@unkey/api
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.
51 lines (45 loc) • 1.57 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
export type V2PermissionsListPermissionsRequestBody = {
/**
* Pagination cursor from a previous response to fetch the next page of permissions.
*
* @remarks
* Include this value when you need to retrieve additional permissions beyond the initial response.
* Each response containing more results than the requested limit includes a cursor for subsequent pages.
*
* Leave empty or omit this field to start from the beginning of the permission list.
* Cursors are temporary and may expire - always handle cases where a cursor becomes invalid.
*/
cursor?: string | undefined;
/**
* Maximum number of permissions to return in a single response.
*/
limit?: number | undefined;
};
/** @internal */
export type V2PermissionsListPermissionsRequestBody$Outbound = {
cursor?: string | undefined;
limit: number;
};
/** @internal */
export const V2PermissionsListPermissionsRequestBody$outboundSchema: z.ZodType<
V2PermissionsListPermissionsRequestBody$Outbound,
z.ZodTypeDef,
V2PermissionsListPermissionsRequestBody
> = z.object({
cursor: z.string().optional(),
limit: z.number().int().default(100),
});
export function v2PermissionsListPermissionsRequestBodyToJSON(
v2PermissionsListPermissionsRequestBody:
V2PermissionsListPermissionsRequestBody,
): string {
return JSON.stringify(
V2PermissionsListPermissionsRequestBody$outboundSchema.parse(
v2PermissionsListPermissionsRequestBody,
),
);
}