/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const WeeklySearchUsersRequest$inboundSchema = z.object({
    after: z.string().optional(),
    project_id: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "project_id": "projectId",
    });
});
/** @internal */
export const WeeklySearchUsersRequest$outboundSchema = z.object({
    after: z.string().optional(),
    projectId: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        projectId: "project_id",
    });
});
export function weeklySearchUsersRequestToJSON(weeklySearchUsersRequest) {
    return JSON.stringify(WeeklySearchUsersRequest$outboundSchema.parse(weeklySearchUsersRequest));
}
export function weeklySearchUsersRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WeeklySearchUsersRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersRequest' from JSON`);
}
/** @internal */
export const WeeklySearchUsersResult$inboundSchema = z.object({
    week: z.string(),
    unique_users: z.string(),
}).transform((v) => {
    return remap$(v, {
        "unique_users": "uniqueUsers",
    });
});
/** @internal */
export const WeeklySearchUsersResult$outboundSchema = z.object({
    week: z.string(),
    uniqueUsers: z.string(),
}).transform((v) => {
    return remap$(v, {
        uniqueUsers: "unique_users",
    });
});
export function weeklySearchUsersResultToJSON(weeklySearchUsersResult) {
    return JSON.stringify(WeeklySearchUsersResult$outboundSchema.parse(weeklySearchUsersResult));
}
export function weeklySearchUsersResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WeeklySearchUsersResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersResult' from JSON`);
}
/** @internal */
export const WeeklySearchUsersData$inboundSchema = z.object({
    result: z.array(z.lazy(() => WeeklySearchUsersResult$inboundSchema)),
    total: z.number(),
});
/** @internal */
export const WeeklySearchUsersData$outboundSchema = z.object({
    result: z.array(z.lazy(() => WeeklySearchUsersResult$outboundSchema)),
    total: z.number(),
});
export function weeklySearchUsersDataToJSON(weeklySearchUsersData) {
    return JSON.stringify(WeeklySearchUsersData$outboundSchema.parse(weeklySearchUsersData));
}
export function weeklySearchUsersDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WeeklySearchUsersData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersData' from JSON`);
}
/** @internal */
export const WeeklySearchUsersResponseBody$inboundSchema = z.object({
    data: z.lazy(() => WeeklySearchUsersData$inboundSchema),
});
/** @internal */
export const WeeklySearchUsersResponseBody$outboundSchema = z.object({
    data: z.lazy(() => WeeklySearchUsersData$outboundSchema),
});
export function weeklySearchUsersResponseBodyToJSON(weeklySearchUsersResponseBody) {
    return JSON.stringify(WeeklySearchUsersResponseBody$outboundSchema.parse(weeklySearchUsersResponseBody));
}
export function weeklySearchUsersResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WeeklySearchUsersResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersResponseBody' from JSON`);
}
//# sourceMappingURL=weeklysearchusers.js.map