@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,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Type definitions for
|
|
3
|
-
* These types define the structure for marketplace parameters, attributes, and responses.
|
|
2
|
+
* @fileoverview Type definitions for Marketplace in the Sharetribe Marketplace API.
|
|
4
3
|
*/
|
|
5
4
|
import { UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Available endpoints
|
|
7
|
+
*/
|
|
6
8
|
export type MarketplaceEndpoints = "show";
|
|
9
|
+
/**
|
|
10
|
+
* Marketplace resource
|
|
11
|
+
*/
|
|
7
12
|
export interface Marketplace {
|
|
8
13
|
id: UUID;
|
|
9
14
|
type: "marketplace";
|
|
@@ -12,10 +17,15 @@ export interface Marketplace {
|
|
|
12
17
|
description: string;
|
|
13
18
|
};
|
|
14
19
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Response data per endpoint
|
|
22
|
+
*/
|
|
23
|
+
type ResponseData<E extends MarketplaceEndpoints> = E extends "show" ? Marketplace : never;
|
|
24
|
+
/**
|
|
25
|
+
* Final response type
|
|
26
|
+
*/
|
|
27
|
+
export type MarketplaceResponse<E extends MarketplaceEndpoints = "show"> = {
|
|
28
|
+
data: ResponseData<E>;
|
|
19
29
|
};
|
|
20
30
|
export {};
|
|
21
31
|
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/marketplace.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/marketplace.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,oBAAoB,IAC9C,CAAC,SAAS,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,oBAAoB,GAAG,MAAM,IAAI;IACzE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CACvB,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Type definitions for
|
|
3
|
-
|
|
2
|
+
* @fileoverview Type definitions for Messages in the Sharetribe Marketplace API.
|
|
3
|
+
*/
|
|
4
|
+
import { ApiMeta, ApiParameter, ExtraParameterType, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Available endpoints
|
|
4
7
|
*/
|
|
5
|
-
import { ApiMeta, ApiParameter, ExtraParameter, UUID, Relationship, RelationshipTypeMap, ExtraParameterType } from "../sharetribe";
|
|
6
8
|
export type MessagesEndpoints = "query" | "send";
|
|
9
|
+
/**
|
|
10
|
+
* Relationship fields that can be included
|
|
11
|
+
*/
|
|
7
12
|
export type MessagesRelationshipsFields = "sender" | "sender.profileImage" | "sender.marketplace" | "transaction" | "transaction.marketplace" | "transaction.listing" | "transaction.provider" | "transaction.customer" | "transaction.booking" | "transaction.stockReservation" | "transaction.reviews" | "transaction.messages";
|
|
13
|
+
/**
|
|
14
|
+
* Message resource
|
|
15
|
+
*/
|
|
8
16
|
export interface Message {
|
|
9
17
|
id: UUID;
|
|
10
18
|
type: "message";
|
|
@@ -13,36 +21,66 @@ export interface Message {
|
|
|
13
21
|
createdAt: Date;
|
|
14
22
|
};
|
|
15
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* With relationships
|
|
26
|
+
*/
|
|
16
27
|
export interface MessageWithRelationships extends Message {
|
|
17
28
|
relationships: {
|
|
18
|
-
sender: Relationship<false, "
|
|
29
|
+
sender: Relationship<false, "sender">;
|
|
19
30
|
transaction: Relationship<false, "transaction">;
|
|
20
31
|
};
|
|
21
32
|
}
|
|
22
|
-
export type
|
|
33
|
+
export type MessageResource<R extends boolean> = R extends true ? MessageWithRelationships : Message;
|
|
34
|
+
/**
|
|
35
|
+
* Base request parameters
|
|
36
|
+
*/
|
|
23
37
|
export interface MessagesParameter extends ApiParameter {
|
|
24
38
|
include?: MessagesRelationshipsFields[];
|
|
25
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Query messages
|
|
42
|
+
*/
|
|
26
43
|
export interface MessagesQueryParameter extends MessagesParameter {
|
|
27
44
|
transactionId: UUID | string;
|
|
28
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Send a message
|
|
48
|
+
*/
|
|
29
49
|
export interface MessagesSendParameter extends MessagesParameter {
|
|
30
50
|
transactionId: UUID | string;
|
|
31
51
|
content: string;
|
|
32
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* All parameter types
|
|
55
|
+
*/
|
|
33
56
|
type AllMessagesParameter = MessagesQueryParameter | MessagesSendParameter;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Include detection — fixes TS2536
|
|
59
|
+
*/
|
|
60
|
+
type HasInclude<P> = P extends {
|
|
61
|
+
include: infer I extends readonly MessagesRelationshipsFields[];
|
|
62
|
+
} ? I : never;
|
|
63
|
+
type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
|
|
64
|
+
type IncludedResources<P> = HasInclude<P> extends infer Fields extends MessagesRelationshipsFields[] ? RelationshipTypeMap[Fields[number]][] : never;
|
|
65
|
+
/**
|
|
66
|
+
* Expand behavior
|
|
67
|
+
*/
|
|
68
|
+
type ExpandResult<T, EP extends ExtraParameterType | undefined> = EP extends {
|
|
37
69
|
expand: true;
|
|
38
|
-
} ?
|
|
70
|
+
} ? T : EP extends {
|
|
39
71
|
expand: false;
|
|
40
|
-
} ? Omit<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
72
|
+
} ? Omit<T, "attributes"> : Omit<T, "attributes">;
|
|
73
|
+
/**
|
|
74
|
+
* Response data per endpoint
|
|
75
|
+
*/
|
|
76
|
+
type ResponseData<E extends MessagesEndpoints, P extends AllMessagesParameter, EP extends ExtraParameterType | undefined> = E extends "query" ? MessageResource<IncludesRelationships<P>>[] : E extends "send" ? ExpandResult<MessageResource<IncludesRelationships<P>>, EP> : never;
|
|
77
|
+
/**
|
|
78
|
+
* Final response type
|
|
79
|
+
*/
|
|
80
|
+
export type MessagesResponse<E extends MessagesEndpoints, P extends AllMessagesParameter, EP extends ExtraParameterType | undefined = undefined> = {
|
|
81
|
+
data: ResponseData<E, P, EP>;
|
|
82
|
+
} & (IncludesRelationships<P> extends true ? {
|
|
83
|
+
included: IncludedResources<P>;
|
|
46
84
|
} : {}) & (E extends "query" ? {
|
|
47
85
|
meta: ApiMeta;
|
|
48
86
|
} : {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/messages.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/messages.ts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AC3B,CAAC,SAAS,oBAAoB,EAC9B,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,GACnF,CAAC,CAAC,SAAS,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1,129 +1,156 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Type definitions for Own Listings in the Sharetribe Marketplace API.
|
|
3
|
-
* These types define the structure for own listing parameters, attributes, and responses.
|
|
4
3
|
*/
|
|
5
|
-
import { ApiMeta, ApiParameter,
|
|
4
|
+
import { ApiMeta, ApiParameter, ExtraParameterType, LatLng, Money, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
|
|
5
|
+
import { AvailabilityPlan } from "./availabilityPlan";
|
|
6
|
+
/**
|
|
7
|
+
* Listing states
|
|
8
|
+
*/
|
|
6
9
|
export type OwnListingState = "draft" | "pendingApproval" | "published" | "closed";
|
|
10
|
+
/**
|
|
11
|
+
* Available endpoints
|
|
12
|
+
*/
|
|
7
13
|
export type OwnListingsEndpoints = "show" | "query" | "create" | "createDraft" | "update" | "publishDraft" | "discardDraft" | "close" | "open" | "addImage";
|
|
14
|
+
/**
|
|
15
|
+
* Relationship fields
|
|
16
|
+
*/
|
|
8
17
|
export type OwnListingsRelationshipsFields = "marketplace" | "author.profileImage" | "author.marketplace" | "author.stripeAccount" | "author.effectivePermissionSet" | "images" | "currentStock";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
seats: number;
|
|
13
|
-
} & T extends "availability-plan/time" ? {
|
|
14
|
-
startTime: string;
|
|
15
|
-
endTime: string;
|
|
16
|
-
} : {};
|
|
17
|
-
export type OwnListingsAvailabilityPlan<T extends OwnListingsAvailabilityPlanTypes = "availability-plan/day"> = {
|
|
18
|
-
type: T;
|
|
19
|
-
timezone?: string;
|
|
20
|
-
entries: Array<OwnListingsAvailabilityPlanEntry<T>>;
|
|
21
|
-
};
|
|
18
|
+
/**
|
|
19
|
+
* Own Listing resource
|
|
20
|
+
*/
|
|
22
21
|
export interface OwnListing {
|
|
23
22
|
id: UUID;
|
|
24
23
|
type: "ownListing";
|
|
25
24
|
attributes: {
|
|
25
|
+
title: string;
|
|
26
26
|
description: string;
|
|
27
|
-
|
|
27
|
+
price: Money;
|
|
28
28
|
geolocation: LatLng;
|
|
29
|
-
createdAt: Date;
|
|
30
29
|
state: OwnListingState;
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
deleted: boolean;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
availabilityPlan: AvailabilityPlan | null;
|
|
33
|
+
publicData: OwnListingPublicData & OwnListingCustomPublicData;
|
|
33
34
|
privateData: OwnListingPrivateData & OwnListingCustomPrivateData;
|
|
34
|
-
publicData: OwnListingOwnListingPublicData & OwnListingCustomPublicData;
|
|
35
35
|
metadata: OwnListingMetadata & OwnListingCustomMetadata;
|
|
36
|
-
price: Money;
|
|
37
36
|
};
|
|
38
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* With relationships
|
|
40
|
+
*/
|
|
39
41
|
export interface OwnListingWithRelationships extends OwnListing {
|
|
40
42
|
relationships: {
|
|
41
43
|
marketplace: Relationship<false, "marketplace">;
|
|
42
|
-
author: Relationship<false, "
|
|
43
|
-
images: Relationship<true, "
|
|
44
|
-
currentStock
|
|
44
|
+
author: Relationship<false, "author">;
|
|
45
|
+
images: Relationship<true, "images">;
|
|
46
|
+
currentStock?: Relationship<false, "currentStock">;
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
|
-
export type
|
|
49
|
+
export type OwnListingResource<R extends boolean> = R extends true ? OwnListingWithRelationships : OwnListing;
|
|
50
|
+
/**
|
|
51
|
+
* Base request parameters
|
|
52
|
+
*/
|
|
48
53
|
export interface OwnListingsParameter extends ApiParameter {
|
|
49
54
|
include?: OwnListingsRelationshipsFields[];
|
|
50
55
|
}
|
|
51
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Endpoint-specific parameters
|
|
58
|
+
*/
|
|
59
|
+
export type OwnListingsShowParameter = OwnListingsParameter & {
|
|
52
60
|
id: UUID | string;
|
|
53
|
-
}
|
|
54
|
-
export
|
|
55
|
-
}
|
|
61
|
+
};
|
|
62
|
+
export type OwnListingsQueryParameter = OwnListingsParameter;
|
|
56
63
|
export interface OwnListingsCreateParameter extends OwnListingsParameter {
|
|
57
64
|
title: string;
|
|
58
65
|
description?: string;
|
|
59
|
-
geolocation?: LatLng;
|
|
60
66
|
price?: Money;
|
|
61
|
-
|
|
67
|
+
geolocation?: LatLng;
|
|
68
|
+
availabilityPlan?: AvailabilityPlan | null;
|
|
69
|
+
publicData?: OwnListingPublicData & OwnListingCustomPublicData;
|
|
62
70
|
privateData?: OwnListingPrivateData & OwnListingCustomPrivateData;
|
|
63
|
-
|
|
64
|
-
metaData?: OwnListingMetadata & OwnListingCustomMetadata;
|
|
71
|
+
metadata?: OwnListingMetadata & OwnListingCustomMetadata;
|
|
65
72
|
images?: string[];
|
|
66
73
|
}
|
|
67
|
-
export
|
|
68
|
-
}
|
|
74
|
+
export type OwnListingsCreateDraftParameter = OwnListingsCreateParameter;
|
|
69
75
|
export interface OwnListingsUpdateParameter extends OwnListingsParameter {
|
|
70
76
|
id: UUID | string;
|
|
71
77
|
title?: string;
|
|
72
78
|
description?: string;
|
|
73
|
-
geolocation?: LatLng;
|
|
74
79
|
price?: Money;
|
|
75
|
-
|
|
80
|
+
geolocation?: LatLng;
|
|
81
|
+
availabilityPlan?: AvailabilityPlan | null;
|
|
82
|
+
publicData?: OwnListingPublicData & OwnListingCustomPublicData;
|
|
76
83
|
privateData?: OwnListingPrivateData & OwnListingCustomPrivateData;
|
|
77
|
-
|
|
78
|
-
metaData?: OwnListingMetadata & OwnListingCustomMetadata;
|
|
84
|
+
metadata?: OwnListingMetadata & OwnListingCustomMetadata;
|
|
79
85
|
images?: string[];
|
|
80
86
|
}
|
|
81
|
-
export
|
|
87
|
+
export type OwnListingsPublishDraftParameter = OwnListingsParameter & {
|
|
82
88
|
id: UUID | string;
|
|
83
|
-
}
|
|
84
|
-
export
|
|
89
|
+
};
|
|
90
|
+
export type OwnListingsDiscardDraftParameter = OwnListingsParameter & {
|
|
85
91
|
id: UUID | string;
|
|
86
|
-
}
|
|
87
|
-
export
|
|
92
|
+
};
|
|
93
|
+
export type OwnListingsCloseParameter = OwnListingsParameter & {
|
|
88
94
|
id: UUID | string;
|
|
89
|
-
}
|
|
90
|
-
export
|
|
95
|
+
};
|
|
96
|
+
export type OwnListingsOpenParameter = OwnListingsParameter & {
|
|
91
97
|
id: UUID | string;
|
|
92
|
-
}
|
|
93
|
-
export
|
|
98
|
+
};
|
|
99
|
+
export type OwnListingsAddImageParameter = OwnListingsParameter & {
|
|
94
100
|
id: UUID | string;
|
|
95
101
|
imageId: UUID | string;
|
|
96
|
-
}
|
|
97
|
-
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Custom data
|
|
105
|
+
*/
|
|
106
|
+
export interface OwnListingPublicData {
|
|
98
107
|
[key: string]: any;
|
|
99
108
|
}
|
|
100
|
-
export interface OwnListingCustomPublicData {
|
|
109
|
+
export interface OwnListingCustomPublicData extends Record<string, unknown> {
|
|
101
110
|
}
|
|
102
111
|
export interface OwnListingPrivateData {
|
|
103
112
|
[key: string]: any;
|
|
104
113
|
}
|
|
105
|
-
export interface OwnListingCustomPrivateData {
|
|
114
|
+
export interface OwnListingCustomPrivateData extends Record<string, unknown> {
|
|
106
115
|
}
|
|
107
116
|
export interface OwnListingMetadata {
|
|
108
117
|
[key: string]: any;
|
|
109
118
|
}
|
|
110
|
-
export interface OwnListingCustomMetadata {
|
|
119
|
+
export interface OwnListingCustomMetadata extends Record<string, unknown> {
|
|
111
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* All parameter types
|
|
123
|
+
*/
|
|
112
124
|
type AllOwnListingsParameter = OwnListingsShowParameter | OwnListingsQueryParameter | OwnListingsCreateParameter | OwnListingsCreateDraftParameter | OwnListingsUpdateParameter | OwnListingsPublishDraftParameter | OwnListingsDiscardDraftParameter | OwnListingsCloseParameter | OwnListingsOpenParameter | OwnListingsAddImageParameter;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Include detection — fixes TS2536
|
|
127
|
+
*/
|
|
128
|
+
type HasInclude<P> = P extends {
|
|
129
|
+
include: infer I extends readonly OwnListingsRelationshipsFields[];
|
|
130
|
+
} ? I : never;
|
|
131
|
+
type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
|
|
132
|
+
type IncludedResources<P> = HasInclude<P> extends infer Fields extends OwnListingsRelationshipsFields[] ? RelationshipTypeMap[Fields[number]][] : never;
|
|
133
|
+
/**
|
|
134
|
+
* Expand behavior
|
|
135
|
+
*/
|
|
136
|
+
type ExpandResult<T, EP extends ExtraParameterType | undefined> = EP extends {
|
|
137
|
+
expand: true;
|
|
138
|
+
} ? T : EP extends {
|
|
139
|
+
expand: false;
|
|
140
|
+
} ? Omit<T, "attributes"> : Omit<T, "attributes">;
|
|
141
|
+
/**
|
|
142
|
+
* Response data per endpoint
|
|
143
|
+
*/
|
|
144
|
+
type ResponseData<E extends OwnListingsEndpoints, P extends AllOwnListingsParameter, EP extends ExtraParameterType | undefined> = E extends "show" | "create" | "createDraft" | "update" | "publishDraft" | "close" | "open" | "addImage" ? ExpandResult<OwnListingResource<IncludesRelationships<P>>, EP> : E extends "query" ? OwnListingResource<IncludesRelationships<P>>[] : E extends "discardDraft" ? Pick<OwnListing, "id" | "type"> : never;
|
|
145
|
+
/**
|
|
146
|
+
* Final response
|
|
147
|
+
*/
|
|
148
|
+
export type OwnListingsResponse<E extends OwnListingsEndpoints, P extends AllOwnListingsParameter, EP extends ExtraParameterType | undefined = undefined> = {
|
|
149
|
+
data: ResponseData<E, P, EP>;
|
|
150
|
+
} & (IncludesRelationships<P> extends true ? {
|
|
151
|
+
included: IncludedResources<P>;
|
|
117
152
|
} : {}) & (E extends "query" ? {
|
|
118
153
|
meta: ApiMeta;
|
|
119
154
|
} : {});
|
|
120
|
-
type DataType<E extends OwnListingsEndpoints, P extends AllOwnListingsParameter, EP extends ExtraParameter | undefined> = E extends "show" ? OwnListingType<OwnListingsType<P>> : E extends "query" ? OwnListingType<OwnListingsType<P>>[] : E extends "create" ? ExpandReturnType<P, EP> : E extends "createDraft" ? ExpandReturnType<P, EP> : E extends "update" ? ExpandReturnType<P, EP> : E extends "publishDraft" ? ExpandReturnType<P, EP> : E extends "discardDraft" ? Pick<OwnListing, "id" | "type"> : E extends "close" ? ExpandReturnType<P, EP> : E extends "open" ? ExpandReturnType<P, EP> : E extends "addImage" ? ExpandReturnType<P, EP> : never;
|
|
121
|
-
type ExpandReturnType<P extends AllOwnListingsParameter, EP> = EP extends {
|
|
122
|
-
expand: true;
|
|
123
|
-
} ? OwnListingType<OwnListingsType<P>> : EP extends {
|
|
124
|
-
expand: false;
|
|
125
|
-
} ? Omit<OwnListingType<OwnListingsType<P>>, "attributes"> : Omit<OwnListingType<OwnListingsType<P>>, "attributes">;
|
|
126
|
-
type OwnListingsType<P extends AllOwnListingsParameter> = "include" extends keyof P ? P["include"] extends OwnListingsRelationshipsFields[] ? true : false : false;
|
|
127
|
-
type IncludedType<P extends AllOwnListingsParameter> = "include" extends keyof P ? P["include"] extends (keyof RelationshipTypeMap)[] ? Array<RelationshipTypeMap[P["include"][number]]> : never : never;
|
|
128
155
|
export {};
|
|
129
156
|
//# sourceMappingURL=ownListings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownListings.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/ownListings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ownListings.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/ownListings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,IAAI,EACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,iBAAiB,GACjB,WAAW,GACX,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,OAAO,GACP,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,cAAc,GACd,cAAc,GACd,OAAO,GACP,MAAM,GACN,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACtC,aAAa,GACb,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,+BAA+B,GAC/B,QAAQ,GACR,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,eAAe,CAAC;QACvB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,IAAI,CAAC;QAChB,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;QAC1C,UAAU,EAAE,oBAAoB,GAAG,0BAA0B,CAAC;QAC9D,WAAW,EAAE,qBAAqB,GAAG,2BAA2B,CAAC;QACjE,QAAQ,EAAE,kBAAkB,GAAG,wBAAwB,CAAC;KACzD,CAAC;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9B,CAAC,SAAS,uBAAuB,EACjC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IAEzC,CAAC,SAAS,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GACnG,YAAY,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAC9D,CAAC,SAAS,OAAO,GACf,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,GAC9C,CAAC,SAAS,cAAc,GACtB,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,CAAC,GAC/B,KAAK,CAAC;AAEhB;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAC7B,CAAC,SAAS,oBAAoB,EAC9B,CAAC,SAAS,uBAAuB,EACjC,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,GACnF,CAAC,CAAC,SAAS,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1,32 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Type definitions for Password Reset
|
|
3
|
-
* This file defines the structure of password reset parameters and responses for the API endpoints.
|
|
2
|
+
* @fileoverview Type definitions for Password Reset operations in the Sharetribe Marketplace API.
|
|
4
3
|
*/
|
|
5
4
|
import { ApiParameter, ExtraParameterType, UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Available endpoints
|
|
7
|
+
*/
|
|
6
8
|
export type PasswordResetEndpoints = "request" | "reset";
|
|
9
|
+
/**
|
|
10
|
+
* Password reset resource (usually empty or minimal)
|
|
11
|
+
*/
|
|
7
12
|
export interface PasswordReset {
|
|
8
13
|
id: UUID;
|
|
9
14
|
type: "passwordReset";
|
|
10
|
-
attributes?:
|
|
15
|
+
attributes?: Record<string, never>;
|
|
11
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Base request parameters
|
|
19
|
+
*/
|
|
12
20
|
export interface PasswordResetParameter extends ApiParameter {
|
|
13
21
|
}
|
|
14
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Request password reset (send email)
|
|
24
|
+
*/
|
|
25
|
+
export interface PasswordResetRequestParameter extends PasswordResetParameter {
|
|
15
26
|
email: string;
|
|
16
27
|
}
|
|
17
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Complete password reset using token
|
|
30
|
+
*/
|
|
31
|
+
export interface PasswordResetResetParameter extends PasswordResetParameter {
|
|
18
32
|
email: string;
|
|
19
33
|
passwordResetToken: string;
|
|
20
34
|
newPassword: string;
|
|
21
35
|
}
|
|
22
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Expand behavior
|
|
38
|
+
*/
|
|
39
|
+
type ExpandResult<EP extends ExtraParameterType | undefined> = EP extends {
|
|
23
40
|
expand: true;
|
|
24
41
|
} ? PasswordReset : EP extends {
|
|
25
42
|
expand: false;
|
|
26
43
|
} ? Omit<PasswordReset, "attributes"> : Omit<PasswordReset, "attributes">;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Response data per endpoint
|
|
46
|
+
*/
|
|
47
|
+
type ResponseData<E extends PasswordResetEndpoints, EP extends ExtraParameterType | undefined> = E extends "request" | "reset" ? ExpandResult<EP> : never;
|
|
48
|
+
/**
|
|
49
|
+
* Final response type
|
|
50
|
+
*/
|
|
51
|
+
export type PasswordResetResponse<E extends PasswordResetEndpoints, EP extends ExtraParameterType | undefined = undefined> = {
|
|
52
|
+
data: ResponseData<E, EP>;
|
|
30
53
|
};
|
|
31
54
|
export {};
|
|
32
55
|
//# sourceMappingURL=passwordReset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passwordReset.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/passwordReset.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"passwordReset.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/passwordReset.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,sBAAsB;IAC3E,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACzD,EAAE,SAAS;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GACvB,aAAa,GACb,EAAE,SAAS;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAC1B,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AAE1C;;GAEG;AACH,KAAK,YAAY,CACf,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,GAAG,SAAS,IACvC,CAAC,SAAS,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,sBAAsB,EAChC,EAAE,SAAS,kBAAkB,GAAG,SAAS,GAAG,SAAS,IACnD;IACF,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CAC3B,CAAC"}
|
|
@@ -1,38 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Type definitions for Process Transitions
|
|
3
|
-
* This file defines the structure of process transition parameters and responses for the API endpoints.
|
|
2
|
+
* @fileoverview Type definitions for Process Transitions in the Sharetribe Marketplace API.
|
|
4
3
|
*/
|
|
5
4
|
import { ApiParameter, UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Available endpoints
|
|
7
|
+
*/
|
|
6
8
|
export type ProcessTransitionsEndpoints = "query";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Actors that can trigger a transition
|
|
11
|
+
*/
|
|
12
|
+
type Actor = "customer" | "provider" | "operator" | "system";
|
|
13
|
+
/**
|
|
14
|
+
* Supported parameter types in transition requests
|
|
15
|
+
*/
|
|
16
|
+
type ParamType = "uuid" | "string" | "integer" | "timestamp" | "boolean" | "object" | "money" | ["lineItem"];
|
|
17
|
+
/**
|
|
18
|
+
* Process Transition resource
|
|
19
|
+
*/
|
|
9
20
|
export interface ProcessTransition {
|
|
10
21
|
id: UUID;
|
|
11
22
|
type: "processTransition";
|
|
12
23
|
attributes: {
|
|
13
24
|
name: string;
|
|
14
|
-
actor:
|
|
25
|
+
actor: Actor[];
|
|
15
26
|
actions: string[];
|
|
16
27
|
params: {
|
|
17
|
-
req:
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
opt: {
|
|
21
|
-
[key: string]: RequestTypes;
|
|
22
|
-
} | null;
|
|
28
|
+
req: Record<string, ParamType>;
|
|
29
|
+
opt: Record<string, ParamType> | null;
|
|
23
30
|
};
|
|
24
31
|
};
|
|
25
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Base request parameters
|
|
35
|
+
*/
|
|
26
36
|
export interface ProcessTransitionsParameter extends ApiParameter {
|
|
27
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Query parameters
|
|
40
|
+
*/
|
|
28
41
|
export interface ProcessTransitionsQueryParameter extends ProcessTransitionsParameter {
|
|
29
42
|
processAlias?: string;
|
|
30
43
|
lastTransition?: string;
|
|
31
44
|
transactionId?: UUID | string;
|
|
32
45
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Response data per endpoint
|
|
48
|
+
*/
|
|
49
|
+
type ResponseData<E extends ProcessTransitionsEndpoints> = E extends "query" ? ProcessTransition[] : never;
|
|
50
|
+
/**
|
|
51
|
+
* Final response type
|
|
52
|
+
*/
|
|
53
|
+
export type ProcessTransitionsResponse<E extends ProcessTransitionsEndpoints = "query"> = {
|
|
54
|
+
data: ResponseData<E>;
|
|
36
55
|
};
|
|
37
56
|
export {};
|
|
38
57
|
//# sourceMappingURL=processTransitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processTransitions.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/processTransitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"processTransitions.d.ts","sourceRoot":"","sources":["../../../../src/types/marketplace/processTransitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAC,YAAY,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,KAAK,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC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