@vansite/ts-sharetribe-flex-sdk 1.0.34 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +1 -1
  2. package/dist/endpoints/assets/index.d.ts +47 -0
  3. package/dist/endpoints/auth/index.d.ts +45 -0
  4. package/dist/endpoints/integrationApi/AvailabilityExceptions.d.ts +66 -0
  5. package/dist/endpoints/integrationApi/Events.d.ts +43 -0
  6. package/dist/endpoints/integrationApi/Images.d.ts +36 -0
  7. package/dist/endpoints/integrationApi/Listings.d.ts +87 -0
  8. package/dist/endpoints/integrationApi/Marketplace.d.ts +30 -0
  9. package/dist/endpoints/integrationApi/Stock.d.ts +42 -0
  10. package/dist/endpoints/integrationApi/StockAdjustments.d.ts +64 -0
  11. package/dist/{types/endpoints/integrationApi/StockReservation.d.ts → endpoints/integrationApi/StockReservations.d.ts} +3 -4
  12. package/dist/endpoints/integrationApi/Transactions.d.ts +76 -0
  13. package/dist/endpoints/integrationApi/Users.d.ts +72 -0
  14. package/dist/endpoints/integrationApi/index.d.ts +58 -0
  15. package/dist/endpoints/marketplace/AvailabilityExceptions.d.ts +69 -0
  16. package/dist/endpoints/marketplace/Bookings.d.ts +45 -0
  17. package/dist/endpoints/marketplace/CurrentUser.d.ts +110 -0
  18. package/dist/endpoints/marketplace/Images.d.ts +38 -0
  19. package/dist/endpoints/marketplace/Listings.d.ts +52 -0
  20. package/dist/endpoints/marketplace/Marketplace.d.ts +33 -0
  21. package/dist/endpoints/marketplace/Messages.d.ts +51 -0
  22. package/dist/endpoints/marketplace/OwnListings.d.ts +116 -0
  23. package/dist/endpoints/marketplace/PasswordReset.d.ts +50 -0
  24. package/dist/endpoints/marketplace/ProcessTransitions.d.ts +42 -0
  25. package/dist/endpoints/marketplace/Reviews.d.ts +49 -0
  26. package/dist/endpoints/marketplace/SitemapData.d.ts +60 -0
  27. package/dist/endpoints/marketplace/Stock.d.ts +50 -0
  28. package/dist/endpoints/marketplace/StockAdjustments.d.ts +64 -0
  29. package/dist/endpoints/marketplace/StripeAccount.d.ts +56 -0
  30. package/dist/endpoints/marketplace/StripeAccountLinks.d.ts +42 -0
  31. package/dist/endpoints/marketplace/StripeCustomer.d.ts +62 -0
  32. package/dist/endpoints/marketplace/StripePersons.d.ts +37 -0
  33. package/dist/endpoints/marketplace/StripeSetupIntents.d.ts +42 -0
  34. package/dist/endpoints/marketplace/TimeSlots.d.ts +40 -0
  35. package/dist/endpoints/marketplace/Transactions.d.ts +89 -0
  36. package/dist/endpoints/marketplace/Users.d.ts +34 -0
  37. package/dist/endpoints/marketplace/index.d.ts +82 -0
  38. package/dist/index.d.ts +161 -0
  39. package/dist/index.js +3 -0
  40. package/dist/{ts-sharetribe-flex-sdk.cjs.LICENSE.txt → index.js.LICENSE.txt} +35 -5
  41. package/dist/index.js.map +1 -0
  42. package/dist/index.mjs +3 -0
  43. package/dist/{ts-sharetribe-flex-sdk.js.LICENSE.txt → index.mjs.LICENSE.txt} +35 -5
  44. package/dist/index.mjs.map +1 -0
  45. package/dist/index.umd.js +3 -0
  46. package/dist/{ts-sharetribe-flex-sdk.mjs.LICENSE.txt → index.umd.js.LICENSE.txt} +35 -5
  47. package/dist/index.umd.js.map +1 -0
  48. package/dist/integrationSdk.d.ts +119 -0
  49. package/dist/sdk.d.ts +211 -0
  50. package/dist/sdkTypes/BigDecimal.d.ts +30 -0
  51. package/dist/sdkTypes/LatLng.d.ts +34 -0
  52. package/dist/sdkTypes/LatLngBounds.d.ts +51 -0
  53. package/dist/sdkTypes/Money.d.ts +35 -0
  54. package/dist/sdkTypes/UUID.d.ts +45 -0
  55. package/dist/types/apiConfigs.d.ts +104 -0
  56. package/dist/types/assets/index.d.ts +101 -0
  57. package/dist/types/authentication/index.d.ts +152 -0
  58. package/dist/types/axios.d.ts +10 -0
  59. package/dist/types/config.d.ts +99 -0
  60. package/dist/types/endpoints/assets/index.d.ts +22 -36
  61. package/dist/types/endpoints/assets/index.d.ts.map +1 -1
  62. package/dist/types/endpoints/auth/index.d.ts +20 -41
  63. package/dist/types/endpoints/auth/index.d.ts.map +1 -1
  64. package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts +30 -49
  65. package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts.map +1 -1
  66. package/dist/types/endpoints/integrationApi/Events.d.ts +23 -27
  67. package/dist/types/endpoints/integrationApi/Events.d.ts.map +1 -1
  68. package/dist/types/endpoints/integrationApi/Images.d.ts +17 -28
  69. package/dist/types/endpoints/integrationApi/Images.d.ts.map +1 -1
  70. package/dist/types/endpoints/integrationApi/Listings.d.ts +42 -104
  71. package/dist/types/endpoints/integrationApi/Listings.d.ts.map +1 -1
  72. package/dist/types/endpoints/integrationApi/Marketplace.d.ts +12 -20
  73. package/dist/types/endpoints/integrationApi/Marketplace.d.ts.map +1 -1
  74. package/dist/types/endpoints/integrationApi/Stock.d.ts +22 -28
  75. package/dist/types/endpoints/integrationApi/Stock.d.ts.map +1 -1
  76. package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts +35 -35
  77. package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts.map +1 -1
  78. package/dist/types/endpoints/integrationApi/StockReservations.d.ts +43 -0
  79. package/dist/types/endpoints/integrationApi/StockReservations.d.ts.map +1 -0
  80. package/dist/types/endpoints/integrationApi/Transactions.d.ts +36 -80
  81. package/dist/types/endpoints/integrationApi/Transactions.d.ts.map +1 -1
  82. package/dist/types/endpoints/integrationApi/Users.d.ts +35 -70
  83. package/dist/types/endpoints/integrationApi/Users.d.ts.map +1 -1
  84. package/dist/types/endpoints/integrationApi/index.d.ts +40 -40
  85. package/dist/types/endpoints/integrationApi/index.d.ts.map +1 -1
  86. package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts +34 -48
  87. package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts.map +1 -1
  88. package/dist/types/endpoints/marketplace/Bookings.d.ts +24 -23
  89. package/dist/types/endpoints/marketplace/Bookings.d.ts.map +1 -1
  90. package/dist/types/endpoints/marketplace/CurrentUser.d.ts +54 -125
  91. package/dist/types/endpoints/marketplace/CurrentUser.d.ts.map +1 -1
  92. package/dist/types/endpoints/marketplace/Images.d.ts +19 -27
  93. package/dist/types/endpoints/marketplace/Images.d.ts.map +1 -1
  94. package/dist/types/endpoints/marketplace/Listings.d.ts +26 -25
  95. package/dist/types/endpoints/marketplace/Listings.d.ts.map +1 -1
  96. package/dist/types/endpoints/marketplace/Marketplace.d.ts +15 -19
  97. package/dist/types/endpoints/marketplace/Marketplace.d.ts.map +1 -1
  98. package/dist/types/endpoints/marketplace/Messages.d.ts +24 -29
  99. package/dist/types/endpoints/marketplace/Messages.d.ts.map +1 -1
  100. package/dist/types/endpoints/marketplace/OwnListings.d.ts +55 -119
  101. package/dist/types/endpoints/marketplace/OwnListings.d.ts.map +1 -1
  102. package/dist/types/endpoints/marketplace/PasswordReset.d.ts +23 -35
  103. package/dist/types/endpoints/marketplace/PasswordReset.d.ts.map +1 -1
  104. package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts +22 -22
  105. package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts.map +1 -1
  106. package/dist/types/endpoints/marketplace/Reviews.d.ts +23 -25
  107. package/dist/types/endpoints/marketplace/Reviews.d.ts.map +1 -1
  108. package/dist/types/endpoints/marketplace/SitemapData.d.ts +61 -0
  109. package/dist/types/endpoints/marketplace/SitemapData.d.ts.map +1 -0
  110. package/dist/types/endpoints/marketplace/Stock.d.ts +30 -26
  111. package/dist/types/endpoints/marketplace/Stock.d.ts.map +1 -1
  112. package/dist/types/endpoints/marketplace/StockAdjustments.d.ts +36 -34
  113. package/dist/types/endpoints/marketplace/StockAdjustments.d.ts.map +1 -1
  114. package/dist/types/endpoints/marketplace/StripeAccount.d.ts +28 -49
  115. package/dist/types/endpoints/marketplace/StripeAccount.d.ts.map +1 -1
  116. package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts +22 -31
  117. package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts.map +1 -1
  118. package/dist/types/endpoints/marketplace/StripeCustomer.d.ts +32 -46
  119. package/dist/types/endpoints/marketplace/StripeCustomer.d.ts.map +1 -1
  120. package/dist/types/endpoints/marketplace/StripePersons.d.ts +17 -25
  121. package/dist/types/endpoints/marketplace/StripePersons.d.ts.map +1 -1
  122. package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts +24 -24
  123. package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts.map +1 -1
  124. package/dist/types/endpoints/marketplace/TimeSlots.d.ts +20 -23
  125. package/dist/types/endpoints/marketplace/TimeSlots.d.ts.map +1 -1
  126. package/dist/types/endpoints/marketplace/Transactions.d.ts +45 -81
  127. package/dist/types/endpoints/marketplace/Transactions.d.ts.map +1 -1
  128. package/dist/types/endpoints/marketplace/Users.d.ts +15 -22
  129. package/dist/types/endpoints/marketplace/Users.d.ts.map +1 -1
  130. package/dist/types/endpoints/marketplace/index.d.ts +52 -40
  131. package/dist/types/endpoints/marketplace/index.d.ts.map +1 -1
  132. package/dist/types/index.d.ts +15 -30
  133. package/dist/types/index.d.ts.map +1 -1
  134. package/dist/types/integration/events.d.ts +87 -0
  135. package/dist/types/integrationSdk.d.ts +4 -5
  136. package/dist/types/integrationSdk.d.ts.map +1 -1
  137. package/dist/types/marketplace/availabilityExceptions.d.ts +99 -0
  138. package/dist/types/marketplace/availabilityPlan.d.ts +17 -0
  139. package/dist/types/marketplace/bookings.d.ts +80 -0
  140. package/dist/types/marketplace/currentUser.d.ts +202 -0
  141. package/dist/types/marketplace/images.d.ts +65 -0
  142. package/dist/types/marketplace/listings.d.ts +169 -0
  143. package/dist/types/marketplace/marketplace.d.ts +30 -0
  144. package/dist/types/marketplace/messages.d.ts +87 -0
  145. package/dist/types/marketplace/ownListings.d.ts +155 -0
  146. package/dist/types/marketplace/passwordReset.d.ts +54 -0
  147. package/dist/types/marketplace/processTransitions.d.ts +56 -0
  148. package/dist/types/marketplace/reviews.d.ts +108 -0
  149. package/dist/types/marketplace/sitemapData.d.ts +47 -0
  150. package/dist/types/marketplace/stock.d.ts +45 -0
  151. package/dist/types/marketplace/stockAdjustment.d.ts +97 -0
  152. package/dist/types/marketplace/stockReservations.d.ts +89 -0
  153. package/dist/types/marketplace/stripeAccount.d.ts +67 -0
  154. package/dist/types/marketplace/stripeAccountLinks.d.ts +55 -0
  155. package/dist/types/marketplace/stripeCustomer.d.ts +94 -0
  156. package/dist/types/marketplace/stripePaymentMethod.d.ts +21 -0
  157. package/dist/types/marketplace/stripePersons.d.ts +48 -0
  158. package/dist/types/marketplace/stripeSetupIntents.d.ts +48 -0
  159. package/dist/types/marketplace/timeSlots.d.ts +51 -0
  160. package/dist/types/marketplace/transactions.d.ts +200 -0
  161. package/dist/types/marketplace/user.d.ts +200 -0
  162. package/dist/types/sdk-types.d.ts +10 -0
  163. package/dist/types/sdk.d.ts +6 -7
  164. package/dist/types/sdk.d.ts.map +1 -1
  165. package/dist/types/sdkTypes/BigDecimal.d.ts +1 -1
  166. package/dist/types/sdkTypes/BigDecimal.d.ts.map +1 -1
  167. package/dist/types/sdkTypes/LatLng.d.ts +1 -1
  168. package/dist/types/sdkTypes/LatLng.d.ts.map +1 -1
  169. package/dist/types/sdkTypes/LatLngBounds.d.ts +1 -1
  170. package/dist/types/sdkTypes/LatLngBounds.d.ts.map +1 -1
  171. package/dist/types/sdkTypes/Money.d.ts +9 -2
  172. package/dist/types/sdkTypes/Money.d.ts.map +1 -1
  173. package/dist/types/sdkTypes/UUID.d.ts +8 -1
  174. package/dist/types/sdkTypes/UUID.d.ts.map +1 -1
  175. package/dist/types/sharetribe.d.ts +227 -0
  176. package/dist/types/store.d.ts +22 -0
  177. package/dist/types/types/apiConfigs.d.ts.map +1 -1
  178. package/dist/types/types/assets/index.d.ts +74 -36
  179. package/dist/types/types/assets/index.d.ts.map +1 -1
  180. package/dist/types/types/authentication/index.d.ts +111 -60
  181. package/dist/types/types/authentication/index.d.ts.map +1 -1
  182. package/dist/types/types/axios.d.ts.map +1 -1
  183. package/dist/types/types/config.d.ts +1 -39
  184. package/dist/types/types/config.d.ts.map +1 -1
  185. package/dist/types/types/integration/events.d.ts +52 -20
  186. package/dist/types/types/integration/events.d.ts.map +1 -1
  187. package/dist/types/types/marketplace/availabilityExceptions.d.ts +59 -16
  188. package/dist/types/types/marketplace/availabilityExceptions.d.ts.map +1 -1
  189. package/dist/types/types/marketplace/availabilityPlan.d.ts +18 -0
  190. package/dist/types/types/marketplace/availabilityPlan.d.ts.map +1 -0
  191. package/dist/types/types/marketplace/bookings.d.ts +48 -14
  192. package/dist/types/types/marketplace/bookings.d.ts.map +1 -1
  193. package/dist/types/types/marketplace/currentUser.d.ts +99 -55
  194. package/dist/types/types/marketplace/currentUser.d.ts.map +1 -1
  195. package/dist/types/types/marketplace/images.d.ts +40 -14
  196. package/dist/types/types/marketplace/images.d.ts.map +1 -1
  197. package/dist/types/types/marketplace/listings.d.ts +96 -66
  198. package/dist/types/types/marketplace/listings.d.ts.map +1 -1
  199. package/dist/types/types/marketplace/marketplace.d.ts +16 -6
  200. package/dist/types/types/marketplace/marketplace.d.ts.map +1 -1
  201. package/dist/types/types/marketplace/messages.d.ts +53 -15
  202. package/dist/types/types/marketplace/messages.d.ts.map +1 -1
  203. package/dist/types/types/marketplace/ownListings.d.ts +92 -65
  204. package/dist/types/types/marketplace/ownListings.d.ts.map +1 -1
  205. package/dist/types/types/marketplace/passwordReset.d.ts +32 -9
  206. package/dist/types/types/marketplace/passwordReset.d.ts.map +1 -1
  207. package/dist/types/types/marketplace/processTransitions.d.ts +33 -14
  208. package/dist/types/types/marketplace/processTransitions.d.ts.map +1 -1
  209. package/dist/types/types/marketplace/reviews.d.ts +72 -23
  210. package/dist/types/types/marketplace/reviews.d.ts.map +1 -1
  211. package/dist/types/types/marketplace/sitemapData.d.ts +48 -0
  212. package/dist/types/types/marketplace/sitemapData.d.ts.map +1 -0
  213. package/dist/types/types/marketplace/stock.d.ts +23 -6
  214. package/dist/types/types/marketplace/stock.d.ts.map +1 -1
  215. package/dist/types/types/marketplace/stockAdjustment.d.ts +60 -14
  216. package/dist/types/types/marketplace/stockAdjustment.d.ts.map +1 -1
  217. package/dist/types/types/marketplace/stockReservations.d.ts +59 -14
  218. package/dist/types/types/marketplace/stockReservations.d.ts.map +1 -1
  219. package/dist/types/types/marketplace/stripeAccount.d.ts +28 -5
  220. package/dist/types/types/marketplace/stripeAccount.d.ts.map +1 -1
  221. package/dist/types/types/marketplace/stripeAccountLinks.d.ts +26 -6
  222. package/dist/types/types/marketplace/stripeAccountLinks.d.ts.map +1 -1
  223. package/dist/types/types/marketplace/stripeCustomer.d.ts +60 -13
  224. package/dist/types/types/marketplace/stripeCustomer.d.ts.map +1 -1
  225. package/dist/types/types/marketplace/stripePaymentMethod.d.ts +1 -2
  226. package/dist/types/types/marketplace/stripePaymentMethod.d.ts.map +1 -1
  227. package/dist/types/types/marketplace/stripePersons.d.ts +17 -15
  228. package/dist/types/types/marketplace/stripePersons.d.ts.map +1 -1
  229. package/dist/types/types/marketplace/stripeSetupIntents.d.ts +16 -14
  230. package/dist/types/types/marketplace/stripeSetupIntents.d.ts.map +1 -1
  231. package/dist/types/types/marketplace/timeSlots.d.ts +13 -15
  232. package/dist/types/types/marketplace/timeSlots.d.ts.map +1 -1
  233. package/dist/types/types/marketplace/transactions.d.ts +77 -83
  234. package/dist/types/types/marketplace/transactions.d.ts.map +1 -1
  235. package/dist/types/types/marketplace/user.d.ts +85 -64
  236. package/dist/types/types/marketplace/user.d.ts.map +1 -1
  237. package/dist/types/types/sharetribe.d.ts +130 -92
  238. package/dist/types/types/sharetribe.d.ts.map +1 -1
  239. package/dist/types/types/store.d.ts +3 -14
  240. package/dist/types/types/store.d.ts.map +1 -1
  241. package/dist/types/utils/apis.d.ts +1 -1
  242. package/dist/types/utils/apis.d.ts.map +1 -1
  243. package/dist/types/utils/config.d.ts.map +1 -1
  244. package/dist/types/utils/prepare-axios-instance.d.ts +1 -1
  245. package/dist/types/utils/prepare-axios-instance.d.ts.map +1 -1
  246. package/dist/types/utils/stores/BrowserStore.d.ts +17 -4
  247. package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -1
  248. package/dist/types/utils/stores/ExpressStore.d.ts +26 -8
  249. package/dist/types/utils/stores/ExpressStore.d.ts.map +1 -1
  250. package/dist/types/utils/stores/MemoryStore.d.ts +1 -2
  251. package/dist/types/utils/stores/MemoryStore.d.ts.map +1 -1
  252. package/dist/types/utils/transit.d.ts +1 -1
  253. package/dist/types/utils/transit.d.ts.map +1 -1
  254. package/dist/types/utils/util.d.ts +2 -2
  255. package/dist/types/utils/util.d.ts.map +1 -1
  256. package/dist/utils/apis.d.ts +8 -0
  257. package/dist/utils/config.d.ts +32 -0
  258. package/dist/utils/convert-types.d.ts +13 -0
  259. package/dist/utils/parameter-serializer.d.ts +23 -0
  260. package/dist/utils/prepare-axios-instance.d.ts +14 -0
  261. package/dist/utils/stores/BrowserStore.d.ts +51 -0
  262. package/dist/utils/stores/ExpressStore.d.ts +67 -0
  263. package/dist/utils/stores/MemoryStore.d.ts +23 -0
  264. package/dist/utils/stores/store.d.ts +8 -0
  265. package/dist/utils/transit.d.ts +28 -0
  266. package/dist/utils/util.d.ts +15 -0
  267. package/package.json +16 -14
  268. package/dist/ts-sharetribe-flex-sdk.cjs +0 -3
  269. package/dist/ts-sharetribe-flex-sdk.cjs.map +0 -1
  270. package/dist/ts-sharetribe-flex-sdk.js +0 -3
  271. package/dist/ts-sharetribe-flex-sdk.js.map +0 -1
  272. package/dist/ts-sharetribe-flex-sdk.mjs +0 -3
  273. package/dist/ts-sharetribe-flex-sdk.mjs.map +0 -1
  274. package/dist/types/endpoints/integrationApi/StockReservation.d.ts.map +0 -1
@@ -1,9 +1,14 @@
1
1
  /**
2
2
  * @fileoverview Type definitions for Stock operations in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stock API endpoints.
4
3
  */
5
- import { ExtraParameter, ExtraParameterType, UUID } from "../sharetribe";
4
+ import { ExtraParameterType, UUID } from "../sharetribe";
5
+ /**
6
+ * Available endpoints
7
+ */
6
8
  export type StockEndpoints = "compareAndSet";
9
+ /**
10
+ * Stock resource
11
+ */
7
12
  export interface Stock {
8
13
  id: UUID;
9
14
  type: "stock";
@@ -11,19 +16,31 @@ export interface Stock {
11
16
  quantity: number;
12
17
  };
13
18
  }
19
+ /**
20
+ * Parameters for compare-and-set operation
21
+ */
14
22
  export interface StockCompareAndSetParameter {
15
23
  listingId: UUID | string;
16
24
  oldTotal: number;
17
25
  newTotal: number;
18
26
  }
19
- type ExpandReturnType<EP> = EP extends {
27
+ /**
28
+ * Expand behavior
29
+ */
30
+ type ExpandResult<EP extends ExtraParameterType | undefined> = EP extends {
20
31
  expand: true;
21
32
  } ? Stock : EP extends {
22
33
  expand: false;
23
34
  } ? Omit<Stock, "attributes"> : Omit<Stock, "attributes">;
24
- type DataType<E extends StockEndpoints, EP extends ExtraParameter | undefined> = E extends "compareAndSet" ? ExpandReturnType<EP> : never;
25
- export type StockResponse<E extends StockEndpoints, EP extends ExtraParameterType = undefined> = {
26
- data: DataType<E, EP>;
35
+ /**
36
+ * Response data per endpoint
37
+ */
38
+ type ResponseData<E extends StockEndpoints, EP extends ExtraParameterType | undefined> = E extends "compareAndSet" ? ExpandResult<EP> : never;
39
+ /**
40
+ * Final response type
41
+ */
42
+ export type StockResponse<E extends StockEndpoints = "compareAndSet", EP extends ExtraParameterType | undefined = undefined> = {
43
+ data: ResponseData<E, EP>;
27
44
  };
28
45
  export {};
29
46
  //# sourceMappingURL=stock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stock.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGzE,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC;AAG7C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,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACzD,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACvB,KAAK,GACL,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC1B,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,GACzB,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAElC;;GAEG;AACH,KAAK,YAAY,CACf,CAAC,SAAS,cAAc,EACxB,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC,CAAC,SAAS,eAAe,GAAG,YAAY,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS,cAAc,GAAG,eAAe,EAC1C,EAAE,SAAS,kBAAkB,GAAG,SAAS,GAAG,SAAS,IACnD;IACF,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CAC3B,CAAC"}
@@ -1,50 +1,96 @@
1
1
  /**
2
2
  * @fileoverview Type definitions for Stock Adjustments in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stock Adjustments API endpoints.
4
3
  */
5
- import { ApiMeta, ApiParameter, ExtraParameter, UUID, Relationship, RelationshipTypeMap, ExtraParameterType } from "../sharetribe";
4
+ import { ApiMeta, ApiParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
5
+ /**
6
+ * Available endpoints
7
+ */
6
8
  export type StockAdjustmentsEndpoints = "query" | "create" | "delete";
9
+ /**
10
+ * Relationship fields that can be included
11
+ */
7
12
  export type StockAdjustmentsRelationshipsFields = "ownListing" | "ownListing.marketplace" | "ownListing.author" | "ownListing.images" | "ownListing.currentStock" | "stockReservation";
13
+ /**
14
+ * Stock Adjustment resource
15
+ */
8
16
  export interface StockAdjustment {
9
17
  id: UUID;
10
- type: "stockAdjustments";
18
+ type: "stockAdjustment";
11
19
  attributes: {
12
20
  at: Date;
13
21
  quantity: number;
14
22
  };
15
23
  }
24
+ /**
25
+ * With relationships
26
+ */
16
27
  export interface StockAdjustmentWithRelationships extends StockAdjustment {
17
28
  relationships: {
18
29
  ownListing: Relationship<false, "ownListing">;
19
- stockReservation: Relationship<false, "stock">;
30
+ stockReservation: Relationship<false, "stockReservation">;
20
31
  };
21
32
  }
33
+ /**
34
+ * Select type based on include
35
+ */
22
36
  export type StockAdjustmentType<R extends boolean> = R extends true ? StockAdjustmentWithRelationships : StockAdjustment;
37
+ /**
38
+ * Base request parameters
39
+ */
23
40
  export interface StockAdjustmentsParameter extends ApiParameter {
24
41
  include?: StockAdjustmentsRelationshipsFields[];
25
42
  }
43
+ /**
44
+ * Query endpoint
45
+ */
26
46
  export interface StockAdjustmentsQueryParameter extends StockAdjustmentsParameter {
27
47
  listingId: UUID | string;
28
48
  start: Date | string;
29
49
  end: Date | string;
30
50
  }
51
+ /**
52
+ * Create endpoint
53
+ */
31
54
  export interface StockAdjustmentsCreateParameter extends StockAdjustmentsParameter {
32
55
  listingId: UUID | string;
33
56
  quantity: number;
34
57
  }
58
+ /**
59
+ * All parameter types
60
+ */
35
61
  type AllStockAdjustmentsParameter = StockAdjustmentsQueryParameter | StockAdjustmentsCreateParameter;
36
- type StockAdjustmentsType<P extends AllStockAdjustmentsParameter> = "include" extends keyof P ? P["include"] extends StockAdjustmentsRelationshipsFields[] ? true : false : false;
37
- type IncludedType<P extends AllStockAdjustmentsParameter> = "include" extends keyof P ? P["include"] extends (keyof RelationshipTypeMap)[] ? Array<RelationshipTypeMap[P["include"][number]]> : never : never;
38
- type ExpandReturnType<P extends AllStockAdjustmentsParameter, EP> = EP extends {
62
+ /**
63
+ * Detect include + fix TS2536
64
+ */
65
+ type HasInclude<P> = P extends {
66
+ include: infer I extends readonly StockAdjustmentsRelationshipsFields[];
67
+ } ? I : never;
68
+ type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
69
+ /**
70
+ * Included resources — bulletproof version (no TS2536)
71
+ */
72
+ type IncludedResources<P> = P extends {
73
+ include: infer I extends readonly StockAdjustmentsRelationshipsFields[];
74
+ } ? RelationshipTypeMap[I[number]][] : never;
75
+ /**
76
+ * Expand behavior
77
+ */
78
+ type ExpandResult<T, EP extends ExtraParameterType | undefined> = EP extends {
39
79
  expand: true;
40
- } ? StockAdjustmentType<StockAdjustmentsType<P>> : EP extends {
80
+ } ? T : EP extends {
41
81
  expand: false;
42
- } ? Omit<StockAdjustmentType<StockAdjustmentsType<P>>, "attributes"> : Omit<StockAdjustmentType<StockAdjustmentsType<P>>, "attributes">;
43
- type DataType<E extends StockAdjustmentsEndpoints, P extends AllStockAdjustmentsParameter, EP extends ExtraParameter | undefined> = E extends "query" ? StockAdjustmentType<StockAdjustmentsType<P>>[] : E extends "create" ? ExpandReturnType<P, EP> : E extends "delete" ? Pick<StockAdjustment, "id" | "type"> : never;
44
- export type StockAdjustmentsResponse<E extends StockAdjustmentsEndpoints, P extends AllStockAdjustmentsParameter, EP extends ExtraParameterType = undefined> = {
45
- data: DataType<E, P, EP>;
46
- } & ("include" extends keyof P ? {
47
- included: IncludedType<P>;
82
+ } ? Omit<T, "attributes"> : Omit<T, "attributes">;
83
+ /**
84
+ * Response data per endpoint
85
+ */
86
+ type ResponseData<E extends StockAdjustmentsEndpoints, P extends AllStockAdjustmentsParameter, EP extends ExtraParameterType | undefined> = E extends "query" ? StockAdjustmentType<IncludesRelationships<P>>[] : E extends "create" ? ExpandResult<StockAdjustmentType<IncludesRelationships<P>>, EP> : E extends "delete" ? Pick<StockAdjustment, "id" | "type"> : never;
87
+ /**
88
+ * Final response type
89
+ */
90
+ export type StockAdjustmentsResponse<E extends StockAdjustmentsEndpoints, P extends AllStockAdjustmentsParameter, EP extends ExtraParameterType | undefined = undefined> = {
91
+ data: ResponseData<E, P, EP>;
92
+ } & (IncludesRelationships<P> extends true ? {
93
+ included: IncludedResources<P>;
48
94
  } : {}) & (E extends "query" ? {
49
95
  meta: ApiMeta;
50
96
  } : {});
@@ -1 +1 @@
1
- {"version":3,"file":"stockAdjustment.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stockAdjustment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAGtE,MAAM,MAAM,mCAAmC,GAC3C,YAAY,GACZ,wBAAwB,GACxB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE;QACV,EAAE,EAAE,IAAI,CAAC;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAGD,MAAM,WAAW,gCAAiC,SAAQ,eAAe;IACvE,aAAa,EAAE;QACb,UAAU,EAAE,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC9C,gBAAgB,EAAE,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KAChD,CAAC;CACH;AAGD,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,IAAI,GAC/D,gCAAgC,GAChC,eAAe,CAAC;AAGpB,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,OAAO,CAAC,EAAE,mCAAmC,EAAE,CAAC;CACjD;AAGD,MAAM,WAAW,8BACf,SAAQ,yBAAyB;IACjC,SAAS,EAAE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,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -1,11 +1,22 @@
1
1
  /**
2
2
  * @fileoverview Type definitions for Stock Reservations in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stock Reservations API endpoints.
4
3
  */
5
- import { ApiParameter, ExtraParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
4
+ import { ApiParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
5
+ /**
6
+ * Available endpoints
7
+ */
6
8
  export type StockReservationsEndpoints = "show";
9
+ /**
10
+ * Relationship fields that can be included
11
+ */
7
12
  export type StockReservationsRelationshipsFields = "transaction" | "transaction.marketplace" | "transaction.listing" | "transaction.provider" | "transaction.customer" | "transaction.booking" | "transaction.stockReservation" | "transaction.reviews" | "transaction.messages";
13
+ /**
14
+ * Possible reservation states
15
+ */
8
16
  export type StockReservationState = "pending" | "proposed" | "accepted" | "declined" | "cancelled";
17
+ /**
18
+ * Stock Reservation resource
19
+ */
9
20
  export interface StockReservation {
10
21
  id: UUID;
11
22
  type: "stockReservation";
@@ -14,32 +25,66 @@ export interface StockReservation {
14
25
  state: StockReservationState;
15
26
  };
16
27
  }
28
+ /**
29
+ * With relationships
30
+ */
17
31
  export interface StockReservationWithRelationships extends StockReservation {
18
32
  relationships: {
19
33
  listing: Relationship<false, "listing">;
20
34
  transaction: Relationship<false, "transaction">;
21
- stockAdjustments: Relationship<false, "stockAdjustment">;
35
+ stockAdjustments: Relationship<true, "stockAdjustment">;
22
36
  };
23
37
  }
38
+ /**
39
+ * Select type based on include
40
+ */
24
41
  export type StockReservationType<R extends boolean> = R extends true ? StockReservationWithRelationships : StockReservation;
42
+ /**
43
+ * Base request parameters
44
+ */
25
45
  export interface StockReservationParameter extends ApiParameter {
46
+ include?: StockReservationsRelationshipsFields[];
26
47
  }
48
+ /**
49
+ * Show endpoint parameters
50
+ */
27
51
  export interface StockReservationShowParameter extends StockReservationParameter {
28
- id: UUID;
52
+ id: UUID | string;
29
53
  }
54
+ /**
55
+ * All parameter types
56
+ */
30
57
  type AllStockReservationsParameter = StockReservationShowParameter;
31
- type StockReservationsType<P extends AllStockReservationsParameter> = "include" extends keyof P ? P["include"] extends StockReservationsRelationshipsFields[] ? true : false : false;
32
- type IncludedType<P extends AllStockReservationsParameter> = "include" extends keyof P ? P["include"] extends (keyof RelationshipTypeMap)[] ? Array<RelationshipTypeMap[P["include"][number]]> : never : never;
33
- type ExpandReturnType<P extends AllStockReservationsParameter, EP> = EP extends {
58
+ /**
59
+ * Detect include usage
60
+ */
61
+ type HasInclude<P> = P extends {
62
+ include: infer I extends StockReservationsRelationshipsFields[];
63
+ } ? I : never;
64
+ type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
65
+ /**
66
+ * Included resources — fixed version (no TS2536)
67
+ */
68
+ type IncludedResources<P> = HasInclude<P> extends infer Fields extends StockReservationsRelationshipsFields[] ? RelationshipTypeMap[Fields[number]][] : never;
69
+ /**
70
+ * Expand behavior
71
+ */
72
+ type ExpandResult<T, EP extends ExtraParameterType | undefined> = EP extends {
34
73
  expand: true;
35
- } ? StockReservationType<StockReservationsType<P>> : EP extends {
74
+ } ? T : EP extends {
36
75
  expand: false;
37
- } ? Omit<StockReservationType<StockReservationsType<P>>, "attributes"> : Omit<StockReservationType<StockReservationsType<P>>, "attributes">;
38
- type DataType<E extends StockReservationsEndpoints, P extends AllStockReservationsParameter, EP extends ExtraParameter | undefined> = E extends "show" ? ExpandReturnType<P, EP> : never;
39
- export type StockReservationsResponse<E extends StockReservationsEndpoints, P extends AllStockReservationsParameter, EP extends ExtraParameterType = undefined> = {
40
- data: DataType<E, P, EP>;
41
- } & ("include" extends keyof P ? {
42
- included: IncludedType<P>;
76
+ } ? Omit<T, "attributes"> : Omit<T, "attributes">;
77
+ /**
78
+ * Response data
79
+ */
80
+ type ResponseData<E extends StockReservationsEndpoints, P extends AllStockReservationsParameter, EP extends ExtraParameterType | undefined> = E extends "show" ? ExpandResult<StockReservationType<IncludesRelationships<P>>, EP> : never;
81
+ /**
82
+ * Final response type
83
+ */
84
+ export type StockReservationsResponse<E extends StockReservationsEndpoints = "show", P extends AllStockReservationsParameter = StockReservationShowParameter, EP extends ExtraParameterType | undefined = undefined> = {
85
+ data: ResponseData<E, P, EP>;
86
+ } & (IncludesRelationships<P> extends true ? {
87
+ included: IncludedResources<P>;
43
88
  } : {});
44
89
  export {};
45
90
  //# sourceMappingURL=stockReservations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stockReservations.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stockReservations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,IAAI,EACL,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAGhD,MAAM,MAAM,oCAAoC,GAC5C,aAAa,GACb,yBAAyB,GACzB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,8BAA8B,GAC9B,qBAAqB,GACrB,sBAAsB,CAAC;AAG3B,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,CAAC;AAGhB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,qBAAqB,CAAC;KAC9B,CAAC;CACH;AAGD,MAAM,WAAW,iCAAkC,SAAQ,gBAAgB;IACzE,aAAa,EAAE;QACb,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACxC,WAAW,EAAE,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAChD,gBAAgB,EAAE,YAAY,C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EAAE,SAAS,cAAc,GAAG,SAAS,IACnC,CAAC,SAAS,MAAM,GAAG,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC;AAGvD,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,0BAA0B,EACpC,CAAC,SAAS,6BAA6B,EACvC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC;IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CAC1B,GAAG,CAAC,SAAS,SAAS,MAAM,CAAC,GAAG;IAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"stockReservations.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stockReservations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC5C,aAAa,GACb,yBAAyB,GACzB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,8BAA8B,GAC9B,qBAAqB,GACrB,sBAAsB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,qBAAqB,CAAC;KAC9B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,gBAAg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AAK,CAAA;CAAE,GAC1B,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,GACrB,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAE9B;;GAEG;AACH,KAAK,YAAY,CACf,CAAC,SAAS,0BAA0B,EACpC,CAAC,SAAS,6BAA6B,EACvC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC,CAAC,SAAS,MAAM,GAChB,YAAY,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAChE,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,0BAA0B,GAAG,MAAM,EAC7C,CAAC,SAAS,6BAA6B,GAAG,6BAA6B,EACvE,EAAE,SAAS,kBAAkB,GAAG,SAAS,GAAG,SAAS,IACnD;IACF,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CAC9B,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -1,10 +1,15 @@
1
1
  /**
2
2
  * @fileoverview Type definitions for Stripe Account operations in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stripe Account API endpoints.
4
3
  */
5
4
  import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
6
5
  import type Stripe from "stripe";
6
+ /**
7
+ * Available endpoints
8
+ */
7
9
  export type StripeAccountEndpoints = "fetch" | "create" | "update";
10
+ /**
11
+ * Stripe Account resource
12
+ */
8
13
  export interface StripeAccount {
9
14
  id: UUID;
10
15
  type: "stripeAccount";
@@ -13,8 +18,14 @@ export interface StripeAccount {
13
18
  stripeAccountData: Stripe.Account;
14
19
  };
15
20
  }
21
+ /**
22
+ * Base request parameters
23
+ */
16
24
  export interface StripeAccountParameter extends ApiParameter {
17
25
  }
26
+ /**
27
+ * Parameters for creating a Stripe Account
28
+ */
18
29
  export interface StripeAccountCreateParameter extends StripeAccountParameter {
19
30
  country: string;
20
31
  accountToken?: string;
@@ -24,6 +35,9 @@ export interface StripeAccountCreateParameter extends StripeAccountParameter {
24
35
  businessProfileProductDescription?: string;
25
36
  requestedCapabilities?: string[];
26
37
  }
38
+ /**
39
+ * Parameters for updating a Stripe Account
40
+ */
27
41
  export interface StripeAccountUpdateParameter extends StripeAccountParameter {
28
42
  accountToken?: string;
29
43
  bankAccountToken?: string;
@@ -32,14 +46,23 @@ export interface StripeAccountUpdateParameter extends StripeAccountParameter {
32
46
  businessProfileProductDescription?: string;
33
47
  requestedCapabilities?: string[];
34
48
  }
35
- type ExpandReturnType<EP> = EP extends {
49
+ /**
50
+ * Expand behavior
51
+ */
52
+ type ExpandResult<EP extends ExtraParameterType | undefined> = EP extends {
36
53
  expand: true;
37
54
  } ? StripeAccount : EP extends {
38
55
  expand: false;
39
56
  } ? Omit<StripeAccount, "attributes"> : Omit<StripeAccount, "attributes">;
40
- type DataType<E extends StripeAccountEndpoints, EP extends ExtraParameterType> = E extends "fetch" ? StripeAccount : E extends "create" ? ExpandReturnType<EP> : E extends "update" ? ExpandReturnType<EP> : never;
41
- export type StripeAccountResponse<E extends StripeAccountEndpoints, EP extends ExtraParameterType = undefined> = {
42
- data: DataType<E, EP>;
57
+ /**
58
+ * Response data per endpoint
59
+ */
60
+ type ResponseData<E extends StripeAccountEndpoints, EP extends ExtraParameterType | undefined> = E extends "fetch" ? StripeAccount : E extends "create" | "update" ? ExpandResult<EP> : never;
61
+ /**
62
+ * Final response type
63
+ */
64
+ export type StripeAccountResponse<E extends StripeAccountEndpoints, EP extends ExtraParameterType | undefined = undefined> = {
65
+ data: ResponseData<E, EP>;
43
66
  };
44
67
  export {};
45
68
  //# sourceMappingURL=stripeAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripeAccount.d.ts","sourceRoot":"","sources":["../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Account Links operations in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stripe Account Links API endpoints.
2
+ * @fileoverview Type definitions for Stripe Account Links in the Sharetribe Marketplace API.
4
3
  */
5
4
  import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
5
+ /**
6
+ * Available endpoints
7
+ */
6
8
  export type StripeAccountLinksEndpoints = "create";
9
+ /**
10
+ * Stripe Account Link resource
11
+ */
7
12
  export interface StripeAccountLink {
8
13
  id: UUID;
9
14
  type: "stripeAccountLink";
@@ -12,8 +17,14 @@ export interface StripeAccountLink {
12
17
  expiresAt: Date;
13
18
  };
14
19
  }
20
+ /**
21
+ * Base request parameters
22
+ */
15
23
  export interface StripeAccountLinksParameter extends ApiParameter {
16
24
  }
25
+ /**
26
+ * Parameters for creating an account link
27
+ */
17
28
  export interface StripeAccountLinksCreateParameter extends StripeAccountLinksParameter {
18
29
  failureURL: string;
19
30
  successURL: string;
@@ -23,14 +34,23 @@ export interface StripeAccountLinksCreateParameter extends StripeAccountLinksPar
23
34
  future_requirements: Array<"include" | "omit">;
24
35
  };
25
36
  }
26
- type ExpandReturnType<EP> = EP extends {
37
+ /**
38
+ * Expand behavior
39
+ */
40
+ type ExpandResult<EP extends ExtraParameterType | undefined> = EP extends {
27
41
  expand: true;
28
42
  } ? StripeAccountLink : EP extends {
29
43
  expand: false;
30
44
  } ? Omit<StripeAccountLink, "attributes"> : Omit<StripeAccountLink, "attributes">;
31
- type DataType<E extends StripeAccountLinksEndpoints, EP extends ExtraParameterType> = E extends "create" ? ExpandReturnType<EP> : never;
32
- export type StripeAccountLinksResponse<E extends StripeAccountLinksEndpoints, EP extends ExtraParameterType = undefined> = {
33
- data: DataType<E, EP>;
45
+ /**
46
+ * Response data per endpoint
47
+ */
48
+ type ResponseData<E extends StripeAccountLinksEndpoints, EP extends ExtraParameterType | undefined> = E extends "create" ? ExpandResult<EP> : never;
49
+ /**
50
+ * Final response type
51
+ */
52
+ export type StripeAccountLinksResponse<E extends StripeAccountLinksEndpoints = "create", EP extends ExtraParameterType | undefined = undefined> = {
53
+ data: ResponseData<E, EP>;
34
54
  };
35
55
  export {};
36
56
  //# sourceMappingURL=stripeAccountLinks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripeAccountLinks.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeAccountLinks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGvE,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAGnD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,IAAI,CAAC;KACjB,CAAC;CACH;AAGD,MAAM,WAAW,2BAA4B,SAAQ,YAAY;CAAG;AAGpE,MAAM,WAAW,iCACf,SAAQ,2BAA2B;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE;QACjB,MAAM,EAAE,KAAK,CAAC,eAAe,GAAG,gBAAgB,CAAC,CAAC;QAClD,mBAAmB,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;KAChD,CAAC;CACH;AAGD,KAAK,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACnD,iBAAiB,GACjB,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC5B,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GACrC,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAG1C,KAAK,QAAQ,CACX,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,kBAAkB,IAC3B,CAAC,SAAS,QAAQ,GAAG,gBAAgB,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAGtD,MAAM,MAAM,0BAA0B,CACpC,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC;IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"stripeAccountLinks.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeAccountLinks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,IAAI,CAAC;KACjB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,YAAY;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,iCACf,SAAQ,2BAA2B;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE;QACjB,MAAM,EAAE,KAAK,CAAC,eAAe,GAAG,gBAAgB,CAAC,CAAC;QAClD,mBAAmB,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;KAChD,CAAC;CACH;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACzD,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACvB,iBAAiB,GACjB,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC1B,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GACrC,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAE9C;;GAEG;AACH,KAAK,YAAY,CACf,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC,CAAC,SAAS,QAAQ,GAAG,YAAY,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,0BAA0B,CACpC,CAAC,SAAS,2BAA2B,GAAG,QAAQ,EAChD,EAAE,SAAS,kBAAkB,GAAG,SAAS,GAAG,SAAS,IACnD;IACF,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CAC3B,CAAC"}
@@ -1,10 +1,18 @@
1
1
  /**
2
2
  * @fileoverview Type definitions for Stripe Customer operations in the Sharetribe Marketplace API.
3
- * This file defines the structure of parameters and responses for the Stripe Customer API endpoints.
4
3
  */
5
- import { ApiParameter, UUID, Relationship, RelationshipTypeMap, ExtraParameterType } from "../sharetribe";
4
+ import { ApiParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
5
+ /**
6
+ * Available endpoints
7
+ */
6
8
  export type StripeCustomerEndpoints = "create" | "addPaymentMethod" | "deletePaymentMethod";
9
+ /**
10
+ * Relationship fields that can be included
11
+ */
7
12
  export type StripeCustomerRelationshipsFields = "defaultPaymentMethod";
13
+ /**
14
+ * Stripe Customer resource
15
+ */
8
16
  export interface StripeCustomer {
9
17
  id: UUID;
10
18
  type: "stripeCustomer";
@@ -12,37 +20,76 @@ export interface StripeCustomer {
12
20
  stripeCustomerId: string;
13
21
  };
14
22
  }
23
+ /**
24
+ * Stripe Customer with relationships
25
+ */
15
26
  export interface StripeCustomerWithRelationships extends StripeCustomer {
16
27
  relationships: {
17
28
  defaultPaymentMethod: Relationship<false, "defaultPaymentMethod">;
18
29
  };
19
30
  }
31
+ /**
32
+ * Select type based on include
33
+ */
20
34
  export type StripeCustomerType<R extends boolean> = R extends true ? StripeCustomerWithRelationships : StripeCustomer;
35
+ /**
36
+ * Base request parameters
37
+ */
21
38
  export interface StripeCustomerParameter extends ApiParameter {
22
39
  include?: StripeCustomerRelationshipsFields[];
23
40
  }
41
+ /**
42
+ * Create endpoint
43
+ */
24
44
  export interface StripeCustomerCreateParameter extends StripeCustomerParameter {
25
45
  stripePaymentMethodId?: string;
26
46
  stripeCustomerEmail?: string;
27
47
  }
48
+ /**
49
+ * Add payment method
50
+ */
28
51
  export interface StripeCustomerAddPaymentMethodParameter extends StripeCustomerParameter {
29
52
  stripePaymentMethodId: string;
30
53
  }
54
+ /**
55
+ * Delete payment method (no body required)
56
+ */
31
57
  export interface StripeCustomerDeletePaymentMethodParameter extends StripeCustomerParameter {
32
58
  }
33
- type AllStripeCustomerParameter = StripeCustomerCreateParameter | StripeCustomerAddPaymentMethodParameter;
34
- type StripeCustomerTypeType<P extends AllStripeCustomerParameter> = "include" extends keyof P ? P["include"] extends StripeCustomerRelationshipsFields[] ? true : false : false;
35
- type IncludedType<P extends AllStripeCustomerParameter> = "include" extends keyof P ? P["include"] extends (keyof RelationshipTypeMap)[] ? Array<RelationshipTypeMap[P["include"][number]]>[] : never : never;
36
- type ExpandReturnType<P extends AllStripeCustomerParameter, EP> = EP extends {
59
+ /**
60
+ * All parameter types
61
+ */
62
+ type AllStripeCustomerParameter = StripeCustomerCreateParameter | StripeCustomerAddPaymentMethodParameter | StripeCustomerDeletePaymentMethodParameter;
63
+ /**
64
+ * Detect if relationships are requested
65
+ */
66
+ type HasInclude<P> = P extends {
67
+ include: infer I extends StripeCustomerRelationshipsFields[];
68
+ } ? I : never;
69
+ type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
70
+ /**
71
+ * Included resources (when include is used)
72
+ */
73
+ type IncludedResources<P> = HasInclude<P> extends infer Fields extends StripeCustomerRelationshipsFields[] ? RelationshipTypeMap[Fields[number]][] : never;
74
+ /**
75
+ * Expand behavior
76
+ */
77
+ type ExpandResult<T, EP extends ExtraParameterType | undefined> = EP extends {
37
78
  expand: true;
38
- } ? StripeCustomerType<StripeCustomerTypeType<P>> : EP extends {
79
+ } ? T : EP extends {
39
80
  expand: false;
40
- } ? Omit<StripeCustomerType<StripeCustomerTypeType<P>>, "attributes"> : Omit<StripeCustomerType<StripeCustomerTypeType<P>>, "attributes">;
41
- type DataType<E extends StripeCustomerEndpoints, P extends AllStripeCustomerParameter, EP extends ExtraParameterType> = E extends "create" ? ExpandReturnType<P, EP> : E extends "addPaymentMethod" ? ExpandReturnType<P, EP> : E extends "deletePaymentMethod" ? ExpandReturnType<P, EP> : never;
42
- export type StripeCustomerResponse<E extends StripeCustomerEndpoints, P extends AllStripeCustomerParameter, EP extends ExtraParameterType = undefined> = {
43
- data: DataType<E, P, EP>;
44
- } & ("include" extends keyof P ? {
45
- included: IncludedType<P>;
81
+ } ? Omit<T, "attributes"> : Omit<T, "attributes">;
82
+ /**
83
+ * Response data per endpoint
84
+ */
85
+ type ResponseData<E extends StripeCustomerEndpoints, P extends AllStripeCustomerParameter, EP extends ExtraParameterType | undefined> = E extends "create" | "addPaymentMethod" | "deletePaymentMethod" ? ExpandResult<StripeCustomerType<IncludesRelationships<P>>, EP> : never;
86
+ /**
87
+ * Final response type
88
+ */
89
+ export type StripeCustomerResponse<E extends StripeCustomerEndpoints, P extends AllStripeCustomerParameter, EP extends ExtraParameterType | undefined = undefined> = {
90
+ data: ResponseData<E, P, EP>;
91
+ } & (IncludesRelationships<P> extends true ? {
92
+ included: IncludedResources<P>;
46
93
  } : {});
47
94
  export {};
48
95
  //# sourceMappingURL=stripeCustomer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripeCustomer.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeCustomer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,eAA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,CAAC,CAAC;CAC9B,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * @fileoverview Type definition for Stripe Payment Method objects in the Sharetribe Marketplace API.
3
- * This file defines the structure of a Stripe Payment Method, including its attributes.
4
3
  */
5
4
  import { UUID } from "../sharetribe";
6
5
  /**
7
- * Represents a Stripe Payment Method object.
6
+ * Stripe Payment Method resource
8
7
  */
9
8
  export interface StripePaymentMethod {
10
9
  id: UUID;
@@ -1 +1 @@
1
- {"version":3,"file":"stripePaymentMethod.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripePaymentMethod.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,qBAAqB,CAAC;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,qBAAqB,EAAE,MAAM,CAAC;QAC9B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,cAAc,EAAE,MAAM,CAAC;YACvB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;KACH,CAAC;CACH"}
1
+ {"version":3,"file":"stripePaymentMethod.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripePaymentMethod.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,qBAAqB,CAAC;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,qBAAqB,EAAE,MAAM,CAAC;QAC9B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,cAAc,EAAE,MAAM,CAAC;YACvB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;KACH,CAAC;CACH"}