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.

162 lines (161 loc) 6.14 kB
/** * A collection of utilities, SDKs, and types provided by the Sharetribe SDK. * * @module SharetribeSdkExports */ import SharetribeSdkExport from "./sdk"; import IntegrationSdkExport from "./integrationSdk"; import BigDecimal from "./sdkTypes/BigDecimal"; import UUID from "./sdkTypes/UUID"; import LatLng from "./sdkTypes/LatLng"; import LatLngBounds from "./sdkTypes/LatLngBounds"; import Money from "./sdkTypes/Money"; import { replacer, reviver } from "./utils/convert-types"; import MemoryStore from "./utils/stores/MemoryStore"; import BrowserStore from "./utils/stores/BrowserStore"; import ExpressStore from "./utils/stores/ExpressStore"; import { objectQueryString } from "./utils/util"; import { read, write } from "./utils/transit"; import { generateKey } from "./utils/stores/store"; export * from "./types/assets"; export * from "./types/authentication"; export * from "./types/integration/events"; export * from "./types/marketplace/availabilityExceptions"; export * from "./types/marketplace/availabilityPlan"; export * from "./types/marketplace/bookings"; export * from "./types/marketplace/currentUser"; export * from "./types/marketplace/images"; export * from "./types/marketplace/listings"; export * from "./types/marketplace/marketplace"; export * from "./types/marketplace/messages"; export * from "./types/marketplace/ownListings"; export * from "./types/marketplace/passwordReset"; export * from "./types/marketplace/processTransitions"; export * from "./types/marketplace/reviews"; export * from "./types/marketplace/stock"; export * from "./types/marketplace/stockAdjustment"; export * from "./types/marketplace/stockReservations"; export * from "./types/marketplace/stripeAccount"; export * from "./types/marketplace/stripeAccountLinks"; export * from "./types/marketplace/stripeCustomer"; export * from "./types/marketplace/stripePaymentMethod"; export * from "./types/marketplace/stripePersons"; export * from "./types/marketplace/stripeSetupIntents"; export * from "./types/marketplace/timeSlots"; export * from "./types/marketplace/transactions"; export * from "./types/marketplace/user"; export * from "./types/config"; export * from "./types/sharetribe"; export * from "./types/apiConfigs"; export * from "./types/config"; export * from "./types/store"; /** * SDK-specific types provided for advanced usage. */ export declare const sdkTypes: { /** A representation of a high-precision decimal number. */ BigDecimal: typeof BigDecimal; /** A geographical point with latitude and longitude. */ LatLng: typeof LatLng; /** A bounding box defined by northeast and southwest geographical points. */ LatLngBounds: typeof LatLngBounds; /** A monetary value with an amount and currency. */ Money: typeof Money; /** A universally unique identifier (UUID). */ UUID: typeof UUID; /** Replacer function for JSON serialization. */ replacer: (key: string, value: any) => any; /** Reviver function for JSON deserialization. */ reviver: (key: string, value: any) => any; }; export type SdkTypes = { BigDecimal: typeof BigDecimal; LatLng: typeof LatLng; LatLngBounds: typeof LatLngBounds; Money: typeof Money; UUID: typeof UUID; replacer: typeof replacer; reviver: typeof reviver; }; export type TokenStores = { MemoryStore: typeof MemoryStore; BrowserStore: typeof BrowserStore; ExpressStore: typeof ExpressStore; }; /** * Token store implementations for managing authentication tokens. */ export declare const TokenStores: TokenStores; export type Transit = { read: typeof read; write: typeof write; }; /** * Transit utilities for reading and writing transit data. */ export declare const transit: Transit; /** * Export the Sharetribe SDK and Integration SDK. */ export declare const SharetribeSdk: typeof SharetribeSdkExport; export type SharetribeSdk = SharetribeSdkExport; export declare const IntegrationSdk: typeof IntegrationSdkExport; export type IntegrationSdk = IntegrationSdkExport; /** * Utility functions for data manipulation. */ export declare const util: { /** Serializes an object into a custom query string format. */ objectQueryString: (obj: { [x: string]: any; }) => string; generateKey: (clientId: string, namespace: string) => string; }; export type Util = { objectQueryString: typeof objectQueryString; generateKey: typeof generateKey; }; declare const defaultExport: { /** Export of the Sharetribe SDK. */ SharetribeSdk: typeof SharetribeSdkExport; /** Export of the Integration SDK. */ SharetribeIntegrationSdk: typeof IntegrationSdkExport; /** Export of available token stores. */ TokenStores: TokenStores; /** Export of SDK-specific types. */ sdkTypes: { /** A representation of a high-precision decimal number. */ BigDecimal: typeof BigDecimal; /** A geographical point with latitude and longitude. */ LatLng: typeof LatLng; /** A bounding box defined by northeast and southwest geographical points. */ LatLngBounds: typeof LatLngBounds; /** A monetary value with an amount and currency. */ Money: typeof Money; /** A universally unique identifier (UUID). */ UUID: typeof UUID; /** Replacer function for JSON serialization. */ replacer: (key: string, value: any) => any; /** Reviver function for JSON deserialization. */ reviver: (key: string, value: any) => any; }; /** Export of utility functions. */ util: { /** Serializes an object into a custom query string format. */ objectQueryString: (obj: { [x: string]: any; }) => string; generateKey: (clientId: string, namespace: string) => string; }; /** Export of Transit utilities. */ transit: Transit; }; export default defaultExport; export type DefaultExport = { SharetribeSdk: SharetribeSdkExport; SharetribeIntegrationSdk: IntegrationSdkExport; TokenStores: typeof TokenStores; sdkTypes: typeof sdkTypes; util: typeof util; transit: typeof transit; };