UNPKG

@unkey/api

Version:

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

49 lines 1.92 kB
import * as z from "zod/v3"; export type V2PortalCreateSessionRequestBody = { /** * The human-readable slug of the portal configuration to create the session against. * * @remarks * Identifies which app's portal the end user will access. * Must be 3-64 characters, lowercase alphanumeric and hyphens only, * must not start or end with a hyphen, and must not contain consecutive hyphens. */ slug: string; /** * The end user's identifier in the customer's system. * * @remarks * Accepts arbitrary string values (user IDs, emails, UUIDs, etc.). */ externalId: string; /** * List of RBAC tuple permissions defining what the end user can do in the Portal. * * @remarks * Each permission is a string in the format `{resourceType}.{resourceId}.{action}`. * Use `*` as resourceId to grant access to all resources of that type. * * Tab visibility is derived from the action segment: * - Keys tab: `read_key`, `create_key`, `update_key`, `delete_key` * - Analytics tab: `read_analytics` * - Docs tab: visible when any permission is present */ permissions: Array<string>; /** * When true, creates a preview session for testing the portal experience. * * @remarks */ preview?: boolean | undefined; }; /** @internal */ export type V2PortalCreateSessionRequestBody$Outbound = { slug: string; externalId: string; permissions: Array<string>; preview: boolean; }; /** @internal */ export declare const V2PortalCreateSessionRequestBody$outboundSchema: z.ZodType<V2PortalCreateSessionRequestBody$Outbound, z.ZodTypeDef, V2PortalCreateSessionRequestBody>; export declare function v2PortalCreateSessionRequestBodyToJSON(v2PortalCreateSessionRequestBody: V2PortalCreateSessionRequestBody): string; //# sourceMappingURL=v2portalcreatesessionrequestbody.d.ts.map