mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat(core): Expose data store service to Data Store Node (no-changelog) (#17970)
Co-authored-by: Daria Staferova <daria.staferova@n8n.io>
This commit is contained in:
@@ -13,6 +13,10 @@ import type { SecureContextOptions } from 'tls';
|
||||
import type { URLSearchParams } from 'url';
|
||||
|
||||
import type { CODE_EXECUTION_MODES, CODE_LANGUAGES, LOG_LEVELS } from './constants';
|
||||
import type {
|
||||
IDataStoreProjectAggregateService,
|
||||
IDataStoreProjectService,
|
||||
} from './data-store.types';
|
||||
import type { IDeferredPromise } from './deferred-promise';
|
||||
import type { ExecutionCancelledError } from './errors';
|
||||
import type { ExpressionError } from './errors/expression.error';
|
||||
@@ -916,6 +920,24 @@ type FunctionsBaseWithRequiredKeys<Keys extends keyof FunctionsBase> = Functions
|
||||
|
||||
export type ContextType = 'flow' | 'node';
|
||||
|
||||
export type DataStoreProxyProvider = {
|
||||
getDataStoreAggregateProxy(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
): Promise<IDataStoreProjectAggregateService>;
|
||||
getDataStoreProxy(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
dataStoreId: string,
|
||||
): Promise<IDataStoreProjectService>;
|
||||
};
|
||||
|
||||
export type DataStoreProxyFunctions = {
|
||||
// These are optional to account for situations where the data-store module is disabled
|
||||
getDataStoreAggregateProxy?(): Promise<IDataStoreProjectAggregateService>;
|
||||
getDataStoreProxy?(dataStoreId: string): Promise<IDataStoreProjectService>;
|
||||
};
|
||||
|
||||
type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys<'getMode'> & {
|
||||
continueOnFail(): boolean;
|
||||
setMetadata(metadata: ITaskMetadata): void;
|
||||
@@ -978,7 +1000,8 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
BinaryHelperFunctions &
|
||||
DeduplicationHelperFunctions &
|
||||
FileSystemHelperFunctions &
|
||||
SSHTunnelFunctions & {
|
||||
SSHTunnelFunctions &
|
||||
DataStoreProxyFunctions & {
|
||||
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
||||
constructExecutionMetaData(
|
||||
inputData: INodeExecutionData[],
|
||||
@@ -1062,7 +1085,7 @@ export interface ILoadOptionsFunctions extends FunctionsBase {
|
||||
): NodeParameterValueType | object | undefined;
|
||||
getCurrentNodeParameters(): INodeParameters | undefined;
|
||||
|
||||
helpers: RequestHelperFunctions & SSHTunnelFunctions;
|
||||
helpers: RequestHelperFunctions & SSHTunnelFunctions & DataStoreProxyFunctions;
|
||||
}
|
||||
|
||||
export type FieldValueOption = { name: string; type: FieldType | 'any' };
|
||||
|
||||
Reference in New Issue
Block a user