UNPKG

@vansite/ts-sharetribe-flex-sdk

Version:

This is a TypeScript SDK for Sharetribe Flex API. It reduces the complexity of the API and provides a more user-friendly interface.

34 lines (33 loc) 1.18 kB
/** * @fileoverview Client for fetching marketplace configuration in the Sharetribe Marketplace API. * * Use this to get metadata about your marketplace — name, description, currency, logo, * supported countries, payout settings, and more. * * @see https://www.sharetribe.com/api-reference/marketplace.html#marketplace */ import type { AxiosResponse } from "axios"; import MarketplaceApi from "./index"; import { MarketplaceResponse } from "../../types"; /** * Public Marketplace API client */ declare class Marketplace { private readonly axios; private readonly endpoint; private readonly headers; constructor(api: MarketplaceApi); /** * Fetch current marketplace configuration * * @returns {Promise<AxiosResponse<MarketplaceResponse<"show">>>} * * @example * const { data } = await sdk.marketplace.show(); * console.log(data.attributes.name); // → "My Awesome Marketplace" * console.log(data.attributes.currency); // → "USD" * console.log(data.attributes.country); // → "FI" */ show(): Promise<AxiosResponse<MarketplaceResponse<"show">>>; } export default Marketplace;