UNPKG

@goteborgco/open-api-js-client

Version:

Official JavaScript client for the Göteborg & Co GraphQL API

38 lines (37 loc) 1.3 kB
import { Client } from '../client/Client'; import type { GuideFilter } from '../interfaces/common'; import { WpEntity as WpEntityClass } from '../entities/WpEntity'; import { Related as RelatedClass } from '../entities/Related'; export interface SingleGuideResponse { guide: WpEntityClass; related?: RelatedClass; } /** * Guides API for accessing guide content * * This class provides type-safe methods for querying and retrieving guide content * from the GraphQL API. */ export declare class Guides { private client; private readonly defaultGuideFields; constructor(client: Client); /** * List guides with optional filtering * * @param filter Optional filtering options * @param matchDate Optional matchDate * @param fields Optional GraphQL fields to return * @returns Array of guide entities */ list(filter: GuideFilter, matchDate?: string, fields?: string): Promise<WpEntityClass[]>; /** * Get a specific guide by ID * * @param id The guide ID * @param lang Language code ('en' or 'sv' or 'de') * @param fields Optional GraphQL fields to return * @returns Guide entity with related content */ getById(id: number, lang: 'en' | 'sv' | 'de', fields?: string): Promise<SingleGuideResponse>; }