mirror of
https://github.com/strapi/strapi.git
synced 2025-10-13 00:52:54 +00:00

* feat: add content source maps service * chore: refactor to fp and async.pipe * chore: use header instead of query param * fix: ignore polymorphic relations * chore: add error handling * fix: arrays of relations and medias * enhancement(getstarted): show nested values in preview * fix: update highlights when the dom changes * fix: highlight dimensions after text update * fix: strip away invisible characters from dom * fix: don't encode slugs * fix: handle fields in single components * enhancement: add rawWithIndices to traverseEntity patj * fix: handle components and repeatable components * fix: strapi utils build * fix: dynamic zones * chore: use dots for array indices not brackets * fix: content source map base url fallback * chore: use URLSearchParams instead of URL * chore: refinements * test: fieldUtils testing * fix: traverse-entity doc * chore: add traverse-entity tests * feat: scroll element into view on focus
77 lines
1.6 KiB
TypeScript
77 lines
1.6 KiB
TypeScript
import type { Data, Struct, UID } from '@strapi/types';
|
|
|
|
export interface Entity {
|
|
id: Data.ID;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface Permission extends Entity {
|
|
action: string;
|
|
actionParameters: object;
|
|
subject?: string | null;
|
|
properties: {
|
|
fields?: string[];
|
|
locales?: string[];
|
|
[key: string]: any;
|
|
};
|
|
conditions: string[];
|
|
}
|
|
|
|
export interface AdminUser extends Entity {
|
|
firstname?: string;
|
|
lastname?: string;
|
|
username?: string;
|
|
email?: string;
|
|
password?: string;
|
|
resetPasswordToken?: string | null;
|
|
registrationToken?: string | null;
|
|
isActive: boolean;
|
|
roles: AdminRole[];
|
|
blocked: boolean;
|
|
preferedLanguage?: string;
|
|
}
|
|
|
|
export type AdminUserCreationPayload = Omit<
|
|
AdminUser,
|
|
keyof Entity | 'roles' | 'isActive' | 'blocked'
|
|
> & {
|
|
roles: Data.ID[];
|
|
};
|
|
|
|
export type AdminUserUpdatePayload = Omit<AdminUser, keyof Entity | 'roles'> & {
|
|
roles: Data.ID[];
|
|
};
|
|
|
|
export type SanitizedAdminUser = Omit<AdminUser, 'password' | 'resetPasswordToken' | 'roles'> & {
|
|
roles: SanitizedAdminRole[];
|
|
};
|
|
export interface AdminRole extends Entity {
|
|
name: string;
|
|
code: string;
|
|
description?: string;
|
|
users: AdminUser[];
|
|
permissions: Permission[];
|
|
}
|
|
|
|
export type SanitizedAdminRole = Omit<
|
|
AdminRole,
|
|
'users' | 'permissions' | 'createdAt' | 'updatedAt'
|
|
>;
|
|
|
|
export interface Pagination {
|
|
page: number;
|
|
pageSize: number;
|
|
pageCount: number;
|
|
total: number;
|
|
}
|
|
|
|
export interface FieldContentSourceMap {
|
|
path: string;
|
|
type: Struct.SchemaAttributes[string]['type'];
|
|
documentId: string;
|
|
locale: string | null;
|
|
model?: UID.Schema;
|
|
kind?: Struct.ContentTypeKind;
|
|
}
|