@goteborgco/open-api-js-client
Version:
Official JavaScript client for the Göteborg & Co GraphQL API
38 lines (37 loc) • 1.29 kB
TypeScript
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')
* @param fields Optional GraphQL fields to return
* @returns Guide entity with related content
*/
getById(id: number, lang: 'en' | 'sv', fields?: string): Promise<SingleGuideResponse>;
}