feat(pipedrive): add create deal action

This commit is contained in:
Rıdvan Akca
2023-09-29 15:56:29 +03:00
committed by Faruk AYDIN
parent aad0b4ddfe
commit c35be241ca
10 changed files with 393 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
export default {
name: 'List users',
key: 'listUsers',
async run($: IGlobalVariable) {
const users: {
data: IJSONObject[];
} = {
data: [],
};
const { data } = await $.http.get(`${$.auth.data.apiDomain}/api/v1/users`);
if (data.data.length) {
for (const user of data.data) {
users.data.push({
value: user.id,
name: user.name,
});
}
}
return users;
},
};