chore: Use ES modules for backend app
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
import createAppAuthClient from './mutations/create-app-auth-client.ee';
|
||||
import createAppConfig from './mutations/create-app-config.ee';
|
||||
import createConnection from './mutations/create-connection';
|
||||
import createFlow from './mutations/create-flow';
|
||||
import createRole from './mutations/create-role.ee';
|
||||
import createStep from './mutations/create-step';
|
||||
import createUser from './mutations/create-user.ee';
|
||||
import deleteConnection from './mutations/delete-connection';
|
||||
import deleteCurrentUser from './mutations/delete-current-user.ee';
|
||||
import deleteFlow from './mutations/delete-flow';
|
||||
import deleteRole from './mutations/delete-role.ee';
|
||||
import deleteStep from './mutations/delete-step';
|
||||
import deleteUser from './mutations/delete-user.ee';
|
||||
import duplicateFlow from './mutations/duplicate-flow';
|
||||
import executeFlow from './mutations/execute-flow';
|
||||
import forgotPassword from './mutations/forgot-password.ee';
|
||||
import generateAuthUrl from './mutations/generate-auth-url';
|
||||
import login from './mutations/login';
|
||||
import registerUser from './mutations/register-user.ee';
|
||||
import resetConnection from './mutations/reset-connection';
|
||||
import resetPassword from './mutations/reset-password.ee';
|
||||
import updateAppAuthClient from './mutations/update-app-auth-client.ee';
|
||||
import updateAppConfig from './mutations/update-app-config.ee';
|
||||
import updateConfig from './mutations/update-config.ee';
|
||||
import updateConnection from './mutations/update-connection';
|
||||
import updateCurrentUser from './mutations/update-current-user';
|
||||
import updateFlow from './mutations/update-flow';
|
||||
import updateFlowStatus from './mutations/update-flow-status';
|
||||
import updateRole from './mutations/update-role.ee';
|
||||
import updateStep from './mutations/update-step';
|
||||
import updateUser from './mutations/update-user.ee';
|
||||
import upsertSamlAuthProvider from './mutations/upsert-saml-auth-provider.ee';
|
||||
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee';
|
||||
import verifyConnection from './mutations/verify-connection';
|
||||
import createAppAuthClient from './mutations/create-app-auth-client.ee.js';
|
||||
import createAppConfig from './mutations/create-app-config.ee.js';
|
||||
import createConnection from './mutations/create-connection.js';
|
||||
import createFlow from './mutations/create-flow.js';
|
||||
import createRole from './mutations/create-role.ee.js';
|
||||
import createStep from './mutations/create-step.js';
|
||||
import createUser from './mutations/create-user.ee.js';
|
||||
import deleteConnection from './mutations/delete-connection.js';
|
||||
import deleteCurrentUser from './mutations/delete-current-user.ee.js';
|
||||
import deleteFlow from './mutations/delete-flow.js';
|
||||
import deleteRole from './mutations/delete-role.ee.js';
|
||||
import deleteStep from './mutations/delete-step.js';
|
||||
import deleteUser from './mutations/delete-user.ee.js';
|
||||
import duplicateFlow from './mutations/duplicate-flow.js';
|
||||
import executeFlow from './mutations/execute-flow.js';
|
||||
import forgotPassword from './mutations/forgot-password.ee.js';
|
||||
import generateAuthUrl from './mutations/generate-auth-url.js';
|
||||
import login from './mutations/login.js';
|
||||
import registerUser from './mutations/register-user.ee.js';
|
||||
import resetConnection from './mutations/reset-connection.js';
|
||||
import resetPassword from './mutations/reset-password.ee.js';
|
||||
import updateAppAuthClient from './mutations/update-app-auth-client.ee.js';
|
||||
import updateAppConfig from './mutations/update-app-config.ee.js';
|
||||
import updateConfig from './mutations/update-config.ee.js';
|
||||
import updateConnection from './mutations/update-connection.js';
|
||||
import updateCurrentUser from './mutations/update-current-user.js';
|
||||
import updateFlow from './mutations/update-flow.js';
|
||||
import updateFlowStatus from './mutations/update-flow-status.js';
|
||||
import updateRole from './mutations/update-role.ee.js';
|
||||
import updateStep from './mutations/update-step.js';
|
||||
import updateUser from './mutations/update-user.ee.js';
|
||||
import upsertSamlAuthProvider from './mutations/upsert-saml-auth-provider.ee.js';
|
||||
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee.js';
|
||||
import verifyConnection from './mutations/verify-connection.js';
|
||||
|
||||
const mutationResolvers = {
|
||||
createAppAuthClient,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createAppAuthClient = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import AppConfig from '../../models/app-config';
|
||||
import App from '../../models/app.js';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import AppConfig from '../../models/app-config';
|
||||
import App from '../../models/app.js';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const createFlow = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import kebabCase from 'lodash/kebabCase';
|
||||
import Role from '../../models/role';
|
||||
import kebabCase from 'lodash/kebabCase.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const createRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Role');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Flow from '../../models/flow';
|
||||
import App from '../../models/app.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
|
||||
const createStep = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import Role from '../../models/role';
|
||||
import User from '../../models/user.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const createUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'User');
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { Duration } from 'luxon';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee';
|
||||
import flowQueue from '../../queues/flow';
|
||||
import Flow from '../../models/flow';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import appConfig from '../../config/app';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee.js';
|
||||
import flowQueue from '../../queues/flow.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const deleteCurrentUser = async (_parent, params, context) => {
|
||||
const id = context.currentUser.id;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import Flow from '../../models/flow';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import logger from '../../helpers/logger';
|
||||
import Flow from '../../models/flow.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import logger from '../../helpers/logger.js';
|
||||
|
||||
const deleteFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('delete', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Role from '../../models/role';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import Role from '../../models/role.js';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const deleteRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('delete', 'Role');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Duration } from 'luxon';
|
||||
import User from '../../models/user';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee';
|
||||
import User from '../../models/user.js';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee.js';
|
||||
|
||||
const deleteUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('delete', 'User');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import testRun from '../../services/test-run';
|
||||
import Step from '../../models/step';
|
||||
import testRun from '../../services/test-run.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const executeFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import appConfig from '../../config/app';
|
||||
import User from '../../models/user';
|
||||
import emailQueue from '../../queues/email';
|
||||
import appConfig from '../../config/app.js';
|
||||
import User from '../../models/user.js';
|
||||
import emailQueue from '../../queues/email.js';
|
||||
import {
|
||||
REMOVE_AFTER_30_DAYS_OR_150_JOBS,
|
||||
REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
} from '../../helpers/remove-job-configuration';
|
||||
} from '../../helpers/remove-job-configuration.js';
|
||||
|
||||
const forgotPassword = async (_parent, params) => {
|
||||
const { email } = params.input;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import App from '../../models/app.js';
|
||||
|
||||
const generateAuthUrl = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import createAuthTokenByUserId from '../../helpers/create-auth-token-by-user-id';
|
||||
import User from '../../models/user.js';
|
||||
import createAuthTokenByUserId from '../../helpers/create-auth-token-by-user-id.js';
|
||||
|
||||
const login = async (_parent, params) => {
|
||||
const user = await User.query().findOne({
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import Role from '../../models/role';
|
||||
import User from '../../models/user.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const registerUser = async (_parent, params) => {
|
||||
const { fullName, email, password } = params.input;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const resetPassword = async (_parent, params) => {
|
||||
const { token, password } = params.input;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const updateAppAuthClient = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const updateAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Config from '../../models/config';
|
||||
import Config from '../../models/config.js';
|
||||
|
||||
const updateConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'Config');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const updateConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import Flow from '../../models/flow';
|
||||
import flowQueue from '../../queues/flow';
|
||||
import Flow from '../../models/flow.js';
|
||||
import flowQueue from '../../queues/flow.js';
|
||||
import {
|
||||
REMOVE_AFTER_30_DAYS_OR_150_JOBS,
|
||||
REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
} from '../../helpers/remove-job-configuration';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
} from '../../helpers/remove-job-configuration.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const JOB_NAME = 'flow';
|
||||
const EVERY_15_MINUTES_CRON = '*/15 * * * *';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import Role from '../../models/role';
|
||||
import Permission from '../../models/permission';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee';
|
||||
import Role from '../../models/role.js';
|
||||
import Permission from '../../models/permission.js';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee.js';
|
||||
|
||||
const updateRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'Role');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const updateStep = async (_parent, params, context) => {
|
||||
const { isCreator } = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const updateUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'User');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const upsertSamlAuthProvider = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'SamlAuthProvider');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvidersRoleMapping from '../../models/saml-auth-providers-role-mapping.ee';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
import SamlAuthProvidersRoleMapping from '../../models/saml-auth-providers-role-mapping.ee.js';
|
||||
import isEmpty from 'lodash/isEmpty.js';
|
||||
|
||||
const upsertSamlAuthProvidersRoleMappings = async (
|
||||
_parent,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const verifyConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const getAppAuthClient = async (_parent, params, context) => {
|
||||
let canSeeAllClients = false;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const getAppAuthClients = async (_parent, params, context) => {
|
||||
let canSeeAllClients = false;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const getAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const getApp = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Connection');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import App from '../../models/app';
|
||||
import App from '../../models/app.js';
|
||||
|
||||
const getApps = async (_parent, params) => {
|
||||
const apps = await App.findAll(params.name);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import { getLicense } from '../../helpers/license.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import { getLicense } from '../../helpers/license.ee.js';
|
||||
|
||||
const getAutomatischInfo = async () => {
|
||||
const license = await getLicense();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
|
||||
const getBillingAndUsage = async (_parent, _params, context) => {
|
||||
const persistedSubscription = await context.currentUser.$relatedQuery(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { hasValidLicense } from '../../helpers/license.ee';
|
||||
import Config from '../../models/config';
|
||||
import { hasValidLicense } from '../../helpers/license.ee.js';
|
||||
import Config from '../../models/config.js';
|
||||
|
||||
const getConfig = async (_parent, params) => {
|
||||
if (!(await hasValidLicense())) return {};
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Flow from '../../models/flow';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const getConnectedApps = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Connection');
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import computeParameters from '../../helpers/compute-parameters';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import computeParameters from '../../helpers/compute-parameters.js';
|
||||
|
||||
const getDynamicData = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const getDynamicFields = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Execution from '../../models/execution';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
import Execution from '../../models/execution.js';
|
||||
|
||||
const getExecutionSteps = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Execution from '../../models/execution';
|
||||
import Execution from '../../models/execution.js';
|
||||
|
||||
const getExecution = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { raw } from 'objection';
|
||||
import { DateTime } from 'luxon';
|
||||
import Execution from '../../models/execution';
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Execution from '../../models/execution.js';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
|
||||
const getExecutions = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Flow from '../../models/flow';
|
||||
import Flow from '../../models/flow.js';
|
||||
|
||||
const getFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Flow from '../../models/flow';
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Flow from '../../models/flow.js';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
|
||||
const getFlows = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getInvoices = async (_parent, _params, context) => {
|
||||
const subscription = await context.currentUser.$relatedQuery(
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import axios from '../../helpers/axios-with-proxy';
|
||||
import axios from '../../helpers/axios-with-proxy.js';
|
||||
|
||||
const NOTIFICATIONS_URL = 'https://notifications.automatisch.io/notifications.json';
|
||||
const NOTIFICATIONS_URL =
|
||||
'https://notifications.automatisch.io/notifications.json';
|
||||
|
||||
const getNotifications = async () => {
|
||||
try {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getPaddleInfo = async () => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getPaymentPlans = async () => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee.js';
|
||||
|
||||
const getPermissionCatalog = async () => {
|
||||
return permissionCatalog;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Role from '../../models/role';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const getRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'Role');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Role from '../../models/role';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const getRoles = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'Role');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const getSamlAuthProviderRoleMappings = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'SamlAuthProvider');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const getSamlAuthProvider = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'SamlAuthProvider');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { ref } from 'objection';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import Step from '../../models/step';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const getStepWithTestExecutions = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const getSubscriptionStatus = async (_parent, _params, context) => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const getTrialStatus = async (_parent, _params, context) => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const getUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'User');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import paginate from '../../helpers/pagination';
|
||||
import User from '../../models/user';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const getUsers = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'User');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const healthcheck = () => {
|
||||
return {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const listSamlAuthProviders = async () => {
|
||||
const providers = await SamlAuthProvider.query().where({ active: true });
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Connection from '../../models/connection';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const testConnection = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Connection');
|
||||
|
@@ -1,37 +1,37 @@
|
||||
import getApp from './queries/get-app';
|
||||
import getAppAuthClient from './queries/get-app-auth-client.ee';
|
||||
import getAppAuthClients from './queries/get-app-auth-clients.ee';
|
||||
import getAppConfig from './queries/get-app-config.ee';
|
||||
import getApps from './queries/get-apps';
|
||||
import getAutomatischInfo from './queries/get-automatisch-info';
|
||||
import getBillingAndUsage from './queries/get-billing-and-usage.ee';
|
||||
import getConfig from './queries/get-config.ee';
|
||||
import getConnectedApps from './queries/get-connected-apps';
|
||||
import getCurrentUser from './queries/get-current-user';
|
||||
import getDynamicData from './queries/get-dynamic-data';
|
||||
import getDynamicFields from './queries/get-dynamic-fields';
|
||||
import getExecution from './queries/get-execution';
|
||||
import getExecutionSteps from './queries/get-execution-steps';
|
||||
import getExecutions from './queries/get-executions';
|
||||
import getFlow from './queries/get-flow';
|
||||
import getFlows from './queries/get-flows';
|
||||
import getInvoices from './queries/get-invoices.ee';
|
||||
import getNotifications from './queries/get-notifications';
|
||||
import getPaddleInfo from './queries/get-paddle-info.ee';
|
||||
import getPaymentPlans from './queries/get-payment-plans.ee';
|
||||
import getPermissionCatalog from './queries/get-permission-catalog.ee';
|
||||
import getRole from './queries/get-role.ee';
|
||||
import getRoles from './queries/get-roles.ee';
|
||||
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee';
|
||||
import getSamlAuthProvider from './queries/get-saml-auth-provider.ee';
|
||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions';
|
||||
import getSubscriptionStatus from './queries/get-subscription-status.ee';
|
||||
import getTrialStatus from './queries/get-trial-status.ee';
|
||||
import getUser from './queries/get-user';
|
||||
import getUsers from './queries/get-users';
|
||||
import healthcheck from './queries/healthcheck';
|
||||
import listSamlAuthProviders from './queries/list-saml-auth-providers.ee';
|
||||
import testConnection from './queries/test-connection';
|
||||
import getApp from './queries/get-app.js';
|
||||
import getAppAuthClient from './queries/get-app-auth-client.ee.js';
|
||||
import getAppAuthClients from './queries/get-app-auth-clients.ee.js';
|
||||
import getAppConfig from './queries/get-app-config.ee.js';
|
||||
import getApps from './queries/get-apps.js';
|
||||
import getAutomatischInfo from './queries/get-automatisch-info.js';
|
||||
import getBillingAndUsage from './queries/get-billing-and-usage.ee.js';
|
||||
import getConfig from './queries/get-config.ee.js';
|
||||
import getConnectedApps from './queries/get-connected-apps.js';
|
||||
import getCurrentUser from './queries/get-current-user.js';
|
||||
import getDynamicData from './queries/get-dynamic-data.js';
|
||||
import getDynamicFields from './queries/get-dynamic-fields.js';
|
||||
import getExecution from './queries/get-execution.js';
|
||||
import getExecutionSteps from './queries/get-execution-steps.js';
|
||||
import getExecutions from './queries/get-executions.js';
|
||||
import getFlow from './queries/get-flow.js';
|
||||
import getFlows from './queries/get-flows.js';
|
||||
import getInvoices from './queries/get-invoices.ee.js';
|
||||
import getNotifications from './queries/get-notifications.js';
|
||||
import getPaddleInfo from './queries/get-paddle-info.ee.js';
|
||||
import getPaymentPlans from './queries/get-payment-plans.ee.js';
|
||||
import getPermissionCatalog from './queries/get-permission-catalog.ee.js';
|
||||
import getRole from './queries/get-role.ee.js';
|
||||
import getRoles from './queries/get-roles.ee.js';
|
||||
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee.js';
|
||||
import getSamlAuthProvider from './queries/get-saml-auth-provider.ee.js';
|
||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions.js';
|
||||
import getSubscriptionStatus from './queries/get-subscription-status.ee.js';
|
||||
import getTrialStatus from './queries/get-trial-status.ee.js';
|
||||
import getUser from './queries/get-user.js';
|
||||
import getUsers from './queries/get-users.js';
|
||||
import healthcheck from './queries/healthcheck.js';
|
||||
import listSamlAuthProviders from './queries/list-saml-auth-providers.ee.js';
|
||||
import testConnection from './queries/test-connection.js';
|
||||
|
||||
const queryResolvers = {
|
||||
getApp,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import mutationResolvers from './mutation-resolvers';
|
||||
import queryResolvers from './query-resolvers';
|
||||
import mutationResolvers from './mutation-resolvers.js';
|
||||
import queryResolvers from './query-resolvers.js';
|
||||
|
||||
const resolvers = {
|
||||
Query: queryResolvers,
|
||||
|
Reference in New Issue
Block a user