UNPKG

@altostra/core

Version:

Core library for shared types and logic

17 lines (16 loc) 821 B
import type { It } from "../../../../common/Iterable"; import type { Dict } from "../../../Common"; import type { AnyApiEndpoint, ApiEndpoint } from "../../../Resources"; export declare type DuplicateEndpoint = [ApiEndpoint, ApiEndpoint, ...ApiEndpoint[]]; /** * Array of duplicated endpoints where each element is an array of endpoints with the same method and path * (which has at least 2 items) */ export declare type DuplicateEndpoints = It<DuplicateEndpoint>; export declare function getDuplicateEndpoints(endpoints: Iterable<AnyApiEndpoint>): DuplicateEndpoints; export interface PathParamConflict { route: string; params: ParamsDict; } export declare function getConflictingPathParams(endpoints: Iterable<AnyApiEndpoint>): It<PathParamConflict>; export declare type ParamsDict = Dict<AnyApiEndpoint[]>;