import { IUserService } from "./resources/user/userService"; import { IBookmarkListService } from "./resources/bookmarkList/service"; import { IBookmarkService } from "./resources/bookmark/bookmarkService"; import { IPoiService } from "./resources/poi/service"; import { IPartnerActivityService } from "./resources/partnerActivity/service"; import { ITagService } from "./resources/tag/service"; import { IPlaceService } from "./resources/place/service"; import { ISearchService } from "./resources/search/service"; import { IBlogPostService } from "./resources/blogPost/blogPostService"; import { IBlogCategoryService } from "./resources/blogCategory/blogCategoryService"; import { IBookmarkPopularityService } from "./resources/bookmarkPopularity/service"; import { ILodgingService } from "./resources/lodging/service"; import { IAvailabilityService } from "./resources/availability/service"; import { IAssociationService } from "./resources/association/service"; import { IAssociationEntryService } from "./resources/associationEntry/service"; import { IVideoService } from "./resources/video/service"; import { IVideoSourceService } from "./resources/videoSource/service"; import { IVideoPlaylistService } from "./resources/videoPlaylist/service"; import { IBlacklistItemService } from "./resources/blacklistItem/service"; import { ITagAssociationService } from "./resources/tagAssociation/service"; import { IProductService } from "./resources/product/service"; export interface IGetAccessTokenParams { scope: string[]; headers?: { Cookie: string; }; } export interface IGetAccessTokenResponse { accessToken: string; } export interface IGetAccessTokenError { error_description?: string; state?: string; error?: string; uri?: string; } export interface IAccessTokenResponse extends IGetAccessTokenError { access_token: string; } export interface IAuth { clientId: string; getAccessToken(params: IGetAccessTokenParams): Promise; } export interface IAuthParams { clientId: string; host: string; } export interface IFetchOptions { [key: string]: string | Object; } export interface IHttpClient { fetch(url: string, options?: IFetchOptions): Promise; } export interface IOpenPlanetNode { clientId: string; user: IUserService; availability: IAvailabilityService; blogPost: IBlogPostService; blogCategory: IBlogCategoryService; bookmarkPopularity: IBookmarkPopularityService; bookmarkList: IBookmarkListService; bookmark: IBookmarkService; lodging: ILodgingService; poi: IPoiService; place: IPlaceService; tag: ITagService; tagAssociation: ITagAssociationService; partnerActivity: IPartnerActivityService; search: ISearchService; association: IAssociationService; associationEntry: IAssociationEntryService; video: IVideoService; videoPlaylist: IVideoPlaylistService; videoSource: IVideoSourceService; blacklistItem: IBlacklistItemService; product: IProductService; authorize(params: IGetAccessTokenParams): Promise; setAccessToken(accessToken: string): void; } export interface IOpenPlanetNodeConfig { clientId: string; } export interface IClientFactory { (): T; } export declare type openPlanetResourceTypes = "place" | "narrative" | "thorntree-topic" | "poi" | "lodging"; export interface ISearchParams extends IFindParams { [key: string]: any; query: string; "op-id"?: string; "op-type"?: openPlanetResourceTypes | string; "topic-id"?: string; } export interface IAutocompleteParams extends IFindParams { [key: string]: any; query: string; } export interface IAvailabilityDates extends IFindParams { fromDate: string; toDate: string; } export interface IAvailabilityParams extends IFindParams { [key: string]: boolean | number | string | string[] | Partial; lodgings: string; availability: any; } export interface IFindParams { [key: string]: boolean | number | string | string[] | Partial; id?: number | string; include?: string[]; sort?: "none" | string; limit?: number; offset?: number; resource?: string; nocache?: string | boolean; extras?: { [key: string]: string | number; }; } export interface IFilterables { [key: string]: number | string; has_ancestor: number | string; like: string; equals: string; } export interface IBase { accessToken?: string; } export interface IService { accessToken?: string; findById(id: string, options?: IFindParams): Promise; destroy(id: string, options?: IFindParams): void; find(options?: IFindParams): Promise; update(attributes: T): void; create(attributes: T): Promise; } export interface IResourceMapper { map(resource: IJsonApiResponse): T | T[]; toModel(resource: R, included: any): T; toResource(model: T): R; } export interface IJsonApiResource { type: string; id: string; attributes: T; relationships?: R; links?: { self: string; [key: string]: string; }; } export interface IJsonApiResponse { meta?: { [key: string]: string | number; }; data: T | T[]; jsonapi?: string; links?: {}; included?: IJsonApiResource[]; } export interface IJsonApiRelationships { [key: string]: IJsonApiRelationship; } export interface IJsonApiRelationship { links?: { related?: string; }; data: IJsonApiRelationshipResource[] | IJsonApiRelationshipResource; } export interface IJsonApiRelationshipResource { id?: string; type?: string; } export interface IJsonApiError { id?: string; status?: string; code?: string; title?: string; detail?: string; source?: { pointer?: string; parameter?: string; }; } export interface IOpenIdUserInfoResponse { sub: string; name: string; given_name: string; family_name: string; preferred_username: string; email: string; picture: string; gender: string; updated_at: string; created_at: string; } export interface IAuthRequestOptions { clientId: string; scope: string[]; responseType?: string; redirectUri?: string; state?: string; nonce?: string; display?: string; prompt?: string[]; uiLocales?: string[]; claims?: Object; claimsLocales?: string[]; codeChallenge?: string; codeChallengeMethod?: string; loginHint?: string; idTokenHint?: string; targetLinkUri?: string; authMethod?: string; } export interface IAuthRequestParams { host: string; options: IAuthRequestOptions; } export interface IAuthRequestBuilder { buildUrl(queryObject: any): string; getLoginUrl(authMethod: any, redirect: any, settings: any): string; getRefreshUrl(authMethod: any, redirect: any, settings: any): string; getAccessTokenUrl(): string; } export interface IFetchOptions { body?: Object; headers?: Object; method?: string; } export interface IOpenPlanetNodeResponse { data: T; total?: number; links?: { [key: string]: string; }; } export declare type priceRange = "top-end" | "mid-range" | "budget";