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>

102 lines (94 loc) 3.17 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; /** * Sort by name in ascending order, or by creation or update time in descending order. */ export const QueryParamSort = { Name: "name", CreatedAt: "createdAt", UpdatedAt: "updatedAt", } as const; /** * Sort by name in ascending order, or by creation or update time in descending order. */ export type QueryParamSort = ClosedEnum<typeof QueryParamSort>; export type ListConnectorsRequest = { /** * Maximum number of connectors to return. Defaults to 20. */ limit?: number | undefined; /** * Cursor from `pagination.next` on the previous response. */ cursor?: string | undefined; /** * Return only connectors connected to this project. */ projectId?: string | undefined; /** * Search connector names, UIDs, and services. */ search?: string | undefined; /** * Comma-separated connector types: `slack`, `discord`, `github`, `linear`, `linq`, `salesforce`, `sendblue`, `snowflake`, `snowflake-wif`, `microsoft-entra`, `api-key`, `photon`, `oauth`, or `custom`. */ type?: string | undefined; /** * Comma-separated provider or service identifiers. */ service?: string | undefined; /** * Sort by name in ascending order, or by creation or update time in descending order. */ sort?: QueryParamSort | undefined; /** * The team ID that scopes the request. Do not send it with slug. If both are omitted, Vercel uses the team associated with the token or the authenticated user's default team. The request returns 401 if no team can be selected. */ teamId?: string | undefined; /** * The team slug that scopes the request. Do not send it with teamId. If both are omitted, Vercel uses the team associated with the token or the authenticated user's default team. The request returns 401 if no team can be selected. */ slug?: string | undefined; }; /** @internal */ export const QueryParamSort$outboundSchema: z.ZodNativeEnum< typeof QueryParamSort > = z.nativeEnum(QueryParamSort); /** @internal */ export type ListConnectorsRequest$Outbound = { limit?: number | undefined; cursor?: string | undefined; projectId?: string | undefined; search?: string | undefined; type?: string | undefined; service?: string | undefined; sort?: string | undefined; teamId?: string | undefined; slug?: string | undefined; }; /** @internal */ export const ListConnectorsRequest$outboundSchema: z.ZodType< ListConnectorsRequest$Outbound, z.ZodTypeDef, ListConnectorsRequest > = z.object({ limit: z.number().int().optional(), cursor: z.string().optional(), projectId: z.string().optional(), search: z.string().optional(), type: z.string().optional(), service: z.string().optional(), sort: QueryParamSort$outboundSchema.optional(), teamId: z.string().optional(), slug: z.string().optional(), }); export function listConnectorsRequestToJSON( listConnectorsRequest: ListConnectorsRequest, ): string { return JSON.stringify( ListConnectorsRequest$outboundSchema.parse(listConnectorsRequest), ); }