@vansite/ts-sharetribe-flex-sdk 1.0.34 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/endpoints/assets/index.d.ts +47 -0
- package/dist/endpoints/auth/index.d.ts +45 -0
- package/dist/endpoints/integrationApi/AvailabilityExceptions.d.ts +66 -0
- package/dist/endpoints/integrationApi/Events.d.ts +43 -0
- package/dist/endpoints/integrationApi/Images.d.ts +36 -0
- package/dist/endpoints/integrationApi/Listings.d.ts +87 -0
- package/dist/endpoints/integrationApi/Marketplace.d.ts +30 -0
- package/dist/endpoints/integrationApi/Stock.d.ts +42 -0
- package/dist/endpoints/integrationApi/StockAdjustments.d.ts +64 -0
- package/dist/{types/endpoints/integrationApi/StockReservation.d.ts → endpoints/integrationApi/StockReservations.d.ts} +3 -4
- package/dist/endpoints/integrationApi/Transactions.d.ts +76 -0
- package/dist/endpoints/integrationApi/Users.d.ts +72 -0
- package/dist/endpoints/integrationApi/index.d.ts +58 -0
- package/dist/endpoints/marketplace/AvailabilityExceptions.d.ts +69 -0
- package/dist/endpoints/marketplace/Bookings.d.ts +45 -0
- package/dist/endpoints/marketplace/CurrentUser.d.ts +110 -0
- package/dist/endpoints/marketplace/Images.d.ts +38 -0
- package/dist/endpoints/marketplace/Listings.d.ts +52 -0
- package/dist/endpoints/marketplace/Marketplace.d.ts +33 -0
- package/dist/endpoints/marketplace/Messages.d.ts +51 -0
- package/dist/endpoints/marketplace/OwnListings.d.ts +116 -0
- package/dist/endpoints/marketplace/PasswordReset.d.ts +50 -0
- package/dist/endpoints/marketplace/ProcessTransitions.d.ts +42 -0
- package/dist/endpoints/marketplace/Reviews.d.ts +49 -0
- package/dist/endpoints/marketplace/SitemapData.d.ts +60 -0
- package/dist/endpoints/marketplace/Stock.d.ts +50 -0
- package/dist/endpoints/marketplace/StockAdjustments.d.ts +64 -0
- package/dist/endpoints/marketplace/StripeAccount.d.ts +56 -0
- package/dist/endpoints/marketplace/StripeAccountLinks.d.ts +42 -0
- package/dist/endpoints/marketplace/StripeCustomer.d.ts +62 -0
- package/dist/endpoints/marketplace/StripePersons.d.ts +37 -0
- package/dist/endpoints/marketplace/StripeSetupIntents.d.ts +42 -0
- package/dist/endpoints/marketplace/TimeSlots.d.ts +40 -0
- package/dist/endpoints/marketplace/Transactions.d.ts +89 -0
- package/dist/endpoints/marketplace/Users.d.ts +34 -0
- package/dist/endpoints/marketplace/index.d.ts +82 -0
- package/dist/index.d.ts +161 -0
- package/dist/index.js +3 -0
- package/dist/{ts-sharetribe-flex-sdk.cjs.LICENSE.txt → index.js.LICENSE.txt} +35 -5
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/{ts-sharetribe-flex-sdk.js.LICENSE.txt → index.mjs.LICENSE.txt} +35 -5
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +3 -0
- package/dist/{ts-sharetribe-flex-sdk.mjs.LICENSE.txt → index.umd.js.LICENSE.txt} +35 -5
- package/dist/index.umd.js.map +1 -0
- package/dist/integrationSdk.d.ts +119 -0
- package/dist/sdk.d.ts +211 -0
- package/dist/sdkTypes/BigDecimal.d.ts +30 -0
- package/dist/sdkTypes/LatLng.d.ts +34 -0
- package/dist/sdkTypes/LatLngBounds.d.ts +51 -0
- package/dist/sdkTypes/Money.d.ts +35 -0
- package/dist/sdkTypes/UUID.d.ts +45 -0
- package/dist/types/apiConfigs.d.ts +104 -0
- package/dist/types/assets/index.d.ts +101 -0
- package/dist/types/authentication/index.d.ts +152 -0
- package/dist/types/axios.d.ts +10 -0
- package/dist/types/config.d.ts +99 -0
- package/dist/types/endpoints/assets/index.d.ts +22 -36
- package/dist/types/endpoints/assets/index.d.ts.map +1 -1
- package/dist/types/endpoints/auth/index.d.ts +20 -41
- package/dist/types/endpoints/auth/index.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts +30 -49
- package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Events.d.ts +23 -27
- package/dist/types/endpoints/integrationApi/Events.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Images.d.ts +17 -28
- package/dist/types/endpoints/integrationApi/Images.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Listings.d.ts +42 -104
- package/dist/types/endpoints/integrationApi/Listings.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Marketplace.d.ts +12 -20
- package/dist/types/endpoints/integrationApi/Marketplace.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Stock.d.ts +22 -28
- package/dist/types/endpoints/integrationApi/Stock.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts +35 -35
- package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/StockReservations.d.ts +43 -0
- package/dist/types/endpoints/integrationApi/StockReservations.d.ts.map +1 -0
- package/dist/types/endpoints/integrationApi/Transactions.d.ts +36 -80
- package/dist/types/endpoints/integrationApi/Transactions.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Users.d.ts +35 -70
- package/dist/types/endpoints/integrationApi/Users.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/index.d.ts +40 -40
- package/dist/types/endpoints/integrationApi/index.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts +34 -48
- package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Bookings.d.ts +24 -23
- package/dist/types/endpoints/marketplace/Bookings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/CurrentUser.d.ts +54 -125
- package/dist/types/endpoints/marketplace/CurrentUser.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Images.d.ts +19 -27
- package/dist/types/endpoints/marketplace/Images.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Listings.d.ts +26 -25
- package/dist/types/endpoints/marketplace/Listings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Marketplace.d.ts +15 -19
- package/dist/types/endpoints/marketplace/Marketplace.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Messages.d.ts +24 -29
- package/dist/types/endpoints/marketplace/Messages.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/OwnListings.d.ts +55 -119
- package/dist/types/endpoints/marketplace/OwnListings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/PasswordReset.d.ts +23 -35
- package/dist/types/endpoints/marketplace/PasswordReset.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts +22 -22
- package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Reviews.d.ts +23 -25
- package/dist/types/endpoints/marketplace/Reviews.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/SitemapData.d.ts +61 -0
- package/dist/types/endpoints/marketplace/SitemapData.d.ts.map +1 -0
- package/dist/types/endpoints/marketplace/Stock.d.ts +30 -26
- package/dist/types/endpoints/marketplace/Stock.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StockAdjustments.d.ts +36 -34
- package/dist/types/endpoints/marketplace/StockAdjustments.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeAccount.d.ts +28 -49
- package/dist/types/endpoints/marketplace/StripeAccount.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts +22 -31
- package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeCustomer.d.ts +32 -46
- package/dist/types/endpoints/marketplace/StripeCustomer.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripePersons.d.ts +17 -25
- package/dist/types/endpoints/marketplace/StripePersons.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts +24 -24
- package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/TimeSlots.d.ts +20 -23
- package/dist/types/endpoints/marketplace/TimeSlots.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Transactions.d.ts +45 -81
- package/dist/types/endpoints/marketplace/Transactions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Users.d.ts +15 -22
- package/dist/types/endpoints/marketplace/Users.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/index.d.ts +52 -40
- package/dist/types/endpoints/marketplace/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +15 -30
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/integration/events.d.ts +87 -0
- package/dist/types/integrationSdk.d.ts +4 -5
- package/dist/types/integrationSdk.d.ts.map +1 -1
- package/dist/types/marketplace/availabilityExceptions.d.ts +99 -0
- package/dist/types/marketplace/availabilityPlan.d.ts +17 -0
- package/dist/types/marketplace/bookings.d.ts +80 -0
- package/dist/types/marketplace/currentUser.d.ts +202 -0
- package/dist/types/marketplace/images.d.ts +65 -0
- package/dist/types/marketplace/listings.d.ts +169 -0
- package/dist/types/marketplace/marketplace.d.ts +30 -0
- package/dist/types/marketplace/messages.d.ts +87 -0
- package/dist/types/marketplace/ownListings.d.ts +155 -0
- package/dist/types/marketplace/passwordReset.d.ts +54 -0
- package/dist/types/marketplace/processTransitions.d.ts +56 -0
- package/dist/types/marketplace/reviews.d.ts +108 -0
- package/dist/types/marketplace/sitemapData.d.ts +47 -0
- package/dist/types/marketplace/stock.d.ts +45 -0
- package/dist/types/marketplace/stockAdjustment.d.ts +97 -0
- package/dist/types/marketplace/stockReservations.d.ts +89 -0
- package/dist/types/marketplace/stripeAccount.d.ts +67 -0
- package/dist/types/marketplace/stripeAccountLinks.d.ts +55 -0
- package/dist/types/marketplace/stripeCustomer.d.ts +94 -0
- package/dist/types/marketplace/stripePaymentMethod.d.ts +21 -0
- package/dist/types/marketplace/stripePersons.d.ts +48 -0
- package/dist/types/marketplace/stripeSetupIntents.d.ts +48 -0
- package/dist/types/marketplace/timeSlots.d.ts +51 -0
- package/dist/types/marketplace/transactions.d.ts +200 -0
- package/dist/types/marketplace/user.d.ts +200 -0
- package/dist/types/sdk-types.d.ts +10 -0
- package/dist/types/sdk.d.ts +6 -7
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdkTypes/BigDecimal.d.ts +1 -1
- package/dist/types/sdkTypes/BigDecimal.d.ts.map +1 -1
- package/dist/types/sdkTypes/LatLng.d.ts +1 -1
- package/dist/types/sdkTypes/LatLng.d.ts.map +1 -1
- package/dist/types/sdkTypes/LatLngBounds.d.ts +1 -1
- package/dist/types/sdkTypes/LatLngBounds.d.ts.map +1 -1
- package/dist/types/sdkTypes/Money.d.ts +9 -2
- package/dist/types/sdkTypes/Money.d.ts.map +1 -1
- package/dist/types/sdkTypes/UUID.d.ts +8 -1
- package/dist/types/sdkTypes/UUID.d.ts.map +1 -1
- package/dist/types/sharetribe.d.ts +227 -0
- package/dist/types/store.d.ts +22 -0
- package/dist/types/types/apiConfigs.d.ts.map +1 -1
- package/dist/types/types/assets/index.d.ts +74 -36
- package/dist/types/types/assets/index.d.ts.map +1 -1
- package/dist/types/types/authentication/index.d.ts +111 -60
- package/dist/types/types/authentication/index.d.ts.map +1 -1
- package/dist/types/types/axios.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +1 -39
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/types/integration/events.d.ts +52 -20
- package/dist/types/types/integration/events.d.ts.map +1 -1
- package/dist/types/types/marketplace/availabilityExceptions.d.ts +59 -16
- package/dist/types/types/marketplace/availabilityExceptions.d.ts.map +1 -1
- package/dist/types/types/marketplace/availabilityPlan.d.ts +18 -0
- package/dist/types/types/marketplace/availabilityPlan.d.ts.map +1 -0
- package/dist/types/types/marketplace/bookings.d.ts +48 -14
- package/dist/types/types/marketplace/bookings.d.ts.map +1 -1
- package/dist/types/types/marketplace/currentUser.d.ts +99 -55
- package/dist/types/types/marketplace/currentUser.d.ts.map +1 -1
- package/dist/types/types/marketplace/images.d.ts +40 -14
- package/dist/types/types/marketplace/images.d.ts.map +1 -1
- package/dist/types/types/marketplace/listings.d.ts +96 -66
- package/dist/types/types/marketplace/listings.d.ts.map +1 -1
- package/dist/types/types/marketplace/marketplace.d.ts +16 -6
- package/dist/types/types/marketplace/marketplace.d.ts.map +1 -1
- package/dist/types/types/marketplace/messages.d.ts +53 -15
- package/dist/types/types/marketplace/messages.d.ts.map +1 -1
- package/dist/types/types/marketplace/ownListings.d.ts +92 -65
- package/dist/types/types/marketplace/ownListings.d.ts.map +1 -1
- package/dist/types/types/marketplace/passwordReset.d.ts +32 -9
- package/dist/types/types/marketplace/passwordReset.d.ts.map +1 -1
- package/dist/types/types/marketplace/processTransitions.d.ts +33 -14
- package/dist/types/types/marketplace/processTransitions.d.ts.map +1 -1
- package/dist/types/types/marketplace/reviews.d.ts +72 -23
- package/dist/types/types/marketplace/reviews.d.ts.map +1 -1
- package/dist/types/types/marketplace/sitemapData.d.ts +48 -0
- package/dist/types/types/marketplace/sitemapData.d.ts.map +1 -0
- package/dist/types/types/marketplace/stock.d.ts +23 -6
- package/dist/types/types/marketplace/stock.d.ts.map +1 -1
- package/dist/types/types/marketplace/stockAdjustment.d.ts +60 -14
- package/dist/types/types/marketplace/stockAdjustment.d.ts.map +1 -1
- package/dist/types/types/marketplace/stockReservations.d.ts +59 -14
- package/dist/types/types/marketplace/stockReservations.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeAccount.d.ts +28 -5
- package/dist/types/types/marketplace/stripeAccount.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeAccountLinks.d.ts +26 -6
- package/dist/types/types/marketplace/stripeAccountLinks.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeCustomer.d.ts +60 -13
- package/dist/types/types/marketplace/stripeCustomer.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripePaymentMethod.d.ts +1 -2
- package/dist/types/types/marketplace/stripePaymentMethod.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripePersons.d.ts +17 -15
- package/dist/types/types/marketplace/stripePersons.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeSetupIntents.d.ts +16 -14
- package/dist/types/types/marketplace/stripeSetupIntents.d.ts.map +1 -1
- package/dist/types/types/marketplace/timeSlots.d.ts +13 -15
- package/dist/types/types/marketplace/timeSlots.d.ts.map +1 -1
- package/dist/types/types/marketplace/transactions.d.ts +77 -83
- package/dist/types/types/marketplace/transactions.d.ts.map +1 -1
- package/dist/types/types/marketplace/user.d.ts +85 -64
- package/dist/types/types/marketplace/user.d.ts.map +1 -1
- package/dist/types/types/sharetribe.d.ts +130 -92
- package/dist/types/types/sharetribe.d.ts.map +1 -1
- package/dist/types/types/store.d.ts +3 -14
- package/dist/types/types/store.d.ts.map +1 -1
- package/dist/types/utils/apis.d.ts +1 -1
- package/dist/types/utils/apis.d.ts.map +1 -1
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/prepare-axios-instance.d.ts +1 -1
- package/dist/types/utils/prepare-axios-instance.d.ts.map +1 -1
- package/dist/types/utils/stores/BrowserStore.d.ts +17 -4
- package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -1
- package/dist/types/utils/stores/ExpressStore.d.ts +26 -8
- package/dist/types/utils/stores/ExpressStore.d.ts.map +1 -1
- package/dist/types/utils/stores/MemoryStore.d.ts +1 -2
- package/dist/types/utils/stores/MemoryStore.d.ts.map +1 -1
- package/dist/types/utils/transit.d.ts +1 -1
- package/dist/types/utils/transit.d.ts.map +1 -1
- package/dist/types/utils/util.d.ts +2 -2
- package/dist/types/utils/util.d.ts.map +1 -1
- package/dist/utils/apis.d.ts +8 -0
- package/dist/utils/config.d.ts +32 -0
- package/dist/utils/convert-types.d.ts +13 -0
- package/dist/utils/parameter-serializer.d.ts +23 -0
- package/dist/utils/prepare-axios-instance.d.ts +14 -0
- package/dist/utils/stores/BrowserStore.d.ts +51 -0
- package/dist/utils/stores/ExpressStore.d.ts +67 -0
- package/dist/utils/stores/MemoryStore.d.ts +23 -0
- package/dist/utils/stores/store.d.ts +8 -0
- package/dist/utils/transit.d.ts +28 -0
- package/dist/utils/util.d.ts +15 -0
- package/package.json +16 -14
- package/dist/ts-sharetribe-flex-sdk.cjs +0 -3
- package/dist/ts-sharetribe-flex-sdk.cjs.map +0 -1
- package/dist/ts-sharetribe-flex-sdk.js +0 -3
- package/dist/ts-sharetribe-flex-sdk.js.map +0 -1
- package/dist/ts-sharetribe-flex-sdk.mjs +0 -3
- package/dist/ts-sharetribe-flex-sdk.mjs.map +0 -1
- package/dist/types/endpoints/integrationApi/StockReservation.d.ts.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Client for the Sharetribe Marketplace API.
|
|
3
|
+
*
|
|
4
|
+
* This is the main entry point for client-side applications.
|
|
5
|
+
* Provides access to all public and authenticated endpoints:
|
|
6
|
+
* - Listings, bookings, messages, reviews
|
|
7
|
+
* - Current user management (signup, profile, password)
|
|
8
|
+
* - Image uploads, Stripe payments
|
|
9
|
+
* - Availability & stock queries
|
|
10
|
+
*
|
|
11
|
+
* Use `sdk.marketplace` for all frontend or authenticated user flows.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const sdk = new SharetribeSdk({ clientId: "abc123" });
|
|
15
|
+
*
|
|
16
|
+
* // Fetch current user
|
|
17
|
+
* const { data: user } = await sdk.marketplace.currentUser.show();
|
|
18
|
+
*
|
|
19
|
+
* // Query public listings
|
|
20
|
+
* const { data: listings } = await sdk.marketplace.listings.query({ perPage: 20 });
|
|
21
|
+
*/
|
|
22
|
+
import type { AxiosInstance } from "axios";
|
|
23
|
+
import SharetribeSdk from "../../sdk";
|
|
24
|
+
import AvailabilityExceptions from "./AvailabilityExceptions";
|
|
25
|
+
import Bookings from "./Bookings";
|
|
26
|
+
import CurrentUser from "./CurrentUser";
|
|
27
|
+
import Images from "./Images";
|
|
28
|
+
import Listings from "./Listings";
|
|
29
|
+
import Marketplace from "./Marketplace";
|
|
30
|
+
import Messages from "./Messages";
|
|
31
|
+
import OwnListings from "./OwnListings";
|
|
32
|
+
import PasswordReset from "./PasswordReset";
|
|
33
|
+
import ProcessTransitions from "./ProcessTransitions";
|
|
34
|
+
import Reviews from "./Reviews";
|
|
35
|
+
import SitemapData from "./SitemapData";
|
|
36
|
+
import Stock from "./Stock";
|
|
37
|
+
import StockAdjustments from "./StockAdjustments";
|
|
38
|
+
import StripeAccount from "./StripeAccount";
|
|
39
|
+
import StripeAccountLinks from "./StripeAccountLinks";
|
|
40
|
+
import StripeCustomer from "./StripeCustomer";
|
|
41
|
+
import StripePersons from "./StripePersons";
|
|
42
|
+
import StripeSetupIntents from "./StripeSetupIntents";
|
|
43
|
+
import TimeSlots from "./TimeSlots";
|
|
44
|
+
import Transactions from "./Transactions";
|
|
45
|
+
import Users from "./Users";
|
|
46
|
+
/**
|
|
47
|
+
* Marketplace API client
|
|
48
|
+
*/
|
|
49
|
+
declare class MarketplaceApi {
|
|
50
|
+
/** Axios instance with auth & base config */
|
|
51
|
+
readonly axios: AxiosInstance;
|
|
52
|
+
/** Base URL for all Marketplace API endpoints */
|
|
53
|
+
readonly endpoint: string;
|
|
54
|
+
/** Default headers (includes Authorization when logged in) */
|
|
55
|
+
readonly headers: Record<string, string>;
|
|
56
|
+
/** Most endpoints require authentication */
|
|
57
|
+
readonly authRequired = true;
|
|
58
|
+
readonly availabilityExceptions: AvailabilityExceptions;
|
|
59
|
+
readonly bookings: Bookings;
|
|
60
|
+
readonly currentUser: CurrentUser;
|
|
61
|
+
readonly images: Images;
|
|
62
|
+
readonly listings: Listings;
|
|
63
|
+
readonly marketplace: Marketplace;
|
|
64
|
+
readonly messages: Messages;
|
|
65
|
+
readonly ownListings: OwnListings;
|
|
66
|
+
readonly passwordReset: PasswordReset;
|
|
67
|
+
readonly processTransitions: ProcessTransitions;
|
|
68
|
+
readonly reviews: Reviews;
|
|
69
|
+
readonly sitemapData: SitemapData;
|
|
70
|
+
readonly stock: Stock;
|
|
71
|
+
readonly stockAdjustments: StockAdjustments;
|
|
72
|
+
readonly stripeAccount: StripeAccount;
|
|
73
|
+
readonly stripeAccountLinks: StripeAccountLinks;
|
|
74
|
+
readonly stripeCustomer: StripeCustomer;
|
|
75
|
+
readonly stripePersons: StripePersons;
|
|
76
|
+
readonly stripeSetupIntents: StripeSetupIntents;
|
|
77
|
+
readonly timeslots: TimeSlots;
|
|
78
|
+
readonly transactions: Transactions;
|
|
79
|
+
readonly users: Users;
|
|
80
|
+
constructor(sdk: SharetribeSdk);
|
|
81
|
+
}
|
|
82
|
+
export default MarketplaceApi;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of utilities, SDKs, and types provided by the Sharetribe SDK.
|
|
3
|
+
*
|
|
4
|
+
* @module SharetribeSdkExports
|
|
5
|
+
*/
|
|
6
|
+
import SharetribeSdkExport from "./sdk";
|
|
7
|
+
import IntegrationSdkExport from "./integrationSdk";
|
|
8
|
+
import BigDecimal from "./sdkTypes/BigDecimal";
|
|
9
|
+
import UUID from "./sdkTypes/UUID";
|
|
10
|
+
import LatLng from "./sdkTypes/LatLng";
|
|
11
|
+
import LatLngBounds from "./sdkTypes/LatLngBounds";
|
|
12
|
+
import Money from "./sdkTypes/Money";
|
|
13
|
+
import { replacer, reviver } from "./utils/convert-types";
|
|
14
|
+
import MemoryStore from "./utils/stores/MemoryStore";
|
|
15
|
+
import BrowserStore from "./utils/stores/BrowserStore";
|
|
16
|
+
import ExpressStore from "./utils/stores/ExpressStore";
|
|
17
|
+
import { objectQueryString } from "./utils/util";
|
|
18
|
+
import { read, write } from "./utils/transit";
|
|
19
|
+
import { generateKey } from "./utils/stores/store";
|
|
20
|
+
export * from "./types/assets";
|
|
21
|
+
export * from "./types/authentication";
|
|
22
|
+
export * from "./types/integration/events";
|
|
23
|
+
export * from "./types/marketplace/availabilityExceptions";
|
|
24
|
+
export * from "./types/marketplace/availabilityPlan";
|
|
25
|
+
export * from "./types/marketplace/bookings";
|
|
26
|
+
export * from "./types/marketplace/currentUser";
|
|
27
|
+
export * from "./types/marketplace/images";
|
|
28
|
+
export * from "./types/marketplace/listings";
|
|
29
|
+
export * from "./types/marketplace/marketplace";
|
|
30
|
+
export * from "./types/marketplace/messages";
|
|
31
|
+
export * from "./types/marketplace/ownListings";
|
|
32
|
+
export * from "./types/marketplace/passwordReset";
|
|
33
|
+
export * from "./types/marketplace/processTransitions";
|
|
34
|
+
export * from "./types/marketplace/reviews";
|
|
35
|
+
export * from "./types/marketplace/stock";
|
|
36
|
+
export * from "./types/marketplace/stockAdjustment";
|
|
37
|
+
export * from "./types/marketplace/stockReservations";
|
|
38
|
+
export * from "./types/marketplace/stripeAccount";
|
|
39
|
+
export * from "./types/marketplace/stripeAccountLinks";
|
|
40
|
+
export * from "./types/marketplace/stripeCustomer";
|
|
41
|
+
export * from "./types/marketplace/stripePaymentMethod";
|
|
42
|
+
export * from "./types/marketplace/stripePersons";
|
|
43
|
+
export * from "./types/marketplace/stripeSetupIntents";
|
|
44
|
+
export * from "./types/marketplace/timeSlots";
|
|
45
|
+
export * from "./types/marketplace/transactions";
|
|
46
|
+
export * from "./types/marketplace/user";
|
|
47
|
+
export * from "./types/config";
|
|
48
|
+
export * from "./types/sharetribe";
|
|
49
|
+
export * from "./types/apiConfigs";
|
|
50
|
+
export * from "./types/config";
|
|
51
|
+
export * from "./types/store";
|
|
52
|
+
/**
|
|
53
|
+
* SDK-specific types provided for advanced usage.
|
|
54
|
+
*/
|
|
55
|
+
export declare const sdkTypes: {
|
|
56
|
+
/** A representation of a high-precision decimal number. */
|
|
57
|
+
BigDecimal: typeof BigDecimal;
|
|
58
|
+
/** A geographical point with latitude and longitude. */
|
|
59
|
+
LatLng: typeof LatLng;
|
|
60
|
+
/** A bounding box defined by northeast and southwest geographical points. */
|
|
61
|
+
LatLngBounds: typeof LatLngBounds;
|
|
62
|
+
/** A monetary value with an amount and currency. */
|
|
63
|
+
Money: typeof Money;
|
|
64
|
+
/** A universally unique identifier (UUID). */
|
|
65
|
+
UUID: typeof UUID;
|
|
66
|
+
/** Replacer function for JSON serialization. */
|
|
67
|
+
replacer: (key: string, value: any) => any;
|
|
68
|
+
/** Reviver function for JSON deserialization. */
|
|
69
|
+
reviver: (key: string, value: any) => any;
|
|
70
|
+
};
|
|
71
|
+
export type SdkTypes = {
|
|
72
|
+
BigDecimal: typeof BigDecimal;
|
|
73
|
+
LatLng: typeof LatLng;
|
|
74
|
+
LatLngBounds: typeof LatLngBounds;
|
|
75
|
+
Money: typeof Money;
|
|
76
|
+
UUID: typeof UUID;
|
|
77
|
+
replacer: typeof replacer;
|
|
78
|
+
reviver: typeof reviver;
|
|
79
|
+
};
|
|
80
|
+
export type TokenStores = {
|
|
81
|
+
MemoryStore: typeof MemoryStore;
|
|
82
|
+
BrowserStore: typeof BrowserStore;
|
|
83
|
+
ExpressStore: typeof ExpressStore;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Token store implementations for managing authentication tokens.
|
|
87
|
+
*/
|
|
88
|
+
export declare const TokenStores: TokenStores;
|
|
89
|
+
export type Transit = {
|
|
90
|
+
read: typeof read;
|
|
91
|
+
write: typeof write;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Transit utilities for reading and writing transit data.
|
|
95
|
+
*/
|
|
96
|
+
export declare const transit: Transit;
|
|
97
|
+
/**
|
|
98
|
+
* Export the Sharetribe SDK and Integration SDK.
|
|
99
|
+
*/
|
|
100
|
+
export declare const SharetribeSdk: typeof SharetribeSdkExport;
|
|
101
|
+
export type SharetribeSdk = SharetribeSdkExport;
|
|
102
|
+
export declare const IntegrationSdk: typeof IntegrationSdkExport;
|
|
103
|
+
export type IntegrationSdk = IntegrationSdkExport;
|
|
104
|
+
/**
|
|
105
|
+
* Utility functions for data manipulation.
|
|
106
|
+
*/
|
|
107
|
+
export declare const util: {
|
|
108
|
+
/** Serializes an object into a custom query string format. */
|
|
109
|
+
objectQueryString: (obj: {
|
|
110
|
+
[x: string]: any;
|
|
111
|
+
}) => string;
|
|
112
|
+
generateKey: (clientId: string, namespace: string) => string;
|
|
113
|
+
};
|
|
114
|
+
export type Util = {
|
|
115
|
+
objectQueryString: typeof objectQueryString;
|
|
116
|
+
generateKey: typeof generateKey;
|
|
117
|
+
};
|
|
118
|
+
declare const defaultExport: {
|
|
119
|
+
/** Export of the Sharetribe SDK. */
|
|
120
|
+
SharetribeSdk: typeof SharetribeSdkExport;
|
|
121
|
+
/** Export of the Integration SDK. */
|
|
122
|
+
SharetribeIntegrationSdk: typeof IntegrationSdkExport;
|
|
123
|
+
/** Export of available token stores. */
|
|
124
|
+
TokenStores: TokenStores;
|
|
125
|
+
/** Export of SDK-specific types. */
|
|
126
|
+
sdkTypes: {
|
|
127
|
+
/** A representation of a high-precision decimal number. */
|
|
128
|
+
BigDecimal: typeof BigDecimal;
|
|
129
|
+
/** A geographical point with latitude and longitude. */
|
|
130
|
+
LatLng: typeof LatLng;
|
|
131
|
+
/** A bounding box defined by northeast and southwest geographical points. */
|
|
132
|
+
LatLngBounds: typeof LatLngBounds;
|
|
133
|
+
/** A monetary value with an amount and currency. */
|
|
134
|
+
Money: typeof Money;
|
|
135
|
+
/** A universally unique identifier (UUID). */
|
|
136
|
+
UUID: typeof UUID;
|
|
137
|
+
/** Replacer function for JSON serialization. */
|
|
138
|
+
replacer: (key: string, value: any) => any;
|
|
139
|
+
/** Reviver function for JSON deserialization. */
|
|
140
|
+
reviver: (key: string, value: any) => any;
|
|
141
|
+
};
|
|
142
|
+
/** Export of utility functions. */
|
|
143
|
+
util: {
|
|
144
|
+
/** Serializes an object into a custom query string format. */
|
|
145
|
+
objectQueryString: (obj: {
|
|
146
|
+
[x: string]: any;
|
|
147
|
+
}) => string;
|
|
148
|
+
generateKey: (clientId: string, namespace: string) => string;
|
|
149
|
+
};
|
|
150
|
+
/** Export of Transit utilities. */
|
|
151
|
+
transit: Transit;
|
|
152
|
+
};
|
|
153
|
+
export default defaultExport;
|
|
154
|
+
export type DefaultExport = {
|
|
155
|
+
SharetribeSdk: SharetribeSdkExport;
|
|
156
|
+
SharetribeIntegrationSdk: IntegrationSdkExport;
|
|
157
|
+
TokenStores: typeof TokenStores;
|
|
158
|
+
sdkTypes: typeof sdkTypes;
|
|
159
|
+
util: typeof util;
|
|
160
|
+
transit: typeof transit;
|
|
161
|
+
};
|