/* * 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"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Representation of a Minimum Wage */ export type MinimumWage = { /** * unique identifier of a minimum wage */ uuid: string; /** * The wage rate for a minimum wage record. Represented as a float, e.g. "15.0". */ wage: string; /** * The type of wage the minimum wage applies to, e.g. "Regular", "Regular-Industry-Specific". */ wageType: string; /** * The date the minimum wage rule is effective on. */ effectiveDate: RFCDate; /** * The governing authority that created the minimum wage, e.g. "City", "State", or "Federal". */ authority: string; /** * Description of parties the minimum wage applies to. */ notes?: string | undefined; }; /** @internal */ export const MinimumWage$inboundSchema: z.ZodType< MinimumWage, z.ZodTypeDef, unknown > = z.object({ uuid: z.string(), wage: z.string(), wage_type: z.string(), effective_date: z.string().transform(v => new RFCDate(v)), authority: z.string(), notes: z.string().optional(), }).transform((v) => { return remap$(v, { "wage_type": "wageType", "effective_date": "effectiveDate", }); }); export function minimumWageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MinimumWage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MinimumWage' from JSON`, ); }