@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 StockReservation class for managing stock reservations in the Sharetribe Integration API.
3
+ * This class allows retrieving details about stock reservations.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#stock-reservations
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { StockReservationShowParameter, StockReservationsResponse } from "../../types/marketplace/stockReservations";
11
+ /**
12
+ * Class representing the Stock Reservations API.
13
+ *
14
+ * The Stock Reservations API provides methods to manage stock reservations for marketplace resources.
15
+ */
16
+ declare class StockReservation {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ /**
21
+ * Creates an instance of the StockReservation class.
22
+ *
23
+ * @param {IntegrationApi} api - The Integration API instance providing configuration and request handling.
24
+ */
25
+ constructor(api: IntegrationApi);
26
+ /**
27
+ * Retrieves details about a specific stock reservation.
28
+ *
29
+ * @template P
30
+ * @param {P & StockReservationShowParameter} params - The parameters to identify the stock reservation.
31
+ * @returns {Promise<AxiosResponse<StockReservationsResponse<'show', P>>>} - A promise resolving to the stock reservation details.
32
+ *
33
+ * @example
34
+ * const response = await integrationSdk.stockReservations.show({
35
+ * id: 'reservation-id',
36
+ * });
37
+ *
38
+ * const reservationDetails = response.data;
39
+ */
40
+ show<P extends StockReservationShowParameter>(params: P): Promise<AxiosResponse<StockReservationsResponse<"show", P>>>;
41
+ }
42
+ export default StockReservation;
43
+ //# sourceMappingURL=StockReservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StockReservation.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/StockReservation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,2CAA2C,CAAC;AAEnD;;;;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;IAEjD;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;OAaG;IACG,IAAI,CAAC,CAAC,SAAS,6BAA6B,EAChD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;CAShE;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @fileoverview Provides the Transactions class for managing transactions in the Sharetribe Integration API.
3
+ * This class allows querying, transitioning, and updating metadata for transactions.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#transactions
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { TransactionsQueryParameter, TransactionsResponse, TransactionsShowParameter, TransactionsTransitionParameter, TransactionsTransitionSpeculativeParameter, TransactionsUpdateMetadataParameter } from "../../types/marketplace/transactions";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Transactions API.
14
+ *
15
+ * The Transactions API provides methods to query, transition, and manage metadata for marketplace transactions.
16
+ */
17
+ declare class Transactions {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the Transactions class.
24
+ *
25
+ * @param {IntegrationApi} api - The Integration API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: IntegrationApi);
28
+ /**
29
+ * Retrieves details about a specific transaction.
30
+ *
31
+ * @template P
32
+ * @param {P & TransactionsShowParameter} params - The parameters to identify the transaction.
33
+ * @returns {Promise<AxiosResponse<TransactionsResponse<'show', P>>>} - A promise resolving to the transaction details.
34
+ *
35
+ * @example
36
+ * const response = await integrationSdk.transactions.show({
37
+ * id: 'transaction-id',
38
+ * });
39
+ *
40
+ * const transactionDetails = response.data;
41
+ */
42
+ show<P extends TransactionsShowParameter>(params: P): Promise<AxiosResponse<TransactionsResponse<"show", P>>>;
43
+ /**
44
+ * Queries transactions based on specified filters.
45
+ *
46
+ * @template P
47
+ * @param {P & TransactionsQueryParameter<true>} params - Query parameters to filter transactions.
48
+ * @returns {Promise<AxiosResponse<TransactionsResponse<'query', P>>>} - A promise resolving to the query results.
49
+ *
50
+ * @example
51
+ * const response = await integrationSdk.transactions.query({
52
+ * createdAtStart: '2021-01-01T00:00:00Z',
53
+ * createdAtEnd: '2021-01-31T23:59:59Z',
54
+ * userId: 'user-id',
55
+ * customerId: 'customer-id',
56
+ * providerId: 'provider-id',
57
+ * listingId: 'listing-id',
58
+ * });
59
+ *
60
+ * const transactions = response.data;
61
+ */
62
+ query<P extends TransactionsQueryParameter<true>>(params: P): Promise<AxiosResponse<TransactionsResponse<"query", P>>>;
63
+ /**
64
+ * Transitions a transaction to a new state.
65
+ *
66
+ * @template P
67
+ * @template EP
68
+ * @param {P & TransactionsTransitionParameter} params - Parameters specifying the transaction and the transition.
69
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
70
+ * @returns {Promise<AxiosResponse<TransactionsResponse<'transition', P, EP>>>} - A promise resolving to the transitioned transaction.
71
+ *
72
+ * @example
73
+ * const response = await integrationSdk.transactions.transition({
74
+ * id: 'transaction-id',
75
+ * transition: 'accept',
76
+ * params: { key: 'value' },
77
+ * });
78
+ *
79
+ * const updatedTransaction = response.data;
80
+ */
81
+ transition<P extends TransactionsTransitionParameter, EP extends ExtraParameter>(params: P, extraParams: EP | void): Promise<AxiosResponse<TransactionsResponse<"transition", P, EP>>>;
82
+ /**
83
+ * Transitions a transaction speculatively to a new state without persisting the transition.
84
+ *
85
+ * @template P
86
+ * @template EP
87
+ * @param {P & TransactionsTransitionSpeculativeParameter} params - Parameters specifying the speculative transition.
88
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
89
+ * @returns {Promise<AxiosResponse<TransactionsResponse<'transitionSpeculative', P, EP>>>} - A promise resolving to the speculative transition result.
90
+ *
91
+ * @example
92
+ * const response = await integrationSdk.transactions.transitionSpeculative({
93
+ * id: 'transaction-id',
94
+ * transition: 'accept',
95
+ * params: { key: 'value' },
96
+ * });
97
+ *
98
+ * const speculativeResult = response.data;
99
+ */
100
+ transitionSpeculative<P extends TransactionsTransitionSpeculativeParameter, EP extends ExtraParameter>(params: P, extraParams: EP | void): Promise<AxiosResponse<TransactionsResponse<"transitionSpeculative", P, EP>>>;
101
+ /**
102
+ * Updates metadata for a transaction.
103
+ *
104
+ * @template P
105
+ * @template EP
106
+ * @param {P & TransactionsUpdateMetadataParameter} params - Parameters specifying the transaction metadata to update.
107
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
108
+ * @returns {Promise<AxiosResponse<TransactionsResponse<'updateMetadata', P, EP>>>} - A promise resolving to the updated transaction metadata.
109
+ *
110
+ * @example
111
+ * const response = await integrationSdk.transactions.updateMetadata({
112
+ * id: 'transaction-id',
113
+ * metadata: { key: 'value' },
114
+ * });
115
+ *
116
+ * const updatedMetadata = response.data;
117
+ */
118
+ updateMetadata<P extends TransactionsUpdateMetadataParameter, EP extends ExtraParameter>(params: P, extraParams: EP | void): Promise<AxiosResponse<TransactionsResponse<"updateMetadata", P, EP>>>;
119
+ }
120
+ export default Transactions;
121
+ //# sourceMappingURL=Transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Transactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,+BAA+B,EAC/B,0CAA0C,EAC1C,mCAAmC,EACpC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,YAAY;IAChB,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;;;;;;;;;;;;;OAaG;IACG,IAAI,CAAC,CAAC,SAAS,yBAAyB,EAC5C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAU1D;;;;;;;;;;;;;;;;;;OAkBG;IACG,KAAK,CAAC,CAAC,SAAS,0BAA0B,CAAC,IAAI,CAAC,EACpD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAU3D;;;;;;;;;;;;;;;;;OAiBG;IACG,UAAU,CACd,CAAC,SAAS,+BAA+B,EACzC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GAAG,IAAI,GACrB,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQpE;;;;;;;;;;;;;;;;;OAiBG;IACG,qBAAqB,CACzB,CAAC,SAAS,0CAA0C,EACpD,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GAAG,IAAI,GACrB,OAAO,CACR,aAAa,CAAC,oBAAoB,CAAC,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CACpE;IAUD;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAClB,CAAC,SAAS,mCAAmC,EAC7C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GAAG,IAAI,GACrB,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAOzE;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @fileoverview Provides the Users class for managing user data in the Sharetribe Integration API.
3
+ * This class allows retrieving details about a specific user.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#users
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { UsersApproveParameter, UsersQueryParameter, UsersResponse, UsersShowParameter, UsersUpdatePermissionsParameter, UsersUpdateProfileParameter } from "../../types/marketplace/user";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Users API.
14
+ *
15
+ * The Users API provides methods to retrieve user data for marketplace resources.
16
+ */
17
+ declare class Users {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ /**
22
+ * Creates an instance of the Users class.
23
+ *
24
+ * @param {IntegrationApi} api - The Integration API instance providing configuration and request handling.
25
+ */
26
+ constructor(api: IntegrationApi);
27
+ /**
28
+ * Retrieves details about a specific user.
29
+ *
30
+ * @template P
31
+ * @param {P & UsersShowParameter} params - The parameters to identify the user.
32
+ * @returns {Promise<AxiosResponse<UsersResponse<'show', P>>>} - A promise resolving to the user details.
33
+ *
34
+ * @example
35
+ * const response = await integrationSdk.users.show({
36
+ * id: 'user-id',
37
+ * });
38
+ *
39
+ * const userDetails = response.data;
40
+ */
41
+ show<P extends UsersShowParameter<true>>(params: P): Promise<AxiosResponse<UsersResponse<"show", P>>>;
42
+ /**
43
+ * Queries users based on specified filters.
44
+ *
45
+ * @template P
46
+ * @param {P & UsersQueryParameter} params - Query parameters for filtering users.
47
+ * @returns {Promise<AxiosResponse<UsersResponse<'query', P>>>} - A promise resolving to the list of users.
48
+ *
49
+ * @example
50
+ * const response = await integrationSdk.users.query({
51
+ * createdAtStart: '2021-01-01T00:00:00Z'
52
+ * });
53
+ * const users = response.data;
54
+ */
55
+ query<P extends UsersQueryParameter>(params: P): Promise<AxiosResponse<UsersResponse<"query", P>>>;
56
+ /**
57
+ * Updates a user's profile.
58
+ *
59
+ * @template P
60
+ * @template EP
61
+ * @param {P & UsersUpdateProfileParameter} params - Parameters to update the user's profile.
62
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
63
+ * @returns {Promise<AxiosResponse<UsersResponse<'updateProfile', P, EP>>>} - A promise resolving to the updated profile details.
64
+ *
65
+ * @example
66
+ * const response = await integrationSdk.users.updateProfile({
67
+ * id: 'user-id',
68
+ * firstName: 'John',
69
+ * lastName: 'Doe',
70
+ * displayName: 'John Doe',
71
+ * });
72
+ * const updatedProfile = response.data;
73
+ */
74
+ updateProfile<P extends UsersUpdateProfileParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<UsersResponse<"updateProfile", P, EP>>>;
75
+ /**
76
+ * Approves a user.
77
+ *
78
+ * @template P
79
+ * @template EP
80
+ * @param {P & UsersApproveParameter} params - Parameters to approve the user.
81
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
82
+ * @returns {Promise<AxiosResponse<UsersResponse<'approve', P>>>} - A promise resolving to the approval confirmation.
83
+ *
84
+ * @example
85
+ * const response = await integrationSdk.users.approve({ id: 'user-id' });
86
+ * const approvalResult = response.data;
87
+ */
88
+ approve<P extends UsersApproveParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<UsersResponse<"approve", P, EP>>>;
89
+ /**
90
+ * Updates a user's permissions.
91
+ *
92
+ * @template P
93
+ * @template EP
94
+ * @param {P & UsersUpdatePermissionsParameter} params - Parameters to update the user's permissions.
95
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
96
+ * @returns {Promise<AxiosResponse<UsersResponse<'updatePermissions', P, EP>>>} - A promise resolving to the updated permissions details.
97
+ *
98
+ * @example
99
+ * const response = await integrationSdk.users.updatePermissions(
100
+ * { id: 'user-id', permissions: ['permission-1', 'permission-2'] },
101
+ * { additionalParam: 'value' }
102
+ * );
103
+ * const updatedPermissions = response.data;
104
+ */
105
+ updatePermissions<P extends UsersUpdatePermissionsParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<UsersResponse<"updatePermissions", P, EP>>>;
106
+ }
107
+ export default Users;
108
+ //# sourceMappingURL=Users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Users.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AACtC,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,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IAEjD;;;;OAIG;gBACS,GAAG,EAAE,cAAc;IAM/B;;;;;;;;;;;;;OAaG;IACG,IAAI,CAAC,CAAC,SAAS,kBAAkB,CAAC,IAAI,CAAC,EAC3C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAWnD;;;;;;;;;;;;OAYG;IACG,KAAK,CAAC,CAAC,SAAS,mBAAmB,EACvC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAOpD;;;;;;;;;;;;;;;;;OAiBG;IACG,aAAa,CACjB,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQhE;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAAE,SAAS,cAAc,EACtE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAU1D;;;;;;;;;;;;;;;OAeG;IACG,iBAAiB,CACrB,CAAC,SAAS,+BAA+B,EACzC,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,mBAAmB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAOrE;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @fileoverview Provides the IntegrationApi class for accessing various endpoints of the Sharetribe Integration API.
3
+ * This class acts as a gateway to multiple sub-APIs, including availability exceptions, events, images, listings, stock, transactions, and users.
4
+ */
5
+ import { AxiosInstance } from "axios";
6
+ import IntegrationSdk from "../../integrationSdk";
7
+ import AvailabilityExceptions from "./AvailabilityExceptions";
8
+ import Events from "./Events";
9
+ import Images from "./Images";
10
+ import Listings from "./Listings";
11
+ import Marketplace from "./Marketplace";
12
+ import Stock from "./Stock";
13
+ import StockAdjustments from "./StockAdjustments";
14
+ import StockReservation from "./StockReservation";
15
+ import Transactions from "./Transactions";
16
+ import Users from "./Users";
17
+ /**
18
+ * Class representing the Sharetribe Integration API.
19
+ *
20
+ * This class provides access to various sub-APIs for managing marketplace resources such as availability exceptions,
21
+ * events, images, listings, stock, transactions, and users.
22
+ *
23
+ * @example
24
+ * const sdk = new IntegrationSdk(sdkConfig);
25
+ * const integrationApi = new IntegrationApi(sdk);
26
+ *
27
+ * // Example: Query availability exceptions
28
+ * const response = await integrationApi.availabilityExceptions.query({
29
+ * resource_id: 'resource-id',
30
+ * start: '2024-12-01T00:00:00Z',
31
+ * end: '2024-12-31T23:59:59Z'
32
+ * });
33
+ *
34
+ * const exceptions = response.data;
35
+ */
36
+ declare class IntegrationApi {
37
+ axios: AxiosInstance;
38
+ endpoint: string;
39
+ headers: Record<string, string>;
40
+ authRequired: boolean;
41
+ availabilityExceptions: AvailabilityExceptions;
42
+ events: Events;
43
+ images: Images;
44
+ listings: Listings;
45
+ marketplace: Marketplace;
46
+ stock: Stock;
47
+ stockAdjustments: StockAdjustments;
48
+ stockReservations: StockReservation;
49
+ transactions: Transactions;
50
+ users: Users;
51
+ /**
52
+ * Creates an instance of the IntegrationApi class.
53
+ *
54
+ * @param {IntegrationSdk} sdk - The Integration SDK instance providing configuration and request handling.
55
+ */
56
+ constructor(sdk: IntegrationSdk);
57
+ }
58
+ export default IntegrationApi;
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAM,cAAc;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IAGtB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IAEb;;;;OAIG;gBACS,GAAG,EAAE,cAAc;CAkBhC;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @fileoverview Provides the AvailabilityExceptions class for managing availability exceptions in the Sharetribe Marketplace API.
3
+ * This class allows querying, creating, and deleting availability exceptions for listings.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#availability-exceptions
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { AvailabilityExceptionsCreateParameter, AvailabilityExceptionsDeleteParameter, AvailabilityExceptionsQueryParameter, AvailabilityExceptionsResponse } from "../../types/marketplace/availabilityExceptions";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the AvailabilityExceptions API.
14
+ *
15
+ * The AvailabilityExceptions API provides methods to manage availability exceptions for listings, such as querying existing exceptions, creating new ones, and deleting them.
16
+ */
17
+ declare class AvailabilityExceptions {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the AvailabilityExceptions class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: MarketplaceApi);
28
+ /**
29
+ * Queries availability exceptions based on specified filters.
30
+ *
31
+ * @template P
32
+ * @param {P & AvailabilityExceptionsQueryParameter} params - Query parameters to filter availability exceptions.
33
+ * @returns {Promise<AxiosResponse<AvailabilityExceptionsResponse<'query', P>>>} - A promise resolving to the query results.
34
+ *
35
+ * @example
36
+ * const response = await sdk.availabilityExceptions.query({
37
+ * listingId: 'listing-id',
38
+ * start: '2024-12-01T00:00:00Z',
39
+ * end: '2024-12-31T23:59:59Z',
40
+ * });
41
+ *
42
+ * const exceptions = response.data;
43
+ */
44
+ query<P extends AvailabilityExceptionsQueryParameter>(params: P): Promise<AxiosResponse<AvailabilityExceptionsResponse<"query", P>>>;
45
+ /**
46
+ * Creates a new availability exception for a listing.
47
+ *
48
+ * @template P
49
+ * @template EP
50
+ * @param {P & AvailabilityExceptionsCreateParameter} params - Parameters for the new availability exception.
51
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
52
+ * @returns {Promise<AxiosResponse<AvailabilityExceptionsResponse<'create', P, EP>>>} - A promise resolving to the created availability exception.
53
+ *
54
+ * @example
55
+ * const response = await sdk.availabilityExceptions.create({
56
+ * listingId: 'listing-id',
57
+ * start: '2024-12-25T00:00:00Z',
58
+ * end: '2024-12-25T23:59:59Z',
59
+ * seats: 0,
60
+ * });
61
+ *
62
+ * const newException = response.data;
63
+ */
64
+ create<P extends AvailabilityExceptionsCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<AvailabilityExceptionsResponse<"create", P, EP>>>;
65
+ /**
66
+ * Deletes an existing availability exception.
67
+ *
68
+ * @template P
69
+ * @template EP
70
+ * @param {P & AvailabilityExceptionsDeleteParameter} params - Parameters to identify the availability exception to delete.
71
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
72
+ * @returns {Promise<AxiosResponse<AvailabilityExceptionsResponse<'delete', P>>>} - A promise resolving to the deletion result.
73
+ *
74
+ * @example
75
+ * const response = await sdk.availabilityExceptions.delete({
76
+ * id: 'exception-id',
77
+ * });
78
+ *
79
+ * const deletionResult = response.data;
80
+ */
81
+ delete<P extends AvailabilityExceptionsDeleteParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<AvailabilityExceptionsResponse<"delete", P, EP>>>;
82
+ }
83
+ export default AvailabilityExceptions;
84
+ //# sourceMappingURL=AvailabilityExceptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvailabilityExceptions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/AvailabilityExceptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,qCAAqC,EACrC,qCAAqC,EACrC,oCAAoC,EACpC,8BAA8B,EAC/B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,sBAAsB;IAC1B,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,KAAK,CAAC,CAAC,SAAS,oCAAoC,EACxD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAUrE;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CACV,CAAC,SAAS,qCAAqC,EAC/C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQ1E;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CACV,CAAC,SAAS,qCAAqC,EAC/C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAO3E;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @fileoverview Provides the Bookings class for managing bookings in the Sharetribe Marketplace API.
3
+ * This class allows querying booking records.
4
+ *
5
+ * For more details, refer to the Marketplace API documentation:
6
+ * https://www.sharetribe.com/api-reference/marketplace.html#bookings
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import MarketplaceApi from "./index";
10
+ import { BookingsQueryParameter, BookingsResponse } from "../../types/marketplace/bookings";
11
+ /**
12
+ * Class representing the Bookings API.
13
+ *
14
+ * The Bookings API provides methods to query booking records for marketplace resources.
15
+ */
16
+ declare class Bookings {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ /**
21
+ * Creates an instance of the Bookings class.
22
+ *
23
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
24
+ */
25
+ constructor(api: MarketplaceApi);
26
+ /**
27
+ * Queries booking records based on specified filters.
28
+ *
29
+ * @template P
30
+ * @param {P & BookingsQueryParameter} params - Query parameters to filter booking records.
31
+ * @returns {Promise<AxiosResponse<BookingsResponse<'query', P>>>} - A promise resolving to the query results.
32
+ *
33
+ * @example
34
+ * const response = await sdk.bookings.query({
35
+ * listingId: 'listing-id',
36
+ * start: '2024-12-01T00:00:00Z',
37
+ * end: '2024-12-31T23:59:59Z',
38
+ * });
39
+ *
40
+ * const bookings = response.data;
41
+ */
42
+ query<P extends BookingsQueryParameter>(params: P): Promise<AxiosResponse<BookingsResponse<"query", P>>>;
43
+ }
44
+ export default Bookings;
45
+ //# sourceMappingURL=Bookings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bookings.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/marketplace/Bookings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C;;;;GAIG;AACH,cAAM,QAAQ;IACZ,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;;;;;;;;;;;;;;;OAeG;IACG,KAAK,CAAC,CAAC,SAAS,sBAAsB,EAC1C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;CASxD;AAED,eAAe,QAAQ,CAAC"}