(options?: ListScheduleOptions)
| 259 | } |
| 260 | |
| 261 | listSchedules(options?: ListScheduleOptions) { |
| 262 | const searchParams = new URLSearchParams(); |
| 263 | |
| 264 | if (options?.page) { |
| 265 | searchParams.append("page", options.page.toString()); |
| 266 | } |
| 267 | |
| 268 | if (options?.perPage) { |
| 269 | searchParams.append("perPage", options.perPage.toString()); |
| 270 | } |
| 271 | |
| 272 | return zodfetchOffsetLimitPage( |
| 273 | ScheduleObject, |
| 274 | `${this.baseUrl}/api/v1/schedules`, |
| 275 | { |
| 276 | page: options?.page, |
| 277 | limit: options?.perPage, |
| 278 | }, |
| 279 | { |
| 280 | method: "GET", |
| 281 | headers: this.#getHeaders(false), |
| 282 | } |
| 283 | ); |
| 284 | } |
| 285 | |
| 286 | retrieveSchedule(scheduleId: string) { |
| 287 | return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}`, { |
no test coverage detected