refactor: Integrate consistent-type-imports in FE packages (no-changelog) (#6060)
* 👕 Move `consistent-type-imports` to top level * 👕 Apply lintfixes * 👕 Apply more lintfixes * 👕 More lintfixes * 👕 More lintfixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IRestApiContext } from '@/Interface';
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
|
||||
export function getApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IRestApiContext } from '@/Interface';
|
||||
import { PublicInstalledPackage } from 'n8n-workflow';
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import type { PublicInstalledPackage } from 'n8n-workflow';
|
||||
import { get, post, makeRestApiRequest } from '@/utils';
|
||||
|
||||
export async function getInstalledCommunityNodes(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICredentialsResponse, IRestApiContext, IShareCredentialsPayload } from '@/Interface';
|
||||
import type { ICredentialsResponse, IRestApiContext, IShareCredentialsPayload } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function setCredentialSharedWith(
|
||||
context: IRestApiContext,
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { ICredentialsDecryptedResponse, ICredentialsResponse, IRestApiContext } from '@/Interface';
|
||||
import type {
|
||||
ICredentialsDecryptedResponse,
|
||||
ICredentialsResponse,
|
||||
IRestApiContext,
|
||||
} from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import {
|
||||
import type {
|
||||
ICredentialsDecrypted,
|
||||
ICredentialType,
|
||||
IDataObject,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CurlToJSONResponse, IRestApiContext } from '@/Interface';
|
||||
import type { CurlToJSONResponse, IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
|
||||
export function getCurlToJson(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EnvironmentVariable, IRestApiContext } from '@/Interface';
|
||||
import type { EnvironmentVariable, IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function getVariables(context: IRestApiContext): Promise<EnvironmentVariable[]> {
|
||||
return await makeRestApiRequest(context, 'GET', '/variables');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IRestApiContext } from '@/Interface';
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IDataObject, MessageEventBusDestinationOptions } from 'n8n-workflow';
|
||||
import type { IDataObject, MessageEventBusDestinationOptions } from 'n8n-workflow';
|
||||
|
||||
export async function saveDestinationToDb(
|
||||
context: IRestApiContext,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ILdapConfig, ILdapSyncData, IRestApiContext } from '@/Interface';
|
||||
import type { ILdapConfig, ILdapSyncData, IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export function getLdapConfig(context: IRestApiContext): Promise<ILdapConfig> {
|
||||
return makeRestApiRequest(context, 'GET', '/ldap/config');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
IRestApiContext,
|
||||
IN8nPrompts,
|
||||
IN8nValueSurveyData,
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '../Interface';
|
||||
import { makeRestApiRequest, get, post } from '@/utils';
|
||||
import { N8N_IO_BASE_URL, NPM_COMMUNITY_NODE_SEARCH_API_URL } from '@/constants';
|
||||
import { IN8nUISettings } from 'n8n-workflow';
|
||||
import type { IN8nUISettings } from 'n8n-workflow';
|
||||
|
||||
export function getSettings(context: IRestApiContext): Promise<IN8nUISettings> {
|
||||
return makeRestApiRequest(context, 'GET', '/settings');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import {
|
||||
import type {
|
||||
IRestApiContext,
|
||||
SamlPreferencesLoginEnabled,
|
||||
SamlPreferences,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IRestApiContext, ITag } from '@/Interface';
|
||||
import type { IRestApiContext, ITag } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
|
||||
export async function getTags(context: IRestApiContext, withUsageCount = false): Promise<ITag[]> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
ITemplatesCategory,
|
||||
ITemplatesCollection,
|
||||
ITemplatesQuery,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ITemplatesWorkflowResponse,
|
||||
IWorkflowTemplate,
|
||||
} from '@/Interface';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import { get } from '@/utils';
|
||||
|
||||
function stringifyArray(arr: number[]) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IRestApiContext, UsageState } from '@/Interface';
|
||||
import type { IRestApiContext, UsageState } from '@/Interface';
|
||||
|
||||
export const getLicense = (context: IRestApiContext): Promise<UsageState['data']> => {
|
||||
return makeRestApiRequest(context, 'GET', '/license');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
import type {
|
||||
CurrentUserResponse,
|
||||
IInviteResponse,
|
||||
IPersonalizationLatestVersion,
|
||||
IRestApiContext,
|
||||
IUserResponse,
|
||||
} from '@/Interface';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import { makeRestApiRequest } from '@/utils/apiUtils';
|
||||
|
||||
export function loginCurrentUser(context: IRestApiContext): Promise<CurrentUserResponse | null> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IVersion } from '@/Interface';
|
||||
import type { IVersion } from '@/Interface';
|
||||
import { INSTANCE_ID_HEADER } from '@/constants';
|
||||
import { get } from '@/utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { IOnboardingCallPrompt, IOnboardingCallPromptResponse, IUser } from '@/Interface';
|
||||
import type { IOnboardingCallPrompt, IUser } from '@/Interface';
|
||||
import { IOnboardingCallPromptResponse } from '@/Interface';
|
||||
import { get, post } from '@/utils';
|
||||
|
||||
const N8N_API_BASE_URL = 'https://api.n8n.io/api';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IRestApiContext, IShareWorkflowsPayload, IWorkflowsShareResponse } from '@/Interface';
|
||||
import type { IRestApiContext, IShareWorkflowsPayload, IWorkflowsShareResponse } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function setWorkflowSharedWith(
|
||||
context: IRestApiContext,
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { IExecutionsCurrentSummaryExtended, IRestApiContext } from '@/Interface';
|
||||
import {
|
||||
ExecutionFilters,
|
||||
ExecutionOptions,
|
||||
ExecutionStatus,
|
||||
IDataObject,
|
||||
WorkflowExecuteMode,
|
||||
} from 'n8n-workflow';
|
||||
import type { IExecutionsCurrentSummaryExtended, IRestApiContext } from '@/Interface';
|
||||
import type { ExecutionFilters, ExecutionOptions, IDataObject } from 'n8n-workflow';
|
||||
import { ExecutionStatus, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
|
||||
export async function getNewWorkflow(context: IRestApiContext, name?: string) {
|
||||
|
||||
Reference in New Issue
Block a user