UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

85 lines 3.37 kB
import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { Flag } from "./flag.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * The state of the flags to retrieve. Defaults to `active`. */ export declare const ListFlagsQueryParamState: { readonly Active: "active"; readonly Archived: "archived"; }; /** * The state of the flags to retrieve. Defaults to `active`. */ export type ListFlagsQueryParamState = ClosedEnum<typeof ListFlagsQueryParamState>; export type ListFlagsRequest = { /** * The project id or name */ projectIdOrName: string; /** * The state of the flags to retrieve. Defaults to `active`. */ state?: ListFlagsQueryParamState | undefined; /** * Deprecated. Whether to include creator metadata in each flag in the response. Resolve creator identity client-side (e.g. via the team members endpoint) instead; this parameter will be removed in a future release. Use `GET /v1/projects/:id/feature-flags/flags/:flagIdOrSlug?withMetadata=true` for single-flag lookups that need creator metadata. */ withMetadata?: boolean | undefined; /** * Maximum number of flags to return. When not set, all flags are returned. */ limit?: number | undefined; /** * Pagination cursor to continue from. */ cursor?: string | undefined; /** * Search flags by their slug or description. Case-insensitive. */ search?: string | undefined; /** * Filter flags by tag. Repeat the parameter for multiple tags (all must match). */ tags?: Array<string> | undefined; /** * The Team identifier to perform the request on behalf of. */ teamId?: string | undefined; /** * The Team slug to perform the request on behalf of. */ slug?: string | undefined; }; export type ListFlagsPagination = { next: string | null; }; export type ListFlagsResponseBody = { data: Array<Flag>; pagination: ListFlagsPagination; }; /** @internal */ export declare const ListFlagsQueryParamState$outboundSchema: z.ZodNativeEnum<typeof ListFlagsQueryParamState>; /** @internal */ export type ListFlagsRequest$Outbound = { projectIdOrName: string; state?: string | undefined; withMetadata?: boolean | undefined; limit?: number | undefined; cursor?: string | undefined; search?: string | undefined; tags?: Array<string> | undefined; teamId?: string | undefined; slug?: string | undefined; }; /** @internal */ export declare const ListFlagsRequest$outboundSchema: z.ZodType<ListFlagsRequest$Outbound, z.ZodTypeDef, ListFlagsRequest>; export declare function listFlagsRequestToJSON(listFlagsRequest: ListFlagsRequest): string; /** @internal */ export declare const ListFlagsPagination$inboundSchema: z.ZodType<ListFlagsPagination, z.ZodTypeDef, unknown>; export declare function listFlagsPaginationFromJSON(jsonString: string): SafeParseResult<ListFlagsPagination, SDKValidationError>; /** @internal */ export declare const ListFlagsResponseBody$inboundSchema: z.ZodType<ListFlagsResponseBody, z.ZodTypeDef, unknown>; export declare function listFlagsResponseBodyFromJSON(jsonString: string): SafeParseResult<ListFlagsResponseBody, SDKValidationError>; //# sourceMappingURL=listflagsop.d.ts.map