export type GetApiFantasticJobsV1ActiveJbArgs = {time_frame: string, limit: number, offset?: string | undefined, cursor?: string | undefined, title?: string | undefined, location?: string | undefined, description?: string | undefined, description_format?: string | undefined, source?: string | undefined, organization?: string | undefined, organization_slug?: string | undefined, organization_industry?: string | undefined, ai_experience_level?: string | undefined, ai_work_arrangement?: string | undefined, ai_employment_type?: string | undefined, has_salary?: string | undefined, exclude_ats_duplicate?: string | undefined, exclude_recruiter_fields?: string | undefined, seniority?: string | undefined, linkedin_id?: string | undefined, id?: string | undefined}; export type GetApiFantasticJobsV1ActiveJbOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Returns new jobs from LinkedIn, Wellfound, and Y Combinator. LinkedIn hourly for English-speaking countries; others every few hours. Pagination billing: call the first page normally and save billing.requestId from the Orthogonal /v1/run response. For later page, offset, or cursor calls on the same logical search, pass parentRequestId with unchanged non-pagination parameters. Valid continuation calls still get their own request IDs and quoted price, but are charged 0. Changing filters starts a new billable request. * * GET /fantastic-jobs/v1/active-jb */ export const getApiFantasticJobsV1ActiveJb = async (args: GetApiFantasticJobsV1ActiveJbArgs, options?: GetApiFantasticJobsV1ActiveJbOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.time_frame != null) query.append("time_frame", String(args.time_frame)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.offset != null) query.append("offset", String(args.offset)) if (args.cursor != null) query.append("cursor", String(args.cursor)) if (args.title != null) query.append("title", String(args.title)) if (args.location != null) query.append("location", String(args.location)) if (args.description != null) query.append("description", String(args.description)) if (args.description_format != null) query.append("description_format", String(args.description_format)) if (args.source != null) query.append("source", String(args.source)) if (args.organization != null) query.append("organization", String(args.organization)) if (args.organization_slug != null) query.append("organization_slug", String(args.organization_slug)) if (args.organization_industry != null) query.append("organization_industry", String(args.organization_industry)) if (args.ai_experience_level != null) query.append("ai_experience_level", String(args.ai_experience_level)) if (args.ai_work_arrangement != null) query.append("ai_work_arrangement", String(args.ai_work_arrangement)) if (args.ai_employment_type != null) query.append("ai_employment_type", String(args.ai_employment_type)) if (args.has_salary != null) query.append("has_salary", String(args.has_salary)) if (args.exclude_ats_duplicate != null) query.append("exclude_ats_duplicate", String(args.exclude_ats_duplicate)) if (args.exclude_recruiter_fields != null) query.append("exclude_recruiter_fields", String(args.exclude_recruiter_fields)) if (args.seniority != null) query.append("seniority", String(args.seniority)) if (args.linkedin_id != null) query.append("linkedin_id", String(args.linkedin_id)) if (args.id != null) query.append("id", String(args.id)) const url = `${baseUrl.replace(/\/+$/, '')}/fantastic-jobs/v1/active-jb${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };