UNPKG

@unkey/api

Version:

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

59 lines (53 loc) 1.95 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; export type V2PermissionsCreateRoleRequestBody = { /** * The unique name for this role. Must be unique within your workspace and clearly indicate the role's purpose. Use descriptive names like 'admin', 'editor', or 'billing_manager'. * * @remarks * * Examples: 'admin.billing', 'support.readonly', 'developer.api', 'manager.analytics' */ name: string; /** * Provides comprehensive documentation of what this role encompasses and what access it grants. * * @remarks * Include information about the intended use case, what permissions should be assigned, and any important considerations. * This internal documentation helps team members understand role boundaries and security implications. * Not visible to end users - designed for administration teams and access control audits. * * Consider documenting: * - The role's intended purpose and scope * - What types of users should receive this role * - What permissions are typically associated with it * - Any security considerations or limitations * - Related roles that might be used together */ description?: string | undefined; }; /** @internal */ export type V2PermissionsCreateRoleRequestBody$Outbound = { name: string; description?: string | undefined; }; /** @internal */ export const V2PermissionsCreateRoleRequestBody$outboundSchema: z.ZodType< V2PermissionsCreateRoleRequestBody$Outbound, z.ZodTypeDef, V2PermissionsCreateRoleRequestBody > = z.object({ name: z.string(), description: z.string().optional(), }); export function v2PermissionsCreateRoleRequestBodyToJSON( v2PermissionsCreateRoleRequestBody: V2PermissionsCreateRoleRequestBody, ): string { return JSON.stringify( V2PermissionsCreateRoleRequestBody$outboundSchema.parse( v2PermissionsCreateRoleRequestBody, ), ); }