/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { AvailableScope, AvailableScope$outboundSchema, } from "./availablescope.js"; export type OrganizationAccessTokenCreate = { organizationId?: string | null | undefined; comment: string; expiresIn?: string | null | undefined; scopes: Array; }; /** @internal */ export type OrganizationAccessTokenCreate$Outbound = { organization_id?: string | null | undefined; comment: string; expires_in?: string | null | undefined; scopes: Array; }; /** @internal */ export const OrganizationAccessTokenCreate$outboundSchema: z.ZodMiniType< OrganizationAccessTokenCreate$Outbound, OrganizationAccessTokenCreate > = z.pipe( z.object({ organizationId: z.optional(z.nullable(z.string())), comment: z.string(), expiresIn: z.optional(z.nullable(z.string())), scopes: z.array(AvailableScope$outboundSchema), }), z.transform((v) => { return remap$(v, { organizationId: "organization_id", expiresIn: "expires_in", }); }), ); export function organizationAccessTokenCreateToJSON( organizationAccessTokenCreate: OrganizationAccessTokenCreate, ): string { return JSON.stringify( OrganizationAccessTokenCreate$outboundSchema.parse( organizationAccessTokenCreate, ), ); }