2023-10-30 12:17:27 +00:00
|
|
|
|
import { errors } from '@strapi/utils';
|
2023-11-21 11:40:51 +00:00
|
|
|
|
import type { File } from 'formidable';
|
2023-10-30 12:17:27 +00:00
|
|
|
|
|
2023-11-21 11:40:51 +00:00
|
|
|
|
export interface Logo {
|
2023-11-16 16:38:15 +01:00
|
|
|
|
name: string;
|
|
|
|
|
url: string;
|
|
|
|
|
width: number;
|
|
|
|
|
height: number;
|
|
|
|
|
ext: string;
|
|
|
|
|
size: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /init - Initialize the admin panel
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace Init {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
export interface Response {
|
|
|
|
|
data: {
|
|
|
|
|
uuid: string | false;
|
|
|
|
|
hasAdmin: boolean;
|
2023-11-21 11:40:51 +00:00
|
|
|
|
menuLogo: string | null;
|
|
|
|
|
authLogo: string | null;
|
2023-11-16 16:38:15 +01:00
|
|
|
|
};
|
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /project-settings - Get the project settings
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace GetProjectSettings {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Response {
|
2023-11-21 11:40:51 +00:00
|
|
|
|
menuLogo: Logo;
|
|
|
|
|
authLogo: Logo;
|
2023-11-16 16:38:15 +01:00
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /project-settings - Update the project settings
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace UpdateProjectSettings {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {
|
2023-11-21 11:40:51 +00:00
|
|
|
|
menuLogo: Logo | null;
|
|
|
|
|
authLogo: Logo | null;
|
2023-11-16 16:38:15 +01:00
|
|
|
|
};
|
|
|
|
|
query: {};
|
2023-11-21 11:40:51 +00:00
|
|
|
|
files: {
|
|
|
|
|
menuLogo?: File | null;
|
|
|
|
|
authLogo?: File | null;
|
|
|
|
|
};
|
2023-11-16 16:38:15 +01:00
|
|
|
|
}
|
|
|
|
|
export interface Response {
|
2023-11-21 11:40:51 +00:00
|
|
|
|
menuLogo: Partial<Logo>;
|
|
|
|
|
authLogo: Partial<Logo>;
|
2023-11-16 16:38:15 +01:00
|
|
|
|
error?: errors.ApplicationError | errors.YupValidationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-30 12:17:27 +00:00
|
|
|
|
/**
|
|
|
|
|
* /information - get project information
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace Information {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
export interface Response {
|
|
|
|
|
data: {
|
|
|
|
|
currentEnvironment: string;
|
|
|
|
|
autoReload: boolean;
|
|
|
|
|
strapiVersion: string | null;
|
|
|
|
|
dependencies: Record<string, string>;
|
|
|
|
|
projectId: string | null;
|
|
|
|
|
nodeVersion: string;
|
|
|
|
|
communityEdition: boolean;
|
|
|
|
|
useYarn: boolean;
|
|
|
|
|
};
|
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-11-16 16:38:15 +01:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /telemetry-properties - get telemetry properties
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace TelemetryProperties {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
export interface Response {
|
|
|
|
|
data: {
|
|
|
|
|
useTypescriptOnServer: boolean;
|
|
|
|
|
useTypescriptOnAdmin: boolean;
|
|
|
|
|
isHostedOnStrapiCloud: boolean;
|
|
|
|
|
numberOfAllContentTypes: number;
|
|
|
|
|
numberOfComponents: number;
|
|
|
|
|
numberOfDynamicZones: number;
|
|
|
|
|
};
|
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /plugins - get plugin information
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace Plugins {
|
|
|
|
|
interface Plugin {
|
|
|
|
|
name: string;
|
|
|
|
|
displayName: string;
|
|
|
|
|
description: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Response {
|
|
|
|
|
plugins: Plugin[];
|
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-11-21 11:40:51 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /providers/options - Single Sign On setting options
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace ProvidersOptions {
|
|
|
|
|
interface SSOProviderOptions {
|
|
|
|
|
autoRegister: boolean;
|
|
|
|
|
defaultRole: string | null;
|
|
|
|
|
ssoLockedRoles: string[] | null;
|
|
|
|
|
}
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: SSOProviderOptions;
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Response {
|
|
|
|
|
data: SSOProviderOptions;
|
|
|
|
|
error?: errors.ApplicationError | errors.ValidationError | errors.YupValidationError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* /license-limit-information – get license limit information
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export interface SSOFeature {
|
|
|
|
|
name: 'sso';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AuditLogsFeature {
|
|
|
|
|
name: 'audit-logs';
|
|
|
|
|
options: {
|
|
|
|
|
retentionDays: number | null;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ReviewWorkflowsFeature {
|
|
|
|
|
name: 'review-workflows';
|
2023-11-16 17:34:50 +01:00
|
|
|
|
options?: { numberOfWorkflows: number | null; stagesPerWorkflow: number | null };
|
2023-11-21 11:40:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-01-30 12:03:33 +01:00
|
|
|
|
export interface ContentReleasesFeature {
|
|
|
|
|
name: 'cms-content-releases';
|
|
|
|
|
options?: {
|
|
|
|
|
maximumReleases: number;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-21 11:40:51 +00:00
|
|
|
|
/**
|
|
|
|
|
* TODO: this response needs refactoring because we're mixing the admin seat limit info with
|
|
|
|
|
* regular EE feature info.
|
|
|
|
|
*/
|
|
|
|
|
export declare namespace GetLicenseLimitInformation {
|
|
|
|
|
export interface Request {
|
|
|
|
|
body: {};
|
|
|
|
|
query: {};
|
|
|
|
|
}
|
|
|
|
|
export interface Response {
|
|
|
|
|
data: {
|
|
|
|
|
currentActiveUserCount: number;
|
|
|
|
|
enforcementUserCount: number;
|
2024-01-30 12:03:33 +01:00
|
|
|
|
features: (SSOFeature | AuditLogsFeature | ReviewWorkflowsFeature | ContentReleasesFeature)[];
|
2023-11-21 11:40:51 +00:00
|
|
|
|
isHostedOnStrapiCloud: boolean;
|
|
|
|
|
licenseLimitStatus: unknown;
|
|
|
|
|
permittedSeats: number;
|
|
|
|
|
shouldNotify: boolean;
|
|
|
|
|
shouldStopCreate: boolean;
|
|
|
|
|
};
|
|
|
|
|
error?: errors.ApplicationError;
|
|
|
|
|
}
|
|
|
|
|
}
|