@vepler/schools-types
Version:
TypeScript type definitions for Vepler Schools Service
58 lines (57 loc) • 1.34 kB
TypeScript
/**
* Attribute Endpoint Types
*
* Type definitions for the attribute-related API endpoints.
*/
import { ApiResponse } from '../common';
/**
* Attribute query options
* Used for operations to query attributes
*/
export interface AttributeQueryOptions {
/** Attribute type filter */
type?: string;
/** Attribute name filter */
name?: string;
/** Page number for pagination */
page?: number;
/** Results per page */
limit?: number;
}
/**
* Response data for attribute endpoints
*/
export interface AttributeResponseData {
/**
* Array of attributes
*/
attributes: Array<{
/** Attribute ID */
id: number;
/** Attribute type */
type: string;
/** Attribute name */
name: string;
/** Attribute description */
description: string;
/** Metadata */
metadata?: Record<string, any>;
}>;
/**
* Pagination metadata
*/
pagination?: {
/** Total number of attributes */
total: number;
/** Current page */
page: number;
/** Results per page */
limit: number;
/** Total number of pages */
pages: number;
};
}
/**
* Complete response for attribute endpoints
*/
export type AttributeResponse = ApiResponse<AttributeResponseData>;