| 
									
										
										
										
											2024-03-01 15:56:07 +01:00
										 |  |  | import type { Struct } from '@strapi/types'; | 
					
						
							| 
									
										
										
										
											2024-03-01 14:41:47 +01:00
										 |  |  | import type { Configuration, Settings, Metadatas, Layouts } from './content-types'; | 
					
						
							| 
									
										
										
										
											2023-11-15 11:08:04 +00:00
										 |  |  | import { errors } from '@strapi/utils'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-01 15:56:07 +01:00
										 |  |  | export interface Component extends Struct.ComponentSchema { | 
					
						
							| 
									
										
										
										
											2023-11-15 11:08:04 +00:00
										 |  |  |   isDisplayed: boolean; | 
					
						
							| 
									
										
										
										
											2024-03-01 15:56:07 +01:00
										 |  |  |   info: Struct.SchemaInfo; | 
					
						
							| 
									
										
										
										
											2023-11-15 11:08:04 +00:00
										 |  |  |   apiID: string; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export interface ComponentConfiguration extends Configuration { | 
					
						
							|  |  |  |   category: string; | 
					
						
							|  |  |  |   isComponent: boolean; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * GET /components | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare namespace FindComponents { | 
					
						
							|  |  |  |   export interface Request { | 
					
						
							|  |  |  |     body: {}; | 
					
						
							|  |  |  |     query: {}; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   export interface Response { | 
					
						
							|  |  |  |     data: Component[]; | 
					
						
							|  |  |  |     error?: errors.ApplicationError; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * GET /components/:uid/configuration | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare namespace FindComponentConfiguration { | 
					
						
							|  |  |  |   export interface Request { | 
					
						
							|  |  |  |     body: {}; | 
					
						
							|  |  |  |     query: {}; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export interface Params { | 
					
						
							|  |  |  |     uid: string; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   export interface Response { | 
					
						
							|  |  |  |     data: { | 
					
						
							| 
									
										
										
										
											2023-12-04 16:00:50 +00:00
										 |  |  |       component: ComponentConfiguration; | 
					
						
							|  |  |  |       components: Record<string, ComponentConfiguration>; | 
					
						
							| 
									
										
										
										
											2023-11-15 11:08:04 +00:00
										 |  |  |     }; | 
					
						
							|  |  |  |     error?: errors.ApplicationError; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * PUT /components/:uid/configuration | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare namespace UpdateComponentConfiguration { | 
					
						
							|  |  |  |   export interface Request { | 
					
						
							|  |  |  |     body: { | 
					
						
							|  |  |  |       layouts: Layouts; | 
					
						
							|  |  |  |       metadatas: Metadatas; | 
					
						
							|  |  |  |       settings: Settings; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |     query: {}; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export interface Params { | 
					
						
							|  |  |  |     uid: string; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export interface Response { | 
					
						
							| 
									
										
										
										
											2023-12-04 16:00:50 +00:00
										 |  |  |     data: ComponentConfiguration; | 
					
						
							| 
									
										
										
										
											2023-11-15 11:08:04 +00:00
										 |  |  |     error?: errors.ApplicationError | errors.YupValidationError; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |