The response to validate
Type predicate indicating whether data is a VWRTokenResponse
isVWRTokenResponse({ access_token: "abc", token_type: "bearer", expires_in: 39047 }); // true
isVWRTokenResponse({ token_type: "bearer" }); // false
export function isVWRTokenResponse(data: unknown): data is VWRTokenResponse {
return v.safeParse(vwrTokenResponseSchema, data).success;
}
Type guard validating a VWR OAuth token response. Requires a bearer
access_token, atoken_type, and a numericexpires_inlifetime.