n8n
Version:
n8n Workflow Automation Tool
51 lines (50 loc) • 1.73 kB
TypeScript
import { Logger } from 'n8n-core';
import type { User } from '../databases/entities/user';
import { WorkflowRepository } from '../databases/repositories/workflow.repository';
import { EventService } from '../events/event.service';
import { License } from '../license';
import { UrlService } from '../services/url.service';
export declare const LicenseErrors: {
SCHEMA_VALIDATION: string;
RESERVATION_EXHAUSTED: string;
RESERVATION_EXPIRED: string;
NOT_FOUND: string;
RESERVATION_CONFLICT: string;
RESERVATION_DUPLICATE: string;
};
export declare class LicenseService {
private readonly logger;
private readonly license;
private readonly workflowRepository;
private readonly urlService;
private readonly eventService;
constructor(logger: Logger, license: License, workflowRepository: WorkflowRepository, urlService: UrlService, eventService: EventService);
getLicenseData(): Promise<{
usage: {
activeWorkflowTriggers: {
value: number;
limit: number;
warningThreshold: number;
};
};
license: {
planId: string;
planName: string;
};
}>;
requestEnterpriseTrial(user: User): Promise<void>;
registerCommunityEdition({ userId, email, instanceId, instanceUrl, licenseType, }: {
userId: User['id'];
email: string;
instanceId: string;
instanceUrl: string;
licenseType: string;
}): Promise<{
title: string;
text: string;
}>;
getManagementJwt(): string;
activateLicense(activationKey: string): Promise<void>;
renewLicense(): Promise<void>;
private mapErrorMessage;
}