/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let hrisTimeOffRequestsList$module: | Promise | undefined; const hrisTimeOffRequestsList = (( ...args: Parameters< typeof import("../funcs/hrisTimeOffRequestsList.js").hrisTimeOffRequestsList > ) => new APIPromise( (hrisTimeOffRequestsList$module ??= import( "../funcs/hrisTimeOffRequestsList.js" ).catch((error: unknown) => { hrisTimeOffRequestsList$module = undefined; throw error; })).then((module) => module.hrisTimeOffRequestsList(...args).$inspect()), )) as typeof import("../funcs/hrisTimeOffRequestsList.js").hrisTimeOffRequestsList; let hrisTimeOffRequestsCreate$module: | Promise | undefined; const hrisTimeOffRequestsCreate = (( ...args: Parameters< typeof import("../funcs/hrisTimeOffRequestsCreate.js").hrisTimeOffRequestsCreate > ) => new APIPromise( (hrisTimeOffRequestsCreate$module ??= import( "../funcs/hrisTimeOffRequestsCreate.js" ).catch((error: unknown) => { hrisTimeOffRequestsCreate$module = undefined; throw error; })).then((module) => module.hrisTimeOffRequestsCreate(...args).$inspect() ), )) as typeof import("../funcs/hrisTimeOffRequestsCreate.js").hrisTimeOffRequestsCreate; let hrisTimeOffRequestsGet$module: | Promise | undefined; const hrisTimeOffRequestsGet = (( ...args: Parameters< typeof import("../funcs/hrisTimeOffRequestsGet.js").hrisTimeOffRequestsGet > ) => new APIPromise( (hrisTimeOffRequestsGet$module ??= import( "../funcs/hrisTimeOffRequestsGet.js" ).catch((error: unknown) => { hrisTimeOffRequestsGet$module = undefined; throw error; })).then((module) => module.hrisTimeOffRequestsGet(...args).$inspect()), )) as typeof import("../funcs/hrisTimeOffRequestsGet.js").hrisTimeOffRequestsGet; let hrisTimeOffRequestsUpdate$module: | Promise | undefined; const hrisTimeOffRequestsUpdate = (( ...args: Parameters< typeof import("../funcs/hrisTimeOffRequestsUpdate.js").hrisTimeOffRequestsUpdate > ) => new APIPromise( (hrisTimeOffRequestsUpdate$module ??= import( "../funcs/hrisTimeOffRequestsUpdate.js" ).catch((error: unknown) => { hrisTimeOffRequestsUpdate$module = undefined; throw error; })).then((module) => module.hrisTimeOffRequestsUpdate(...args).$inspect() ), )) as typeof import("../funcs/hrisTimeOffRequestsUpdate.js").hrisTimeOffRequestsUpdate; let hrisTimeOffRequestsDelete$module: | Promise | undefined; const hrisTimeOffRequestsDelete = (( ...args: Parameters< typeof import("../funcs/hrisTimeOffRequestsDelete.js").hrisTimeOffRequestsDelete > ) => new APIPromise( (hrisTimeOffRequestsDelete$module ??= import( "../funcs/hrisTimeOffRequestsDelete.js" ).catch((error: unknown) => { hrisTimeOffRequestsDelete$module = undefined; throw error; })).then((module) => module.hrisTimeOffRequestsDelete(...args).$inspect() ), )) as typeof import("../funcs/hrisTimeOffRequestsDelete.js").hrisTimeOffRequestsDelete; export class TimeOffRequests extends ClientSDK { /** * List Time Off Requests * * @remarks * List Time Off Requests */ async list( request: operations.HrisTimeOffRequestsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(hrisTimeOffRequestsList( this, request, options, )); } /** * Create Time Off Request * * @remarks * Create Time Off Request */ async create( request: operations.HrisTimeOffRequestsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(hrisTimeOffRequestsCreate( this, request, options, )); } /** * Get Time Off Request * * @remarks * Get Time Off Request */ async get( request: operations.HrisTimeOffRequestsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(hrisTimeOffRequestsGet( this, request, options, )); } /** * Update Time Off Request * * @remarks * Update Time Off Request */ async update( request: operations.HrisTimeOffRequestsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(hrisTimeOffRequestsUpdate( this, request, options, )); } /** * Delete Time Off Request * * @remarks * Delete Time Off Request */ async delete( request: operations.HrisTimeOffRequestsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(hrisTimeOffRequestsDelete( this, request, options, )); } }