feat: Convert all app files to JS
This commit is contained in:
23
packages/backend/src/apps/pipedrive/dynamic-data/index.js
Normal file
23
packages/backend/src/apps/pipedrive/dynamic-data/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import listActivityTypes from './list-activity-types/index.js';
|
||||
import listCurrencies from './list-currencies/index.js';
|
||||
import listDeals from './list-deals/index.js';
|
||||
import listLeads from './list-leads/index.js';
|
||||
import listLeadLabels from './list-lead-labels/index.js';
|
||||
import listOrganizations from './list-organizations/index.js';
|
||||
import listOrganizationLabelField from './list-organization-label-field/index.js';
|
||||
import listPersonLabelField from './list-person-label-field/index.js';
|
||||
import listPersons from './list-persons/index.js';
|
||||
import listUsers from './list-users/index.js';
|
||||
|
||||
export default [
|
||||
listActivityTypes,
|
||||
listCurrencies,
|
||||
listDeals,
|
||||
listLeads,
|
||||
listLeadLabels,
|
||||
listOrganizations,
|
||||
listOrganizationLabelField,
|
||||
listPersonLabelField,
|
||||
listPersons,
|
||||
listUsers,
|
||||
];
|
@@ -1,23 +0,0 @@
|
||||
import listActivityTypes from './list-activity-types';
|
||||
import listCurrencies from './list-currencies';
|
||||
import listDeals from './list-deals';
|
||||
import listLeads from './list-leads';
|
||||
import listLeadLabels from './list-lead-labels';
|
||||
import listOrganizations from './list-organizations';
|
||||
import listOrganizationLabelField from './list-organization-label-field';
|
||||
import listPersonLabelField from './list-person-label-field';
|
||||
import listPersons from './list-persons';
|
||||
import listUsers from './list-users';
|
||||
|
||||
export default [
|
||||
listActivityTypes,
|
||||
listCurrencies,
|
||||
listDeals,
|
||||
listLeads,
|
||||
listLeadLabels,
|
||||
listOrganizations,
|
||||
listOrganizationLabelField,
|
||||
listPersonLabelField,
|
||||
listPersons,
|
||||
listUsers,
|
||||
];
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List activity types',
|
||||
key: 'listActivityTypes',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const activityTypes: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const activityTypes = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List currencies',
|
||||
key: 'listCurrencies',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const currencies: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const currencies = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List deals',
|
||||
key: 'listDeals',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const deals: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const deals = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List lead labels',
|
||||
key: 'listLeadLabels',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const leadLabels: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const leadLabels = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List leads',
|
||||
key: 'listLeads',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const leads: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const leads = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List organization label field',
|
||||
key: 'listOrganizationLabelField',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const labelFields: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const labelFields = {
|
||||
data: [],
|
||||
};
|
||||
|
||||
@@ -15,9 +11,7 @@ export default {
|
||||
`${$.auth.data.apiDomain}/api/v1/organizationFields`
|
||||
);
|
||||
|
||||
const labelField = data.data.filter(
|
||||
(field: IJSONObject) => field.key === 'label'
|
||||
);
|
||||
const labelField = data.data.filter((field) => field.key === 'label');
|
||||
const labelOptions = labelField[0].options;
|
||||
|
||||
if (labelOptions?.length) {
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List organizations',
|
||||
key: 'listOrganizations',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const organizations: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const organizations = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List person label field',
|
||||
key: 'listPersonLabelField',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const personFields: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const personFields = {
|
||||
data: [],
|
||||
};
|
||||
|
||||
@@ -24,7 +20,7 @@ export default {
|
||||
params.start = data.additional_data?.pagination?.next_start;
|
||||
|
||||
const labelField = data.data?.filter(
|
||||
(personField: IJSONObject) => personField.key === 'label'
|
||||
(personField) => personField.key === 'label'
|
||||
);
|
||||
const labelOptions = labelField[0].options;
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List persons',
|
||||
key: 'listPersons',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const persons: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const persons = {
|
||||
data: [],
|
||||
};
|
||||
|
@@ -1,13 +1,9 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List users',
|
||||
key: 'listUsers',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const users: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const users = {
|
||||
data: [],
|
||||
};
|
||||
|
Reference in New Issue
Block a user