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>

112 lines 5.08 kB
import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * Owner or project scope for the query */ export type CreateObservabilityQueryScope = {}; /** * Direction to order grouped results by. Defaults to desc. */ export declare const OrderDirection: { readonly Asc: "asc"; readonly Desc: "desc"; }; /** * Direction to order grouped results by. Defaults to desc. */ export type OrderDirection = ClosedEnum<typeof OrderDirection>; /** * Time bucket size */ export type Granularity = {}; export type CreateObservabilityQueryRequestBody = { /** * Metric id */ metric: string; /** * Owner or project scope for the query */ scope: CreateObservabilityQueryScope; /** * Aggregation function to apply. Some aggregations require a dimension: use <agg>/<dimension>, for example unique/visitor_id. */ aggregation?: string | undefined; /** * Dimensions to group results by. JSON dimensions support nested refs, for example event_data/checkout_step. Nested keys containing characters that OData cannot parse as an identifier, such as '-', spaces, quotes, or '/', must be wrapped in single quotes (escape embedded single quotes by doubling them), for example flags/'enable-comments-view' or event_data/'some property''s/value'. */ groupBy?: Array<string> | undefined; /** * Filter to apply to the query. JSON dimensions support nested refs, for example event_data/checkout_step eq 'payment'. Nested keys containing characters that OData cannot parse as an identifier, such as '-', spaces, quotes, or '/', must be wrapped in single quotes (escape embedded single quotes by doubling them), for example flags/'enable-comments-view' eq true or event_data/'some property''s/value' eq true. */ filter?: string | undefined; /** * Maximum number of results */ limit?: number | undefined; /** * Rollup column to order grouped results by. Use the generated rollup key for the requested metric and aggregation. Defaults to the query engine count rollup. */ orderBy?: string | undefined; /** * Direction to order grouped results by. Defaults to desc. */ orderDirection?: OrderDirection | undefined; /** * Time bucket size */ granularity?: Granularity | undefined; /** * Start timestamp */ startTime?: string | undefined; /** * End timestamp */ endTime?: string | undefined; /** * IANA timezone (e.g. Europe/Paris) used only to align calendar buckets (1d/1mo) to that zone's day/month boundaries. startTime/endTime and all output timestamps are always UTC. No effect on sub-day granularities. */ bucketTimezone?: string | undefined; additionalProperties?: { [k: string]: any; } | undefined; }; export type CreateObservabilityQueryResponseBody = {}; /** @internal */ export type CreateObservabilityQueryScope$Outbound = {}; /** @internal */ export declare const CreateObservabilityQueryScope$outboundSchema: z.ZodType<CreateObservabilityQueryScope$Outbound, z.ZodTypeDef, CreateObservabilityQueryScope>; export declare function createObservabilityQueryScopeToJSON(createObservabilityQueryScope: CreateObservabilityQueryScope): string; /** @internal */ export declare const OrderDirection$outboundSchema: z.ZodNativeEnum<typeof OrderDirection>; /** @internal */ export type Granularity$Outbound = {}; /** @internal */ export declare const Granularity$outboundSchema: z.ZodType<Granularity$Outbound, z.ZodTypeDef, Granularity>; export declare function granularityToJSON(granularity: Granularity): string; /** @internal */ export type CreateObservabilityQueryRequestBody$Outbound = { metric: string; scope: CreateObservabilityQueryScope$Outbound; aggregation?: string | undefined; groupBy?: Array<string> | undefined; filter?: string | undefined; limit?: number | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; granularity?: Granularity$Outbound | undefined; startTime?: string | undefined; endTime?: string | undefined; bucketTimezone?: string | undefined; [additionalProperties: string]: unknown; }; /** @internal */ export declare const CreateObservabilityQueryRequestBody$outboundSchema: z.ZodType<CreateObservabilityQueryRequestBody$Outbound, z.ZodTypeDef, CreateObservabilityQueryRequestBody>; export declare function createObservabilityQueryRequestBodyToJSON(createObservabilityQueryRequestBody: CreateObservabilityQueryRequestBody): string; /** @internal */ export declare const CreateObservabilityQueryResponseBody$inboundSchema: z.ZodType<CreateObservabilityQueryResponseBody, z.ZodTypeDef, unknown>; export declare function createObservabilityQueryResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateObservabilityQueryResponseBody, SDKValidationError>; //# sourceMappingURL=createobservabilityqueryop.d.ts.map