valorant-api-types
Version:
A collection of documented endpoints and return types for the unofficial Valorant API
45 lines (44 loc) • 1.04 kB
TypeScript
import { ZodType } from 'zod';
export type EndpointType = {
type: 'pd';
shard: string;
} | {
type: 'shared';
shard: string;
} | {
type: 'glz';
region: string;
shard: string;
} | {
type: 'local';
port: number;
} | {
type: 'other';
};
export type EndpointTypeName = EndpointType['type'];
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
export declare function typeToPrefix(options: EndpointType): string;
export interface ValorantEndpoint {
name: string;
description: string;
queryName?: string;
category?: string | string[];
type: EndpointTypeName;
suffix: string;
method?: HttpMethod;
riotRequirements?: {
entitlement?: boolean;
token?: boolean;
clientVersion?: boolean;
clientPlatform?: boolean;
localAuth?: boolean;
};
headers?: Map<string, string>;
body?: ZodType;
query?: Map<string, ZodType>;
variables?: Map<string, ZodType>;
responses?: {
[code: string]: ZodType;
};
}
export {};