createGetV1Workouts.ts•1.36 kB
/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import type { GetV1WorkoutsQueryParams, GetV1WorkoutsHeaderParams, GetV1Workouts200, GetV1WorkoutsQueryResponse } from '../types/GetV1Workouts.ts'
import { createWorkout } from './createWorkout.ts'
import { faker } from '@faker-js/faker'
export function createGetV1WorkoutsQueryParams(data?: Partial<GetV1WorkoutsQueryParams>): GetV1WorkoutsQueryParams {
return {
...{ page: faker.number.int(), pageSize: faker.number.int() },
...(data || {}),
}
}
export function createGetV1WorkoutsHeaderParams(data?: Partial<GetV1WorkoutsHeaderParams>): GetV1WorkoutsHeaderParams {
return {
...{ 'api-key': faker.string.uuid() },
...(data || {}),
}
}
/**
* @description A paginated list of workouts
*/
export function createGetV1Workouts200(data?: Partial<GetV1Workouts200>): GetV1Workouts200 {
return {
...{ page: faker.number.int(), page_count: faker.number.int(), workouts: faker.helpers.multiple(() => createWorkout()) },
...(data || {}),
}
}
/**
* @description Invalid page size
*/
export function createGetV1Workouts400() {
return undefined
}
export function createGetV1WorkoutsQueryResponse(data?: Partial<GetV1WorkoutsQueryResponse>): GetV1WorkoutsQueryResponse {
return data || faker.helpers.arrayElement<any>([createGetV1Workouts200()])
}