@vansite/ts-sharetribe-flex-sdk 1.0.34 → 2.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/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 +80 -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} +13 -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} +13 -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} +13 -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 +28 -0
- package/dist/sdkTypes/UUID.d.ts +38 -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/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 +50 -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/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 +1 -1
- package/dist/types/sdkTypes/Money.d.ts.map +1 -1
- package/dist/types/sdkTypes/UUID.d.ts +1 -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/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.map +1 -1
- package/dist/types/utils/stores/BrowserStore.d.ts +1 -2
- package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -1
- package/dist/types/utils/stores/ExpressStore.d.ts +6 -7
- 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 +37 -0
- package/dist/utils/stores/ExpressStore.d.ts +48 -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
|
@@ -1,46 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class includes methods for creating persons associated with Stripe accounts.
|
|
2
|
+
* @fileoverview Client for creating Stripe Persons in the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A "Person" represents an individual associated with a Stripe Connect account
|
|
5
|
+
* (e.g. owner, director, representative). Required for compliance in many countries.
|
|
6
|
+
*
|
|
7
|
+
* @see https://www.sharetribe.com/api-reference/marketplace.html#stripe-persons
|
|
7
8
|
*/
|
|
8
|
-
import { AxiosResponse } from "axios";
|
|
9
|
+
import type { AxiosResponse } from "axios";
|
|
9
10
|
import MarketplaceApi from "./index";
|
|
10
|
-
import { StripePersonsCreateParameter, StripePersonsResponse } from "../../types
|
|
11
|
-
import { ExtraParameter } from "../../types/sharetribe";
|
|
11
|
+
import { ExtraParameter, StripePersonsCreateParameter, StripePersonsResponse } from "../../types";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The Stripe Persons API provides methods for creating persons associated with Stripe accounts, used for compliance and verification purposes.
|
|
13
|
+
* Stripe Persons API client (current user)
|
|
16
14
|
*/
|
|
17
15
|
declare class StripePersons {
|
|
18
|
-
|
|
16
|
+
readonly authRequired = true;
|
|
19
17
|
private readonly axios;
|
|
18
|
+
private readonly endpoint;
|
|
20
19
|
private readonly headers;
|
|
21
|
-
readonly authRequired = true;
|
|
22
|
-
/**
|
|
23
|
-
* Creates an instance of the StripePersons class.
|
|
24
|
-
*
|
|
25
|
-
* @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
|
|
26
|
-
*/
|
|
27
20
|
constructor(api: MarketplaceApi);
|
|
28
21
|
/**
|
|
29
|
-
*
|
|
22
|
+
* Create a new Person for the current user's Stripe Connect account
|
|
30
23
|
*
|
|
31
24
|
* @template P
|
|
32
25
|
* @template EP
|
|
33
|
-
* @param {P & StripePersonsCreateParameter} params
|
|
34
|
-
* @param {EP
|
|
35
|
-
* @returns {Promise<AxiosResponse<StripePersonsResponse<
|
|
26
|
+
* @param {P & StripePersonsCreateParameter} params
|
|
27
|
+
* @param {EP} [extraParams]
|
|
28
|
+
* @returns {Promise<AxiosResponse<StripePersonsResponse<"create">>>}
|
|
36
29
|
*
|
|
37
30
|
* @example
|
|
38
|
-
*
|
|
39
|
-
* personToken:
|
|
31
|
+
* await sdk.stripePersons.create({
|
|
32
|
+
* personToken: "person_tok_1AbC2DeFGhiJkLMnOPqRsTuV"
|
|
40
33
|
* });
|
|
41
|
-
* const personDetails = response.data;
|
|
42
34
|
*/
|
|
43
|
-
create<P extends StripePersonsCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripePersonsResponse<"create">>>;
|
|
35
|
+
create<P extends StripePersonsCreateParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<StripePersonsResponse<"create">>>;
|
|
44
36
|
}
|
|
45
37
|
export default StripePersons;
|
|
46
38
|
//# sourceMappingURL=StripePersons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripePersons.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripePersons.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"StripePersons.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripePersons.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,cAAc,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEjG;;GAEG;AACH,cAAM,aAAa;IACjB,SAAgB,YAAY,QAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,CAAC,SAAS,4BAA4B,EACtC,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;CAO3D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class includes methods for creating Stripe Setup Intents to set up payment methods for future use.
|
|
2
|
+
* @fileoverview Client for creating Stripe Setup Intents in the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A Setup Intent is used to save a payment method (e.g. card) for future use
|
|
5
|
+
* without charging immediately — ideal for marketplaces that charge later.
|
|
6
|
+
*
|
|
7
|
+
* Returns `client_secret` for use with Stripe.js / Elements.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.sharetribe.com/api-reference/marketplace.html#stripe-setup-intents
|
|
7
10
|
*/
|
|
8
|
-
import { AxiosResponse } from "axios";
|
|
11
|
+
import type { AxiosResponse } from "axios";
|
|
9
12
|
import MarketplaceApi from "./index";
|
|
10
|
-
import { StripeSetupIntentsCreateParameter, StripeSetupIntentsResponse } from "../../types
|
|
11
|
-
import { ExtraParameter } from "../../types/sharetribe";
|
|
13
|
+
import { ExtraParameter, StripeSetupIntentsCreateParameter, StripeSetupIntentsResponse } from "../../types";
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The Stripe Setup Intents API provides methods to securely create Setup Intents for Stripe payments.
|
|
15
|
+
* Stripe Setup Intents API client (current user)
|
|
16
16
|
*/
|
|
17
17
|
declare class StripeSetupIntents {
|
|
18
|
-
private readonly endpoint;
|
|
19
|
-
private readonly axios;
|
|
20
18
|
readonly authRequired = true;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
|
|
25
|
-
*/
|
|
19
|
+
private readonly axios;
|
|
20
|
+
private readonly endpoint;
|
|
21
|
+
private readonly headers;
|
|
26
22
|
constructor(api: MarketplaceApi);
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
24
|
+
* Create a new Setup Intent for saving a payment method
|
|
29
25
|
*
|
|
30
26
|
* @template P
|
|
31
27
|
* @template EP
|
|
32
|
-
* @param {P & StripeSetupIntentsCreateParameter} params
|
|
33
|
-
* @param {EP
|
|
34
|
-
* @returns {Promise<AxiosResponse<StripeSetupIntentsResponse<
|
|
28
|
+
* @param {P & StripeSetupIntentsCreateParameter} params
|
|
29
|
+
* @param {EP} [extraParams]
|
|
30
|
+
* @returns {Promise<AxiosResponse<StripeSetupIntentsResponse<"create">>>}
|
|
35
31
|
*
|
|
36
32
|
* @example
|
|
37
|
-
* const
|
|
38
|
-
*
|
|
33
|
+
* const { data } = await sdk.stripeSetupIntents.create({});
|
|
34
|
+
*
|
|
35
|
+
* // Use with Stripe.js
|
|
36
|
+
* stripe.confirmCardSetup(data.attributes.clientSecret, {
|
|
37
|
+
* payment_method: { card: cardElement }
|
|
38
|
+
* });
|
|
39
39
|
*/
|
|
40
|
-
create<P extends StripeSetupIntentsCreateParameter, EP extends ExtraParameter>(params
|
|
40
|
+
create<P extends StripeSetupIntentsCreateParameter, EP extends ExtraParameter | undefined = undefined>(params?: P, extraParams?: EP): Promise<AxiosResponse<StripeSetupIntentsResponse<"create">>>;
|
|
41
41
|
}
|
|
42
42
|
export default StripeSetupIntents;
|
|
43
43
|
//# sourceMappingURL=StripeSetupIntents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripeSetupIntents.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeSetupIntents.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"StripeSetupIntents.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeSetupIntents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,cAAc,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE3G;;GAEG;AACH,cAAM,kBAAkB;IACtB,SAAgB,YAAY,QAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CACV,CAAC,SAAS,iCAAiC,EAC3C,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,GAAE,CAAW,EACnB,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAC;CAOhE;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,42 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class includes methods for querying available time slots for marketplace resources.
|
|
2
|
+
* @fileoverview Client for querying time slots in the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Use this to fetch availability for listings that use time-based booking
|
|
5
|
+
* (e.g. hourly rentals, appointments, classes).
|
|
6
|
+
*
|
|
7
|
+
* Returns day or time-range slots with seat availability.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.sharetribe.com/api-reference/marketplace.html#time-slots
|
|
7
10
|
*/
|
|
8
|
-
import { AxiosResponse } from "axios";
|
|
11
|
+
import type { AxiosResponse } from "axios";
|
|
9
12
|
import MarketplaceApi from "./index";
|
|
10
|
-
import { TimeSlotsQueryParameter, TimeSlotsResponse } from "../../types
|
|
13
|
+
import { TimeSlotsQueryParameter, TimeSlotsResponse } from "../../types";
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* The Time Slots API provides methods for querying available time slots for bookings.
|
|
15
|
+
* Time Slots API client
|
|
15
16
|
*/
|
|
16
17
|
declare class TimeSlots {
|
|
17
|
-
private readonly endpoint;
|
|
18
18
|
private readonly axios;
|
|
19
|
+
private readonly endpoint;
|
|
19
20
|
private readonly headers;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an instance of the TimeSlots class.
|
|
22
|
-
*
|
|
23
|
-
* @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
|
|
24
|
-
*/
|
|
25
21
|
constructor(api: MarketplaceApi);
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
23
|
+
* Query available time slots for a listing
|
|
28
24
|
*
|
|
29
25
|
* @template P
|
|
30
|
-
* @param {P & TimeSlotsQueryParameter} params
|
|
31
|
-
* @returns {Promise<AxiosResponse<TimeSlotsResponse<
|
|
26
|
+
* @param {P & TimeSlotsQueryParameter} params
|
|
27
|
+
* @returns {Promise<AxiosResponse<TimeSlotsResponse<"query">>>}
|
|
32
28
|
*
|
|
33
29
|
* @example
|
|
34
|
-
* const
|
|
35
|
-
* listingId:
|
|
36
|
-
* start:
|
|
37
|
-
* end:
|
|
30
|
+
* const { data } = await sdk.timeSlots.query({
|
|
31
|
+
* listingId: "listing-abc123",
|
|
32
|
+
* start: "2025-06-01T00:00:00Z",
|
|
33
|
+
* end: "2025-06-07T23:59:59Z"
|
|
38
34
|
* });
|
|
39
|
-
*
|
|
35
|
+
*
|
|
36
|
+
* // `data` contains TimeSlot[] with `seats` and `start`/`end`
|
|
40
37
|
*/
|
|
41
38
|
query<P extends TimeSlotsQueryParameter>(params: P): Promise<AxiosResponse<TimeSlotsResponse<"query">>>;
|
|
42
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSlots.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/TimeSlots.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TimeSlots.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/TimeSlots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAExE;;GAEG;AACH,cAAM,SAAS;IACb,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;;OAeG;IACG,KAAK,CAAC,CAAC,SAAS,uBAAuB,EAC3C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;CAMtD;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,126 +1,90 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class includes methods for querying, initiating, transitioning, and managing transactions.
|
|
2
|
+
* @fileoverview Client for managing transactions in the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Use this to:
|
|
5
|
+
* - Query your own transactions
|
|
6
|
+
* - Initiate new orders/inquiries
|
|
7
|
+
* - Transition transactions (accept, complete, cancel, etc.)
|
|
8
|
+
* - Perform speculative transitions (dry-run)
|
|
9
|
+
*
|
|
10
|
+
* All operations require authentication.
|
|
11
|
+
*
|
|
12
|
+
* @see https://www.sharetribe.com/api-reference/marketplace.html#transactions
|
|
7
13
|
*/
|
|
8
|
-
import { AxiosResponse } from "axios";
|
|
14
|
+
import type { AxiosResponse } from "axios";
|
|
9
15
|
import MarketplaceApi from "./index";
|
|
10
|
-
import { TransactionsInitiateParameter, TransactionsInitiateSpeculativeParameter, TransactionsQueryParameter, TransactionsResponse, TransactionsShowParameter, TransactionsTransitionParameter, TransactionsTransitionSpeculativeParameter } from "../../types
|
|
11
|
-
import { ExtraParameter } from "../../types/sharetribe";
|
|
16
|
+
import { ExtraParameter, TransactionsInitiateParameter, TransactionsInitiateSpeculativeParameter, TransactionsQueryParameter, TransactionsResponse, TransactionsShowParameter, TransactionsTransitionParameter, TransactionsTransitionSpeculativeParameter } from "../../types";
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The Transactions API provides methods for managing marketplace transactions, including querying, initiating, and transitioning them.
|
|
18
|
+
* Transactions API client (current user)
|
|
16
19
|
*/
|
|
17
20
|
declare class Transactions {
|
|
18
|
-
|
|
21
|
+
readonly authRequired = true;
|
|
19
22
|
private readonly axios;
|
|
23
|
+
private readonly endpoint;
|
|
20
24
|
private readonly headers;
|
|
21
|
-
readonly authRequired = true;
|
|
22
|
-
/**
|
|
23
|
-
* Creates an instance of the Transactions class.
|
|
24
|
-
*
|
|
25
|
-
* @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
|
|
26
|
-
*/
|
|
27
25
|
constructor(api: MarketplaceApi);
|
|
28
26
|
/**
|
|
29
|
-
*
|
|
27
|
+
* Fetch a single transaction by ID
|
|
30
28
|
*
|
|
31
29
|
* @template P
|
|
32
|
-
* @param {P & TransactionsShowParameter} params
|
|
33
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* const response = await sdk.transactions.show({ id: 'transaction-id' });
|
|
37
|
-
* const transactionDetails = response.data;
|
|
30
|
+
* @param {P & TransactionsShowParameter} params
|
|
31
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"show", P>>>}
|
|
38
32
|
*/
|
|
39
33
|
show<P extends TransactionsShowParameter>(params: P): Promise<AxiosResponse<TransactionsResponse<"show", P>>>;
|
|
40
34
|
/**
|
|
41
|
-
*
|
|
35
|
+
* Query your own transactions
|
|
42
36
|
*
|
|
43
37
|
* @template P
|
|
44
|
-
* @param {P & TransactionsQueryParameter} params
|
|
45
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* const response = await sdk.transactions.query({ perPage: 10 });
|
|
49
|
-
* const transactions = response.data;
|
|
38
|
+
* @param {P & TransactionsQueryParameter} params
|
|
39
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"query", P>>>}
|
|
50
40
|
*/
|
|
51
|
-
query<P extends TransactionsQueryParameter>(params
|
|
41
|
+
query<P extends TransactionsQueryParameter>(params?: P): Promise<AxiosResponse<TransactionsResponse<"query", P>>>;
|
|
52
42
|
/**
|
|
53
|
-
*
|
|
43
|
+
* Initiate a new transaction (e.g. place an order)
|
|
54
44
|
*
|
|
55
45
|
* @template P
|
|
56
46
|
* @template EP
|
|
57
|
-
* @param {P & TransactionsInitiateParameter} params
|
|
58
|
-
* @param {EP
|
|
59
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* const response = await sdk.transactions.initiate({
|
|
63
|
-
* processAlias: 'order',
|
|
64
|
-
* transition: 'start',
|
|
65
|
-
* params: {}
|
|
66
|
-
* });
|
|
67
|
-
* const initiatedTransaction = response.data;
|
|
47
|
+
* @param {P & TransactionsInitiateParameter} params
|
|
48
|
+
* @param {EP} [extraParams]
|
|
49
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"initiate", P, EP>>>}
|
|
68
50
|
*/
|
|
69
|
-
initiate<P extends TransactionsInitiateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"initiate", P, EP>>>;
|
|
51
|
+
initiate<P extends TransactionsInitiateParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"initiate", P, EP>>>;
|
|
70
52
|
/**
|
|
71
|
-
*
|
|
53
|
+
* Initiate a transaction speculatively (dry-run)
|
|
72
54
|
*
|
|
73
55
|
* @template P
|
|
74
56
|
* @template EP
|
|
75
|
-
* @param {P & TransactionsInitiateSpeculativeParameter} params
|
|
76
|
-
* @param {EP
|
|
77
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* const response = await sdk.transactions.initiateSpeculative({
|
|
81
|
-
* processAlias: 'order',
|
|
82
|
-
* transition: 'start',
|
|
83
|
-
* params: {}
|
|
84
|
-
* });
|
|
85
|
-
* const speculativeTransaction = response.data;
|
|
57
|
+
* @param {P & TransactionsInitiateSpeculativeParameter} params
|
|
58
|
+
* @param {EP} [extraParams]
|
|
59
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"initiateSpeculative", P, EP>>>}
|
|
86
60
|
*/
|
|
87
|
-
initiateSpeculative<P extends TransactionsInitiateSpeculativeParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"initiateSpeculative", P, EP>>>;
|
|
61
|
+
initiateSpeculative<P extends TransactionsInitiateSpeculativeParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"initiateSpeculative", P, EP>>>;
|
|
88
62
|
/**
|
|
89
|
-
*
|
|
63
|
+
* Transition a transaction to a new state
|
|
90
64
|
*
|
|
91
65
|
* @template P
|
|
92
66
|
* @template EP
|
|
93
|
-
* @param {P & TransactionsTransitionParameter} params
|
|
94
|
-
* @param {EP
|
|
95
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
67
|
+
* @param {P & TransactionsTransitionParameter} params
|
|
68
|
+
* @param {EP} [extraParams]
|
|
69
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"transition", P, EP>>>}
|
|
96
70
|
*
|
|
97
71
|
* @example
|
|
98
|
-
*
|
|
99
|
-
* id:
|
|
100
|
-
* transition:
|
|
101
|
-
* params: { review: 5 }
|
|
72
|
+
* await sdk.transactions.transition({
|
|
73
|
+
* id: "tx-abc123",
|
|
74
|
+
* transition: "transition/confirm-payment"
|
|
102
75
|
* });
|
|
103
|
-
* const transitionedTransaction = response.data;
|
|
104
76
|
*/
|
|
105
|
-
transition<P extends TransactionsTransitionParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"transition", P, EP>>>;
|
|
77
|
+
transition<P extends TransactionsTransitionParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"transition", P, EP>>>;
|
|
106
78
|
/**
|
|
107
|
-
*
|
|
79
|
+
* Perform a speculative transition (dry-run)
|
|
108
80
|
*
|
|
109
81
|
* @template P
|
|
110
82
|
* @template EP
|
|
111
|
-
* @param {P & TransactionsTransitionSpeculativeParameter} params
|
|
112
|
-
* @param {EP
|
|
113
|
-
* @returns {Promise<AxiosResponse<TransactionsResponse<
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* const response = await sdk.transactions.transitionSpeculative({
|
|
117
|
-
* id: 'transaction-id',
|
|
118
|
-
* transition: 'complete',
|
|
119
|
-
* params: { review: 5 }
|
|
120
|
-
* });
|
|
121
|
-
* const speculativeTransitionedTransaction = response.data;
|
|
83
|
+
* @param {P & TransactionsTransitionSpeculativeParameter} params
|
|
84
|
+
* @param {EP} [extraParams]
|
|
85
|
+
* @returns {Promise<AxiosResponse<TransactionsResponse<"transitionSpeculative", P, EP>>>}
|
|
122
86
|
*/
|
|
123
|
-
transitionSpeculative<P extends TransactionsTransitionSpeculativeParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"transitionSpeculative", P, EP>>>;
|
|
87
|
+
transitionSpeculative<P extends TransactionsTransitionSpeculativeParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<TransactionsResponse<"transitionSpeculative", P, EP>>>;
|
|
124
88
|
}
|
|
125
89
|
export default Transactions;
|
|
126
90
|
//# sourceMappingURL=Transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Transactions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Transactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,cAAc,EACd,6BAA6B,EAC7B,wCAAwC,EACxC,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,+BAA+B,EAC/B,0CAA0C,EAC3C,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,cAAM,YAAY;IAChB,SAAgB,YAAY,QAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,GAAG,EAAE,cAAc;IAM/B;;;;;;OAMG;IACG,IAAI,CAAC,CAAC,SAAS,yBAAyB,EAC5C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAO1D;;;;;;OAMG;IACG,KAAK,CAAC,CAAC,SAAS,0BAA0B,EAC9C,MAAM,CAAC,EAAE,CAAC,GACT,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAO3D;;;;;;;;OAQG;IACG,QAAQ,CACZ,CAAC,SAAS,6BAA6B,EACvC,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQlE;;;;;;;;OAQG;IACG,mBAAmB,CACvB,CAAC,SAAS,wCAAwC,EAClD,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQ7E;;;;;;;;;;;;;;OAcG;IACG,UAAU,CACd,CAAC,SAAS,+BAA+B,EACzC,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQpE;;;;;;;;OAQG;IACG,qBAAqB,CACzB,CAAC,SAAS,0CAA0C,EACpD,EAAE,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEjD,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAOhF;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,40 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class includes methods for retrieving details about a specific user.
|
|
2
|
+
* @fileoverview Client for fetching public user profiles in the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Use this to retrieve publicly visible information about any user (e.g. name, bio, profile image).
|
|
5
|
+
* Only returns data the current user is allowed to see.
|
|
6
|
+
*
|
|
7
|
+
* @see https://www.sharetribe.com/api-reference/marketplace.html#show-user
|
|
7
8
|
*/
|
|
8
|
-
import { AxiosResponse } from "axios";
|
|
9
|
+
import type { AxiosResponse } from "axios";
|
|
9
10
|
import MarketplaceApi from "./index";
|
|
10
|
-
import { UsersResponse, UsersShowParameter } from "../../types
|
|
11
|
+
import { UsersResponse, UsersShowParameter } from "../../types";
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* The Users API provides methods for managing user data in the marketplace.
|
|
13
|
+
* Public Users API client
|
|
15
14
|
*/
|
|
16
15
|
declare class Users {
|
|
17
|
-
private readonly endpoint;
|
|
18
16
|
private readonly axios;
|
|
17
|
+
private readonly endpoint;
|
|
19
18
|
private readonly headers;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an instance of the Users class.
|
|
22
|
-
*
|
|
23
|
-
* @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
|
|
24
|
-
*/
|
|
25
19
|
constructor(api: MarketplaceApi);
|
|
26
20
|
/**
|
|
27
|
-
*
|
|
21
|
+
* Fetch a public user profile by ID
|
|
28
22
|
*
|
|
29
23
|
* @template P
|
|
30
|
-
* @param {P & UsersShowParameter} params
|
|
31
|
-
* @returns {Promise<AxiosResponse<UsersResponse<
|
|
24
|
+
* @param {P & UsersShowParameter} params
|
|
25
|
+
* @returns {Promise<AxiosResponse<UsersResponse<"show", P>>>}
|
|
32
26
|
*
|
|
33
27
|
* @example
|
|
34
|
-
* const
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* const userDetails = response.data;
|
|
28
|
+
* const { data } = await sdk.users.show({ id: "user-abc123" });
|
|
29
|
+
* console.log(data.attributes.profile.displayName);
|
|
30
|
+
* console.log(data.attributes.profile.bio);
|
|
38
31
|
*/
|
|
39
32
|
show<P extends UsersShowParameter>(params: P): Promise<AxiosResponse<UsersResponse<"show", P>>>;
|
|
40
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Users.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Users.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D;;GAEG;AACH,cAAM,KAAK;IACT,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;OAWG;IACG,IAAI,CAAC,CAAC,SAAS,kBAAkB,EACrC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;CAMpD;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* This class serves as the entry point for interacting with various resources such as listings, bookings, users, and payments.
|
|
2
|
+
* @fileoverview Client for the Sharetribe Marketplace API.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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 });
|
|
7
21
|
*/
|
|
22
|
+
import type { AxiosInstance } from "axios";
|
|
8
23
|
import SharetribeSdk from "../../sdk";
|
|
9
|
-
import { AxiosInstance } from "axios";
|
|
10
24
|
import AvailabilityExceptions from "./AvailabilityExceptions";
|
|
11
|
-
import Listings from "./Listings";
|
|
12
25
|
import Bookings from "./Bookings";
|
|
13
26
|
import CurrentUser from "./CurrentUser";
|
|
14
27
|
import Images from "./Images";
|
|
28
|
+
import Listings from "./Listings";
|
|
15
29
|
import Marketplace from "./Marketplace";
|
|
16
30
|
import Messages from "./Messages";
|
|
17
31
|
import OwnListings from "./OwnListings";
|
|
@@ -29,42 +43,38 @@ import TimeSlots from "./TimeSlots";
|
|
|
29
43
|
import Transactions from "./Transactions";
|
|
30
44
|
import Users from "./Users";
|
|
31
45
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* This class provides access to all available endpoints in the Sharetribe Marketplace API, enabling operations such as managing listings,
|
|
35
|
-
* handling transactions, updating user profiles, and integrating with Stripe.
|
|
46
|
+
* Marketplace API client
|
|
36
47
|
*/
|
|
37
48
|
declare class MarketplaceApi {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*/
|
|
49
|
+
/** Axios instance with auth & base config */
|
|
50
|
+
readonly axios: AxiosInstance;
|
|
51
|
+
/** Base URL for all Marketplace API endpoints */
|
|
52
|
+
readonly endpoint: string;
|
|
53
|
+
/** Default headers (includes Authorization when logged in) */
|
|
54
|
+
readonly headers: Record<string, string>;
|
|
55
|
+
/** Most endpoints require authentication */
|
|
56
|
+
readonly authRequired = true;
|
|
57
|
+
readonly availabilityExceptions: AvailabilityExceptions;
|
|
58
|
+
readonly bookings: Bookings;
|
|
59
|
+
readonly currentUser: CurrentUser;
|
|
60
|
+
readonly images: Images;
|
|
61
|
+
readonly listings: Listings;
|
|
62
|
+
readonly marketplace: Marketplace;
|
|
63
|
+
readonly messages: Messages;
|
|
64
|
+
readonly ownListings: OwnListings;
|
|
65
|
+
readonly passwordReset: PasswordReset;
|
|
66
|
+
readonly processTransitions: ProcessTransitions;
|
|
67
|
+
readonly reviews: Reviews;
|
|
68
|
+
readonly stock: Stock;
|
|
69
|
+
readonly stockAdjustments: StockAdjustments;
|
|
70
|
+
readonly stripeAccount: StripeAccount;
|
|
71
|
+
readonly stripeAccountLinks: StripeAccountLinks;
|
|
72
|
+
readonly stripeCustomer: StripeCustomer;
|
|
73
|
+
readonly stripePersons: StripePersons;
|
|
74
|
+
readonly stripeSetupIntents: StripeSetupIntents;
|
|
75
|
+
readonly timeslots: TimeSlots;
|
|
76
|
+
readonly transactions: Transactions;
|
|
77
|
+
readonly users: Users;
|
|
68
78
|
constructor(sdk: SharetribeSdk);
|
|
69
79
|
}
|
|
70
80
|
export default MarketplaceApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,aAAa,MAAM,WAAW,CAAC;AAEtC,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,cAAc;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAE9B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,QAAQ;IAG7B,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IACxD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;gBAEV,GAAG,EAAE,aAAa;CA8B/B;AAED,eAAe,cAAc,CAAC"}
|