refactor: Use internal namespace for the existing API

This commit is contained in:
Faruk AYDIN
2025-04-17 19:47:03 +02:00
parent 53f0d80c80
commit cddfbad68a
354 changed files with 2275 additions and 2195 deletions

View File

@@ -1,11 +0,0 @@
import { Router } from 'express';
import createAccessTokenAction from '../../../controllers/api/v1/access-tokens/create-access-token.js';
import revokeAccessTokenAction from '../../../controllers/api/v1/access-tokens/revoke-access-token.js';
import { authenticateUser } from '../../../helpers/authentication.js';
const router = Router();
router.post('/', createAccessTokenAction);
router.delete('/:token', authenticateUser, revokeAccessTokenAction);
export default router;

View File

@@ -1,35 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createApiTokenAction from '../../../../controllers/api/v1/admin/api-tokens/create-api-token.ee.js';
import getApiTokensAction from '../../../../controllers/api/v1/admin/api-tokens/get-api-tokens.ee.js';
import deleteApiTokenAction from '../../../../controllers/api/v1/admin/api-tokens/delete-api-token.ee.js';
const router = Router();
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createApiTokenAction
);
router.get(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getApiTokensAction
);
router.delete(
'/:id',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
deleteApiTokenAction
);
export default router;

View File

@@ -1,62 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createConfigAction from '../../../../controllers/api/v1/admin/apps/create-config.ee.js';
import updateConfigAction from '../../../../controllers/api/v1/admin/apps/update-config.ee.js';
import getOAuthClientsAction from '../../../../controllers/api/v1/admin/apps/get-oauth-clients.ee.js';
import getOAuthClientAction from '../../../../controllers/api/v1/admin/apps/get-oauth-client.ee.js';
import createOAuthClientAction from '../../../../controllers/api/v1/admin/apps/create-oauth-client.ee.js';
import updateOAuthClientAction from '../../../../controllers/api/v1/admin/apps/update-oauth-client.ee.js';
const router = Router();
router.post(
'/:appKey/config',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createConfigAction
);
router.patch(
'/:appKey/config',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateConfigAction
);
router.get(
'/:appKey/oauth-clients',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getOAuthClientsAction
);
router.post(
'/:appKey/oauth-clients',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createOAuthClientAction
);
router.get(
'/:appKey/oauth-clients/:oauthClientId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getOAuthClientAction
);
router.patch(
'/:appKey/oauth-clients/:oauthClientId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateOAuthClientAction
);
export default router;

View File

@@ -1,17 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import updateConfigAction from '../../../../controllers/api/v1/admin/config/update.ee.js';
const router = Router();
router.patch(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateConfigAction
);
export default router;

View File

@@ -1,17 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import getPermissionsCatalogAction from '../../../../controllers/api/v1/admin/permissions/get-permissions-catalog.ee.js';
const router = Router();
router.get(
'/catalog',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getPermissionsCatalogAction
);
export default router;

View File

@@ -1,53 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createRoleAction from '../../../../controllers/api/v1/admin/roles/create-role.ee.js';
import getRolesAction from '../../../../controllers/api/v1/admin/roles/get-roles.ee.js';
import getRoleAction from '../../../../controllers/api/v1/admin/roles/get-role.ee.js';
import updateRoleAction from '../../../../controllers/api/v1/admin/roles/update-role.ee.js';
import deleteRoleAction from '../../../../controllers/api/v1/admin/roles/delete-role.ee.js';
const router = Router();
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createRoleAction
);
router.get(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getRolesAction
);
router.get(
'/:roleId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getRoleAction
);
router.patch(
'/:roleId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateRoleAction
);
router.delete(
'/:roleId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
deleteRoleAction
);
export default router;

View File

@@ -1,62 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/create-saml-auth-provider.ee.js';
import updateSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/update-saml-auth-provider.ee.js';
import getSamlAuthProvidersAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-saml-auth-providers.ee.js';
import getSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-saml-auth-provider.ee.js';
import getRoleMappingsAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-role-mappings.ee.js';
import updateRoleMappingsAction from '../../../../controllers/api/v1/admin/saml-auth-providers/update-role-mappings.ee.js';
const router = Router();
router.get(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getSamlAuthProvidersAction
);
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createSamlAuthProviderAction
);
router.get(
'/:samlAuthProviderId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getSamlAuthProviderAction
);
router.get(
'/:samlAuthProviderId/role-mappings',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getRoleMappingsAction
);
router.patch(
'/:samlAuthProviderId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateSamlAuthProviderAction
);
router.patch(
'/:samlAuthProviderId/role-mappings',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateRoleMappingsAction
);
export default router;

View File

@@ -1,54 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createTemplateAction from '../../../../controllers/api/v1/admin/templates/create-template.ee.js';
import getTemplatesAction from '../../../../controllers/api/v1/admin/templates/get-templates.ee.js';
import getTemplateAction from '../../../../controllers/api/v1/admin/templates/get-template.ee.js';
import updateTemplateAction from '../../../../controllers/api/v1/admin/templates/update-template.ee.js';
import deleteTemplateAction from '../../../../controllers/api/v1/admin/templates/delete-template.ee.js';
const router = Router();
router.get(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getTemplatesAction
);
router.get(
'/:templateId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getTemplateAction
);
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createTemplateAction
);
router.patch(
'/:templateId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateTemplateAction
);
router.delete(
'/:templateId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
deleteTemplateAction
);
export default router;

View File

@@ -1,18 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import getUsersAction from '../../../../controllers/api/v1/admin/users/get-users.ee.js';
import createUserAction from '../../../../controllers/api/v1/admin/users/create-user.js';
import getUserAction from '../../../../controllers/api/v1/admin/users/get-user.ee.js';
import updateUserAction from '../../../../controllers/api/v1/admin/users/update-user.ee.js';
import deleteUserAction from '../../../../controllers/api/v1/admin/users/delete-user.js';
const router = Router();
router.get('/', authenticateUser, authorizeAdmin, getUsersAction);
router.post('/', authenticateUser, authorizeAdmin, createUserAction);
router.get('/:userId', authenticateUser, authorizeAdmin, getUserAction);
router.patch('/:userId', authenticateUser, authorizeAdmin, updateUserAction);
router.delete('/:userId', authenticateUser, authorizeAdmin, deleteUserAction);
export default router;

View File

@@ -1,78 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../helpers/check-is-enterprise.js';
import getAppAction from '../../../controllers/api/v1/apps/get-app.js';
import getAppsAction from '../../../controllers/api/v1/apps/get-apps.js';
import getAuthAction from '../../../controllers/api/v1/apps/get-auth.js';
import getConnectionsAction from '../../../controllers/api/v1/apps/get-connections.js';
import getConfigAction from '../../../controllers/api/v1/apps/get-config.ee.js';
import getOAuthClientsAction from '../../../controllers/api/v1/apps/get-oauth-clients.ee.js';
import getOAuthClientAction from '../../../controllers/api/v1/apps/get-oauth-client.ee.js';
import getTriggersAction from '../../../controllers/api/v1/apps/get-triggers.js';
import getTriggerSubstepsAction from '../../../controllers/api/v1/apps/get-trigger-substeps.js';
import getActionsAction from '../../../controllers/api/v1/apps/get-actions.js';
import getActionSubstepsAction from '../../../controllers/api/v1/apps/get-action-substeps.js';
import getFlowsAction from '../../../controllers/api/v1/apps/get-flows.js';
import createConnectionAction from '../../../controllers/api/v1/apps/create-connection.js';
const router = Router();
router.get('/', authenticateUser, getAppsAction);
router.get('/:appKey', authenticateUser, getAppAction);
router.get('/:appKey/auth', authenticateUser, getAuthAction);
router.get(
'/:appKey/connections',
authenticateUser,
authorizeUser,
getConnectionsAction
);
router.post(
'/:appKey/connections',
authenticateUser,
authorizeUser,
createConnectionAction
);
router.get(
'/:appKey/config',
authenticateUser,
checkIsEnterprise,
getConfigAction
);
router.get(
'/:appKey/oauth-clients',
authenticateUser,
checkIsEnterprise,
getOAuthClientsAction
);
router.get(
'/:appKey/oauth-clients/:oauthClientId',
authenticateUser,
checkIsEnterprise,
getOAuthClientAction
);
router.get('/:appKey/triggers', authenticateUser, getTriggersAction);
router.get(
'/:appKey/triggers/:triggerKey/substeps',
authenticateUser,
getTriggerSubstepsAction
);
router.get('/:appKey/actions', authenticateUser, getActionsAction);
router.get(
'/:appKey/actions/:actionKey/substeps',
authenticateUser,
getActionSubstepsAction
);
router.get('/:appKey/flows', authenticateUser, authorizeUser, getFlowsAction);
export default router;

View File

@@ -1,17 +0,0 @@
import { Router } from 'express';
import { checkIsEnterprise } from '../../../helpers/check-is-enterprise.js';
import versionAction from '../../../controllers/api/v1/automatisch/version.js';
import notificationsAction from '../../../controllers/api/v1/automatisch/notifications.js';
import infoAction from '../../../controllers/api/v1/automatisch/info.js';
import licenseAction from '../../../controllers/api/v1/automatisch/license.js';
import configAction from '../../../controllers/api/v1/automatisch/config.ee.js';
const router = Router();
router.get('/version', versionAction);
router.get('/notifications', notificationsAction);
router.get('/info', infoAction);
router.get('/license', licenseAction);
router.get('/config', checkIsEnterprise, configAction);
export default router;

View File

@@ -1,63 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getFlowsAction from '../../../controllers/api/v1/connections/get-flows.js';
import testConnectionAction from '../../../controllers/api/v1/connections/test-connection.js';
import verifyConnectionAction from '../../../controllers/api/v1/connections/verify-connection.js';
import deleteConnectionAction from '../../../controllers/api/v1/connections/delete-connection.js';
import updateConnectionAction from '../../../controllers/api/v1/connections/update-connection.js';
import generateAuthUrlAction from '../../../controllers/api/v1/connections/generate-auth-url.js';
import resetConnectionAction from '../../../controllers/api/v1/connections/reset-connection.js';
const router = Router();
router.delete(
'/:connectionId',
authenticateUser,
authorizeUser,
deleteConnectionAction
);
router.patch(
'/:connectionId',
authenticateUser,
authorizeUser,
updateConnectionAction
);
router.get(
'/:connectionId/flows',
authenticateUser,
authorizeUser,
getFlowsAction
);
router.post(
'/:connectionId/test',
authenticateUser,
authorizeUser,
testConnectionAction
);
router.post(
'/:connectionId/reset',
authenticateUser,
authorizeUser,
resetConnectionAction
);
router.post(
'/:connectionId/auth-url',
authenticateUser,
authorizeUser,
generateAuthUrlAction
);
router.post(
'/:connectionId/verify',
authenticateUser,
authorizeUser,
verifyConnectionAction
);
export default router;

View File

@@ -1,26 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getExecutionsAction from '../../../controllers/api/v1/executions/get-executions.js';
import getExecutionAction from '../../../controllers/api/v1/executions/get-execution.js';
import getExecutionStepsAction from '../../../controllers/api/v1/executions/get-execution-steps.js';
const router = Router();
router.get('/', authenticateUser, authorizeUser, getExecutionsAction);
router.get(
'/:executionId',
authenticateUser,
authorizeUser,
getExecutionAction
);
router.get(
'/:executionId/execution-steps',
authenticateUser,
authorizeUser,
getExecutionStepsAction
);
export default router;

View File

@@ -1,64 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getFlowsAction from '../../../controllers/api/v1/flows/get-flows.js';
import getFlowAction from '../../../controllers/api/v1/flows/get-flow.js';
import getFolderAction from '../../../controllers/api/v1/flows/get-folder.js';
import updateFlowAction from '../../../controllers/api/v1/flows/update-flow.js';
import updateFlowStatusAction from '../../../controllers/api/v1/flows/update-flow-status.js';
import updateFlowFolderAction from '../../../controllers/api/v1/flows/update-flow-folder.js';
import createFlowAction from '../../../controllers/api/v1/flows/create-flow.js';
import createStepAction from '../../../controllers/api/v1/flows/create-step.js';
import deleteFlowAction from '../../../controllers/api/v1/flows/delete-flow.js';
import duplicateFlowAction from '../../../controllers/api/v1/flows/duplicate-flow.js';
import exportFlowAction from '../../../controllers/api/v1/flows/export-flow.js';
import importFlowAction from '../../../controllers/api/v1/flows/import-flow.js';
const router = Router();
router.get('/', authenticateUser, authorizeUser, getFlowsAction);
router.get('/:flowId', authenticateUser, authorizeUser, getFlowAction);
router.get('/:flowId/folder', authenticateUser, authorizeUser, getFolderAction);
router.post('/', authenticateUser, authorizeUser, createFlowAction);
router.patch('/:flowId', authenticateUser, authorizeUser, updateFlowAction);
router.patch(
'/:flowId/status',
authenticateUser,
authorizeUser,
updateFlowStatusAction
);
router.patch(
'/:flowId/folder',
authenticateUser,
authorizeUser,
updateFlowFolderAction
);
router.post(
'/:flowId/export',
authenticateUser,
authorizeUser,
exportFlowAction
);
router.post('/import', authenticateUser, authorizeUser, importFlowAction);
router.post(
'/:flowId/steps',
authenticateUser,
authorizeUser,
createStepAction
);
router.post(
'/:flowId/duplicate',
authenticateUser,
authorizeUser,
duplicateFlowAction
);
router.delete('/:flowId', authenticateUser, authorizeUser, deleteFlowAction);
export default router;

View File

@@ -1,22 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getFoldersAction from '../../../controllers/api/v1/folders/get-folders.js';
import createFolderAction from '../../../controllers/api/v1/folders/create-folder.js';
import updateFolderAction from '../../../controllers/api/v1/folders/update-folder.js';
import deleteFolderAction from '../../../controllers/api/v1/folders/delete-folder.js';
const router = Router();
router.get('/', authenticateUser, authorizeUser, getFoldersAction);
router.post('/', authenticateUser, authorizeUser, createFolderAction);
router.patch('/:folderId', authenticateUser, authorizeUser, updateFolderAction);
router.delete(
'/:folderId',
authenticateUser,
authorizeUser,
deleteFolderAction
);
export default router;

View File

@@ -1,9 +0,0 @@
import { Router } from 'express';
import { allowInstallation } from '../../../../helpers/allow-installation.js';
import createUserAction from '../../../../controllers/api/v1/installation/users/create-user.js';
const router = Router();
router.post('/', allowInstallation, createUserAction);
export default router;

View File

@@ -1,12 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import checkIsCloud from '../../../helpers/check-is-cloud.js';
import getPlansAction from '../../../controllers/api/v1/payment/get-plans.ee.js';
import getPaddleInfoAction from '../../../controllers/api/v1/payment/get-paddle-info.ee.js';
const router = Router();
router.get('/plans', authenticateUser, checkIsCloud, getPlansAction);
router.get('/paddle-info', authenticateUser, checkIsCloud, getPaddleInfoAction);
export default router;

View File

@@ -1,9 +0,0 @@
import { Router } from 'express';
import { checkIsEnterprise } from '../../../helpers/check-is-enterprise.js';
import getSamlAuthProvidersAction from '../../../controllers/api/v1/saml-auth-providers/get-saml-auth-providers.ee.js';
const router = Router();
router.get('/', checkIsEnterprise, getSamlAuthProvidersAction);
export default router;

View File

@@ -1,47 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getConnectionAction from '../../../controllers/api/v1/steps/get-connection.js';
import testStepAction from '../../../controllers/api/v1/steps/test-step.js';
import getPreviousStepsAction from '../../../controllers/api/v1/steps/get-previous-steps.js';
import createDynamicFieldsAction from '../../../controllers/api/v1/steps/create-dynamic-fields.js';
import createDynamicDataAction from '../../../controllers/api/v1/steps/create-dynamic-data.js';
import deleteStepAction from '../../../controllers/api/v1/steps/delete-step.js';
import updateStepAction from '../../../controllers/api/v1/steps/update-step.js';
const router = Router();
router.get(
'/:stepId/connection',
authenticateUser,
authorizeUser,
getConnectionAction
);
router.post('/:stepId/test', authenticateUser, authorizeUser, testStepAction);
router.get(
'/:stepId/previous-steps',
authenticateUser,
authorizeUser,
getPreviousStepsAction
);
router.post(
'/:stepId/dynamic-fields',
authenticateUser,
authorizeUser,
createDynamicFieldsAction
);
router.post(
'/:stepId/dynamic-data',
authenticateUser,
authorizeUser,
createDynamicDataAction
);
router.patch('/:stepId', authenticateUser, authorizeUser, updateStepAction);
router.delete('/:stepId', authenticateUser, authorizeUser, deleteStepAction);
export default router;

View File

@@ -1,20 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../helpers/check-is-enterprise.js';
import { checkTemplatesEnabled } from '../../../helpers/check-templates-enabled.js';
import getTemplatesAction from '../../../controllers/api/v1/templates/get-templates.ee.js';
const router = Router();
router.get(
'/',
authenticateUser,
authorizeUser,
checkIsEnterprise,
checkTemplatesEnabled,
getTemplatesAction
);
export default router;

View File

@@ -1,60 +0,0 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import checkIsCloud from '../../../helpers/check-is-cloud.js';
import getCurrentUserAction from '../../../controllers/api/v1/users/get-current-user.js';
import updateCurrentUserAction from '../../../controllers/api/v1/users/update-current-user.js';
import updateCurrentUserPasswordAction from '../../../controllers/api/v1/users/update-current-user-password.js';
import deleteCurrentUserAction from '../../../controllers/api/v1/users/delete-current-user.js';
import getUserTrialAction from '../../../controllers/api/v1/users/get-user-trial.ee.js';
import getAppsAction from '../../../controllers/api/v1/users/get-apps.js';
import getInvoicesAction from '../../../controllers/api/v1/users/get-invoices.ee.js';
import getSubscriptionAction from '../../../controllers/api/v1/users/get-subscription.ee.js';
import getPlanAndUsageAction from '../../../controllers/api/v1/users/get-plan-and-usage.ee.js';
import acceptInvitationAction from '../../../controllers/api/v1/users/accept-invitation.js';
import forgotPasswordAction from '../../../controllers/api/v1/users/forgot-password.js';
import resetPasswordAction from '../../../controllers/api/v1/users/reset-password.js';
import registerUserAction from '../../../controllers/api/v1/users/register-user.ee.js';
const router = Router();
router.get('/me', authenticateUser, getCurrentUserAction);
router.patch('/:userId', authenticateUser, updateCurrentUserAction);
router.patch(
'/:userId/password',
authenticateUser,
updateCurrentUserPasswordAction
);
router.get('/:userId/apps', authenticateUser, authorizeUser, getAppsAction);
router.get('/invoices', authenticateUser, checkIsCloud, getInvoicesAction);
router.delete('/:userId', authenticateUser, deleteCurrentUserAction);
router.get(
'/:userId/trial',
authenticateUser,
checkIsCloud,
getUserTrialAction
);
router.get(
'/:userId/subscription',
authenticateUser,
checkIsCloud,
getSubscriptionAction
);
router.get(
'/:userId/plan-and-usage',
authenticateUser,
checkIsCloud,
getPlanAndUsageAction
);
router.post('/invitation', acceptInvitationAction);
router.post('/forgot-password', forgotPasswordAction);
router.post('/reset-password', resetPasswordAction);
router.post('/register', checkIsCloud, registerUserAction);
export default router;