import type { ApiResponse } from '@apimatic/core-interfaces'; import type { JSONSchema, Schema, SchemaMappedType, SchemaType, ValidationResult } from '@apimatic/schema'; /** * Interface representing all metadata for a single endpoint, including: * - Name and group for organizational purposes. * - Request schema for validating and mapping input data. * - Call function to execute the API call using the provided client and mapped request data. * - Optional description for documentation purposes. * * @template CoreReqSchema The core schema type used for request validation and mapping. * @template Result The deserialized result type of the API response. */ export interface EndpointMetadataInterface, Result> { readonly name: string; readonly group: string; readonly requestSchema: RequestSchemaInterface; readonly call: (client: any, mappedRequest: SchemaType) => Promise>; readonly description?: string; } /** Interface representing a request schema with methods for: * - Converting to JSON Schema format. * - Validating and mapping input arguments to the desired type. * @template CoreReqSchema The core schema type used for request validation and mapping. */ export interface RequestSchemaInterface> { toJSONSchema(): JSONSchema; validateAndMap(args: SchemaMappedType): ValidationResult>; } /** * The container for all endpoint metadata in the SDK, where each key is the endpoint ID. */ export type EndpointsObject = Record>; //# sourceMappingURL=endpointMetadataFromId.d.ts.map