@vansite/ts-sharetribe-flex-sdk 1.0.33 → 2.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.
- package/README.md +1 -1
- package/dist/endpoints/assets/index.d.ts +47 -0
- package/dist/endpoints/auth/index.d.ts +45 -0
- package/dist/endpoints/integrationApi/AvailabilityExceptions.d.ts +66 -0
- package/dist/endpoints/integrationApi/Events.d.ts +43 -0
- package/dist/endpoints/integrationApi/Images.d.ts +36 -0
- package/dist/endpoints/integrationApi/Listings.d.ts +87 -0
- package/dist/endpoints/integrationApi/Marketplace.d.ts +30 -0
- package/dist/endpoints/integrationApi/Stock.d.ts +42 -0
- package/dist/endpoints/integrationApi/StockAdjustments.d.ts +64 -0
- package/dist/{types/endpoints/integrationApi/StockReservation.d.ts → endpoints/integrationApi/StockReservations.d.ts} +3 -4
- package/dist/endpoints/integrationApi/Transactions.d.ts +76 -0
- package/dist/endpoints/integrationApi/Users.d.ts +72 -0
- package/dist/endpoints/integrationApi/index.d.ts +58 -0
- package/dist/endpoints/marketplace/AvailabilityExceptions.d.ts +69 -0
- package/dist/endpoints/marketplace/Bookings.d.ts +45 -0
- package/dist/endpoints/marketplace/CurrentUser.d.ts +110 -0
- package/dist/endpoints/marketplace/Images.d.ts +38 -0
- package/dist/endpoints/marketplace/Listings.d.ts +52 -0
- package/dist/endpoints/marketplace/Marketplace.d.ts +33 -0
- package/dist/endpoints/marketplace/Messages.d.ts +51 -0
- package/dist/endpoints/marketplace/OwnListings.d.ts +116 -0
- package/dist/endpoints/marketplace/PasswordReset.d.ts +50 -0
- package/dist/endpoints/marketplace/ProcessTransitions.d.ts +42 -0
- package/dist/endpoints/marketplace/Reviews.d.ts +49 -0
- package/dist/endpoints/marketplace/Stock.d.ts +50 -0
- package/dist/endpoints/marketplace/StockAdjustments.d.ts +64 -0
- package/dist/endpoints/marketplace/StripeAccount.d.ts +56 -0
- package/dist/endpoints/marketplace/StripeAccountLinks.d.ts +42 -0
- package/dist/endpoints/marketplace/StripeCustomer.d.ts +62 -0
- package/dist/endpoints/marketplace/StripePersons.d.ts +37 -0
- package/dist/endpoints/marketplace/StripeSetupIntents.d.ts +42 -0
- package/dist/endpoints/marketplace/TimeSlots.d.ts +40 -0
- package/dist/endpoints/marketplace/Transactions.d.ts +89 -0
- package/dist/endpoints/marketplace/Users.d.ts +34 -0
- package/dist/endpoints/marketplace/index.d.ts +80 -0
- package/dist/index.d.ts +161 -0
- package/dist/index.js +3 -0
- package/dist/{ts-sharetribe-flex-sdk.cjs.LICENSE.txt → index.js.LICENSE.txt} +53 -41
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/{ts-sharetribe-flex-sdk.js.LICENSE.txt → index.mjs.LICENSE.txt} +13 -5
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +3 -0
- package/dist/{ts-sharetribe-flex-sdk.mjs.LICENSE.txt → index.umd.js.LICENSE.txt} +13 -5
- package/dist/index.umd.js.map +1 -0
- package/dist/integrationSdk.d.ts +119 -0
- package/dist/sdk.d.ts +211 -0
- package/dist/sdkTypes/BigDecimal.d.ts +30 -0
- package/dist/sdkTypes/LatLng.d.ts +34 -0
- package/dist/sdkTypes/LatLngBounds.d.ts +51 -0
- package/dist/sdkTypes/Money.d.ts +28 -0
- package/dist/sdkTypes/UUID.d.ts +38 -0
- package/dist/types/apiConfigs.d.ts +104 -0
- package/dist/types/assets/index.d.ts +101 -0
- package/dist/types/authentication/index.d.ts +152 -0
- package/dist/types/axios.d.ts +10 -0
- package/dist/types/config.d.ts +99 -0
- package/dist/types/endpoints/assets/index.d.ts +22 -36
- package/dist/types/endpoints/assets/index.d.ts.map +1 -1
- package/dist/types/endpoints/auth/index.d.ts +20 -41
- package/dist/types/endpoints/auth/index.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts +30 -49
- package/dist/types/endpoints/integrationApi/AvailabilityExceptions.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Events.d.ts +23 -27
- package/dist/types/endpoints/integrationApi/Events.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Images.d.ts +17 -28
- package/dist/types/endpoints/integrationApi/Images.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Listings.d.ts +42 -104
- package/dist/types/endpoints/integrationApi/Listings.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Marketplace.d.ts +12 -20
- package/dist/types/endpoints/integrationApi/Marketplace.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Stock.d.ts +22 -28
- package/dist/types/endpoints/integrationApi/Stock.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts +35 -35
- package/dist/types/endpoints/integrationApi/StockAdjustments.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/StockReservations.d.ts +43 -0
- package/dist/types/endpoints/integrationApi/StockReservations.d.ts.map +1 -0
- package/dist/types/endpoints/integrationApi/Transactions.d.ts +36 -80
- package/dist/types/endpoints/integrationApi/Transactions.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/Users.d.ts +35 -70
- package/dist/types/endpoints/integrationApi/Users.d.ts.map +1 -1
- package/dist/types/endpoints/integrationApi/index.d.ts +40 -40
- package/dist/types/endpoints/integrationApi/index.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts +34 -48
- package/dist/types/endpoints/marketplace/AvailabilityExceptions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Bookings.d.ts +24 -23
- package/dist/types/endpoints/marketplace/Bookings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/CurrentUser.d.ts +54 -125
- package/dist/types/endpoints/marketplace/CurrentUser.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Images.d.ts +19 -27
- package/dist/types/endpoints/marketplace/Images.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Listings.d.ts +26 -25
- package/dist/types/endpoints/marketplace/Listings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Marketplace.d.ts +15 -19
- package/dist/types/endpoints/marketplace/Marketplace.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Messages.d.ts +24 -29
- package/dist/types/endpoints/marketplace/Messages.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/OwnListings.d.ts +55 -119
- package/dist/types/endpoints/marketplace/OwnListings.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/PasswordReset.d.ts +23 -35
- package/dist/types/endpoints/marketplace/PasswordReset.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts +22 -22
- package/dist/types/endpoints/marketplace/ProcessTransitions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Reviews.d.ts +23 -25
- package/dist/types/endpoints/marketplace/Reviews.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Stock.d.ts +30 -26
- package/dist/types/endpoints/marketplace/Stock.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StockAdjustments.d.ts +36 -34
- package/dist/types/endpoints/marketplace/StockAdjustments.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeAccount.d.ts +28 -49
- package/dist/types/endpoints/marketplace/StripeAccount.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts +22 -31
- package/dist/types/endpoints/marketplace/StripeAccountLinks.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeCustomer.d.ts +32 -46
- package/dist/types/endpoints/marketplace/StripeCustomer.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripePersons.d.ts +17 -25
- package/dist/types/endpoints/marketplace/StripePersons.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts +24 -24
- package/dist/types/endpoints/marketplace/StripeSetupIntents.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/TimeSlots.d.ts +20 -23
- package/dist/types/endpoints/marketplace/TimeSlots.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Transactions.d.ts +45 -81
- package/dist/types/endpoints/marketplace/Transactions.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/Users.d.ts +15 -22
- package/dist/types/endpoints/marketplace/Users.d.ts.map +1 -1
- package/dist/types/endpoints/marketplace/index.d.ts +50 -40
- package/dist/types/endpoints/marketplace/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +15 -30
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/integration/events.d.ts +87 -0
- package/dist/types/integrationSdk.d.ts +4 -5
- package/dist/types/integrationSdk.d.ts.map +1 -1
- package/dist/types/marketplace/availabilityExceptions.d.ts +99 -0
- package/dist/types/marketplace/availabilityPlan.d.ts +17 -0
- package/dist/types/marketplace/bookings.d.ts +80 -0
- package/dist/types/marketplace/currentUser.d.ts +202 -0
- package/dist/types/marketplace/images.d.ts +65 -0
- package/dist/types/marketplace/listings.d.ts +169 -0
- package/dist/types/marketplace/marketplace.d.ts +30 -0
- package/dist/types/marketplace/messages.d.ts +87 -0
- package/dist/types/marketplace/ownListings.d.ts +155 -0
- package/dist/types/marketplace/passwordReset.d.ts +54 -0
- package/dist/types/marketplace/processTransitions.d.ts +56 -0
- package/dist/types/marketplace/reviews.d.ts +108 -0
- package/dist/types/marketplace/stock.d.ts +45 -0
- package/dist/types/marketplace/stockAdjustment.d.ts +97 -0
- package/dist/types/marketplace/stockReservations.d.ts +89 -0
- package/dist/types/marketplace/stripeAccount.d.ts +67 -0
- package/dist/types/marketplace/stripeAccountLinks.d.ts +55 -0
- package/dist/types/marketplace/stripeCustomer.d.ts +94 -0
- package/dist/types/marketplace/stripePaymentMethod.d.ts +21 -0
- package/dist/types/marketplace/stripePersons.d.ts +48 -0
- package/dist/types/marketplace/stripeSetupIntents.d.ts +48 -0
- package/dist/types/marketplace/timeSlots.d.ts +51 -0
- package/dist/types/marketplace/transactions.d.ts +200 -0
- package/dist/types/marketplace/user.d.ts +200 -0
- package/dist/types/sdk-types.d.ts +10 -0
- package/dist/types/sdk.d.ts +6 -7
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdkTypes/BigDecimal.d.ts +1 -1
- package/dist/types/sdkTypes/BigDecimal.d.ts.map +1 -1
- package/dist/types/sdkTypes/LatLng.d.ts +1 -1
- package/dist/types/sdkTypes/LatLng.d.ts.map +1 -1
- package/dist/types/sdkTypes/LatLngBounds.d.ts +1 -1
- package/dist/types/sdkTypes/LatLngBounds.d.ts.map +1 -1
- package/dist/types/sdkTypes/Money.d.ts +1 -1
- package/dist/types/sdkTypes/Money.d.ts.map +1 -1
- package/dist/types/sdkTypes/UUID.d.ts +1 -1
- package/dist/types/sdkTypes/UUID.d.ts.map +1 -1
- package/dist/types/sharetribe.d.ts +227 -0
- package/dist/types/store.d.ts +22 -0
- package/dist/types/types/apiConfigs.d.ts.map +1 -1
- package/dist/types/types/assets/index.d.ts +74 -36
- package/dist/types/types/assets/index.d.ts.map +1 -1
- package/dist/types/types/authentication/index.d.ts +111 -60
- package/dist/types/types/authentication/index.d.ts.map +1 -1
- package/dist/types/types/axios.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +1 -39
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/types/integration/events.d.ts +52 -20
- package/dist/types/types/integration/events.d.ts.map +1 -1
- package/dist/types/types/marketplace/availabilityExceptions.d.ts +59 -16
- package/dist/types/types/marketplace/availabilityExceptions.d.ts.map +1 -1
- package/dist/types/types/marketplace/availabilityPlan.d.ts +18 -0
- package/dist/types/types/marketplace/availabilityPlan.d.ts.map +1 -0
- package/dist/types/types/marketplace/bookings.d.ts +48 -14
- package/dist/types/types/marketplace/bookings.d.ts.map +1 -1
- package/dist/types/types/marketplace/currentUser.d.ts +99 -55
- package/dist/types/types/marketplace/currentUser.d.ts.map +1 -1
- package/dist/types/types/marketplace/images.d.ts +40 -14
- package/dist/types/types/marketplace/images.d.ts.map +1 -1
- package/dist/types/types/marketplace/listings.d.ts +96 -66
- package/dist/types/types/marketplace/listings.d.ts.map +1 -1
- package/dist/types/types/marketplace/marketplace.d.ts +16 -6
- package/dist/types/types/marketplace/marketplace.d.ts.map +1 -1
- package/dist/types/types/marketplace/messages.d.ts +53 -15
- package/dist/types/types/marketplace/messages.d.ts.map +1 -1
- package/dist/types/types/marketplace/ownListings.d.ts +92 -65
- package/dist/types/types/marketplace/ownListings.d.ts.map +1 -1
- package/dist/types/types/marketplace/passwordReset.d.ts +32 -9
- package/dist/types/types/marketplace/passwordReset.d.ts.map +1 -1
- package/dist/types/types/marketplace/processTransitions.d.ts +33 -14
- package/dist/types/types/marketplace/processTransitions.d.ts.map +1 -1
- package/dist/types/types/marketplace/reviews.d.ts +72 -23
- package/dist/types/types/marketplace/reviews.d.ts.map +1 -1
- package/dist/types/types/marketplace/stock.d.ts +23 -6
- package/dist/types/types/marketplace/stock.d.ts.map +1 -1
- package/dist/types/types/marketplace/stockAdjustment.d.ts +60 -14
- package/dist/types/types/marketplace/stockAdjustment.d.ts.map +1 -1
- package/dist/types/types/marketplace/stockReservations.d.ts +59 -14
- package/dist/types/types/marketplace/stockReservations.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeAccount.d.ts +28 -5
- package/dist/types/types/marketplace/stripeAccount.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeAccountLinks.d.ts +26 -6
- package/dist/types/types/marketplace/stripeAccountLinks.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeCustomer.d.ts +60 -13
- package/dist/types/types/marketplace/stripeCustomer.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripePaymentMethod.d.ts +1 -2
- package/dist/types/types/marketplace/stripePaymentMethod.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripePersons.d.ts +17 -15
- package/dist/types/types/marketplace/stripePersons.d.ts.map +1 -1
- package/dist/types/types/marketplace/stripeSetupIntents.d.ts +16 -14
- package/dist/types/types/marketplace/stripeSetupIntents.d.ts.map +1 -1
- package/dist/types/types/marketplace/timeSlots.d.ts +13 -15
- package/dist/types/types/marketplace/timeSlots.d.ts.map +1 -1
- package/dist/types/types/marketplace/transactions.d.ts +77 -83
- package/dist/types/types/marketplace/transactions.d.ts.map +1 -1
- package/dist/types/types/marketplace/user.d.ts +85 -64
- package/dist/types/types/marketplace/user.d.ts.map +1 -1
- package/dist/types/types/sharetribe.d.ts +130 -92
- package/dist/types/types/sharetribe.d.ts.map +1 -1
- package/dist/types/types/store.d.ts +3 -14
- package/dist/types/types/store.d.ts.map +1 -1
- package/dist/types/utils/apis.d.ts +1 -1
- package/dist/types/utils/apis.d.ts.map +1 -1
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/convert-types.d.ts.map +1 -1
- package/dist/types/utils/parameter-serializer.d.ts.map +1 -1
- package/dist/types/utils/prepare-axios-instance.d.ts +1 -1
- package/dist/types/utils/prepare-axios-instance.d.ts.map +1 -1
- package/dist/types/utils/stores/BrowserStore.d.ts +1 -2
- package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -1
- package/dist/types/utils/stores/ExpressStore.d.ts +6 -7
- package/dist/types/utils/stores/ExpressStore.d.ts.map +1 -1
- package/dist/types/utils/stores/MemoryStore.d.ts +1 -2
- package/dist/types/utils/stores/MemoryStore.d.ts.map +1 -1
- package/dist/types/utils/stores/store.d.ts.map +1 -1
- package/dist/types/utils/transit.d.ts +1 -1
- package/dist/types/utils/transit.d.ts.map +1 -1
- package/dist/types/utils/util.d.ts +2 -2
- package/dist/types/utils/util.d.ts.map +1 -1
- package/dist/utils/apis.d.ts +8 -0
- package/dist/utils/config.d.ts +32 -0
- package/dist/utils/convert-types.d.ts +13 -0
- package/dist/utils/parameter-serializer.d.ts +23 -0
- package/dist/utils/prepare-axios-instance.d.ts +14 -0
- package/dist/utils/stores/BrowserStore.d.ts +37 -0
- package/dist/utils/stores/ExpressStore.d.ts +48 -0
- package/dist/utils/stores/MemoryStore.d.ts +23 -0
- package/dist/utils/stores/store.d.ts +8 -0
- package/dist/utils/transit.d.ts +28 -0
- package/dist/utils/util.d.ts +15 -0
- package/package.json +18 -17
- package/dist/ts-sharetribe-flex-sdk.cjs +0 -3
- package/dist/ts-sharetribe-flex-sdk.cjs.map +0 -1
- package/dist/ts-sharetribe-flex-sdk.js +0 -3
- package/dist/ts-sharetribe-flex-sdk.js.map +0 -1
- package/dist/ts-sharetribe-flex-sdk.mjs +0 -3
- package/dist/ts-sharetribe-flex-sdk.mjs.map +0 -1
- package/dist/types/endpoints/integrationApi/StockReservation.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/transactions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/transactions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,IAAI,EACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,OAAO,GACP,UAAU,GACV,qBAAqB,GACrB,YAAY,GACZ,uBAAuB,GACvB,gBAAgB,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,+BAA+B,GACvC,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,gBAAgB,GAChB,sBAAsB,GACtB,UAAU,GACV,uBAAuB,GACvB,wBAAwB,GACxB,iCAAiC,GACjC,UAAU,GACV,uBAAuB,GACvB,wBAAwB,GACxB,iCAAiC,GACjC,SAAS,GACT,kBAAkB,GAClB,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,UAAU,GACV,iBAAiB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAA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C,+BAA+B,GAC/B,0CAA0C,GAC1C,mCAAmC,CAAC;AAExC;;GAEG;AACH,KAAK,wBAAwB,CAC3B,CAAC,SAAS,qBAAqB,EAC/B,CAAC,SAAS,wBAAwB,EAClC,EAAE,SAAS,cAAc,GAAG,SAAS,IACnC,CAAC,SAAS,MAAM,GAChB,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GACzC,CAAC,SAAS,OAAO,GACf,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,GAC3C,CAAC,SAAS,UAAU,GAAG,qBAAqB,GAAG,YAAY,GAAG,uBAAuB,GAAG,gBAAgB,GACtG,YAAY,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAC3D,KAAK,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAC9B,CAAC,SAAS,qBAAqB,EAC/B,CAAC,SAAS,wBAAwB,EAClC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC;IACF,IAAI,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CAC1C,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,GACnF,CAAC,CAAC,SAAS,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Type definitions for Users in the Sharetribe Marketplace API.
|
|
3
|
-
* This file defines the structure of users, their parameters, and response types for API requests.
|
|
4
3
|
*/
|
|
5
4
|
import { ApiMeta, ApiParameter, ExtraParameter, ExtraParameterType, QueryMeta, QueryPriv, QueryProt, QueryPub, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
|
|
6
5
|
/**
|
|
@@ -16,23 +15,28 @@ export type UsersRelationshipsFields = "marketplace" | "profileImage" | "stripeA
|
|
|
16
15
|
*/
|
|
17
16
|
export type UserState = "active" | "banned" | "pendingApproval";
|
|
18
17
|
/**
|
|
19
|
-
* Permission levels
|
|
18
|
+
* Permission levels.
|
|
20
19
|
*/
|
|
21
20
|
export type Permissions = "permission/allow" | "permission/deny";
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
22
|
+
* Core user attributes (always present)
|
|
24
23
|
*/
|
|
25
|
-
|
|
26
|
-
id: UUID;
|
|
27
|
-
type: "user";
|
|
28
|
-
attributes: UserAttributes<I>;
|
|
29
|
-
}
|
|
30
|
-
type UserAttributes<I extends boolean> = {
|
|
24
|
+
interface BaseUserAttributes {
|
|
31
25
|
banned: boolean;
|
|
32
26
|
deleted: boolean;
|
|
33
27
|
createdAt: Date;
|
|
34
|
-
profile:
|
|
35
|
-
|
|
28
|
+
profile: {
|
|
29
|
+
displayName: string;
|
|
30
|
+
abbreviatedName: string;
|
|
31
|
+
bio: string | null;
|
|
32
|
+
publicData: UserProfilePublicData & UserCustomProfilePublicData;
|
|
33
|
+
metadata: UserProfileMetadata & UserCustomProfileMetadata;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Private/admin-only attributes (only when I = true)
|
|
38
|
+
*/
|
|
39
|
+
interface PrivateUserAttributes {
|
|
36
40
|
state: UserState;
|
|
37
41
|
email: string;
|
|
38
42
|
emailVerified: boolean;
|
|
@@ -42,26 +46,28 @@ type UserAttributes<I extends boolean> = {
|
|
|
42
46
|
idpId: string;
|
|
43
47
|
userId: string;
|
|
44
48
|
}[];
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
protectedData: UserProfileProtectedData & UserCustomProfileProtectedData;
|
|
56
|
-
privateData: UserProfilePrivateData & UserCustomProfilePrivateData;
|
|
57
|
-
permissions: {
|
|
58
|
-
postListings: Permissions;
|
|
59
|
-
initiateTransactions: Permissions;
|
|
60
|
-
read: Permissions;
|
|
49
|
+
profile: {
|
|
50
|
+
firstName: string;
|
|
51
|
+
lastName: string;
|
|
52
|
+
protectedData: UserProfileProtectedData & UserCustomProfileProtectedData;
|
|
53
|
+
privateData: UserProfilePrivateData & UserCustomProfilePrivateData;
|
|
54
|
+
permissions: {
|
|
55
|
+
postListings: Permissions;
|
|
56
|
+
initiateTransactions: Permissions;
|
|
57
|
+
read: Permissions;
|
|
58
|
+
};
|
|
61
59
|
};
|
|
62
|
-
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Main User type with conditional private fields
|
|
63
|
+
*/
|
|
64
|
+
export interface User<I extends boolean = false> {
|
|
65
|
+
id: UUID;
|
|
66
|
+
type: "user";
|
|
67
|
+
attributes: BaseUserAttributes & (I extends true ? PrivateUserAttributes : {});
|
|
68
|
+
}
|
|
63
69
|
/**
|
|
64
|
-
* User with
|
|
70
|
+
* User with relationships
|
|
65
71
|
*/
|
|
66
72
|
export interface UserWithRelationships<I extends boolean = false> extends User<I> {
|
|
67
73
|
relationships: {
|
|
@@ -71,45 +77,46 @@ export interface UserWithRelationships<I extends boolean = false> extends User<I
|
|
|
71
77
|
effectivePermissionSet: Relationship<false, "effectivePermissionSet">;
|
|
72
78
|
};
|
|
73
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Select user type based on whether relationships are included
|
|
82
|
+
*/
|
|
74
83
|
export type UserType<R extends boolean, I extends boolean = false> = R extends true ? UserWithRelationships<I> : User<I>;
|
|
75
84
|
/**
|
|
76
|
-
* Base
|
|
85
|
+
* Base parameter shared across user endpoints
|
|
77
86
|
*/
|
|
78
87
|
export interface UsersParameter extends ApiParameter {
|
|
79
88
|
include?: UsersRelationshipsFields[];
|
|
80
89
|
}
|
|
81
90
|
/**
|
|
82
|
-
*
|
|
91
|
+
* Show endpoint parameters
|
|
83
92
|
*/
|
|
84
|
-
export type UsersShowParameter<I extends boolean = false> = {
|
|
85
|
-
id: UUID | string;
|
|
86
|
-
} & UsersParameter & (I extends false ? {
|
|
87
|
-
id: UUID | string;
|
|
88
|
-
} : {
|
|
93
|
+
export type UsersShowParameter<I extends boolean = false> = UsersParameter & (I extends true ? {
|
|
89
94
|
id?: UUID | string;
|
|
90
95
|
email?: string;
|
|
96
|
+
} : {
|
|
97
|
+
id: UUID | string;
|
|
91
98
|
});
|
|
92
99
|
/**
|
|
93
|
-
*
|
|
100
|
+
* Query endpoint parameters
|
|
94
101
|
*/
|
|
95
102
|
export interface UsersQueryParameter extends UsersParameter {
|
|
96
103
|
createdAtStart?: Date | string;
|
|
97
104
|
createdAtEnd?: Date | string;
|
|
98
|
-
[keyof: QueryPub]: string;
|
|
99
|
-
[keyof: QueryMeta]: string;
|
|
100
|
-
[keyof: QueryPriv]: string;
|
|
101
|
-
[keyof: QueryProt]: string;
|
|
102
105
|
sort?: string;
|
|
106
|
+
[keyof: QueryPub]: string | undefined;
|
|
107
|
+
[keyof: QueryMeta]: string | undefined;
|
|
108
|
+
[keyof: QueryPriv]: string | undefined;
|
|
109
|
+
[keyof: QueryProt]: string | undefined;
|
|
103
110
|
}
|
|
104
111
|
/**
|
|
105
|
-
*
|
|
112
|
+
* Update profile parameters
|
|
106
113
|
*/
|
|
107
114
|
export interface UsersUpdateProfileParameter extends UsersParameter {
|
|
108
115
|
id: UUID | string;
|
|
109
116
|
firstName?: string;
|
|
110
117
|
lastName?: string;
|
|
111
118
|
displayName?: string;
|
|
112
|
-
bio?: string;
|
|
119
|
+
bio?: string | null;
|
|
113
120
|
publicData?: UserProfilePublicData & UserCustomProfilePublicData;
|
|
114
121
|
protectedData?: UserProfileProtectedData & UserCustomProfileProtectedData;
|
|
115
122
|
privateData?: UserProfilePrivateData & UserCustomProfilePrivateData;
|
|
@@ -117,14 +124,11 @@ export interface UsersUpdateProfileParameter extends UsersParameter {
|
|
|
117
124
|
profileImageId?: UUID | string;
|
|
118
125
|
}
|
|
119
126
|
/**
|
|
120
|
-
*
|
|
127
|
+
* Approve & permissions parameters
|
|
121
128
|
*/
|
|
122
129
|
export interface UsersApproveParameter extends UsersParameter {
|
|
123
130
|
id: UUID | string;
|
|
124
131
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Parameters for updating a user's permissions.
|
|
127
|
-
*/
|
|
128
132
|
export interface UsersUpdatePermissionsParameter extends UsersParameter {
|
|
129
133
|
id: UUID | string;
|
|
130
134
|
postListings?: Permissions;
|
|
@@ -132,47 +136,64 @@ export interface UsersUpdatePermissionsParameter extends UsersParameter {
|
|
|
132
136
|
read?: Permissions;
|
|
133
137
|
}
|
|
134
138
|
/**
|
|
135
|
-
* Custom data types
|
|
139
|
+
* Custom profile data types (extensible but typed)
|
|
136
140
|
*/
|
|
137
141
|
export interface UserProfilePublicData {
|
|
138
142
|
[key: string]: any;
|
|
139
143
|
}
|
|
140
|
-
export interface UserCustomProfilePublicData {
|
|
144
|
+
export interface UserCustomProfilePublicData extends Record<string, unknown> {
|
|
141
145
|
}
|
|
142
146
|
export interface UserProfileProtectedData {
|
|
143
147
|
[key: string]: any;
|
|
144
148
|
}
|
|
145
|
-
export interface UserCustomProfileProtectedData {
|
|
149
|
+
export interface UserCustomProfileProtectedData extends Record<string, unknown> {
|
|
146
150
|
}
|
|
147
151
|
export interface UserProfilePrivateData {
|
|
148
152
|
[key: string]: any;
|
|
149
153
|
}
|
|
150
|
-
export interface UserCustomProfilePrivateData {
|
|
154
|
+
export interface UserCustomProfilePrivateData extends Record<string, unknown> {
|
|
151
155
|
}
|
|
152
156
|
export interface UserProfileMetadata {
|
|
153
157
|
[key: string]: any;
|
|
154
158
|
}
|
|
155
|
-
export interface UserCustomProfileMetadata {
|
|
159
|
+
export interface UserCustomProfileMetadata extends Record<string, unknown> {
|
|
156
160
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
type
|
|
161
|
+
/**
|
|
162
|
+
* Helper: does the parameter request includes?
|
|
163
|
+
*/
|
|
164
|
+
type HasInclude<P> = P extends {
|
|
165
|
+
include: infer T extends UsersRelationshipsFields[];
|
|
166
|
+
} ? T : never;
|
|
167
|
+
type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
|
|
168
|
+
/**
|
|
169
|
+
* Helper: extract included resources
|
|
170
|
+
*/
|
|
171
|
+
type IncludedResources<P, I> = P extends {
|
|
172
|
+
include: infer I extends readonly UsersRelationshipsFields[];
|
|
173
|
+
} ? RelationshipTypeMap[I[number]][] : never;
|
|
174
|
+
/**
|
|
175
|
+
* Expand behavior
|
|
176
|
+
*/
|
|
177
|
+
type ExpandReturnType<T, EP extends ExtraParameter | undefined> = EP extends {
|
|
161
178
|
expand: true;
|
|
162
|
-
} ?
|
|
179
|
+
} ? T : EP extends {
|
|
163
180
|
expand: false;
|
|
164
|
-
} ? Omit<
|
|
181
|
+
} ? Omit<T, "attributes"> : Omit<T, "attributes">;
|
|
182
|
+
/**
|
|
183
|
+
* Final response data type per endpoint
|
|
184
|
+
*/
|
|
185
|
+
type UsersResponseData<E extends UsersEndpoints, P extends AllUsersParameter, EP extends ExtraParameter | undefined, I extends boolean> = E extends "show" ? UserType<IncludesRelationships<P>, I> : E extends "query" ? UserType<IncludesRelationships<P>, I>[] : E extends "updateProfile" | "approve" | "updatePermissions" ? ExpandReturnType<UserType<IncludesRelationships<P>, I>, EP> : never;
|
|
165
186
|
/**
|
|
166
|
-
*
|
|
187
|
+
* Union of all valid parameter types
|
|
167
188
|
*/
|
|
168
|
-
type
|
|
189
|
+
type AllUsersParameter = UsersShowParameter<any> | UsersQueryParameter | UsersUpdateProfileParameter | UsersApproveParameter | UsersUpdatePermissionsParameter;
|
|
169
190
|
/**
|
|
170
|
-
*
|
|
191
|
+
* Final response type
|
|
171
192
|
*/
|
|
172
193
|
export type UsersResponse<E extends UsersEndpoints, P extends AllUsersParameter, EP extends ExtraParameterType = undefined, I extends boolean = false> = {
|
|
173
|
-
data:
|
|
174
|
-
} & (
|
|
175
|
-
included:
|
|
194
|
+
data: UsersResponseData<E, P, EP, I>;
|
|
195
|
+
} & (IncludesRelationships<P> extends true ? {
|
|
196
|
+
included: IncludedResources<P, I>;
|
|
176
197
|
} : {}) & (E extends "query" ? {
|
|
177
198
|
meta: ApiMeta;
|
|
178
199
|
} : {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/user.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,IAAI,EACL,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,OAAO,GACP,eAAe,GACf,SAAS,GACT,mBAAmB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,aAAa,GACb,cAAc,GACd,eAAe,GACf,wBAAwB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAEjE;;GAEG;AACH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,UAAU,EAAE,qBAAqB,GAAG,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QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAC3D,KAAK,CAAC;AAEd;;GAEG;AACH,KAAK,iBAAiB,GAClB,kBAAkB,CAAC,GAAG,CAAC,GACvB,mBAAmB,GACnB,2BAA2B,GAC3B,qBAAqB,GACrB,+BAA+B,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,iBAAiB,EAC3B,EAAE,SAAS,kBAAkB,GAAG,SAAS,EACzC,CAAC,SAAS,OAAO,GAAG,KAAK,IACvB;IACF,IAAI,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;CACtC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,GACtF,CAAC,CAAC,SAAS,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -14,177 +14,215 @@ import { StripeAccount } from "./marketplace/stripeAccount";
|
|
|
14
14
|
import { StripeCustomer } from "./marketplace/stripeCustomer";
|
|
15
15
|
import { Transaction } from "./marketplace/transactions";
|
|
16
16
|
import { CurrentUserPermissionSet } from "./marketplace/currentUser";
|
|
17
|
+
import { StockAdjustment } from "./marketplace/stockAdjustment";
|
|
18
|
+
import { ImageAsset } from "./assets";
|
|
17
19
|
/**
|
|
18
20
|
* A mapping of relationship types to their corresponding entities.
|
|
21
|
+
* The `I` flag controls whether private/protected user data is included.
|
|
19
22
|
*/
|
|
20
23
|
export type RelationshipTypeMap<I extends boolean = false> = {
|
|
21
|
-
author:
|
|
24
|
+
"author.effectivePermissionSet": CurrentUserPermissionSet;
|
|
22
25
|
"author.marketplace": Marketplace;
|
|
23
26
|
"author.profileImage": Image;
|
|
24
27
|
"author.stripeAccount": StripeAccount;
|
|
25
|
-
"author.effectivePermissionSet": CurrentUserPermissionSet;
|
|
26
|
-
booking: Booking;
|
|
27
28
|
"booking.transaction": Transaction;
|
|
28
|
-
|
|
29
|
-
customer: User<I>;
|
|
29
|
+
"customer.effectivePermissionSet": CurrentUserPermissionSet;
|
|
30
30
|
"customer.marketplace": Marketplace;
|
|
31
31
|
"customer.profileImage": Image;
|
|
32
32
|
"customer.stripeAccount": StripeAccount;
|
|
33
|
-
"
|
|
34
|
-
defaultPaymentMethod: StripePaymentMethod;
|
|
35
|
-
images: Image;
|
|
36
|
-
listing: Listing<I>;
|
|
37
|
-
"listing.marketplace": Marketplace;
|
|
33
|
+
"effectivePermissionSet": CurrentUserPermissionSet;
|
|
38
34
|
"listing.author": User<I>;
|
|
39
|
-
"listing.images": Image;
|
|
40
35
|
"listing.currentStock": Stock;
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
"listing.images": Image;
|
|
37
|
+
"listing.marketplace": Marketplace;
|
|
43
38
|
"messages.sender": User<I>;
|
|
44
39
|
"messages.transaction": Transaction;
|
|
45
|
-
ownListing: OwnListing;
|
|
46
|
-
"ownListing.marketplace": Marketplace;
|
|
47
40
|
"ownListing.author": User<I>;
|
|
48
|
-
"ownListing.images": Image;
|
|
49
41
|
"ownListing.currentStock": Stock;
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
"ownListing.images": Image;
|
|
43
|
+
"ownListing.marketplace": Marketplace;
|
|
44
|
+
"provider.effectivePermissionSet": CurrentUserPermissionSet;
|
|
52
45
|
"provider.marketplace": Marketplace;
|
|
53
46
|
"provider.profileImage": Image;
|
|
54
47
|
"provider.stripeAccount": StripeAccount;
|
|
55
|
-
"provider.effectivePermissionSet": CurrentUserPermissionSet;
|
|
56
|
-
reviews: Review;
|
|
57
48
|
"reviews.author": User<I>;
|
|
49
|
+
"reviews.author.profileImage": Image;
|
|
58
50
|
"reviews.listing": Listing<I>;
|
|
59
51
|
"reviews.subject": User<I>;
|
|
60
|
-
"
|
|
61
|
-
sender: User<I>;
|
|
52
|
+
"sender.effectivePermissionSet": CurrentUserPermissionSet;
|
|
62
53
|
"sender.marketplace": Marketplace;
|
|
63
54
|
"sender.profileImage": Image;
|
|
64
55
|
"sender.stripeAccount": StripeAccount;
|
|
65
|
-
"sender.effectivePermissionSet": CurrentUserPermissionSet;
|
|
66
|
-
stockReservation: StockReservation;
|
|
67
56
|
"stockReservation.transaction": Transaction;
|
|
68
|
-
stripeAccount: StripeAccount;
|
|
69
|
-
stripeCustomer: StripeCustomer;
|
|
70
57
|
"stripeCustomer.defaultPaymentMethod": StripePaymentMethod;
|
|
71
|
-
subject:
|
|
58
|
+
"subject.effectivePermissionSet": CurrentUserPermissionSet;
|
|
72
59
|
"subject.marketplace": Marketplace;
|
|
73
60
|
"subject.profileImage": Image;
|
|
74
61
|
"subject.stripeAccount": StripeAccount;
|
|
75
|
-
"
|
|
76
|
-
transaction:
|
|
77
|
-
"transaction.marketplace": Marketplace;
|
|
62
|
+
"transaction.booking": Booking;
|
|
63
|
+
"transaction.customer": User<I>;
|
|
78
64
|
"transaction.listing": Listing<I>;
|
|
65
|
+
"transaction.marketplace": Marketplace;
|
|
66
|
+
"transaction.messages": Message;
|
|
79
67
|
"transaction.provider": User<I>;
|
|
80
|
-
"transaction.
|
|
81
|
-
"transaction.booking": Booking;
|
|
68
|
+
"transaction.reviews": Review;
|
|
82
69
|
"transaction.stockReservation": StockReservation;
|
|
70
|
+
author: User<I>;
|
|
71
|
+
booking: Booking;
|
|
72
|
+
currentStock: Stock;
|
|
73
|
+
customer: User<I>;
|
|
74
|
+
defaultPaymentMethod: StripePaymentMethod;
|
|
75
|
+
imageAsset: ImageAsset;
|
|
76
|
+
images: Image;
|
|
77
|
+
listing: Listing<I>;
|
|
78
|
+
marketplace: Marketplace;
|
|
79
|
+
messages: Message;
|
|
80
|
+
ownListing: OwnListing;
|
|
81
|
+
profileImage: Image;
|
|
82
|
+
provider: User<I>;
|
|
83
|
+
reviews: Review;
|
|
84
|
+
sender: User<I>;
|
|
85
|
+
stockAdjustment: StockAdjustment;
|
|
86
|
+
stockReservation: StockReservation;
|
|
87
|
+
stripeAccount: StripeAccount;
|
|
88
|
+
stripeCustomer: StripeCustomer;
|
|
89
|
+
subject: User<I>;
|
|
90
|
+
transaction: Transaction;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* HTTP status codes that can return API errors
|
|
94
|
+
*/
|
|
95
|
+
export declare const ApiErrorStatuses: {
|
|
96
|
+
readonly BadRequest: 400;
|
|
97
|
+
readonly Unauthorized: 401;
|
|
98
|
+
readonly PaymentRequired: 402;
|
|
99
|
+
readonly Forbidden: 403;
|
|
100
|
+
readonly NotFound: 404;
|
|
101
|
+
readonly Conflict: 409;
|
|
102
|
+
readonly PayloadTooLarge: 413;
|
|
103
|
+
readonly TooManyRequests: 429;
|
|
104
|
+
readonly ServerError: 500;
|
|
83
105
|
};
|
|
84
|
-
export type
|
|
85
|
-
|
|
106
|
+
export type ApiErrorStatus = typeof ApiErrorStatuses[keyof typeof ApiErrorStatuses];
|
|
107
|
+
/**
|
|
108
|
+
* Strongly typed error codes per status
|
|
109
|
+
*/
|
|
110
|
+
export type ApiErrorCode = "unsupported-content-type" | "bad-request" | "validation-disallowed-key" | "validation-invalid-value" | "validation-invalid-params" | "validation-missing-key" | "auth-invalid-access-token" | "auth-missing-access-token" | "transaction-payment-failed" | "forbidden" | "not-found" | "conflict" | "image-invalid" | "image-invalid-content" | "email-taken" | "email-already-verified" | "email-unverified" | "email-not-found" | "listing-not-found" | "listing-invalid-state" | "stripe-account-not-found" | "stripe-missing-api-key" | "stripe-invalid-payment-intent-status" | "stripe-customer-not-found" | "stripe-multiple-payment-methods-not-supported" | "stripe-payment-method-type-not-supported" | "user-missing-stripe-account" | "user-is-banned" | "user-not-found" | "transaction-locked" | "transaction-not-found" | "transaction-listing-not-found" | "transaction-booking-state-not-pending" | "transaction-booking-state-not-accepted" | "transaction-invalid-transition" | "transaction-invalid-action-sequence" | "transaction-missing-listing-price" | "transaction-missing-stripe-account" | "transaction-same-author-and-customer" | "transaction-stripe-account-disabled-charges" | "transaction-stripe-account-disabled-payouts" | "transaction-charge-zero-payin" | "transaction-charge-zero-payout" | "transaction-zero-payin" | "transaction-unknown-alias" | "transaction-provider-banned-or-deleted" | "transaction-customer-banned-or-deleted" | "request-larger-than-content-length" | "request-upload-over-limit" | "too-many-requests";
|
|
86
111
|
/**
|
|
87
|
-
*
|
|
112
|
+
* Single API error object
|
|
88
113
|
*/
|
|
89
|
-
export
|
|
114
|
+
export interface ApiError {
|
|
90
115
|
id: string;
|
|
91
|
-
status:
|
|
92
|
-
code:
|
|
116
|
+
status: ApiErrorStatus;
|
|
117
|
+
code: ApiErrorCode;
|
|
93
118
|
title: string;
|
|
94
|
-
|
|
119
|
+
detail?: string;
|
|
95
120
|
source?: {
|
|
96
|
-
|
|
97
|
-
|
|
121
|
+
pointer?: string;
|
|
122
|
+
parameter?: string;
|
|
98
123
|
};
|
|
99
|
-
|
|
124
|
+
meta?: Record<string, unknown>;
|
|
125
|
+
}
|
|
100
126
|
/**
|
|
101
|
-
*
|
|
127
|
+
* Full error response from Sharetribe API
|
|
102
128
|
*/
|
|
103
|
-
export
|
|
129
|
+
export interface ApiErrorResponse {
|
|
130
|
+
errors: ApiError[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
export interface SharetribeApiError {
|
|
104
136
|
name: string;
|
|
105
137
|
message: string;
|
|
106
|
-
status
|
|
107
|
-
statusText
|
|
108
|
-
data:
|
|
109
|
-
|
|
110
|
-
};
|
|
111
|
-
};
|
|
138
|
+
status?: number;
|
|
139
|
+
statusText?: string;
|
|
140
|
+
data: any;
|
|
141
|
+
}
|
|
112
142
|
/**
|
|
113
|
-
*
|
|
143
|
+
* UUID wrapper instance
|
|
114
144
|
*/
|
|
115
145
|
export type UUID = InstanceType<typeof UUIDClass>;
|
|
116
146
|
/**
|
|
117
|
-
*
|
|
147
|
+
* Pagination metadata
|
|
118
148
|
*/
|
|
119
|
-
export
|
|
149
|
+
export interface ApiMeta {
|
|
120
150
|
totalItems: number;
|
|
121
151
|
totalPages: number;
|
|
122
152
|
page: number;
|
|
123
|
-
paginationLimit: number;
|
|
124
153
|
perPage: number;
|
|
125
|
-
|
|
154
|
+
paginationLimit?: number;
|
|
155
|
+
}
|
|
126
156
|
/**
|
|
127
|
-
*
|
|
157
|
+
* Relationship object in API responses
|
|
128
158
|
*/
|
|
129
|
-
export type Relationship<
|
|
130
|
-
data:
|
|
159
|
+
export type Relationship<IsArray extends boolean = false, Type extends keyof RelationshipTypeMap = keyof RelationshipTypeMap> = IsArray extends true ? {
|
|
160
|
+
data: {
|
|
131
161
|
id: UUID;
|
|
132
|
-
type:
|
|
133
|
-
}[]
|
|
162
|
+
type: Type;
|
|
163
|
+
}[];
|
|
164
|
+
} : {
|
|
165
|
+
data: {
|
|
134
166
|
id: UUID;
|
|
135
|
-
type:
|
|
136
|
-
};
|
|
167
|
+
type: Type;
|
|
168
|
+
} | null;
|
|
137
169
|
};
|
|
138
170
|
/**
|
|
139
|
-
*
|
|
171
|
+
* Query parameter prefixes
|
|
140
172
|
*/
|
|
141
173
|
export type QueryFields = `fields.${string}`;
|
|
142
174
|
export type QueryLimit = `limit.${string}`;
|
|
143
|
-
export type
|
|
175
|
+
export type QueryImageVariant = `imageVariant.${string}`;
|
|
144
176
|
/**
|
|
145
|
-
*
|
|
177
|
+
* Public, metadata, private, protected data query keys
|
|
146
178
|
*/
|
|
147
|
-
export
|
|
179
|
+
export type QueryPub = `pub_${string}`;
|
|
180
|
+
export type QueryMeta = `meta_${string}`;
|
|
181
|
+
export type QueryPriv = `priv_${string}`;
|
|
182
|
+
export type QueryProt = `prot_${string}`;
|
|
183
|
+
/**
|
|
184
|
+
* Optional expand control
|
|
185
|
+
*/
|
|
186
|
+
export interface ExpandParam {
|
|
148
187
|
expand?: boolean;
|
|
149
188
|
}
|
|
189
|
+
export type ExtraParameter = ExpandParam | undefined;
|
|
190
|
+
export type ExtraParameterType = ExtraParameter;
|
|
150
191
|
/**
|
|
151
|
-
*
|
|
192
|
+
* Base API parameter interface (index signatures are now safe)
|
|
152
193
|
*/
|
|
153
194
|
export interface ApiParameter {
|
|
154
|
-
|
|
155
|
-
[
|
|
156
|
-
|
|
195
|
+
/** Select fields: fields.listings=title,description */
|
|
196
|
+
[K: QueryFields]: string | undefined;
|
|
197
|
+
/** Pagination limits per resource type */
|
|
198
|
+
[K: QueryLimit]: number | undefined;
|
|
199
|
+
/** Image variants */
|
|
200
|
+
[K: QueryImageVariant]: string | undefined;
|
|
201
|
+
/** Public custom fields */
|
|
202
|
+
[K: QueryPub]: string | undefined;
|
|
203
|
+
/** Metadata fields */
|
|
204
|
+
[K: QueryMeta]: string | undefined;
|
|
205
|
+
/** Private fields (admin only) */
|
|
206
|
+
[K: QueryPriv]: string | undefined;
|
|
207
|
+
/** Protected fields (trusted user) */
|
|
208
|
+
[K: QueryProt]: string | undefined;
|
|
157
209
|
}
|
|
158
210
|
/**
|
|
159
|
-
*
|
|
211
|
+
* Geographic types
|
|
160
212
|
*/
|
|
161
|
-
export
|
|
213
|
+
export interface LatLng {
|
|
162
214
|
lat: number;
|
|
163
215
|
lng: number;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
* Represents a latitude/longitude bounding box.
|
|
167
|
-
*/
|
|
168
|
-
export type LatLngBounds = {
|
|
216
|
+
}
|
|
217
|
+
export interface LatLngBounds {
|
|
169
218
|
ne: LatLng;
|
|
170
219
|
sw: LatLng;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Query types for public, metadata, private, and protected data.
|
|
174
|
-
*/
|
|
175
|
-
export type QueryPub = `pub_${string}`;
|
|
176
|
-
export type QueryMeta = `meta_${string}`;
|
|
177
|
-
export type QueryPriv = `priv_${string}`;
|
|
178
|
-
export type QueryProt = `prot_${string}`;
|
|
179
|
-
/**
|
|
180
|
-
* Additional parameters for API requests.
|
|
181
|
-
*/
|
|
182
|
-
export type ExtraParameterType = ExtraParameter | undefined;
|
|
220
|
+
}
|
|
183
221
|
/**
|
|
184
|
-
*
|
|
222
|
+
* Money amount with currency
|
|
185
223
|
*/
|
|
186
|
-
export
|
|
224
|
+
export interface Money {
|
|
187
225
|
amount: number;
|
|
188
226
|
currency: string;
|
|
189
|
-
}
|
|
227
|
+
}
|
|
190
228
|
//# sourceMappingURL=sharetribe.d.ts.map
|