add strapi types

This commit is contained in:
Schneider Roland
2025-01-11 20:58:03 +01:00
parent 35dcd6ab22
commit ea3a2e3366
22 changed files with 540 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
// Interface automatically generated by schemas-to-ts
export interface AdminPanelRelationPropertyModification<T> {
connect: T[];
disconnect: T[];
}

View File

@@ -0,0 +1,9 @@
// Interface automatically generated by schemas-to-ts
import { BeforeRunEvent } from './BeforeRunEvent';
export interface AfterRunEvent<TState, TResult> extends BeforeRunEvent<TState extends Record<string, unknown> ? TState : never> {
result: TResult;
}

View File

@@ -0,0 +1,8 @@
// Interface automatically generated by schemas-to-ts
import { Event } from '@strapi/database/dist/lifecycles';
export interface BeforeRunEvent<TState extends Record<string, unknown>> extends Event {
state: TState;
}

View File

@@ -0,0 +1,44 @@
// Interface automatically generated by schemas-to-ts
import { MediaFormat } from './MediaFormat';
export interface Media {
id: number;
attributes: {
name: string;
alternativeText: string;
caption: string;
width: number;
height: number;
formats: { thumbnail: MediaFormat; small: MediaFormat; medium: MediaFormat; large: MediaFormat; };
hash: string;
ext: string;
mime: string;
size: number;
url: string;
previewUrl: string;
provider: string;
createdAt: Date;
updatedAt: Date;
}
}
export interface Media_Plain {
id: number;
name: string;
alternativeText: string;
caption: string;
width: number;
height: number;
formats: { thumbnail: MediaFormat; small: MediaFormat; medium: MediaFormat; large: MediaFormat; };
hash: string;
ext: string;
mime: string;
size: number;
url: string;
previewUrl: string;
provider: string;
createdAt: Date;
updatedAt: Date;
}

View File

@@ -0,0 +1,15 @@
// Interface automatically generated by schemas-to-ts
export interface MediaFormat {
name: string;
hash: string;
ext: string;
mime: string;
width: number;
height: number;
size: number;
path: string;
url: string;
}

View File

@@ -0,0 +1,15 @@
// Interface automatically generated by schemas-to-ts
export interface Payload<T> {
data: T;
meta: {
pagination?: {
page: number;
pageSize: number;
pageCount: number;
total: number;
}
};
}

View File

@@ -0,0 +1,26 @@
// Interface automatically generated by schemas-to-ts
export interface User {
id: number;
attributes: {
username: string;
email: string;
provider: string;
confirmed: boolean;
blocked: boolean;
createdAt: Date;
updatedAt: Date;
}
}
export interface User_Plain {
id: number;
username: string;
email: string;
provider: string;
confirmed: boolean;
blocked: boolean;
createdAt: Date;
updatedAt: Date;
}