feat: Convert all app files to JS

This commit is contained in:
Faruk AYDIN
2024-01-05 17:44:21 +01:00
parent b95478b635
commit 43dba351c3
1030 changed files with 5114 additions and 6436 deletions

View 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,
];

View File

@@ -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,
];

View File

@@ -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: [],
};

View File

@@ -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: [],
};

View File

@@ -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: [],
};

View File

@@ -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: [],
};

View File

@@ -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: [],
};

View File

@@ -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) {

View File

@@ -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: [],
};

View File

@@ -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;

View File

@@ -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: [],
};

View File

@@ -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: [],
};