import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { Authentication } from "../components/authentication.js"; import { HTTPMetadata } from "../components/httpmetadata.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * 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 declare const HeaderXGustoAPIVersion: { readonly TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15"; }; /** * 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 HeaderXGustoAPIVersion = ClosedEnum; export type SystemAccessTokenRequest = { /** * Your client ID */ clientId: string; /** * Your client secret */ clientSecret: string; /** * Set system_access to create a system access token, refresh_token to refresh an existing token */ grantType: "system_access"; }; export type RefreshTokenRequest = { /** * Your client ID */ clientId: string; /** * Your client secret */ clientSecret: string; /** * Set system_access to create a system access token, refresh_token to refresh an existing token */ grantType: "refresh_token"; refreshToken: string; /** * The redirect URI you set up via the Developer Portal */ redirectUri?: string | undefined; }; export type OauthAccessTokenRequestBody = RefreshTokenRequest | SystemAccessTokenRequest; export type OauthAccessTokenRequest = { /** * 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?: HeaderXGustoAPIVersion | undefined; requestBody: RefreshTokenRequest | SystemAccessTokenRequest; }; export type OauthAccessTokenResponse = { httpMeta: HTTPMetadata; /** * Success */ authentication?: Authentication | undefined; }; /** @internal */ export declare const HeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum; /** @internal */ export type SystemAccessTokenRequest$Outbound = { client_id: string; client_secret: string; grant_type: "system_access"; }; /** @internal */ export declare const SystemAccessTokenRequest$outboundSchema: z.ZodType; export declare function systemAccessTokenRequestToJSON(systemAccessTokenRequest: SystemAccessTokenRequest): string; /** @internal */ export type RefreshTokenRequest$Outbound = { client_id: string; client_secret: string; grant_type: "refresh_token"; refresh_token: string; redirect_uri?: string | undefined; }; /** @internal */ export declare const RefreshTokenRequest$outboundSchema: z.ZodType; export declare function refreshTokenRequestToJSON(refreshTokenRequest: RefreshTokenRequest): string; /** @internal */ export type OauthAccessTokenRequestBody$Outbound = RefreshTokenRequest$Outbound | SystemAccessTokenRequest$Outbound; /** @internal */ export declare const OauthAccessTokenRequestBody$outboundSchema: z.ZodType; export declare function oauthAccessTokenRequestBodyToJSON(oauthAccessTokenRequestBody: OauthAccessTokenRequestBody): string; /** @internal */ export type OauthAccessTokenRequest$Outbound = { "X-Gusto-API-Version": string; RequestBody: RefreshTokenRequest$Outbound | SystemAccessTokenRequest$Outbound; }; /** @internal */ export declare const OauthAccessTokenRequest$outboundSchema: z.ZodType; export declare function oauthAccessTokenRequestToJSON(oauthAccessTokenRequest: OauthAccessTokenRequest): string; /** @internal */ export declare const OauthAccessTokenResponse$inboundSchema: z.ZodType; export declare function oauthAccessTokenResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=oauthaccesstoken.d.ts.map