/* * 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 { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { BLSOccupation, BLSOccupation$inboundSchema, } from "../components/blsoccupation.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetV1SalaryEstimatesOccupationsSecurity = { systemAccessAuth: string; }; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export const GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion = { TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15", } as const; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export type GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion >; export type GetV1SalaryEstimatesOccupationsRequest = { /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ xGustoAPIVersion?: | GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion | undefined; /** * Search term for occupation (minimum 3 characters) */ search: string; }; export type GetV1SalaryEstimatesOccupationsResponse = { httpMeta: HTTPMetadata; /** * successful */ blsOccupations?: Array | undefined; }; /** @internal */ export type GetV1SalaryEstimatesOccupationsSecurity$Outbound = { SystemAccessAuth: string; }; /** @internal */ export const GetV1SalaryEstimatesOccupationsSecurity$outboundSchema: z.ZodType< GetV1SalaryEstimatesOccupationsSecurity$Outbound, z.ZodTypeDef, GetV1SalaryEstimatesOccupationsSecurity > = z.object({ systemAccessAuth: z.string(), }).transform((v) => { return remap$(v, { systemAccessAuth: "SystemAccessAuth", }); }); export function getV1SalaryEstimatesOccupationsSecurityToJSON( getV1SalaryEstimatesOccupationsSecurity: GetV1SalaryEstimatesOccupationsSecurity, ): string { return JSON.stringify( GetV1SalaryEstimatesOccupationsSecurity$outboundSchema.parse( getV1SalaryEstimatesOccupationsSecurity, ), ); } /** @internal */ export const GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion > = z.nativeEnum(GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion); /** @internal */ export type GetV1SalaryEstimatesOccupationsRequest$Outbound = { "X-Gusto-API-Version": string; search: string; }; /** @internal */ export const GetV1SalaryEstimatesOccupationsRequest$outboundSchema: z.ZodType< GetV1SalaryEstimatesOccupationsRequest$Outbound, z.ZodTypeDef, GetV1SalaryEstimatesOccupationsRequest > = z.object({ xGustoAPIVersion: GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), search: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getV1SalaryEstimatesOccupationsRequestToJSON( getV1SalaryEstimatesOccupationsRequest: GetV1SalaryEstimatesOccupationsRequest, ): string { return JSON.stringify( GetV1SalaryEstimatesOccupationsRequest$outboundSchema.parse( getV1SalaryEstimatesOccupationsRequest, ), ); } /** @internal */ export const GetV1SalaryEstimatesOccupationsResponse$inboundSchema: z.ZodType< GetV1SalaryEstimatesOccupationsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "BLS-Occupations": z.array(BLSOccupation$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "BLS-Occupations": "blsOccupations", }); }); export function getV1SalaryEstimatesOccupationsResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1SalaryEstimatesOccupationsResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1SalaryEstimatesOccupationsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1SalaryEstimatesOccupationsResponse' from JSON`, ); }