Files
tom goriunovandGitHub 06acc48e35 Changes in ReCaptcha behavior (#2829)
* migrate to v2 API URLs for CSV exports

* don't ask user to solve recaptcha for first response; pass token in header as well

* hide "Try again" button if no bypass allowed

* fix tests
2025-07-04 09:23:00 +02:00

20 lines
606 B
TypeScript

import type { ApiResource } from '../../types';
import type { BlockCountdownResponse } from 'types/api/block';
export const GENERAL_API_V1_RESOURCES = {
graphql: {
path: '/api/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 */