mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
17 lines
556 B
TypeScript
17 lines
556 B
TypeScript
import type { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
|
|
import { cockpitApiRequest } from './GenericFunctions';
|
|
|
|
export async function getSingleton(
|
|
this: IExecuteFunctions | ILoadOptionsFunctions,
|
|
resourceName: string,
|
|
): Promise<any> {
|
|
return await cockpitApiRequest.call(this, 'GET', `/singletons/get/${resourceName}`);
|
|
}
|
|
|
|
export async function getAllSingletonNames(
|
|
this: IExecuteFunctions | ILoadOptionsFunctions,
|
|
): Promise<string[]> {
|
|
return await cockpitApiRequest.call(this, 'GET', '/singletons/listSingletons', {});
|
|
}
|