Download src/services/policyLimits/types.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 792 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/policyLimits/types.ts
- Command line
-
hf download hf://chenbhao/codev@e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/policyLimits/types.ts
-
curl -L -o types.ts https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/policyLimits/types.ts
792 Bytes
| import { z } from 'zod/v4' | |
| import { lazySchema } from '../../utils/lazySchema.js' | |
| /** | |
| * Schema for the policy limits API response | |
| * Only blocked policies are included. If a policy key is absent, it's allowed. | |
| */ | |
| export const PolicyLimitsResponseSchema = lazySchema(() => | |
| z.object({ | |
| restrictions: z.record(z.string(), z.object({ allowed: z.boolean() })), | |
| }), | |
| ) | |
| export type PolicyLimitsResponse = z.infer< | |
| ReturnType<typeof PolicyLimitsResponseSchema> | |
| > | |
| /** | |
| * Result of fetching policy limits | |
| */ | |
| export type PolicyLimitsFetchResult = { | |
| success: boolean | |
| restrictions?: PolicyLimitsResponse['restrictions'] | null // null means 304 Not Modified (cache is valid) | |
| etag?: string | |
| error?: string | |
| skipRetry?: boolean // If true, don't retry on failure (e.g., auth errors) | |
| } | |