forked from sanbuphy/learn-coding-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
27 lines (24 loc) · 792 Bytes
/
Copy pathtypes.ts
File metadata and controls
27 lines (24 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)
}