import { AuthClient } from './auth/authClient'; import { Transporter } from './transporters'; /** * service constructor options */ export interface IOptions { /** * API endpoint * @example * http://localhost:8081 */ endpoint: string; /** * OAuth2 client object */ auth?: AuthClient; /** * transporter object */ transporter?: Transporter; /** * サービスを使用するプロジェクト */ project?: { id?: string; }; } export interface IFetchOptions { uri: string; form?: any; qs?: any; method: string; headers?: { [key: string]: any; }; body?: any; expectedStatusCodes: number[]; } /** * base service class */ export declare class Service { options: IOptions; constructor(options: IOptions); /** * Create and send request to API */ fetch(options: IFetchOptions): Promise; } /** * 検索結果インターフェース */ export interface ISearchResult { /** * マッチ数 */ totalCount?: number; /** * マッチデータ */ data: T; } export interface IProjectionSearchConditions { $projection?: { [key: string]: number; }; } export interface IUnset { $unset?: { [key: string]: 1; }; }