mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(editor): Move externalSecrets.ee API to @n8n/rest-api-client package (#19404)
This commit is contained in:
committed by
GitHub
parent
c4d26982e3
commit
47d9936fd4
@@ -61,3 +61,11 @@ export type {
|
|||||||
DataTableFilter,
|
DataTableFilter,
|
||||||
DataTableFilterConditionType,
|
DataTableFilterConditionType,
|
||||||
} from './schemas/data-table-filter.schema';
|
} from './schemas/data-table-filter.schema';
|
||||||
|
|
||||||
|
export type {
|
||||||
|
ExternalSecretsProvider,
|
||||||
|
ExternalSecretsProviderSecret,
|
||||||
|
ExternalSecretsProviderData,
|
||||||
|
ExternalSecretsProviderProperty,
|
||||||
|
ExternalSecretsProviderState,
|
||||||
|
} from './schemas/external-secrets.schema';
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import type { NodeParameterValueType, INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
|
export interface ExternalSecretsProviderSecret {
|
||||||
|
key: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ExternalSecretsProviderData = Record<string, NodeParameterValueType>;
|
||||||
|
|
||||||
|
export type ExternalSecretsProviderProperty = INodeProperties;
|
||||||
|
|
||||||
|
export type ExternalSecretsProviderState = 'connected' | 'tested' | 'initializing' | 'error';
|
||||||
|
|
||||||
|
export interface ExternalSecretsProvider {
|
||||||
|
icon: string;
|
||||||
|
name: string;
|
||||||
|
displayName: string;
|
||||||
|
connected: boolean;
|
||||||
|
connectedAt: string | false;
|
||||||
|
state: ExternalSecretsProviderState;
|
||||||
|
data?: ExternalSecretsProviderData;
|
||||||
|
properties?: ExternalSecretsProviderProperty[];
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { ExternalSecretsProvider } from '@/Interface';
|
import type { ExternalSecretsProvider } from '@n8n/api-types';
|
||||||
import type { IRestApiContext } from '@n8n/rest-api-client';
|
|
||||||
import { makeRestApiRequest } from '@n8n/rest-api-client';
|
import type { IRestApiContext } from '../types';
|
||||||
|
import { makeRestApiRequest } from '../utils';
|
||||||
|
|
||||||
export const getExternalSecrets = async (
|
export const getExternalSecrets = async (
|
||||||
context: IRestApiContext,
|
context: IRestApiContext,
|
||||||
@@ -4,6 +4,7 @@ export * from './communityNodes';
|
|||||||
export * from './ctas';
|
export * from './ctas';
|
||||||
export * from './eventbus.ee';
|
export * from './eventbus.ee';
|
||||||
export * from './events';
|
export * from './events';
|
||||||
|
export * from './externalSecrets.ee';
|
||||||
export * from './ldap';
|
export * from './ldap';
|
||||||
export * from './mfa';
|
export * from './mfa';
|
||||||
export * from './nodeTypes';
|
export * from './nodeTypes';
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import { defineStore } from 'pinia';
|
|||||||
import { EnterpriseEditionFeature } from '@/constants';
|
import { EnterpriseEditionFeature } from '@/constants';
|
||||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||||
import { useSettingsStore } from '@/stores/settings.store';
|
import { useSettingsStore } from '@/stores/settings.store';
|
||||||
import * as externalSecretsApi from '@/api/externalSecrets.ee';
|
import * as externalSecretsApi from '@n8n/rest-api-client';
|
||||||
import { connectProvider } from '@/api/externalSecrets.ee';
|
import { connectProvider } from '@n8n/rest-api-client';
|
||||||
import { useRBACStore } from '@/stores/rbac.store';
|
import { useRBACStore } from '@/stores/rbac.store';
|
||||||
import type { ExternalSecretsProvider } from '@/Interface';
|
import type { ExternalSecretsProvider } from '@n8n/api-types';
|
||||||
|
|
||||||
export const useExternalSecretsStore = defineStore('externalSecrets', () => {
|
export const useExternalSecretsStore = defineStore('externalSecrets', () => {
|
||||||
const rootStore = useRootStore();
|
const rootStore = useRootStore();
|
||||||
|
|||||||
Reference in New Issue
Block a user