mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
20 lines
602 B
TypeScript
20 lines
602 B
TypeScript
import type { ApiResource } from '../../types';
|
|
import type { BlockCountdownResponse } from 'types/api/block';
|
|
|
|
export const GENERAL_API_V1_RESOURCES = {
|
|
graphql: {
|
|
path: '/v1/graphql',
|
|
},
|
|
block_countdown: {
|
|
path: '/api',
|
|
},
|
|
} satisfies Record<string, ApiResource>;
|
|
|
|
export type GeneralApiV1ResourceName = `general:${ keyof typeof GENERAL_API_V1_RESOURCES }`;
|
|
|
|
/* eslint-disable @stylistic/indent */
|
|
export type GeneralApiV1ResourcePayload<R extends GeneralApiV1ResourceName> =
|
|
R extends 'general:block_countdown' ? BlockCountdownResponse :
|
|
never;
|
|
/* eslint-enable @stylistic/indent */
|