@in.pulse-crm/sdk 2.3.92 → 2.4.0
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/.prettierrc +4 -4
- package/dist/files.client.d.ts +2 -0
- package/dist/types/files.types.d.ts +2 -0
- package/dist/users.client.d.ts +1 -1
- package/dist/users.client.js +2 -2
- package/dist/whatsapp.client.js +2 -1
- package/package.json +2 -1
- package/src/users.client.ts +2 -3
- package/src/whatsapp.client.ts +1 -0
- package/tsconfig.json +16 -16
package/.prettierrc
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tabWidth": 4,
|
|
3
|
-
"useTabs": true
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"tabWidth": 4,
|
|
3
|
+
"useTabs": true
|
|
4
|
+
}
|
package/dist/files.client.d.ts
CHANGED
package/dist/users.client.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default class UsersClient extends ApiClient {
|
|
|
10
10
|
* @param filters - Filtros opcionais para a query.
|
|
11
11
|
* @returns Uma resposta paginada contendo os usuários.
|
|
12
12
|
*/
|
|
13
|
-
getUsers(filters?: RequestFilters<User>): Promise<
|
|
13
|
+
getUsers(filters?: RequestFilters<User>): Promise<any>;
|
|
14
14
|
/**
|
|
15
15
|
* Obtém um usuário pelo ID.
|
|
16
16
|
* @param userId - O ID do usuário.
|
package/dist/users.client.js
CHANGED
|
@@ -19,8 +19,8 @@ class UsersClient extends api_client_1.default {
|
|
|
19
19
|
if (params.toString()) {
|
|
20
20
|
baseUrl += `?${params.toString()}`;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
return
|
|
22
|
+
const response = await this.httpClient.get(baseUrl);
|
|
23
|
+
return response.data;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Obtém um usuário pelo ID.
|
package/dist/whatsapp.client.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const api_client_1 = __importDefault(require("./api-client"));
|
|
7
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
7
8
|
class WhatsappClient extends api_client_1.default {
|
|
8
9
|
async getChatsBySession(token, messages = false, contact = false) {
|
|
9
10
|
const url = `/api/whatsapp/session/chats?messages=${messages}&contact=${contact}`;
|
|
@@ -34,7 +35,7 @@ class WhatsappClient extends api_client_1.default {
|
|
|
34
35
|
}
|
|
35
36
|
async sendMessage(to, data) {
|
|
36
37
|
const url = "/api/whatsapp/messages";
|
|
37
|
-
const formData = new
|
|
38
|
+
const formData = new form_data_1.default();
|
|
38
39
|
formData.append("to", to);
|
|
39
40
|
data.text && formData.append("text", data.text);
|
|
40
41
|
data.file && formData.append("file", data.file);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@in.pulse-crm/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "SDKs for abstraction of api consumption of in.pulse-crm application",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@in.pulse-crm/utils": "^1.3.0",
|
|
27
27
|
"axios": "^1.8.3",
|
|
28
|
+
"form-data": "^4.0.2",
|
|
28
29
|
"socket.io-client": "^4.8.1",
|
|
29
30
|
"tsc": "^2.0.4"
|
|
30
31
|
},
|
package/src/users.client.ts
CHANGED
|
@@ -20,10 +20,9 @@ export default class UsersClient extends ApiClient {
|
|
|
20
20
|
baseUrl += `?${params.toString()}`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
await this.httpClient.get<PaginatedResponse<User>>(baseUrl);
|
|
23
|
+
const response = await this.httpClient.get(baseUrl);
|
|
25
24
|
|
|
26
|
-
return
|
|
25
|
+
return response.data;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/**
|
package/src/whatsapp.client.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
4
|
-
"module": "commonjs" /* Specify what module code is generated. */,
|
|
5
|
-
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
|
6
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
7
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
8
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
|
|
9
|
-
"noUnusedLocals": false,
|
|
10
|
-
"outDir": "./dist", /* Redirect output structure to the directory. */
|
|
11
|
-
"declaration": true
|
|
12
|
-
},
|
|
13
|
-
"include": [
|
|
14
|
-
"src/index.ts",
|
|
15
|
-
"src/**/*.{ts}"
|
|
16
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
4
|
+
"module": "commonjs" /* Specify what module code is generated. */,
|
|
5
|
+
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
|
6
|
+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
7
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
8
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
|
|
9
|
+
"noUnusedLocals": false,
|
|
10
|
+
"outDir": "./dist", /* Redirect output structure to the directory. */
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": [
|
|
14
|
+
"src/index.ts",
|
|
15
|
+
"src/**/*.{ts}"
|
|
16
|
+
]
|
|
17
17
|
}
|