/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: f443d09d9966
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
/** @internal */
export const OAuth2Token$outboundSchema = z.object({
    accessToken: z.string(),
    tokenType: z.literal("Bearer").default("Bearer"),
    expiresIn: z.nullable(z.int()).optional(),
    scope: z.nullable(z.string()).optional(),
    refreshToken: z.nullable(z.string()).optional(),
    expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return remap$(v, {
        accessToken: "access_token",
        tokenType: "token_type",
        expiresIn: "expires_in",
        refreshToken: "refresh_token",
        expiresAt: "expires_at",
    });
});
export function oAuth2TokenToJSON(oAuth2Token) {
    return JSON.stringify(OAuth2Token$outboundSchema.parse(oAuth2Token));
}
//# sourceMappingURL=oauth2token.js.map