@vansite/ts-sharetribe-flex-sdk 1.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.
Files changed (184) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +191 -0
  3. package/dist/ts-sharetribe-flex-sdk.cjs +3 -0
  4. package/dist/ts-sharetribe-flex-sdk.cjs.LICENSE.txt +701 -0
  5. package/dist/ts-sharetribe-flex-sdk.cjs.map +1 -0
  6. package/dist/ts-sharetribe-flex-sdk.js +3 -0
  7. package/dist/ts-sharetribe-flex-sdk.js.LICENSE.txt +701 -0
  8. package/dist/ts-sharetribe-flex-sdk.js.map +1 -0
  9. package/dist/ts-sharetribe-flex-sdk.mjs +3 -0
  10. package/dist/ts-sharetribe-flex-sdk.mjs.LICENSE.txt +701 -0
  11. package/dist/ts-sharetribe-flex-sdk.mjs.map +1 -0
  12. package/dist/types/endpoints/assets/index.d.ts +62 -0
  13. package/dist/types/endpoints/assets/index.d.ts.map +1 -0
  14. package/dist/types/endpoints/auth/index.d.ts +59 -0
  15. package/dist/types/endpoints/auth/index.d.ts.map +1 -0
  16. package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts +86 -0
  17. package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts.map +1 -0
  18. package/dist/types/endpoints/integrationApi/Events.d.ts +48 -0
  19. package/dist/types/endpoints/integrationApi/Events.d.ts.map +1 -0
  20. package/dist/types/endpoints/integrationApi/Images.d.ts +48 -0
  21. package/dist/types/endpoints/integrationApi/Images.d.ts.map +1 -0
  22. package/dist/types/endpoints/integrationApi/Listings.d.ts +150 -0
  23. package/dist/types/endpoints/integrationApi/Listings.d.ts.map +1 -0
  24. package/dist/types/endpoints/integrationApi/Marketplace.d.ts +39 -0
  25. package/dist/types/endpoints/integrationApi/Marketplace.d.ts.map +1 -0
  26. package/dist/types/endpoints/integrationApi/Stock.d.ts +48 -0
  27. package/dist/types/endpoints/integrationApi/Stock.d.ts.map +1 -0
  28. package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts +65 -0
  29. package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts.map +1 -0
  30. package/dist/types/endpoints/integrationApi/StockReservation.d.ts +43 -0
  31. package/dist/types/endpoints/integrationApi/StockReservation.d.ts.map +1 -0
  32. package/dist/types/endpoints/integrationApi/Transactions.d.ts +121 -0
  33. package/dist/types/endpoints/integrationApi/Transactions.d.ts.map +1 -0
  34. package/dist/types/endpoints/integrationApi/Users.d.ts +108 -0
  35. package/dist/types/endpoints/integrationApi/Users.d.ts.map +1 -0
  36. package/dist/types/endpoints/integrationApi/index.d.ts +59 -0
  37. package/dist/types/endpoints/integrationApi/index.d.ts.map +1 -0
  38. package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts +84 -0
  39. package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts.map +1 -0
  40. package/dist/types/endpoints/marketplace/Bookings.d.ts +45 -0
  41. package/dist/types/endpoints/marketplace/Bookings.d.ts.map +1 -0
  42. package/dist/types/endpoints/marketplace/CurrentUser.d.ts +182 -0
  43. package/dist/types/endpoints/marketplace/CurrentUser.d.ts.map +1 -0
  44. package/dist/types/endpoints/marketplace/Images.d.ts +47 -0
  45. package/dist/types/endpoints/marketplace/Images.d.ts.map +1 -0
  46. package/dist/types/endpoints/marketplace/Listings.d.ts +52 -0
  47. package/dist/types/endpoints/marketplace/Listings.d.ts.map +1 -0
  48. package/dist/types/endpoints/marketplace/Marketplace.d.ts +38 -0
  49. package/dist/types/endpoints/marketplace/Marketplace.d.ts.map +1 -0
  50. package/dist/types/endpoints/marketplace/Messages.d.ts +57 -0
  51. package/dist/types/endpoints/marketplace/Messages.d.ts.map +1 -0
  52. package/dist/types/endpoints/marketplace/OwnListings.d.ts +181 -0
  53. package/dist/types/endpoints/marketplace/OwnListings.d.ts.map +1 -0
  54. package/dist/types/endpoints/marketplace/PasswordReset.d.ts +63 -0
  55. package/dist/types/endpoints/marketplace/PasswordReset.d.ts.map +1 -0
  56. package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts +43 -0
  57. package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts.map +1 -0
  58. package/dist/types/endpoints/marketplace/Reviews.d.ts +52 -0
  59. package/dist/types/endpoints/marketplace/Reviews.d.ts.map +1 -0
  60. package/dist/types/endpoints/marketplace/Stock.d.ts +47 -0
  61. package/dist/types/endpoints/marketplace/Stock.d.ts.map +1 -0
  62. package/dist/types/endpoints/marketplace/StockAdjustments.d.ts +63 -0
  63. package/dist/types/endpoints/marketplace/StockAdjustments.d.ts.map +1 -0
  64. package/dist/types/endpoints/marketplace/StripeAccount.d.ts +78 -0
  65. package/dist/types/endpoints/marketplace/StripeAccount.d.ts.map +1 -0
  66. package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts +52 -0
  67. package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts.map +1 -0
  68. package/dist/types/endpoints/marketplace/StripeCustomer.d.ts +77 -0
  69. package/dist/types/endpoints/marketplace/StripeCustomer.d.ts.map +1 -0
  70. package/dist/types/endpoints/marketplace/StripePersons.d.ts +46 -0
  71. package/dist/types/endpoints/marketplace/StripePersons.d.ts.map +1 -0
  72. package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts +43 -0
  73. package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts.map +1 -0
  74. package/dist/types/endpoints/marketplace/TimeSlots.d.ts +44 -0
  75. package/dist/types/endpoints/marketplace/TimeSlots.d.ts.map +1 -0
  76. package/dist/types/endpoints/marketplace/Transactions.d.ts +126 -0
  77. package/dist/types/endpoints/marketplace/Transactions.d.ts.map +1 -0
  78. package/dist/types/endpoints/marketplace/Users.d.ts +42 -0
  79. package/dist/types/endpoints/marketplace/Users.d.ts.map +1 -0
  80. package/dist/types/endpoints/marketplace/index.d.ts +71 -0
  81. package/dist/types/endpoints/marketplace/index.d.ts.map +1 -0
  82. package/dist/types/index.d.ts +143 -0
  83. package/dist/types/index.d.ts.map +1 -0
  84. package/dist/types/integrationSdk.d.ts +121 -0
  85. package/dist/types/integrationSdk.d.ts.map +1 -0
  86. package/dist/types/sdk.d.ts +213 -0
  87. package/dist/types/sdk.d.ts.map +1 -0
  88. package/dist/types/sdkTypes/BigDecimal.d.ts +31 -0
  89. package/dist/types/sdkTypes/BigDecimal.d.ts.map +1 -0
  90. package/dist/types/sdkTypes/LatLng.d.ts +35 -0
  91. package/dist/types/sdkTypes/LatLng.d.ts.map +1 -0
  92. package/dist/types/sdkTypes/LatLngBounds.d.ts +52 -0
  93. package/dist/types/sdkTypes/LatLngBounds.d.ts.map +1 -0
  94. package/dist/types/sdkTypes/Money.d.ts +29 -0
  95. package/dist/types/sdkTypes/Money.d.ts.map +1 -0
  96. package/dist/types/sdkTypes/UUID.d.ts +39 -0
  97. package/dist/types/sdkTypes/UUID.d.ts.map +1 -0
  98. package/dist/types/types/apiConfigs.d.ts +105 -0
  99. package/dist/types/types/apiConfigs.d.ts.map +1 -0
  100. package/dist/types/types/assets/index.d.ts +64 -0
  101. package/dist/types/types/assets/index.d.ts.map +1 -0
  102. package/dist/types/types/authentication/index.d.ts +102 -0
  103. package/dist/types/types/authentication/index.d.ts.map +1 -0
  104. package/dist/types/types/axios.d.ts +11 -0
  105. package/dist/types/types/axios.d.ts.map +1 -0
  106. package/dist/types/types/config.d.ts +138 -0
  107. package/dist/types/types/config.d.ts.map +1 -0
  108. package/dist/types/types/integration/events.d.ts +56 -0
  109. package/dist/types/types/integration/events.d.ts.map +1 -0
  110. package/dist/types/types/marketplace/availabilityExceptions.d.ts +57 -0
  111. package/dist/types/types/marketplace/availabilityExceptions.d.ts.map +1 -0
  112. package/dist/types/types/marketplace/bookings.d.ts +47 -0
  113. package/dist/types/types/marketplace/bookings.d.ts.map +1 -0
  114. package/dist/types/types/marketplace/currentUser.d.ts +159 -0
  115. package/dist/types/types/marketplace/currentUser.d.ts.map +1 -0
  116. package/dist/types/types/marketplace/images.d.ts +40 -0
  117. package/dist/types/types/marketplace/images.d.ts.map +1 -0
  118. package/dist/types/types/marketplace/listings.d.ts +140 -0
  119. package/dist/types/types/marketplace/listings.d.ts.map +1 -0
  120. package/dist/types/types/marketplace/marketplace.d.ts +21 -0
  121. package/dist/types/types/marketplace/marketplace.d.ts.map +1 -0
  122. package/dist/types/types/marketplace/messages.d.ts +50 -0
  123. package/dist/types/types/marketplace/messages.d.ts.map +1 -0
  124. package/dist/types/types/marketplace/ownListings.d.ts +129 -0
  125. package/dist/types/types/marketplace/ownListings.d.ts.map +1 -0
  126. package/dist/types/types/marketplace/passwordReset.d.ts +32 -0
  127. package/dist/types/types/marketplace/passwordReset.d.ts.map +1 -0
  128. package/dist/types/types/marketplace/processTransitions.d.ts +38 -0
  129. package/dist/types/types/marketplace/processTransitions.d.ts.map +1 -0
  130. package/dist/types/types/marketplace/reviews.d.ts +60 -0
  131. package/dist/types/types/marketplace/reviews.d.ts.map +1 -0
  132. package/dist/types/types/marketplace/stock.d.ts +29 -0
  133. package/dist/types/types/marketplace/stock.d.ts.map +1 -0
  134. package/dist/types/types/marketplace/stockAdjustment.d.ts +52 -0
  135. package/dist/types/types/marketplace/stockAdjustment.d.ts.map +1 -0
  136. package/dist/types/types/marketplace/stockReservations.d.ts +45 -0
  137. package/dist/types/types/marketplace/stockReservations.d.ts.map +1 -0
  138. package/dist/types/types/marketplace/stripeAccount.d.ts +45 -0
  139. package/dist/types/types/marketplace/stripeAccount.d.ts.map +1 -0
  140. package/dist/types/types/marketplace/stripeAccountLinks.d.ts +36 -0
  141. package/dist/types/types/marketplace/stripeAccountLinks.d.ts.map +1 -0
  142. package/dist/types/types/marketplace/stripeCustomer.d.ts +48 -0
  143. package/dist/types/types/marketplace/stripeCustomer.d.ts.map +1 -0
  144. package/dist/types/types/marketplace/stripePaymentMethod.d.ts +23 -0
  145. package/dist/types/types/marketplace/stripePaymentMethod.d.ts.map +1 -0
  146. package/dist/types/types/marketplace/stripePersons.d.ts +47 -0
  147. package/dist/types/types/marketplace/stripePersons.d.ts.map +1 -0
  148. package/dist/types/types/marketplace/stripeSetupIntents.d.ts +47 -0
  149. package/dist/types/types/marketplace/stripeSetupIntents.d.ts.map +1 -0
  150. package/dist/types/types/marketplace/timeSlots.d.ts +54 -0
  151. package/dist/types/types/marketplace/timeSlots.d.ts.map +1 -0
  152. package/dist/types/types/marketplace/transactions.d.ts +191 -0
  153. package/dist/types/types/marketplace/transactions.d.ts.map +1 -0
  154. package/dist/types/types/marketplace/user.d.ts +166 -0
  155. package/dist/types/types/marketplace/user.d.ts.map +1 -0
  156. package/dist/types/types/sdk-types.d.ts +11 -0
  157. package/dist/types/types/sdk-types.d.ts.map +1 -0
  158. package/dist/types/types/sharetribe.d.ts +177 -0
  159. package/dist/types/types/sharetribe.d.ts.map +1 -0
  160. package/dist/types/types/store.d.ts +34 -0
  161. package/dist/types/types/store.d.ts.map +1 -0
  162. package/dist/types/utils/apis.d.ts +9 -0
  163. package/dist/types/utils/apis.d.ts.map +1 -0
  164. package/dist/types/utils/config.d.ts +16 -0
  165. package/dist/types/utils/config.d.ts.map +1 -0
  166. package/dist/types/utils/convert-types.d.ts +14 -0
  167. package/dist/types/utils/convert-types.d.ts.map +1 -0
  168. package/dist/types/utils/parameter-serializer.d.ts +24 -0
  169. package/dist/types/utils/parameter-serializer.d.ts.map +1 -0
  170. package/dist/types/utils/prepare-axios-instance.d.ts +14 -0
  171. package/dist/types/utils/prepare-axios-instance.d.ts.map +1 -0
  172. package/dist/types/utils/stores/BrowserStore.d.ts +39 -0
  173. package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -0
  174. package/dist/types/utils/stores/ExpressStore.d.ts +50 -0
  175. package/dist/types/utils/stores/ExpressStore.d.ts.map +1 -0
  176. package/dist/types/utils/stores/MemoryStore.d.ts +25 -0
  177. package/dist/types/utils/stores/MemoryStore.d.ts.map +1 -0
  178. package/dist/types/utils/stores/store.d.ts +9 -0
  179. package/dist/types/utils/stores/store.d.ts.map +1 -0
  180. package/dist/types/utils/transit.d.ts +30 -0
  181. package/dist/types/utils/transit.d.ts.map +1 -0
  182. package/dist/types/utils/util.d.ts +13 -0
  183. package/dist/types/utils/util.d.ts.map +1 -0
  184. package/package.json +90 -0
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @fileoverview Provides the ProcessTransitions class for managing process transitions in the Sharetribe Marketplace API.
3
+ * This class includes a method for querying process transitions.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#process-transitions
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { ProcessTransitionsQueryParameter, ProcessTransitionsResponse } from "../../types/marketplace/processTransitions";
11
+ /**
12
+ * Class representing the Process Transitions API.
13
+ *
14
+ * The Process Transitions API provides methods for querying transitions within processes.
15
+ */
16
+ declare class ProcessTransitions {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ readonly authRequired = true;
21
+ /**
22
+ * Creates an instance of the ProcessTransitions class.
23
+ *
24
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
25
+ */
26
+ constructor(api: MarketplaceApi);
27
+ /**
28
+ * Queries process transitions based on specified filters.
29
+ *
30
+ * @template P
31
+ * @param {P & ProcessTransitionsQueryParameter} params - Query parameters for filtering transitions.
32
+ * @returns {Promise<AxiosResponse<ProcessTransitionsResponse<'query'>>>} - A promise resolving to the query results.
33
+ *
34
+ * @example
35
+ * const response = await sdk.processTransitions.query({
36
+ * processAlias: 'booking-process',
37
+ * });
38
+ * const transitions = response.data;
39
+ */
40
+ query<P extends ProcessTransitionsQueryParameter>(params: P): Promise<AxiosResponse<ProcessTransitionsResponse<"query">>>;
41
+ }
42
+ export default ProcessTransitions;
43
+ //# sourceMappingURL=ProcessTransitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessTransitions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/ProcessTransitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AAEpD;;;;GAIG;AACH,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;OAYG;IACG,KAAK,CAAC,CAAC,SAAS,gCAAgC,EACpD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;CAS/D;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @fileoverview Provides the Reviews class for managing reviews in the Sharetribe Marketplace API.
3
+ * This class includes methods for querying and retrieving details of reviews.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#reviews
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { ReviewsQueryParameter, ReviewsResponse, ReviewsShowParameter } from "../../types/marketplace/reviews";
11
+ /**
12
+ * Class representing the Reviews API.
13
+ *
14
+ * The Reviews API provides methods for querying and retrieving details of reviews within the marketplace.
15
+ */
16
+ declare class Reviews {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ /**
21
+ * Creates an instance of the Reviews class.
22
+ *
23
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
24
+ */
25
+ constructor(api: MarketplaceApi);
26
+ /**
27
+ * Retrieves details of a specific review.
28
+ *
29
+ * @template P
30
+ * @param {P & ReviewsShowParameter} params - Parameters identifying the review.
31
+ * @returns {Promise<AxiosResponse<ReviewsResponse<'show', P>>>} - A promise resolving to the review details.
32
+ *
33
+ * @example
34
+ * const response = await sdk.reviews.show({ id: 'review-id' });
35
+ * const review = response.data;
36
+ */
37
+ show<P extends ReviewsShowParameter>(params: P): Promise<AxiosResponse<ReviewsResponse<"show", P>>>;
38
+ /**
39
+ * Queries reviews based on specified filters.
40
+ *
41
+ * @template P
42
+ * @param {P & ReviewsQueryParameter} params - Query parameters to filter reviews.
43
+ * @returns {Promise<AxiosResponse<ReviewsResponse<'query', P>>>} - A promise resolving to the query results.
44
+ *
45
+ * @example
46
+ * const response = await sdk.reviews.query({ listingId: 'listing-id', perPage: 10 });
47
+ * const reviews = response.data;
48
+ */
49
+ query<P extends ReviewsQueryParameter>(params: P): Promise<AxiosResponse<ReviewsResponse<"query", P>>>;
50
+ }
51
+ export default Reviews;
52
+ //# sourceMappingURL=Reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reviews.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Reviews.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,cAAM,OAAO;IACX,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IAEjD;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;OAUG;IACG,IAAI,CAAC,CAAC,SAAS,oBAAoB,EACvC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAOrD;;;;;;;;;;OAUG;IACG,KAAK,CAAC,CAAC,SAAS,qBAAqB,EACzC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;CASvD;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @fileoverview Provides the Stock class for managing stock levels in the Sharetribe Marketplace API.
3
+ * This class includes methods for comparing and setting stock levels.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stock
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StockCompareAndSetParameter, StockResponse } from "../../types/marketplace/stock";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stock API.
14
+ *
15
+ * The Stock API provides methods for comparing and setting stock levels for marketplace resources.
16
+ */
17
+ declare class Stock {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ readonly authRequired = true;
21
+ /**
22
+ * Creates an instance of the Stock class.
23
+ *
24
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
25
+ */
26
+ constructor(api: MarketplaceApi);
27
+ /**
28
+ * Compares and sets stock levels for a specific resource.
29
+ *
30
+ * @template P
31
+ * @template EP
32
+ * @param {P & StockCompareAndSetParameter} params - Parameters for comparing and setting stock levels.
33
+ * @param {EP} extraParams - Optional extra parameters for the request.
34
+ * @returns {Promise<AxiosResponse<StockResponse<'compareAndSet', EP>>>} - A promise resolving to the result of the stock comparison and update.
35
+ *
36
+ * @example
37
+ * const response = await sdk.stock.compareAndSet({
38
+ * listingId: 'listing-1',
39
+ * oldTotal: 10,
40
+ * newTotal: 100
41
+ * });
42
+ * const stockUpdateResult = response.data;
43
+ */
44
+ compareAndSet<P extends StockCompareAndSetParameter, EP extends ExtraParameter>(params: P, extraParams: EP): Promise<AxiosResponse<StockResponse<"compareAndSet", EP>>>;
45
+ }
46
+ export default Stock;
47
+ //# sourceMappingURL=Stock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stock.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Stock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,KAAK;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAK/B;;;;;;;;;;;;;;;;OAgBG;IACG,aAAa,CACjB,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GACd,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;CAM9D;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @fileoverview Provides the StockAdjustments class for managing stock adjustments in the Sharetribe Marketplace API.
3
+ * This class includes methods for querying and creating stock adjustments.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stock-adjustments
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StockAdjustmentsCreateParameter, StockAdjustmentsQueryParameter, StockAdjustmentsResponse } from "../../types/marketplace/stockAdjustment";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stock Adjustments API.
14
+ *
15
+ * The Stock Adjustments API provides methods for querying and creating adjustments to stock levels.
16
+ */
17
+ declare class StockAdjustments {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the StockAdjustments class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Queries stock adjustments based on specified filters.
30
+ *
31
+ * @template P
32
+ * @param {P & StockAdjustmentsQueryParameter} params - Query parameters to filter stock adjustments.
33
+ * @returns {Promise<AxiosResponse<StockAdjustmentsResponse<'query', P>>>} - A promise resolving to the query results.
34
+ *
35
+ * @example
36
+ * const response = await sdk.stockAdjustments.query({
37
+ * listingId: 'listing-id',
38
+ * start: new Date('2022-01-01'),
39
+ * end: new Date('2022-01-31'),
40
+ * });
41
+ * const stockAdjustments = response.data;
42
+ */
43
+ query<P extends StockAdjustmentsQueryParameter>(params: P): Promise<AxiosResponse<StockAdjustmentsResponse<"query", P>>>;
44
+ /**
45
+ * Creates a stock adjustment for a specific resource.
46
+ *
47
+ * @template P
48
+ * @template EP
49
+ * @param {P & StockAdjustmentsCreateParameter} params - Parameters for the stock adjustment.
50
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
51
+ * @returns {Promise<AxiosResponse<StockAdjustmentsResponse<'create', P, EP>>>} - A promise resolving to the created stock adjustment details.
52
+ *
53
+ * @example
54
+ * const response = await sdk.stockAdjustments.create({
55
+ * listingId: 'listing-id',
56
+ * quantity: 5,
57
+ * });
58
+ * const createdAdjustment = response.data;
59
+ */
60
+ create<P extends StockAdjustmentsCreateParameter, EP extends ExtraParameter | undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<StockAdjustmentsResponse<"create", P, EP>>>;
61
+ }
62
+ export default StockAdjustments;
63
+ //# sourceMappingURL=StockAdjustments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StockAdjustments.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StockAdjustments.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,gBAAgB;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;OAcG;IACG,KAAK,CAAC,CAAC,SAAS,8BAA8B,EAClD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAU/D;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CACV,CAAC,SAAS,+BAA+B,EACzC,EAAE,SAAS,cAAc,GAAG,SAAS,EAErC,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAOrE;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @fileoverview Provides the StripeAccount class for managing Stripe accounts in the Sharetribe Marketplace API.
3
+ * This class includes methods for fetching, creating, and updating Stripe accounts.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stripe-account
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StripeAccountCreateParameter, StripeAccountResponse, StripeAccountUpdateParameter } from "../../types/marketplace/stripeAccount";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stripe Account API.
14
+ *
15
+ * The Stripe Account API provides methods for managing Stripe accounts associated with the marketplace.
16
+ */
17
+ declare class StripeAccount {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the StripeAccount class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Fetches the current Stripe account details.
30
+ *
31
+ * @returns {Promise<AxiosResponse<StripeAccountResponse<'fetch'>>>} - A promise resolving to the Stripe account details.
32
+ *
33
+ * @example
34
+ * const response = await sdk.stripeAccount.fetch();
35
+ * const stripeAccountDetails = response.data;
36
+ */
37
+ fetch(): Promise<AxiosResponse<StripeAccountResponse<"fetch">>>;
38
+ /**
39
+ * Creates a new Stripe account.
40
+ *
41
+ * @template P
42
+ * @template EP
43
+ * @param {P & StripeAccountCreateParameter} params - Parameters for creating the Stripe account.
44
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
45
+ * @returns {Promise<AxiosResponse<StripeAccountResponse<'create', EP>>>} - A promise resolving to the created Stripe account details.
46
+ *
47
+ * @example
48
+ * const response = await sdk.stripeAccount.create({
49
+ * country: 'US',
50
+ * accountToken: 'account-token',
51
+ * bankAccountToken: 'bank-account-token',
52
+ * businessProfileMCC: '1234',
53
+ * businessProfileURL: 'https://example.com',
54
+ * businessProfileProductDescription: 'Product description',
55
+ * requestedCapabilities: ['card_payments', 'transfers'],
56
+ * });
57
+ * const createdStripeAccount = response.data;
58
+ */
59
+ create<P extends StripeAccountCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeAccountResponse<"create", EP>>>;
60
+ /**
61
+ * Updates an existing Stripe account.
62
+ *
63
+ * @template P
64
+ * @template EP
65
+ * @param {P & StripeAccountUpdateParameter} params - Parameters for updating the Stripe account.
66
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
67
+ * @returns {Promise<AxiosResponse<StripeAccountResponse<'update', EP>>>} - A promise resolving to the updated Stripe account details.
68
+ *
69
+ * @example
70
+ * const response = await sdk.stripeAccount.update({
71
+ * accountToken: 'new-account-token',
72
+ * });
73
+ * const updatedStripeAccount = response.data;
74
+ */
75
+ update<P extends StripeAccountUpdateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeAccountResponse<"update", EP>>>;
76
+ }
77
+ export default StripeAccount;
78
+ //# sourceMappingURL=StripeAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeAccount.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeAccount.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,aAAa;IACjB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;OAQG;IACG,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;IASrE;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,MAAM,CACV,CAAC,SAAS,4BAA4B,EACtC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IAQ9D;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,CAAC,SAAS,4BAA4B,EACtC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;CAO/D;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @fileoverview Provides the StripeAccountLinks class for managing Stripe account links in the Sharetribe Marketplace API.
3
+ * This class includes methods for creating account links to manage Stripe accounts.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stripe-account-links
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StripeAccountLinksCreateParameter, StripeAccountLinksResponse } from "../../types/marketplace/stripeAccountLinks";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stripe Account Links API.
14
+ *
15
+ * The Stripe Account Links API provides methods for creating links to manage Stripe accounts, such as onboarding links.
16
+ */
17
+ declare class StripeAccountLinks {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the StripeAccountLinks class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Creates a new Stripe account link.
30
+ *
31
+ * @template P
32
+ * @template EP
33
+ * @param {P & StripeAccountLinksCreateParameter} params - Parameters for creating the account link.
34
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
35
+ * @returns {Promise<AxiosResponse<StripeAccountLinksResponse<'create', EP>>>} - A promise resolving to the created account link details.
36
+ *
37
+ * @example
38
+ * const response = await sdk.stripeAccountLinks.create({
39
+ * failureURL: 'https://example.com/failure',
40
+ * successURL: 'https://example.com/success',
41
+ * type: 'custom_account_verification',
42
+ * collectionOptions: {
43
+ * fields: ['currently_due', 'eventually_due'],
44
+ * future_requirements: ['include', 'omit'],
45
+ * },
46
+ * });
47
+ * const accountLink = response.data;
48
+ */
49
+ create<P extends StripeAccountLinksCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeAccountLinksResponse<"create", EP>>>;
50
+ }
51
+ export default StripeAccountLinks;
52
+ //# sourceMappingURL=StripeAccountLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeAccountLinks.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeAccountLinks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,MAAM,CACV,CAAC,SAAS,iCAAiC,EAC3C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,0BAA0B,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;CAOpE;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @fileoverview Provides the StripeCustomer class for managing Stripe customers in the Sharetribe Marketplace API.
3
+ * This class includes methods for creating customers, adding payment methods, and deleting payment methods.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stripe-customer
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StripeCustomerAddPaymentMethodParameter, StripeCustomerCreateParameter, StripeCustomerDeletePaymentMethodParameter, StripeCustomerResponse } from "../../types/marketplace/stripeCustomer";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stripe Customer API.
14
+ *
15
+ * The Stripe Customer API provides methods for managing Stripe customers, including creating customers and managing payment methods.
16
+ */
17
+ declare class StripeCustomer {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the StripeCustomer class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Creates a new Stripe customer.
30
+ *
31
+ * @template P
32
+ * @template EP
33
+ * @param {P & StripeCustomerCreateParameter} params - Parameters for creating the Stripe customer.
34
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
35
+ * @returns {Promise<AxiosResponse<StripeCustomerResponse<'create', P, EP>>>} - A promise resolving to the created customer details.
36
+ *
37
+ * @example
38
+ * const response = await sdk.stripeCustomer.create({
39
+ * stripePaymentMethodId: 'payment-method-id',
40
+ * stripeCustomerEmail: 'user@example.com'
41
+ * });
42
+ * const customer = response.data;
43
+ */
44
+ create<P extends StripeCustomerCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeCustomerResponse<"create", P, EP>>>;
45
+ /**
46
+ * Adds a payment method to a Stripe customer.
47
+ *
48
+ * @template P
49
+ * @template EP
50
+ * @param {P & StripeCustomerAddPaymentMethodParameter} params - Parameters for adding a payment method.
51
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
52
+ * @returns {Promise<AxiosResponse<StripeCustomerResponse<'addPaymentMethod', P, EP>>>} - A promise resolving to the updated customer details.
53
+ *
54
+ * @example
55
+ * const response = await sdk.stripeCustomer.addPaymentMethod({
56
+ * stripePaymentMethodId: 'payment-method-id'
57
+ * });
58
+ * const updatedCustomer = response.data;
59
+ */
60
+ addPaymentMethod<P extends StripeCustomerAddPaymentMethodParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeCustomerResponse<"addPaymentMethod", P, EP>>>;
61
+ /**
62
+ * Deletes a payment method from a Stripe customer.
63
+ *
64
+ * @template P
65
+ * @template EP
66
+ * @param {P & StripeCustomerDeletePaymentMethodParameter} params - Parameters for deleting the payment method.
67
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
68
+ * @returns {Promise<AxiosResponse<StripeCustomerResponse<'deletePaymentMethod', P>>>} - A promise resolving to the confirmation of deletion.
69
+ *
70
+ * @example
71
+ * const response = await sdk.stripeCustomer.deletePaymentMethod({ customer_id: 'customer-id', payment_method_id: 'payment-method-id' });
72
+ * const result = response.data;
73
+ */
74
+ deletePaymentMethod<P extends StripeCustomerDeletePaymentMethodParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeCustomerResponse<"deletePaymentMethod", P, EP>>>;
75
+ }
76
+ export default StripeCustomer;
77
+ //# sourceMappingURL=StripeCustomer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeCustomer.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeCustomer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,uCAAuC,EACvC,6BAA6B,EAC7B,0CAA0C,EAC1C,sBAAsB,EACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CACV,CAAC,SAAS,6BAA6B,EACvC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQlE;;;;;;;;;;;;;;OAcG;IACG,gBAAgB,CACpB,CAAC,SAAS,uCAAuC,EACjD,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQ5E;;;;;;;;;;;;OAYG;IACG,mBAAmB,CACvB,CAAC,SAAS,0CAA0C,EACpD,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CACR,aAAa,CAAC,sBAAsB,CAAC,qBAAqB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CACpE;CASF;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @fileoverview Provides the StripePersons class for managing Stripe persons in the Sharetribe Marketplace API.
3
+ * This class includes methods for creating persons associated with Stripe accounts.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#stripe-persons
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StripePersonsCreateParameter, StripePersonsResponse } from "../../types/marketplace/stripePersons";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stripe Persons API.
14
+ *
15
+ * The Stripe Persons API provides methods for creating persons associated with Stripe accounts, used for compliance and verification purposes.
16
+ */
17
+ declare class StripePersons {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ 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
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Creates a new person for a Stripe account.
30
+ *
31
+ * @template P
32
+ * @template EP
33
+ * @param {P & StripePersonsCreateParameter} params - Parameters for creating the Stripe person.
34
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
35
+ * @returns {Promise<AxiosResponse<StripePersonsResponse<'create'>>>} - A promise resolving to the created person details.
36
+ *
37
+ * @example
38
+ * const response = await sdk.stripePersons.create({
39
+ * personToken: 'person-token',
40
+ * });
41
+ * const personDetails = response.data;
42
+ */
43
+ create<P extends StripePersonsCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripePersonsResponse<"create">>>;
44
+ }
45
+ export default StripePersons;
46
+ //# sourceMappingURL=StripePersons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripePersons.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripePersons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,aAAa;IACjB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,CAAC,SAAS,4BAA4B,EACtC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;CAO3D;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @fileoverview Provides the StripeSetupIntents class for managing Stripe Setup Intents in the Sharetribe Marketplace API.
3
+ * This class includes methods for creating Stripe Setup Intents to set up payment methods for future use.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#create-stripe-person
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { StripeSetupIntentsCreateParameter, StripeSetupIntentsResponse } from "../../types/marketplace/stripeSetupIntents";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Stripe Setup Intents API.
14
+ *
15
+ * The Stripe Setup Intents API provides methods to securely create Setup Intents for Stripe payments.
16
+ */
17
+ declare class StripeSetupIntents {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ readonly authRequired = true;
21
+ /**
22
+ * Creates an instance of the StripeSetupIntents class.
23
+ *
24
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
25
+ */
26
+ constructor(api: MarketplaceApi);
27
+ /**
28
+ * Creates a new Stripe Setup Intent.
29
+ *
30
+ * @template P
31
+ * @template EP
32
+ * @param {P & StripeSetupIntentsCreateParameter} params - Parameters required to create the Stripe Setup Intent.
33
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
34
+ * @returns {Promise<AxiosResponse<StripeSetupIntentsResponse<'create'>>>} - A promise resolving to the created Setup Intent details.
35
+ *
36
+ * @example
37
+ * const response = await sdk.stripeSetupIntents.create({});
38
+ * const setupIntentDetails = response.data;
39
+ */
40
+ create<P extends StripeSetupIntentsCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<StripeSetupIntentsResponse<"create">>>;
41
+ }
42
+ export default StripeSetupIntents;
43
+ //# sourceMappingURL=StripeSetupIntents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeSetupIntents.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/StripeSetupIntents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,SAAgB,YAAY,QAAQ;IAEpC;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAK/B;;;;;;;;;;;;OAYG;IACG,MAAM,CACV,CAAC,SAAS,iCAAiC,EAC3C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAC;CAMhE;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @fileoverview Provides the TimeSlots class for managing time slots in the Sharetribe Marketplace API.
3
+ * This class includes methods for querying available time slots for marketplace resources.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#time-slots
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { TimeSlotsQueryParameter, TimeSlotsResponse } from "../../types/marketplace/timeSlots";
11
+ /**
12
+ * Class representing the Time Slots API.
13
+ *
14
+ * The Time Slots API provides methods for querying available time slots for bookings.
15
+ */
16
+ declare class TimeSlots {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ 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
+ constructor(api: MarketplaceApi);
26
+ /**
27
+ * Queries available time slots based on specified filters.
28
+ *
29
+ * @template P
30
+ * @param {P & TimeSlotsQueryParameter} params - Query parameters for filtering time slots.
31
+ * @returns {Promise<AxiosResponse<TimeSlotsResponse<'query'>>>} - A promise resolving to the query results.
32
+ *
33
+ * @example
34
+ * const response = await sdk.timeSlots.query({
35
+ * listingId: 'listing-id',
36
+ * start: '2024-01-01T00:00:00Z',
37
+ * end: '2024-01-07T23:59:59Z',
38
+ * });
39
+ * const timeSlots = response.data;
40
+ */
41
+ query<P extends TimeSlotsQueryParameter>(params: P): Promise<AxiosResponse<TimeSlotsResponse<"query">>>;
42
+ }
43
+ export default TimeSlots;
44
+ //# sourceMappingURL=TimeSlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeSlots.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/TimeSlots.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,cAAM,SAAS;IACb,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IAEjD;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;;OAcG;IACG,KAAK,CAAC,CAAC,SAAS,uBAAuB,EAC3C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;CAStD;AAED,eAAe,SAAS,CAAC"}