@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,52 @@
1
+ /**
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
+ */
5
+ import { ApiMeta, ApiParameter, ExtraParameter, UUID, Relationship, RelationshipTypeMap, ExtraParameterType } from "../sharetribe";
6
+ export type StockAdjustmentsEndpoints = "query" | "create" | "delete";
7
+ export type StockAdjustmentsRelationshipsFields = "ownListing" | "ownListing.marketplace" | "ownListing.author" | "ownListing.images" | "ownListing.currentStock" | "stockReservation";
8
+ export interface StockAdjustment {
9
+ id: UUID;
10
+ type: "stockAdjustments";
11
+ attributes: {
12
+ at: Date;
13
+ quantity: number;
14
+ };
15
+ }
16
+ export interface StockAdjustmentWithRelationships extends StockAdjustment {
17
+ relationships: {
18
+ ownListing: Relationship<false, "ownListing">;
19
+ stockReservation: Relationship<false, "stock">;
20
+ };
21
+ }
22
+ export type StockAdjustmentType<R extends boolean> = R extends true ? StockAdjustmentWithRelationships : StockAdjustment;
23
+ export interface StockAdjustmentsParameter extends ApiParameter {
24
+ include?: StockAdjustmentsRelationshipsFields[];
25
+ }
26
+ export interface StockAdjustmentsQueryParameter extends StockAdjustmentsParameter {
27
+ listingId: UUID | string;
28
+ start: Date | string;
29
+ end: Date | string;
30
+ }
31
+ export interface StockAdjustmentsCreateParameter extends StockAdjustmentsParameter {
32
+ listingId: UUID | string;
33
+ quantity: number;
34
+ }
35
+ 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 {
39
+ expand: true;
40
+ } ? StockAdjustmentType<StockAdjustmentsType<P>> : EP extends {
41
+ 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>;
48
+ } : {}) & (E extends "query" ? {
49
+ meta: ApiMeta;
50
+ } : {});
51
+ export {};
52
+ //# sourceMappingURL=stockAdjustment.d.ts.map
@@ -0,0 +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,E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@ -0,0 +1,45 @@
1
+ /**
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
+ */
5
+ import { ApiParameter, ExtraParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
6
+ export type StockReservationsEndpoints = "show";
7
+ export type StockReservationsRelationshipsFields = "transaction" | "transaction.marketplace" | "transaction.listing" | "transaction.provider" | "transaction.customer" | "transaction.booking" | "transaction.stockReservation" | "transaction.reviews" | "transaction.messages";
8
+ export type StockReservationState = "pending" | "proposed" | "accepted" | "declined" | "cancelled";
9
+ export interface StockReservation {
10
+ id: UUID;
11
+ type: "stockReservation";
12
+ attributes: {
13
+ quantity: number;
14
+ state: StockReservationState;
15
+ };
16
+ }
17
+ export interface StockReservationWithRelationships extends StockReservation {
18
+ relationships: {
19
+ listing: Relationship<false, "listing">;
20
+ transaction: Relationship<false, "transaction">;
21
+ stockAdjustments: Relationship<false, "stockAdjustment">;
22
+ };
23
+ }
24
+ export type StockReservationType<R extends boolean> = R extends true ? StockReservationWithRelationships : StockReservation;
25
+ export interface StockReservationParameter extends ApiParameter {
26
+ }
27
+ export interface StockReservationShowParameter extends StockReservationParameter {
28
+ id: UUID;
29
+ }
30
+ 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 {
34
+ expand: true;
35
+ } ? StockReservationType<StockReservationsType<P>> : EP extends {
36
+ 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>;
43
+ } : {});
44
+ export {};
45
+ //# sourceMappingURL=stockReservations.d.ts.map
@@ -0,0 +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,CAAC,KAAK,EAAE,iBAAiB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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"}
@@ -0,0 +1,45 @@
1
+ /**
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
+ */
5
+ import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
6
+ import type Stripe from "stripe";
7
+ export type StripeAccountEndpoints = "fetch" | "create" | "update";
8
+ export interface StripeAccount {
9
+ id: UUID;
10
+ type: "stripeAccount";
11
+ attributes: {
12
+ stripeAccountId: string;
13
+ stripeAccountData: Stripe.Account;
14
+ };
15
+ }
16
+ export interface StripeAccountParameter extends ApiParameter {
17
+ }
18
+ export interface StripeAccountCreateParameter extends StripeAccountParameter {
19
+ country: string;
20
+ accountToken?: string;
21
+ bankAccountToken?: string;
22
+ businessProfileMCC?: string;
23
+ businessProfileURL?: string;
24
+ businessProfileProductDescription?: string;
25
+ requestedCapabilities?: string[];
26
+ }
27
+ export interface StripeAccountUpdateParameter extends StripeAccountParameter {
28
+ accountToken?: string;
29
+ bankAccountToken?: string;
30
+ businessProfileMCC?: string;
31
+ businessProfileURL?: string;
32
+ businessProfileProductDescription?: string;
33
+ requestedCapabilities?: string[];
34
+ }
35
+ type ExpandReturnType<EP> = EP extends {
36
+ expand: true;
37
+ } ? StripeAccount : EP extends {
38
+ expand: false;
39
+ } ? 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>;
43
+ };
44
+ export {};
45
+ //# sourceMappingURL=stripeAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripeAccount.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeAccount.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAGnE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE;QACV,eAAe,EAAE,MAAM,CAAC;QACxB,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC;KACnC,CAAC;CACH;AAGD,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAAG;AAG/D,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iCAAiC,CAAC,EAAE,MAAM,CAAC;IAC3C,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAGD,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iCAAiC,CAAC,EAAE,MAAM,CAAC;IAC3C,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAGD,KAAK,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACnD,aAAa,GACb,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC5B,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AAGtC,KAAK,QAAQ,CACX,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,IAC3B,CAAC,SAAS,OAAO,GACjB,aAAa,GACb,CAAC,SAAS,QAAQ,GAClB,gBAAgB,CAAC,EAAE,CAAC,GACpB,CAAC,SAAS,QAAQ,GAClB,gBAAgB,CAAC,EAAE,CAAC,GACpB,KAAK,CAAC;AAGV,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC;IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CACvB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview Type definitions for Stripe 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.
4
+ */
5
+ import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
6
+ export type StripeAccountLinksEndpoints = "create";
7
+ export interface StripeAccountLink {
8
+ id: UUID;
9
+ type: "stripeAccountLink";
10
+ attributes: {
11
+ url: string;
12
+ expiresAt: Date;
13
+ };
14
+ }
15
+ export interface StripeAccountLinksParameter extends ApiParameter {
16
+ }
17
+ export interface StripeAccountLinksCreateParameter extends StripeAccountLinksParameter {
18
+ failureURL: string;
19
+ successURL: string;
20
+ type: string;
21
+ collectionOptions: {
22
+ fields: Array<"currently_due" | "eventually_due">;
23
+ future_requirements: Array<"include" | "omit">;
24
+ };
25
+ }
26
+ type ExpandReturnType<EP> = EP extends {
27
+ expand: true;
28
+ } ? StripeAccountLink : EP extends {
29
+ expand: false;
30
+ } ? 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>;
34
+ };
35
+ export {};
36
+ //# sourceMappingURL=stripeAccountLinks.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,48 @@
1
+ /**
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
+ */
5
+ import { ApiParameter, UUID, Relationship, RelationshipTypeMap, ExtraParameterType } from "../sharetribe";
6
+ export type StripeCustomerEndpoints = "create" | "addPaymentMethod" | "deletePaymentMethod";
7
+ export type StripeCustomerRelationshipsFields = "defaultPaymentMethod";
8
+ export interface StripeCustomer {
9
+ id: UUID;
10
+ type: "stripeCustomer";
11
+ attributes: {
12
+ stripeCustomerId: string;
13
+ };
14
+ }
15
+ export interface StripeCustomerWithRelationships extends StripeCustomer {
16
+ relationships: {
17
+ defaultPaymentMethod: Relationship<false, "defaultPaymentMethod">;
18
+ };
19
+ }
20
+ export type StripeCustomerType<R extends boolean> = R extends true ? StripeCustomerWithRelationships : StripeCustomer;
21
+ export interface StripeCustomerParameter extends ApiParameter {
22
+ include?: StripeCustomerRelationshipsFields[];
23
+ }
24
+ export interface StripeCustomerCreateParameter extends StripeCustomerParameter {
25
+ stripePaymentMethodId?: string;
26
+ stripeCustomerEmail?: string;
27
+ }
28
+ export interface StripeCustomerAddPaymentMethodParameter extends StripeCustomerParameter {
29
+ stripePaymentMethodId: string;
30
+ }
31
+ export interface StripeCustomerDeletePaymentMethodParameter extends StripeCustomerParameter {
32
+ }
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 {
37
+ expand: true;
38
+ } ? StripeCustomerType<StripeCustomerTypeType<P>> : EP extends {
39
+ 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>;
46
+ } : {});
47
+ export {};
48
+ //# sourceMappingURL=stripeCustomer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripeCustomer.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeCustomer.ts"],"names":[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G;IAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
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
+ */
5
+ import { UUID } from "../sharetribe";
6
+ /**
7
+ * Represents a Stripe Payment Method object.
8
+ */
9
+ export interface StripePaymentMethod {
10
+ id: UUID;
11
+ type: "stripePaymentMethod";
12
+ attributes: {
13
+ type: string;
14
+ stripePaymentMethodId: string;
15
+ card: {
16
+ brand: string;
17
+ last4Digits: string;
18
+ expirationYear: number;
19
+ expirationMonth: number;
20
+ };
21
+ };
22
+ }
23
+ //# sourceMappingURL=stripePaymentMethod.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @fileoverview Type definitions for Stripe Persons in the Sharetribe Marketplace API.
3
+ * This file includes the structure of Stripe Persons, their attributes, parameters, and response types.
4
+ */
5
+ export type StripePersonsEndpoints = "create";
6
+ import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
7
+ /**
8
+ * Represents a Stripe Person object.
9
+ */
10
+ export interface StripePersons {
11
+ id: UUID;
12
+ type: "stripePerson";
13
+ attributes: {
14
+ stripePersonId: string;
15
+ };
16
+ }
17
+ /**
18
+ * Parameters for making API requests involving Stripe Persons.
19
+ */
20
+ export interface StripePersonsParameter extends ApiParameter {
21
+ }
22
+ /**
23
+ * Parameters for creating a Stripe Person.
24
+ */
25
+ export interface StripePersonsCreateParameter extends StripePersonsParameter {
26
+ personToken: string;
27
+ }
28
+ /**
29
+ * Determines the response type based on the `expand` parameter.
30
+ */
31
+ type ExpandReturnType<EP> = EP extends {
32
+ expand: true;
33
+ } ? StripePersons : EP extends {
34
+ expand: false;
35
+ } ? Omit<StripePersons, "attributes"> : Omit<StripePersons, "attributes">;
36
+ /**
37
+ * Determines the data type based on the endpoint.
38
+ */
39
+ type DataType<E extends StripePersonsEndpoints, EP extends ExtraParameterType> = E extends "create" ? ExpandReturnType<EP> : never;
40
+ /**
41
+ * The response type for Stripe Persons API calls.
42
+ */
43
+ export type StripePersonsResponse<E extends StripePersonsEndpoints, EP extends ExtraParameterType = undefined> = {
44
+ data: DataType<E, EP>;
45
+ };
46
+ export {};
47
+ //# sourceMappingURL=stripePersons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripePersons.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripePersons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE;QACV,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAAG;AAE/D;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,KAAK,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACnD,aAAa,GACb,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC5B,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AAEtC;;GAEG;AACH,KAAK,QAAQ,CACX,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,IAC3B,CAAC,SAAS,QAAQ,GAAG,gBAAgB,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC;IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CACvB,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @fileoverview Type definitions for Stripe Setup Intents in the Sharetribe Marketplace API.
3
+ * This file includes the structure of Stripe Setup Intents, their attributes, parameters, and response types.
4
+ */
5
+ import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
6
+ export type StripeSetupIntentsEndpoints = "create";
7
+ /**
8
+ * Represents a Stripe Setup Intent object.
9
+ */
10
+ export interface StripeSetupIntents {
11
+ id: UUID;
12
+ type: "stripeSetupIntent";
13
+ attributes: {
14
+ stripeSetupIntentId: string;
15
+ clientSecret: string;
16
+ };
17
+ }
18
+ /**
19
+ * Parameters for making API requests involving Stripe Setup Intents.
20
+ */
21
+ export interface StripeSetupIntentsParameter extends ApiParameter {
22
+ }
23
+ /**
24
+ * Parameters for creating a Stripe Setup Intent.
25
+ */
26
+ export interface StripeSetupIntentsCreateParameter extends StripeSetupIntentsParameter {
27
+ }
28
+ /**
29
+ * Determines the response type based on the `expand` parameter.
30
+ */
31
+ type ExpandReturnType<EP> = EP extends {
32
+ expand: true;
33
+ } ? StripeSetupIntents : EP extends {
34
+ expand: false;
35
+ } ? Omit<StripeSetupIntents, "attributes"> : Omit<StripeSetupIntents, "attributes">;
36
+ /**
37
+ * Determines the data type based on the endpoint.
38
+ */
39
+ type DataType<E extends StripeSetupIntentsEndpoints, EP extends ExtraParameterType> = E extends "create" ? ExpandReturnType<EP> : never;
40
+ /**
41
+ * The response type for Stripe Setup Intents API calls.
42
+ */
43
+ export type StripeSetupIntentsResponse<E extends StripeSetupIntentsEndpoints, EP extends ExtraParameterType = undefined> = {
44
+ data: DataType<E, EP>;
45
+ };
46
+ export {};
47
+ //# sourceMappingURL=stripeSetupIntents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripeSetupIntents.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/stripeSetupIntents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,EAAE;QACV,mBAAmB,EAAE,MAAM,CAAC;QAC5B,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,YAAY;CAAG;AAEpE;;GAEG;AACH,MAAM,WAAW,iCACf,SAAQ,2BAA2B;CAAG;AAExC;;GAEG;AACH,KAAK,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACnD,kBAAkB,GAClB,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC5B,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,GACtC,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAE3C;;GAEG;AACH,KAAK,QAAQ,CACX,CAAC,SAAS,2BAA2B,EACrC,EAAE,SAAS,kBAAkB,IAC3B,CAAC,SAAS,QAAQ,GAAG,gBAAgB,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAEtD;;GAEG;AACH,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"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @fileoverview Type definitions for Time Slots in the Sharetribe Marketplace API.
3
+ * This file defines the structure of Time Slots, their parameters, and response types for API requests.
4
+ */
5
+ import { ApiMeta, ApiParameter } from "../sharetribe";
6
+ import UUID from "../../sdkTypes/UUID";
7
+ /**
8
+ * Types of time slots available in the system.
9
+ */
10
+ export type TimeSlotTypes = "time-slot/day" | "time-slot/time";
11
+ /**
12
+ * Endpoints available for Time Slots API.
13
+ */
14
+ export type TimeSlotsEndpoints = "query";
15
+ /**
16
+ * Represents a Time Slot object.
17
+ */
18
+ export interface TimeSlot {
19
+ id: UUID;
20
+ type: "timeSlot";
21
+ attributes: {
22
+ type: TimeSlotTypes;
23
+ seats: number;
24
+ start: Date;
25
+ end: Date;
26
+ };
27
+ }
28
+ /**
29
+ * Base parameters for Time Slots API requests.
30
+ */
31
+ export interface TimeSlotsParameter extends ApiParameter {
32
+ }
33
+ /**
34
+ * Parameters for querying Time Slots.
35
+ */
36
+ export interface TimeSlotsQueryParameter extends TimeSlotsParameter {
37
+ listingId: UUID | string;
38
+ start: Date | string;
39
+ end: Date | string;
40
+ }
41
+ /**
42
+ * Determines the data type based on the API endpoint.
43
+ */
44
+ type DataType<E extends TimeSlotsEndpoints> = E extends "query" ? TimeSlot[] : never;
45
+ /**
46
+ * Response type for Time Slots API calls.
47
+ */
48
+ export type TimeSlotsResponse<E extends TimeSlotsEndpoints> = {
49
+ data: DataType<E>;
50
+ } & (E extends "query" ? {
51
+ meta: ApiMeta;
52
+ } : {});
53
+ export {};
54
+ //# sourceMappingURL=timeSlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeSlots.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/timeSlots.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE;QACV,IAAI,EAAE,aAAa,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,IAAI,CAAC;QACZ,GAAG,EAAE,IAAI,CAAC;KACX,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;CAAG;AAE3D;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;IACrB,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,KAAK,QAAQ,CAAC,CAAC,SAAS,kBAAkB,IAAI,CAAC,SAAS,OAAO,GAC3D,QAAQ,EAAE,GACV,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,kBAAkB,IAAI;IAC5D,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;CACnB,GAAG,CAAC,CAAC,SAAS,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * @fileoverview Type definitions for Transactions in the Sharetribe Marketplace API.
3
+ * This file defines the structure of transactions, their parameters, and response types for API requests.
4
+ */
5
+ import { ApiParameter, ExtraParameterType, Money, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
6
+ /**
7
+ * Available endpoints for the Transactions API.
8
+ */
9
+ export type TransactionsEndpoints = "show" | "query" | "initiate" | "initiateSpeculative" | "transition" | "transitionSpeculative" | "updateMetadata";
10
+ /**
11
+ * Fields available for relationships in transactions.
12
+ */
13
+ export type TransactionsRelationshipsFields = "marketplace" | "listing" | "listing.marketplace" | "listing.author" | "listing.images" | "listing.currentStock" | "provider" | "provider.profileImage" | "provider.stripeAccount" | "provider.effectivePermissionSet" | "customer" | "customer.profileImage" | "customer.stripeAccount" | "customer.effectivePermissionSet" | "booking" | "stockReservation" | "reviews" | "reviews.author" | "reviews.subject" | "messages" | "messages.sender";
14
+ /**
15
+ * Roles for parties in a transaction.
16
+ */
17
+ export type TransactionsParties = "customer" | "provider";
18
+ /**
19
+ * Varieties of transactions.
20
+ */
21
+ export type TransactionsVariety = "sale" | "order";
22
+ /**
23
+ * Defines a line item within a transaction.
24
+ */
25
+ export interface LineItem {
26
+ code: string;
27
+ quantity?: number;
28
+ units?: number;
29
+ seats?: number;
30
+ unitPrice: Money;
31
+ percentage?: number;
32
+ reversal?: boolean;
33
+ lineTotal: Money;
34
+ includeFor: TransactionsParties[];
35
+ }
36
+ /**
37
+ * Defines a transition in a transaction.
38
+ */
39
+ export type Transition = {
40
+ transition: string;
41
+ createdAt: Date | string;
42
+ by: TransactionsParties;
43
+ };
44
+ /**
45
+ * Defines the structure of a transaction.
46
+ */
47
+ export interface Transaction {
48
+ id: UUID;
49
+ type: "transaction";
50
+ attributes: {
51
+ createdAt: Date;
52
+ processName: string;
53
+ processVersion: number;
54
+ lastTransition: string;
55
+ lastTransitionedAt: string;
56
+ payinTotal: Money;
57
+ payoutTotal: Money;
58
+ lineItems: LineItem[];
59
+ protectedData: TransactionProtectedData & TransactionCustomProtectedData;
60
+ metadata: TransactionMetadata & TransactionCustomMetadata;
61
+ transitions: Transition[];
62
+ };
63
+ }
64
+ /**
65
+ * Transaction with additional relationship information.
66
+ */
67
+ export interface TransactionWithRelationships extends Transaction {
68
+ relationships: {
69
+ marketplace: Relationship<false, "marketplace">;
70
+ listing: Relationship<false, "listing">;
71
+ provider: Relationship<false, "user">;
72
+ customer: Relationship<false, "user">;
73
+ booking: Relationship<false, "booking">;
74
+ stockReservation: Relationship<false, "stockReservation">;
75
+ reviews: Relationship<true, "reviews">;
76
+ messages: Relationship<true, "messages">;
77
+ };
78
+ }
79
+ /**
80
+ * Represents a transaction type based on the inclusion of relationships.
81
+ */
82
+ export type TransactionType<R extends boolean> = R extends true ? TransactionWithRelationships : Transaction;
83
+ /**
84
+ * Base parameters for Transactions API requests.
85
+ */
86
+ export interface TransactionsParameter extends ApiParameter {
87
+ include?: TransactionsRelationshipsFields[];
88
+ }
89
+ /**
90
+ * Parameters for fetching a specific transaction.
91
+ */
92
+ export interface TransactionsShowParameter extends TransactionsParameter {
93
+ id: UUID | string;
94
+ }
95
+ /**
96
+ * Parameters for querying transactions.
97
+ */
98
+ export type TransactionsQueryParameter<I extends boolean = false> = TransactionsParameter & (I extends false ? {
99
+ only?: TransactionsVariety;
100
+ lastTransitions?: string[];
101
+ } : {
102
+ createdAtStart?: string;
103
+ createdAtEnd?: string;
104
+ userId?: UUID | string;
105
+ customerId?: UUID | string;
106
+ providerId?: UUID | string;
107
+ listingId?: UUID | string;
108
+ });
109
+ /**
110
+ * Parameters for initiating a transaction.
111
+ */
112
+ export interface TransactionsInitiateParameter extends TransactionsParameter {
113
+ processAlias: string;
114
+ transition: string;
115
+ params: unknown;
116
+ }
117
+ /**
118
+ * Parameters for speculative initiation of a transaction.
119
+ */
120
+ export interface TransactionsInitiateSpeculativeParameter extends TransactionsParameter {
121
+ processAlias: string;
122
+ transition: string;
123
+ params: unknown;
124
+ }
125
+ /**
126
+ * Parameters for transitioning a transaction.
127
+ */
128
+ export interface TransactionsTransitionParameter extends TransactionsParameter {
129
+ id: UUID | string;
130
+ transition: string;
131
+ params: unknown;
132
+ }
133
+ /**
134
+ * Parameters for speculative transitioning of a transaction.
135
+ */
136
+ export interface TransactionsTransitionSpeculativeParameter extends TransactionsParameter {
137
+ id: UUID | string;
138
+ transition: string;
139
+ params: unknown;
140
+ }
141
+ /**
142
+ * Parameters for updating transaction metadata.
143
+ */
144
+ export interface TransactionsUpdateMetadataParameter extends TransactionsParameter {
145
+ id: UUID | string;
146
+ metadata: TransactionMetadata & TransactionCustomMetadata;
147
+ }
148
+ /**
149
+ * Protected data structure for a transaction.
150
+ */
151
+ export interface TransactionProtectedData {
152
+ [key: string]: any;
153
+ }
154
+ /**
155
+ * Custom protected data structure for a transaction.
156
+ */
157
+ export interface TransactionCustomProtectedData {
158
+ }
159
+ /**
160
+ * Metadata structure for a transaction.
161
+ */
162
+ export interface TransactionMetadata {
163
+ [key: string]: any;
164
+ }
165
+ /**
166
+ * Custom metadata structure for a transaction.
167
+ */
168
+ export interface TransactionCustomMetadata {
169
+ }
170
+ type AllTransactionsParameter = TransactionsShowParameter | TransactionsQueryParameter | TransactionsInitiateParameter | TransactionsInitiateSpeculativeParameter | TransactionsTransitionParameter | TransactionsTransitionSpeculativeParameter;
171
+ type TransactionsType<P extends AllTransactionsParameter> = "include" extends keyof P ? P["include"] extends TransactionsRelationshipsFields[] ? true : false : false;
172
+ type IncludedType<P extends AllTransactionsParameter> = "include" extends keyof P ? P["include"] extends (keyof RelationshipTypeMap)[] ? Array<RelationshipTypeMap[P["include"][number]]> : never : never;
173
+ type ExpandReturnType<P extends AllTransactionsParameter, EP> = EP extends {
174
+ expand: true;
175
+ } ? TransactionType<TransactionsType<P>> : EP extends {
176
+ expand: false;
177
+ } ? Omit<TransactionType<TransactionsType<P>>, "attributes"> : Omit<TransactionType<TransactionsType<P>>, "attributes">;
178
+ /**
179
+ * Defines the data type based on the Transactions API endpoint and parameters.
180
+ */
181
+ type DataType<E extends TransactionsEndpoints, P extends AllTransactionsParameter, EP extends ExtraParameterType | undefined> = E extends "show" ? TransactionType<TransactionsType<P>> : E extends "query" ? TransactionType<TransactionsType<P>>[] : E extends "transition" ? ExpandReturnType<P, EP> : never;
182
+ /**
183
+ * Response structure for Transactions API calls.
184
+ */
185
+ export type TransactionsResponse<E extends TransactionsEndpoints, P extends AllTransactionsParameter, EP extends ExtraParameterType = undefined> = {
186
+ data: DataType<E, P, EP>;
187
+ } & ("include" extends keyof P ? {
188
+ included: IncludedType<P>;
189
+ } : {});
190
+ export {};
191
+ //# sourceMappingURL=transactions.d.ts.map