UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

29 lines 1.22 kB
import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { KeyCreditsRefill, KeyCreditsRefill$Outbound } from "./keycreditsrefill.js"; /** * Credit configuration and remaining balance for this key. */ export type KeyCreditsData = { /** * Number of credits remaining (null for unlimited). */ remaining: number | null; /** * Configuration for automatic credit refill behavior. */ refill?: KeyCreditsRefill | undefined; }; /** @internal */ export declare const KeyCreditsData$inboundSchema: z.ZodType<KeyCreditsData, z.ZodTypeDef, unknown>; /** @internal */ export type KeyCreditsData$Outbound = { remaining: number | null; refill?: KeyCreditsRefill$Outbound | undefined; }; /** @internal */ export declare const KeyCreditsData$outboundSchema: z.ZodType<KeyCreditsData$Outbound, z.ZodTypeDef, KeyCreditsData>; export declare function keyCreditsDataToJSON(keyCreditsData: KeyCreditsData): string; export declare function keyCreditsDataFromJSON(jsonString: string): SafeParseResult<KeyCreditsData, SDKValidationError>; //# sourceMappingURL=keycreditsdata.d.ts.map