@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,62 @@
1
+ /**
2
+ * @fileoverview Provides the AssetsApi class for interacting with the Sharetribe Asset Delivery API.
3
+ * This class includes methods to retrieve assets by alias or version.
4
+ *
5
+ * For more information, refer to the Asset Delivery API reference:
6
+ * https://www.sharetribe.com/api-reference/asset-delivery-api.html
7
+ */
8
+ import SharetribeSdk from "../../sdk";
9
+ import { AxiosInstance, AxiosResponse } from "axios";
10
+ import { AssetByAliasParameter, AssetByVersionParameter, AssetResponse, AssetsByAliasParameter, AssetsByVersionParameter } from "../../types/assets";
11
+ /**
12
+ * Class representing the Assets API for interacting with the Sharetribe Asset Delivery API.
13
+ */
14
+ declare class AssetsApi {
15
+ axios: AxiosInstance;
16
+ endpoint: string;
17
+ headers: Record<string, string>;
18
+ /**
19
+ * Creates an instance of AssetsApi.
20
+ *
21
+ * @param {SharetribeSdk} sdk - The Sharetribe SDK instance for configuration and request handling.
22
+ */
23
+ constructor(sdk: SharetribeSdk);
24
+ /**
25
+ * Retrieves a single asset by alias.
26
+ *
27
+ * @template P
28
+ * @param {P & AssetByAliasParameter} params - Parameters including alias and path for the asset.
29
+ * @returns {Promise<AssetResponse<'assetByAlias', P>>} - A promise resolving to the asset response.
30
+ * @throws {Error} If the path starts with a leading slash.
31
+ */
32
+ assetByAlias<P extends AssetByAliasParameter>(params: P): Promise<AxiosResponse<AssetResponse<"assetByAlias", P>>>;
33
+ /**
34
+ * Retrieves multiple assets by alias.
35
+ *
36
+ * @template P
37
+ * @param {P & AssetsByAliasParameter} params - Parameters including alias and paths for the assets.
38
+ * @returns {Promise<AssetResponse<'assetsByAlias', P>>} - A promise resolving to the assets response.
39
+ * @throws {Error} If any path starts with a leading slash or if paths are empty.
40
+ */
41
+ assetsByAlias<P extends AssetsByAliasParameter>(params: P): Promise<AxiosResponse<AssetResponse<"assetsByAlias", P>>>;
42
+ /**
43
+ * Retrieves a single asset by version.
44
+ *
45
+ * @template P
46
+ * @param {P & AssetByVersionParameter} params - Parameters including version and path for the asset.
47
+ * @returns {Promise<AssetResponse<'assetByVersion', P>>} - A promise resolving to the asset response.
48
+ * @throws {Error} If the path starts with a leading slash.
49
+ */
50
+ assetByVersion<P extends AssetByVersionParameter>(params: P): Promise<AxiosResponse<AssetResponse<"assetByVersion", P>>>;
51
+ /**
52
+ * Retrieves multiple assets by version.
53
+ *
54
+ * @template P
55
+ * @param {P & AssetsByVersionParameter} params - Parameters including version and paths for the assets.
56
+ * @returns {Promise<AssetResponse<'assetsByVersion', P>>} - A promise resolving to the assets response.
57
+ * @throws {Error} If any path starts with a leading slash.
58
+ */
59
+ assetsByVersion<P extends AssetsByVersionParameter>(params: P): Promise<AxiosResponse<AssetResponse<"assetsByVersion", P>>>;
60
+ }
61
+ export default AssetsApi;
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/assets/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAyB5B;;GAEG;AACH,cAAM,SAAS;IACb,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;;;OAIG;gBACS,GAAG,EAAE,aAAa;IAO9B;;;;;;;OAOG;IACG,YAAY,CAAC,CAAC,SAAS,qBAAqB,EAChD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC;IAY3D;;;;;;;OAOG;IACG,aAAa,CAAC,CAAC,SAAS,sBAAsB,EAClD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;IAmB5D;;;;;;;OAOG;IACG,cAAc,CAAC,CAAC,SAAS,uBAAuB,EACpD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;IAY7D;;;;;;;OAOG;IACG,eAAe,CAAC,CAAC,SAAS,wBAAwB,EACtD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC;CAe/D;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @fileoverview Provides the AuthenticationApi class for interacting with the Sharetribe Authentication API.
3
+ * This class includes methods to obtain and manage access tokens for authenticating requests to the Marketplace API and Integration API.
4
+ *
5
+ * For more information, refer to the Authentication API reference:
6
+ * https://www.sharetribe.com/api-reference/authentication.html
7
+ */
8
+ import { AuthWithIdpParameter, Endpoint, RevokeResponse, ScopeType, TokenResponse } from "../../types/authentication";
9
+ import { AxiosResponse } from "axios";
10
+ import SharetribeSdk from "../../sdk";
11
+ import IntegrationSdk from "../../integrationSdk";
12
+ /**
13
+ * Class representing the Authentication API for obtaining and managing access tokens.
14
+ *
15
+ * The Authentication API follows the OAuth2 framework and supports various grant types to issue tokens for authenticating requests.
16
+ *
17
+ * @see https://www.sharetribe.com/api-reference/authentication.html
18
+ */
19
+ declare class AuthenticationApi {
20
+ private readonly endpoint;
21
+ private readonly headers;
22
+ private axios;
23
+ /**
24
+ * Creates an instance of AuthenticationApi.
25
+ *
26
+ * @param {SharetribeSdk | IntegrationSdk} sdk - The Sharetribe SDK or Integration SDK instance for configuration and request handling.
27
+ */
28
+ constructor(sdk: SharetribeSdk | IntegrationSdk);
29
+ /**
30
+ * Obtains an access token using the specified grant type and parameters.
31
+ *
32
+ * @template S
33
+ * @param {Endpoint<S>} params - Parameters including grant type and necessary credentials.
34
+ * @returns {Promise<TokenResponse<S>>} - A promise resolving to the token response.
35
+ */
36
+ token<S extends ScopeType>(params: Endpoint<S>): Promise<AxiosResponse<TokenResponse<S>>>;
37
+ /**
38
+ * Authenticates a user using an external identity provider (IdP) and obtains an access token.
39
+ *
40
+ * @param {AuthWithIdpParameter} params - Parameters including IdP token and provider details.
41
+ * @returns {Promise<TokenResponse<'user'>>} - A promise resolving to the token response.
42
+ */
43
+ authWithIdp<P extends AuthWithIdpParameter>(params: P): Promise<AxiosResponse<TokenResponse<"user">>>;
44
+ /**
45
+ * Revokes a refresh token, effectively invalidating any associated access tokens.
46
+ *
47
+ * @param {string} token - The refresh token to be revoked.
48
+ * @returns {Promise<RevokeResponse>} - A promise resolving to the revoke response.
49
+ */
50
+ revoke(token: string): Promise<AxiosResponse<RevokeResponse>>;
51
+ /**
52
+ * Retrieves details about the current access token.
53
+ *
54
+ * @returns {Promise<TokenResponse<'details'>>} - A promise resolving to the token details response.
55
+ */
56
+ details(): Promise<AxiosResponse<TokenResponse<"details">>>;
57
+ }
58
+ export default AuthenticationApi;
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,cAAc,EACd,SAAS,EACT,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,cAAc,MAAM,sBAAsB,CAAC;AA2BlD;;;;;;GAMG;AACH,cAAM,iBAAiB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,KAAK,CAAgB;IAE7B;;;;OAIG;gBACS,GAAG,EAAE,aAAa,GAAG,cAAc;IAO/C;;;;;;OAMG;IACG,KAAK,CAAC,CAAC,SAAS,SAAS,EAC7B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAQ3C;;;;;OAKG;IACG,WAAW,CAAC,CAAC,SAAS,oBAAoB,EAC9C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAQhD;;;;;OAKG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAQnE;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;CAMlE;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @fileoverview Provides the AvailabilityExceptions class for managing availability exceptions in the Sharetribe Integration API.
3
+ * This class allows querying, creating, and deleting availability exceptions for resources in a Sharetribe marketplace.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#availability-exceptions
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { AvailabilityExceptionsCreateParameter, AvailabilityExceptionsDeleteParameter, AvailabilityExceptionsQueryParameter, AvailabilityExceptionsResponse } from "../../types/marketplace/availabilityExceptions";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Availability Exceptions API.
14
+ *
15
+ * Availability exceptions are used to override default availability rules for specific time ranges.
16
+ * This class provides methods to query, create, and delete such exceptions.
17
+ */
18
+ declare class AvailabilityExceptions {
19
+ private readonly endpoint;
20
+ private readonly axios;
21
+ private readonly headers;
22
+ readonly authRequired = true;
23
+ /**
24
+ * Creates an instance of the AvailabilityExceptions class.
25
+ *
26
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
27
+ */
28
+ constructor(api: IntegrationApi);
29
+ /**
30
+ * Queries availability exceptions for a resource.
31
+ *
32
+ * @template P
33
+ * @param {P & AvailabilityExceptionsQueryParameter} params - Query parameters to filter availability exceptions.
34
+ * @returns {Promise<AvailabilityExceptionsResponse<'query', P>>} - A promise resolving to the query response.
35
+ *
36
+ * @example
37
+ * const response = await integrationSdk.availabilityExceptions.query({
38
+ * listingId: 'listing-id',
39
+ * start: '2024-12-01T00:00:00Z',
40
+ * end: '2024-12-31T23:59:59Z'
41
+ * });
42
+ *
43
+ * // Access the list of exceptions
44
+ * const exceptions = response.data;
45
+ */
46
+ query<P extends AvailabilityExceptionsQueryParameter>(params: P): Promise<AxiosResponse<AvailabilityExceptionsResponse<"query", P>>>;
47
+ /**
48
+ * Creates a new availability exception for a resource.
49
+ *
50
+ * @template P
51
+ * @template EP
52
+ * @param {P & AvailabilityExceptionsCreateParameter} params - Parameters to define the availability exception.
53
+ * @param {EP | void} [extraParams] - Optional additional parameters.
54
+ * @returns {Promise<AvailabilityExceptionsResponse<'create', P, EP>>} - A promise resolving to the create response.
55
+ *
56
+ * @example
57
+ * const response = await integrationSdk.availabilityExceptions.create({
58
+ * listingId: 'listing-id',
59
+ * start: '2024-12-10T10:00:00Z',
60
+ * end: '2024-12-10T12:00:00Z',
61
+ * seats: 0
62
+ * });
63
+ *
64
+ * // Access the created exception
65
+ * const createdException = response.data;
66
+ */
67
+ create<P extends AvailabilityExceptionsCreateParameter, EP extends ExtraParameter>(params: P, extraParams: EP | void): Promise<AxiosResponse<AvailabilityExceptionsResponse<"create", P, EP>>>;
68
+ /**
69
+ * Deletes an availability exception for a resource.
70
+ *
71
+ * @template P
72
+ * @param {P & AvailabilityExceptionsDeleteParameter} params - Parameters to specify the exception to delete.
73
+ * @returns {Promise<AvailabilityExceptionsResponse<'delete', P>>} - A promise resolving to the delete response.
74
+ *
75
+ * @example
76
+ * const response = await integrationSdk.availabilityExceptions.delete({
77
+ * id: 'exception-id'
78
+ * });
79
+ *
80
+ * // Check the deletion result
81
+ * const result = response.data;
82
+ */
83
+ delete<P extends AvailabilityExceptionsDeleteParameter>(params: P): Promise<AxiosResponse<AvailabilityExceptionsResponse<"delete", P>>>;
84
+ }
85
+ export default AvailabilityExceptions;
86
+ //# sourceMappingURL=AvailabilityExceptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvailabilityExceptions.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/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;;;;;GAKG;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;;;;;;;;;;;;;;;;OAgBG;IACG,KAAK,CAAC,CAAC,SAAS,oCAAoC,EACxD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAUrE;;;;;;;;;;;;;;;;;;;OAmBG;IACG,MAAM,CACV,CAAC,SAAS,qCAAqC,EAC/C,EAAE,SAAS,cAAc,EAEzB,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GAAG,IAAI,GACrB,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAQ1E;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,CAAC,SAAS,qCAAqC,EAC1D,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;CAOvE;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @fileoverview Provides the Events class for querying event data in the Sharetribe Integration API.
3
+ * This class allows querying events related to bookings or other entities in a Sharetribe marketplace.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#events
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { EventQueryParameter, EventsResponse } from "../../types/integration/events";
11
+ /**
12
+ * Class representing the Events API.
13
+ *
14
+ * The Events API provides access to event data, such as booking events, allowing integration with external systems.
15
+ */
16
+ declare class Events {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ /**
21
+ * Creates an instance of the Events class.
22
+ *
23
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
24
+ */
25
+ constructor(api: IntegrationApi);
26
+ /**
27
+ * Queries event data based on the specified parameters.
28
+ *
29
+ * @template P
30
+ * @param {P & EventQueryParameter} params - Query parameters to filter events.
31
+ * @returns {Promise<EventsResponse<'query'>>} - A promise resolving to the event query response.
32
+ *
33
+ * @example
34
+ * const response = await integrationSdk.events.query({
35
+ * startAfterSequenceId: 'event-sequence-id',
36
+ * createdAtStart: '2021-01-01T00:00:00Z',
37
+ * resourceId: 'resource-id',
38
+ * relatedResourceId: 'related-resource-id',
39
+ * eventTypes: ['eventType1', 'eventType2'],
40
+ * });
41
+ *
42
+ * // Access the list of events
43
+ * const eventsList = response.data;
44
+ */
45
+ query<P extends EventQueryParameter>(params: P): Promise<AxiosResponse<EventsResponse<"query">>>;
46
+ }
47
+ export default Events;
48
+ //# sourceMappingURL=Events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Events.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,cAAc,EACf,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,cAAM,MAAM;IACV,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;;;;;;;;;;;;;;;;;;OAkBG;IACG,KAAK,CAAC,CAAC,SAAS,mBAAmB,EACvC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAMnD;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @fileoverview Provides the Images class for handling image uploads in the Sharetribe Integration API.
3
+ * This class allows uploading images to be used as resources in a Sharetribe marketplace.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#images
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { ImagesResponse, ImagesUploadParameter } from "../../types/marketplace/images";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Images API.
14
+ *
15
+ * The Images API allows uploading images to the marketplace for use in listings or other resources.
16
+ */
17
+ declare class Images {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ readonly authRequired = true;
22
+ /**
23
+ * Creates an instance of the Images class.
24
+ *
25
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: IntegrationApi);
28
+ /**
29
+ * Uploads an image to the marketplace.
30
+ *
31
+ * @template P
32
+ * @template EP
33
+ * @param {P & ImagesUploadParameter} params - The image upload parameters, including image data and related metadata.
34
+ * @param {EP & ExtraParameter} extraParams - Optional additional parameters for the upload request.
35
+ * @returns {Promise<ImagesResponse<'upload', EP>>} - A promise resolving to the upload response.
36
+ *
37
+ * @example
38
+ * const response = await integrationSdk.images.upload({
39
+ * image: fileData,
40
+ * });
41
+ *
42
+ * // Access the uploaded image details
43
+ * const imageDetails = response.data;
44
+ */
45
+ upload<P extends ImagesUploadParameter, EP extends ExtraParameter>(params: P, extraParams: EP): Promise<AxiosResponse<ImagesResponse<"upload", EP>>>;
46
+ }
47
+ export default Images;
48
+ //# sourceMappingURL=Images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Images.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Images.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,cAAc,EACd,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,cAAM,MAAM;IACV,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;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAAE,SAAS,cAAc,EACrE,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GACd,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;CAOxD;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @fileoverview Provides the Listings class for managing listings in the Sharetribe Integration API.
3
+ * This class allows creating, updating, querying, and performing other operations on marketplace listings.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#listings
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { ListingsApproveParameter, ListingsCloseParameter, ListingsCreateParameter, ListingsOpenParameter, ListingsQueryParameter, ListingsResponse, ListingsShowParameter, ListingsUpdateParameter } from "../../types/marketplace/listings";
11
+ import { ExtraParameter } from "../../types/sharetribe";
12
+ /**
13
+ * Class representing the Listings API.
14
+ *
15
+ * The Listings API provides methods to manage marketplace listings, such as creating, updating, querying, and approving listings.
16
+ */
17
+ declare class Listings {
18
+ private readonly endpoint;
19
+ private readonly axios;
20
+ private readonly headers;
21
+ /**
22
+ * Creates an instance of the Listings class.
23
+ *
24
+ * @param {IntegrationApi} api - The Marketplace API instance providing configuration and request handling.
25
+ */
26
+ constructor(api: IntegrationApi);
27
+ /**
28
+ * Retrieves details of a specific listing.
29
+ *
30
+ * @template P
31
+ * @param {P & ListingsShowParameter} params - The parameters to identify the listing.
32
+ * @returns {Promise<ListingsResponse<'show', P>>} - A promise resolving to the listing details.
33
+ *
34
+ * @example
35
+ * const response = await integrationSdk.listings.show({
36
+ * id: 'listing-id'
37
+ * });
38
+ *
39
+ * const listing = response.data;
40
+ */
41
+ show<P extends ListingsShowParameter>(params: P): Promise<AxiosResponse<ListingsResponse<"show", P, undefined, true>>>;
42
+ /**
43
+ * Queries listings based on specified filters.
44
+ *
45
+ * @template P
46
+ * @param {P & ListingsQueryParameter} params - Query parameters to filter listings.
47
+ * @returns {Promise<ListingsResponse<'query', P>>} - A promise resolving to the query results.
48
+ *
49
+ * @example
50
+ * const response = await integrationSdk.listings.query({
51
+ * ids: ['listing-id-1', 'listing-id-2'],
52
+ * per_page: 10,
53
+ * page: 1
54
+ * });
55
+ *
56
+ * const listings = response.data;
57
+ */
58
+ query<P extends ListingsQueryParameter>(params: P): Promise<AxiosResponse<ListingsResponse<"query", P, undefined, false>>>;
59
+ /**
60
+ * Creates a new listing.
61
+ *
62
+ * @template P
63
+ * @template EP
64
+ * @param {P & ListingsCreateParameter} params - Parameters for the new listing.
65
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
66
+ * @returns {Promise<ListingsResponse<'create', P, EP, true>>} - A promise resolving to the created listing.
67
+ *
68
+ * @example
69
+ * const response = await integrationSdk.listings.create({
70
+ * title: 'New Listing',
71
+ * description: 'Description of the listing',
72
+ * authorId: 'user-id',
73
+ * state: 'published'
74
+ * });
75
+ *
76
+ * const newListing = response.data;
77
+ */
78
+ create<P extends ListingsCreateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<ListingsResponse<"create", P, EP, true>>>;
79
+ /**
80
+ * Updates an existing listing.
81
+ *
82
+ * @template P
83
+ * @template EP
84
+ * @param {P & ListingsUpdateParameter} params - Parameters for the listing update.
85
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
86
+ * @returns {Promise<ListingsResponse<'update', P, EP>>} - A promise resolving to the updated listing.
87
+ *
88
+ * @example
89
+ * const response = await integrationSdk.listings.update({
90
+ * id: 'listing-id',
91
+ * title: 'Updated Title'
92
+ * });
93
+ *
94
+ * const updatedListing = response.data;
95
+ */
96
+ update<P extends ListingsUpdateParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<ListingsResponse<"update", P, EP, true>>>;
97
+ /**
98
+ * Closes a listing.
99
+ *
100
+ * @template P
101
+ * @template EP
102
+ * @param {P & ListingsCloseParameter} params - Parameters to identify the listing to close.
103
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
104
+ * @returns {Promise<ListingsResponse<'close', P, EP>>} - A promise resolving to the closed listing.
105
+ *
106
+ * @example
107
+ * const response = await integrationSdk.listings.close({
108
+ * id: 'listing-id'
109
+ * });
110
+ *
111
+ * const closedListing = response.data;
112
+ */
113
+ close<P extends ListingsCloseParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<ListingsResponse<"close", P, EP, true>>>;
114
+ /**
115
+ * Opens a listing.
116
+ *
117
+ * @template P
118
+ * @template EP
119
+ * @param {P & ListingsOpenParameter} params - Parameters to identify the listing to open.
120
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
121
+ * @returns {Promise<ListingsResponse<'open', P, EP>>} - A promise resolving to the opened listing.
122
+ *
123
+ * @example
124
+ * const response = await integrationSdk.listings.open({
125
+ * id: 'listing-id'
126
+ * });
127
+ *
128
+ * const openedListing = response.data;
129
+ */
130
+ open<P extends ListingsOpenParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<ListingsResponse<"open", P, EP, true>>>;
131
+ /**
132
+ * Approves a listing.
133
+ *
134
+ * @template P
135
+ * @template EP
136
+ * @param {P & ListingsApproveParameter} params - Parameters to identify the listing to approve.
137
+ * @param {EP | void} extraParams - Optional extra parameters for the request.
138
+ * @returns {Promise<ListingsResponse<'approve', P, EP>>} - A promise resolving to the approved listing.
139
+ *
140
+ * @example
141
+ * const response = await integrationSdk.listings.approve({
142
+ * id: 'listing-id'
143
+ * });
144
+ *
145
+ * const approvedListing = response.data;
146
+ */
147
+ approve<P extends ListingsApproveParameter, EP extends ExtraParameter>(params: P, extraParams?: EP): Promise<AxiosResponse<ListingsResponse<"approve", P, EP, true>>>;
148
+ }
149
+ export default Listings;
150
+ //# sourceMappingURL=Listings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Listings.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Listings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;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;;;;;;;;;;;;;OAaG;IACG,IAAI,CAAC,CAAC,SAAS,qBAAqB,EACxC,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAUvE;;;;;;;;;;;;;;;OAeG;IACG,KAAK,CAAC,CAAC,SAAS,sBAAsB,EAC1C,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAUzE;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CAAC,CAAC,SAAS,uBAAuB,EAAE,EAAE,SAAS,cAAc,EACvE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAQlE;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,CAAC,SAAS,uBAAuB,EAAE,EAAE,SAAS,cAAc,EACvE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAQlE;;;;;;;;;;;;;;;OAeG;IACG,KAAK,CAAC,CAAC,SAAS,sBAAsB,EAAE,EAAE,SAAS,cAAc,EACrE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAQjE;;;;;;;;;;;;;;;OAeG;IACG,IAAI,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAAE,SAAS,cAAc,EACnE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAQhE;;;;;;;;;;;;;;;OAeG;IACG,OAAO,CAAC,CAAC,SAAS,wBAAwB,EAAE,EAAE,SAAS,cAAc,EACzE,MAAM,EAAE,CAAC,EACT,WAAW,CAAC,EAAE,EAAE,GACf,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;CAOpE;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @fileoverview Provides the Marketplace class for interacting with the Sharetribe Integration API.
3
+ * This class allows fetching details about the marketplace configuration.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#marketplace
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi from "./index";
10
+ import { MarketplaceResponse } from "../../types/marketplace/marketplace";
11
+ /**
12
+ * Class representing the Marketplace API.
13
+ *
14
+ * The Marketplace API provides methods to retrieve marketplace configuration details.
15
+ */
16
+ declare class Marketplace {
17
+ private readonly endpoint;
18
+ private readonly axios;
19
+ private readonly headers;
20
+ /**
21
+ * Creates an instance of the Marketplace class.
22
+ *
23
+ * @param {MarketplaceApi} api - The Marketplace API instance providing configuration and request handling.
24
+ */
25
+ constructor(api: IntegrationApi);
26
+ /**
27
+ * Retrieves details about the marketplace configuration.
28
+ *
29
+ * @returns {Promise<AxiosResponse<MarketplaceResponse<'show'>>>} - A promise resolving to the marketplace details.
30
+ *
31
+ * @example
32
+ * const response = await integrationSdk.marketplace.show();
33
+ *
34
+ * const marketplaceDetails = response.data;
35
+ */
36
+ show(): Promise<AxiosResponse<MarketplaceResponse<"show">>>;
37
+ }
38
+ export default Marketplace;
39
+ //# sourceMappingURL=Marketplace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Marketplace.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/Marketplace.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,cAAM,WAAW;IACf,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;;;;;;;;;OASG;IACG,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;CAQlE;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @fileoverview Provides the Stock class for managing stock levels in the Sharetribe Integration API.
3
+ * This class allows performing operations on stock, such as compare-and-set updates.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#stock
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi 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 to manage 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: IntegrationApi);
27
+ /**
28
+ * Updates stock levels using a compare-and-set operation.
29
+ *
30
+ * @template P
31
+ * @template EP
32
+ * @param {P & StockCompareAndSetParameter} params - Parameters specifying the stock to compare and set.
33
+ * @param {EP & ExtraParameter} extraParams - Optional additional parameters for the request.
34
+ * @returns {Promise<AxiosResponse<StockResponse<'compareAndSet', EP>>>} - A promise resolving to the stock update response.
35
+ *
36
+ * @example
37
+ * const response = await integrationSdk.stock.compareAndSet({
38
+ * listingId: 'listing-id',
39
+ * oldTotal: 5,
40
+ * newTotal: 10,
41
+ * });
42
+ *
43
+ * const updatedStock = response.data;
44
+ */
45
+ compareAndSet<P extends StockCompareAndSetParameter, EP extends ExtraParameter>(params: P, extraParams: EP): Promise<AxiosResponse<StockResponse<"compareAndSet", EP>>>;
46
+ }
47
+ export default Stock;
48
+ //# sourceMappingURL=Stock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stock.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/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;;;;;;;;;;;;;;;;;OAiBG;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,65 @@
1
+ /**
2
+ * @fileoverview Provides the StockAdjustments class for managing stock adjustments in the Sharetribe Integration API.
3
+ * This class allows querying and creating stock adjustment records.
4
+ *
5
+ * For more details, refer to the Integration API documentation:
6
+ * https://www.sharetribe.com/api-reference/integration.html#stock-adjustments
7
+ */
8
+ import { AxiosResponse } from "axios";
9
+ import IntegrationApi 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 to query and create stock adjustments for marketplace resources.
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 {IntegrationApi} api - The Integration API instance providing configuration and request handling.
26
+ */
27
+ constructor(api: IntegrationApi);
28
+ /**
29
+ * Queries stock adjustment records based on specified filters.
30
+ *
31
+ * @template P
32
+ * @param {P & StockAdjustmentsQueryParameter} params - Query parameters to filter stock adjustment records.
33
+ * @returns {Promise<AxiosResponse<StockAdjustmentsResponse<'query', P>>>} - A promise resolving to the query results.
34
+ *
35
+ * @example
36
+ * const response = await integrationSdk.stockAdjustments.query({
37
+ * listingId: 'resource-id',
38
+ * start: '2024-12-01T00:00:00Z',
39
+ * end: '2024-12-31T23:59:59Z',
40
+ * });
41
+ *
42
+ * const adjustments = response.data;
43
+ */
44
+ query<P extends StockAdjustmentsQueryParameter>(params: P): Promise<AxiosResponse<StockAdjustmentsResponse<"query", P>>>;
45
+ /**
46
+ * Creates a new stock adjustment record.
47
+ *
48
+ * @template P
49
+ * @template EP
50
+ * @param {P & StockAdjustmentsCreateParameter} params - Parameters for the new stock adjustment.
51
+ * @param {EP | undefined} extraParams - Optional extra parameters for the request.
52
+ * @returns {Promise<AxiosResponse<StockAdjustmentsResponse<'create', P, EP>>>} - A promise resolving to the created stock adjustment record.
53
+ *
54
+ * @example
55
+ * const response = await integrationSdk.stockAdjustments.create({
56
+ * listingId: 'listing-id',
57
+ * quantity: 10,
58
+ * });
59
+ *
60
+ * const newAdjustment = response.data;
61
+ */
62
+ create<P extends StockAdjustmentsCreateParameter, EP extends ExtraParameter | undefined>(params: P, extraParams: EP): Promise<AxiosResponse<StockAdjustmentsResponse<"create", P, EP>>>;
63
+ }
64
+ export default StockAdjustments;
65
+ //# sourceMappingURL=StockAdjustments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StockAdjustments.d.ts","sourceRoot":"","sources":["../../../../src/endpoints/integrationApi/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;;;;;;;;;;;;;;;OAeG;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;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CACV,CAAC,SAAS,+BAA+B,EACzC,EAAE,SAAS,cAAc,GAAG,SAAS,EAErC,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GACd,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAOrE;AAED,eAAe,gBAAgB,CAAC"}