@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for Time Slots in the Sharetribe Marketplace API.
|
|
3
|
+
*/
|
|
4
|
+
import { ApiMeta, ApiParameter, UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Supported time slot types
|
|
7
|
+
*/
|
|
8
|
+
export type TimeSlotType = "time-slot/day" | "time-slot/time";
|
|
9
|
+
/**
|
|
10
|
+
* Available endpoints
|
|
11
|
+
*/
|
|
12
|
+
export type TimeSlotsEndpoints = "query";
|
|
13
|
+
/**
|
|
14
|
+
* Time slot resource
|
|
15
|
+
*/
|
|
16
|
+
export interface TimeSlot {
|
|
17
|
+
id: UUID;
|
|
18
|
+
type: "timeSlot";
|
|
19
|
+
attributes: {
|
|
20
|
+
type: TimeSlotType;
|
|
21
|
+
seats: number;
|
|
22
|
+
start: Date;
|
|
23
|
+
end: Date;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Base request parameters
|
|
28
|
+
*/
|
|
29
|
+
export interface TimeSlotsParameter extends ApiParameter {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Query parameters for fetching availability
|
|
33
|
+
*/
|
|
34
|
+
export interface TimeSlotsQueryParameter extends TimeSlotsParameter {
|
|
35
|
+
listingId: UUID | string;
|
|
36
|
+
start: Date | string;
|
|
37
|
+
end: Date | string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Response data per endpoint
|
|
41
|
+
*/
|
|
42
|
+
type TimeSlotsResponseData<E extends TimeSlotsEndpoints> = E extends "query" ? TimeSlot[] : never;
|
|
43
|
+
/**
|
|
44
|
+
* Final API response type
|
|
45
|
+
*/
|
|
46
|
+
export type TimeSlotsResponse<E extends TimeSlotsEndpoints = "query"> = {
|
|
47
|
+
data: TimeSlotsResponseData<E>;
|
|
48
|
+
} & (E extends "query" ? {
|
|
49
|
+
meta: ApiMeta;
|
|
50
|
+
} : {});
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for Transactions in the Sharetribe Marketplace API.
|
|
3
|
+
*/
|
|
4
|
+
import { ApiMeta, ApiParameter, ExtraParameter, ExtraParameterType, Money, QueryMeta, QueryProt, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
|
|
5
|
+
import { BookingState } from "./bookings";
|
|
6
|
+
/**
|
|
7
|
+
* Available endpoints
|
|
8
|
+
*/
|
|
9
|
+
export type TransactionsEndpoints = "show" | "query" | "initiate" | "initiateSpeculative" | "transition" | "transitionSpeculative" | "updateMetadata";
|
|
10
|
+
/**
|
|
11
|
+
* Relationship fields that can be included
|
|
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 in a transaction
|
|
16
|
+
*/
|
|
17
|
+
export type TransactionParty = "customer" | "provider";
|
|
18
|
+
/**
|
|
19
|
+
* Transaction variety
|
|
20
|
+
*/
|
|
21
|
+
export type TransactionVariety = "sale" | "order";
|
|
22
|
+
/**
|
|
23
|
+
* Line item in 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: TransactionParty[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Process transition record
|
|
38
|
+
*/
|
|
39
|
+
export interface Transition {
|
|
40
|
+
transition: string;
|
|
41
|
+
createdAt: Date | string;
|
|
42
|
+
by: TransactionParty;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Core transaction attributes (always present)
|
|
46
|
+
*/
|
|
47
|
+
export interface TransactionAttributes {
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
processName: string;
|
|
50
|
+
processVersion: number;
|
|
51
|
+
lastTransition: string;
|
|
52
|
+
lastTransitionedAt: string | Date;
|
|
53
|
+
payinTotal: Money;
|
|
54
|
+
payoutTotal: Money;
|
|
55
|
+
lineItems: LineItem[];
|
|
56
|
+
protectedData: TransactionProtectedData & TransactionCustomProtectedData;
|
|
57
|
+
metadata: TransactionMetadata & TransactionCustomMetadata;
|
|
58
|
+
transitions: Transition[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Base transaction type
|
|
62
|
+
*/
|
|
63
|
+
export interface Transaction {
|
|
64
|
+
id: UUID;
|
|
65
|
+
type: "transaction";
|
|
66
|
+
attributes: TransactionAttributes;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Transaction with relationships
|
|
70
|
+
*/
|
|
71
|
+
export interface TransactionWithRelationships extends Transaction {
|
|
72
|
+
relationships: {
|
|
73
|
+
marketplace: Relationship<false, "marketplace">;
|
|
74
|
+
listing: Relationship<false, "listing">;
|
|
75
|
+
provider: Relationship<false, "provider">;
|
|
76
|
+
customer: Relationship<false, "customer">;
|
|
77
|
+
booking: Relationship<false, "booking">;
|
|
78
|
+
stockReservation: Relationship<false, "stockReservation">;
|
|
79
|
+
reviews: Relationship<true, "reviews">;
|
|
80
|
+
messages: Relationship<true, "messages">;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Select type based on include
|
|
85
|
+
*/
|
|
86
|
+
export type TransactionType<R extends boolean> = R extends true ? TransactionWithRelationships : Transaction;
|
|
87
|
+
/**
|
|
88
|
+
* Base API parameter
|
|
89
|
+
*/
|
|
90
|
+
export interface TransactionsParameter extends ApiParameter {
|
|
91
|
+
include?: TransactionsRelationshipsFields[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Show endpoint
|
|
95
|
+
*/
|
|
96
|
+
export interface TransactionsShowParameter extends TransactionsParameter {
|
|
97
|
+
id: UUID | string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Query endpoint (with optional privileged fields when I = true)
|
|
101
|
+
*/
|
|
102
|
+
export type TransactionsQueryParameter<I extends boolean = false> = TransactionsParameter & {
|
|
103
|
+
bookingEnd?: string;
|
|
104
|
+
bookingStart?: string;
|
|
105
|
+
bookingStates?: BookingState[];
|
|
106
|
+
createdAtEnd?: string;
|
|
107
|
+
createdAtStart?: string;
|
|
108
|
+
hasBooking?: boolean;
|
|
109
|
+
hasMessage?: boolean;
|
|
110
|
+
hasPayin?: boolean;
|
|
111
|
+
hasStockReservation?: boolean;
|
|
112
|
+
lastTransitionedAtStart?: string;
|
|
113
|
+
lastTransitions?: string[];
|
|
114
|
+
listingId?: UUID | string;
|
|
115
|
+
only?: TransactionVariety;
|
|
116
|
+
processName?: string;
|
|
117
|
+
stockReservationStates?: string[];
|
|
118
|
+
userId?: UUID | string;
|
|
119
|
+
sort?: "bookingEnd" | "bookingStart" | "createdAt" | "lastMessageAt" | "lastTransitionedAt" | `meta_${string}` | `prot_${string}`;
|
|
120
|
+
[keyof: QueryMeta]: string | undefined;
|
|
121
|
+
[keyof: QueryProt]: string | undefined;
|
|
122
|
+
} & (I extends true ? {
|
|
123
|
+
customerId?: UUID | string;
|
|
124
|
+
providerId?: UUID | string;
|
|
125
|
+
} : {});
|
|
126
|
+
/**
|
|
127
|
+
* Initiate / Speculative initiate
|
|
128
|
+
*/
|
|
129
|
+
export interface TransactionsInitiateParameter extends TransactionsParameter {
|
|
130
|
+
processAlias: string;
|
|
131
|
+
transition: string;
|
|
132
|
+
params?: unknown;
|
|
133
|
+
}
|
|
134
|
+
export interface TransactionsInitiateSpeculativeParameter extends TransactionsInitiateParameter {
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Transition / Speculative transition
|
|
138
|
+
*/
|
|
139
|
+
export interface TransactionsTransitionParameter extends TransactionsParameter {
|
|
140
|
+
id: UUID | string;
|
|
141
|
+
transition: string;
|
|
142
|
+
params?: unknown;
|
|
143
|
+
}
|
|
144
|
+
export interface TransactionsTransitionSpeculativeParameter extends TransactionsTransitionParameter {
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Update metadata
|
|
148
|
+
*/
|
|
149
|
+
export interface TransactionsUpdateMetadataParameter extends TransactionsParameter {
|
|
150
|
+
id: UUID | string;
|
|
151
|
+
metadata?: TransactionMetadata & TransactionCustomMetadata;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Custom data structures
|
|
155
|
+
*/
|
|
156
|
+
export interface TransactionProtectedData {
|
|
157
|
+
[key: string]: any;
|
|
158
|
+
}
|
|
159
|
+
export interface TransactionCustomProtectedData extends Record<string, unknown> {
|
|
160
|
+
}
|
|
161
|
+
export interface TransactionMetadata {
|
|
162
|
+
[key: string]: any;
|
|
163
|
+
}
|
|
164
|
+
export interface TransactionCustomMetadata extends Record<string, unknown> {
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Helpers
|
|
168
|
+
*/
|
|
169
|
+
type HasInclude<P> = P extends {
|
|
170
|
+
include: infer I extends TransactionsRelationshipsFields[];
|
|
171
|
+
} ? I : never;
|
|
172
|
+
type IncludesRelationships<P> = HasInclude<P> extends never ? false : true;
|
|
173
|
+
type IncludedResources<P> = HasInclude<P> extends infer Fields extends TransactionsRelationshipsFields[] ? RelationshipTypeMap[Fields[number]][] : never;
|
|
174
|
+
/**
|
|
175
|
+
* Expand behavior (for transition responses)
|
|
176
|
+
*/
|
|
177
|
+
type ExpandResult<T, EP extends ExtraParameter | undefined> = EP extends {
|
|
178
|
+
expand: true;
|
|
179
|
+
} ? T : EP extends {
|
|
180
|
+
expand: false;
|
|
181
|
+
} ? Omit<T, "attributes"> : Omit<T, "attributes">;
|
|
182
|
+
/**
|
|
183
|
+
* Union of all parameter types
|
|
184
|
+
*/
|
|
185
|
+
type AllTransactionsParameter = TransactionsShowParameter | TransactionsQueryParameter<any> | TransactionsInitiateParameter | TransactionsInitiateSpeculativeParameter | TransactionsTransitionParameter | TransactionsTransitionSpeculativeParameter | TransactionsUpdateMetadataParameter;
|
|
186
|
+
/**
|
|
187
|
+
* Final response data type
|
|
188
|
+
*/
|
|
189
|
+
type TransactionsResponseData<E extends TransactionsEndpoints, P extends AllTransactionsParameter, EP extends ExtraParameter | undefined> = E extends "show" ? TransactionType<IncludesRelationships<P>> : E extends "query" ? TransactionType<IncludesRelationships<P>>[] : E extends "initiate" | "initiateSpeculative" | "transition" | "transitionSpeculative" | "updateMetadata" ? ExpandResult<TransactionType<IncludesRelationships<P>>, EP> : never;
|
|
190
|
+
/**
|
|
191
|
+
* Final response type
|
|
192
|
+
*/
|
|
193
|
+
export type TransactionsResponse<E extends TransactionsEndpoints, P extends AllTransactionsParameter, EP extends ExtraParameterType = undefined> = {
|
|
194
|
+
data: TransactionsResponseData<E, P, EP>;
|
|
195
|
+
} & (IncludesRelationships<P> extends true ? {
|
|
196
|
+
included: IncludedResources<P>;
|
|
197
|
+
} : {}) & (E extends "query" ? {
|
|
198
|
+
meta: ApiMeta;
|
|
199
|
+
} : {});
|
|
200
|
+
export {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for Users in the Sharetribe Marketplace API.
|
|
3
|
+
*/
|
|
4
|
+
import { ApiMeta, ApiParameter, ExtraParameter, ExtraParameterType, QueryMeta, QueryPriv, QueryProt, QueryPub, Relationship, RelationshipTypeMap, UUID } from "../sharetribe";
|
|
5
|
+
/**
|
|
6
|
+
* Available endpoints for the Users API.
|
|
7
|
+
*/
|
|
8
|
+
export type UsersEndpoints = "show" | "query" | "updateProfile" | "approve" | "updatePermissions";
|
|
9
|
+
/**
|
|
10
|
+
* Fields available for relationships in users.
|
|
11
|
+
*/
|
|
12
|
+
export type UsersRelationshipsFields = "marketplace" | "profileImage" | "stripeAccount" | "effectivePermissionSet";
|
|
13
|
+
/**
|
|
14
|
+
* Possible states for a user.
|
|
15
|
+
*/
|
|
16
|
+
export type UserState = "active" | "banned" | "pendingApproval";
|
|
17
|
+
/**
|
|
18
|
+
* Permission levels.
|
|
19
|
+
*/
|
|
20
|
+
export type Permissions = "permission/allow" | "permission/deny";
|
|
21
|
+
/**
|
|
22
|
+
* Core user attributes (always present)
|
|
23
|
+
*/
|
|
24
|
+
interface BaseUserAttributes {
|
|
25
|
+
banned: boolean;
|
|
26
|
+
deleted: boolean;
|
|
27
|
+
createdAt: Date;
|
|
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 {
|
|
40
|
+
state: UserState;
|
|
41
|
+
email: string;
|
|
42
|
+
emailVerified: boolean;
|
|
43
|
+
pendingEmail: string | null;
|
|
44
|
+
stripeConnected: boolean;
|
|
45
|
+
identityProviders: {
|
|
46
|
+
idpId: string;
|
|
47
|
+
userId: string;
|
|
48
|
+
}[];
|
|
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
|
+
};
|
|
59
|
+
};
|
|
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
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* User with relationships
|
|
71
|
+
*/
|
|
72
|
+
export interface UserWithRelationships<I extends boolean = false> extends User<I> {
|
|
73
|
+
relationships: {
|
|
74
|
+
marketplace: Relationship<false, "marketplace">;
|
|
75
|
+
profileImage: Relationship<false, "profileImage">;
|
|
76
|
+
stripeAccount: Relationship<false, "stripeAccount">;
|
|
77
|
+
effectivePermissionSet: Relationship<false, "effectivePermissionSet">;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Select user type based on whether relationships are included
|
|
82
|
+
*/
|
|
83
|
+
export type UserType<R extends boolean, I extends boolean = false> = R extends true ? UserWithRelationships<I> : User<I>;
|
|
84
|
+
/**
|
|
85
|
+
* Base parameter shared across user endpoints
|
|
86
|
+
*/
|
|
87
|
+
export interface UsersParameter extends ApiParameter {
|
|
88
|
+
include?: UsersRelationshipsFields[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Show endpoint parameters
|
|
92
|
+
*/
|
|
93
|
+
export type UsersShowParameter<I extends boolean = false> = UsersParameter & (I extends true ? {
|
|
94
|
+
id?: UUID | string;
|
|
95
|
+
email?: string;
|
|
96
|
+
} : {
|
|
97
|
+
id: UUID | string;
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* Query endpoint parameters
|
|
101
|
+
*/
|
|
102
|
+
export interface UsersQueryParameter extends UsersParameter {
|
|
103
|
+
createdAtStart?: Date | string;
|
|
104
|
+
createdAtEnd?: Date | string;
|
|
105
|
+
sort?: string;
|
|
106
|
+
[keyof: QueryPub]: string | undefined;
|
|
107
|
+
[keyof: QueryMeta]: string | undefined;
|
|
108
|
+
[keyof: QueryPriv]: string | undefined;
|
|
109
|
+
[keyof: QueryProt]: string | undefined;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Update profile parameters
|
|
113
|
+
*/
|
|
114
|
+
export interface UsersUpdateProfileParameter extends UsersParameter {
|
|
115
|
+
id: UUID | string;
|
|
116
|
+
firstName?: string;
|
|
117
|
+
lastName?: string;
|
|
118
|
+
displayName?: string;
|
|
119
|
+
bio?: string | null;
|
|
120
|
+
publicData?: UserProfilePublicData & UserCustomProfilePublicData;
|
|
121
|
+
protectedData?: UserProfileProtectedData & UserCustomProfileProtectedData;
|
|
122
|
+
privateData?: UserProfilePrivateData & UserCustomProfilePrivateData;
|
|
123
|
+
metadata?: UserProfileMetadata & UserCustomProfileMetadata;
|
|
124
|
+
profileImageId?: UUID | string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Approve & permissions parameters
|
|
128
|
+
*/
|
|
129
|
+
export interface UsersApproveParameter extends UsersParameter {
|
|
130
|
+
id: UUID | string;
|
|
131
|
+
}
|
|
132
|
+
export interface UsersUpdatePermissionsParameter extends UsersParameter {
|
|
133
|
+
id: UUID | string;
|
|
134
|
+
postListings?: Permissions;
|
|
135
|
+
initiateTransactions?: Permissions;
|
|
136
|
+
read?: Permissions;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Custom profile data types (extensible but typed)
|
|
140
|
+
*/
|
|
141
|
+
export interface UserProfilePublicData {
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}
|
|
144
|
+
export interface UserCustomProfilePublicData extends Record<string, unknown> {
|
|
145
|
+
}
|
|
146
|
+
export interface UserProfileProtectedData {
|
|
147
|
+
[key: string]: any;
|
|
148
|
+
}
|
|
149
|
+
export interface UserCustomProfileProtectedData extends Record<string, unknown> {
|
|
150
|
+
}
|
|
151
|
+
export interface UserProfilePrivateData {
|
|
152
|
+
[key: string]: any;
|
|
153
|
+
}
|
|
154
|
+
export interface UserCustomProfilePrivateData extends Record<string, unknown> {
|
|
155
|
+
}
|
|
156
|
+
export interface UserProfileMetadata {
|
|
157
|
+
[key: string]: any;
|
|
158
|
+
}
|
|
159
|
+
export interface UserCustomProfileMetadata extends Record<string, unknown> {
|
|
160
|
+
}
|
|
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 {
|
|
178
|
+
expand: true;
|
|
179
|
+
} ? T : EP extends {
|
|
180
|
+
expand: false;
|
|
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;
|
|
186
|
+
/**
|
|
187
|
+
* Union of all valid parameter types
|
|
188
|
+
*/
|
|
189
|
+
type AllUsersParameter = UsersShowParameter<any> | UsersQueryParameter | UsersUpdateProfileParameter | UsersApproveParameter | UsersUpdatePermissionsParameter;
|
|
190
|
+
/**
|
|
191
|
+
* Final response type
|
|
192
|
+
*/
|
|
193
|
+
export type UsersResponse<E extends UsersEndpoints, P extends AllUsersParameter, EP extends ExtraParameterType = undefined, I extends boolean = false> = {
|
|
194
|
+
data: UsersResponseData<E, P, EP, I>;
|
|
195
|
+
} & (IncludesRelationships<P> extends true ? {
|
|
196
|
+
included: IncludedResources<P, I>;
|
|
197
|
+
} : {}) & (E extends "query" ? {
|
|
198
|
+
meta: ApiMeta;
|
|
199
|
+
} : {});
|
|
200
|
+
export {};
|
package/dist/types/sdk.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SdkConfig } from "./types
|
|
2
|
-
import { ApiConfigs } from "./types/apiConfigs";
|
|
1
|
+
import { ApiConfigs, SdkConfig } from "./types";
|
|
3
2
|
import { AxiosInstance, AxiosResponse } from "axios";
|
|
4
3
|
import AuthenticationApi from "./endpoints/auth";
|
|
5
4
|
import MarketplaceApi from "./endpoints/marketplace";
|
|
@@ -24,7 +23,7 @@ import StripeSetupIntents from "./endpoints/marketplace/StripeSetupIntents";
|
|
|
24
23
|
import TimeSlots from "./endpoints/marketplace/TimeSlots";
|
|
25
24
|
import Transactions from "./endpoints/marketplace/Transactions";
|
|
26
25
|
import Users from "./endpoints/marketplace/Users";
|
|
27
|
-
import { AuthInfoResponse, LoginParameter,
|
|
26
|
+
import { AuthInfoResponse, LoginParameter, LoginWithIdpParameter, RevokeResponse, TokenResponse, TrustedUserTokenRequest, UserTokenRequest, UserTokenRequestWithAuthCode } from "./types";
|
|
28
27
|
import AssetsApi from "./endpoints/assets";
|
|
29
28
|
declare class SharetribeSdk {
|
|
30
29
|
/**
|
|
@@ -170,7 +169,7 @@ declare class SharetribeSdk {
|
|
|
170
169
|
* @param {LoginParameter} params - The login parameters.
|
|
171
170
|
* @returns {Promise<AuthToken>} - The authentication token.
|
|
172
171
|
*/
|
|
173
|
-
login
|
|
172
|
+
login(params: LoginParameter<'user'>): Promise<AxiosResponse<TokenResponse<UserTokenRequest>>>;
|
|
174
173
|
/**
|
|
175
174
|
* Logs in the marketplace operator as the marketplace user and returns a Promise
|
|
176
175
|
*
|
|
@@ -178,7 +177,7 @@ declare class SharetribeSdk {
|
|
|
178
177
|
* @param {LoginParameter} params - The login parameters.
|
|
179
178
|
* @returns {Promise<AuthToken>} - The authentication token.
|
|
180
179
|
*/
|
|
181
|
-
loginAs(params: LoginParameter<
|
|
180
|
+
loginAs(params: LoginParameter<'auth_code'>): Promise<AxiosResponse<TokenResponse<UserTokenRequestWithAuthCode>>>;
|
|
182
181
|
/**
|
|
183
182
|
* Logs in a user using an identity provider (IDP).
|
|
184
183
|
*
|
|
@@ -186,7 +185,7 @@ declare class SharetribeSdk {
|
|
|
186
185
|
* @param {LoginWithIdpParameter} params - The IDP login parameters.
|
|
187
186
|
* @returns {Promise<AuthToken>} - The authentication token.
|
|
188
187
|
*/
|
|
189
|
-
loginWithIdp(params: LoginWithIdpParameter): Promise<AxiosResponse<TokenResponse<
|
|
188
|
+
loginWithIdp(params: LoginWithIdpParameter): Promise<AxiosResponse<TokenResponse<UserTokenRequest>>>;
|
|
190
189
|
/**
|
|
191
190
|
* Logs out the current user.
|
|
192
191
|
*
|
|
@@ -200,7 +199,7 @@ declare class SharetribeSdk {
|
|
|
200
199
|
* @async
|
|
201
200
|
* @returns {Promise<AuthToken>} - The exchanged token.
|
|
202
201
|
*/
|
|
203
|
-
exchangeToken(): Promise<AxiosResponse<TokenResponse<
|
|
202
|
+
exchangeToken(): Promise<AxiosResponse<TokenResponse<TrustedUserTokenRequest>>>;
|
|
204
203
|
/**
|
|
205
204
|
* Retrieves authentication info for the current user.
|
|
206
205
|
*
|
package/dist/types/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The BigDecimal class ensures that large decimal numbers are stored as strings
|
|
5
5
|
* to avoid precision loss during computations.
|
|
6
6
|
*/
|
|
7
|
-
import { SdkType } from "../types
|
|
7
|
+
import { SdkType } from "../types";
|
|
8
8
|
declare const BIGDECIMAL_SDK_TYPE = "BigDecimal";
|
|
9
9
|
declare class BigDecimal implements SdkType {
|
|
10
10
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigDecimal.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/BigDecimal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"BigDecimal.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/BigDecimal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,mBAAmB,eAAe,CAAC;AAEzC,cAAM,UAAW,YAAW,OAAO;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,QAAQ,EAAE,OAAO,mBAAmB,CAAC;IAE9C;;;;;;OAMG;gBACS,KAAK,EAAE,GAAG;IAYtB;;;;;;;OAOG;IACH,QAAQ,IAAI,MAAM;CAGnB;AAGD,eAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Provides the LatLng class for representing geographical coordinates.
|
|
3
3
|
* This class encapsulates a latitude and longitude pair, with validation for numeric input.
|
|
4
4
|
*/
|
|
5
|
-
import { SdkType } from "../types
|
|
5
|
+
import { SdkType } from "../types";
|
|
6
6
|
declare const LATLNG_SDK_TYPE = "LatLng";
|
|
7
7
|
/**
|
|
8
8
|
* Class representing a geographical coordinate pair (latitude and longitude).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LatLng.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/LatLng.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LatLng.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/LatLng.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,eAAe,WAAW,CAAC;AAEjC;;GAEG;AACH,cAAM,MAAO,YAAW,OAAO;IAC7B,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,OAAO,eAAe,CAAC;IAE1C;;;;;;;;OAQG;gBACS,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IA4BtD;;;;;;;OAOG;IACH,QAAQ,IAAI,MAAM;CAGnB;AAGD,eAAe,MAAM,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* This class encapsulates a northeast (NE) and southwest (SW) pair of coordinates to define a rectangular area.
|
|
4
4
|
*/
|
|
5
5
|
import LatLng from "./LatLng";
|
|
6
|
-
import { SdkType } from "../types
|
|
6
|
+
import { SdkType } from "../types";
|
|
7
7
|
declare const LATLNGBOUNDS_SDK_TYPE = "LatLngBounds";
|
|
8
8
|
/**
|
|
9
9
|
* Class representing a geographical bounding box with NE and SW coordinates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LatLngBounds.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/LatLngBounds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"LatLngBounds.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/LatLngBounds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAEjC,QAAA,MAAM,qBAAqB,iBAAiB,CAAC;AAE7C;;GAEG;AACH,cAAM,YAAa,YAAW,OAAO;IACnC,EAAE,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC5D,EAAE,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC5D,QAAQ,CAAC,QAAQ,EAAE,OAAO,qBAAqB,CAAC;IAEhD;;;;;;;;;;OAUG;gBAED,EAAE,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EACzC,EAAE,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;IAmD3C;;;;;;;;;OASG;IACH,QAAQ,IAAI,MAAM;CAGnB;AAGD,eAAe,YAAY,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Provides the Money class for handling monetary values.
|
|
3
3
|
* This class ensures proper structure and validation of monetary values with an amount and a currency.
|
|
4
4
|
*/
|
|
5
|
-
import { SdkType } from "../types
|
|
5
|
+
import { SdkType } from "../types";
|
|
6
6
|
declare const MONEY_SDK_TYPE = "Money";
|
|
7
7
|
/**
|
|
8
8
|
* Class representing a monetary value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Money.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/Money.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Money.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/Money.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAEjC,QAAA,MAAM,cAAc,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,cAAM,KAAM,YAAW,OAAO;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC;IAEzC;;;;;;;;OAQG;gBACS,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAwB7C;AAGD,eAAe,KAAK,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Provides the UUID class for handling universally unique identifiers (UUIDs).
|
|
3
3
|
* This class allows for the creation and validation of UUIDs, using the `uuid` library.
|
|
4
4
|
*/
|
|
5
|
-
import { SdkType } from "../types
|
|
5
|
+
import { SdkType } from "../types";
|
|
6
6
|
declare const UUID_SDK_TYPE = "UUID";
|
|
7
7
|
/**
|
|
8
8
|
* Class representing a UUID (Universally Unique Identifier).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UUID.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/UUID.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"UUID.d.ts","sourceRoot":"","sources":["../../../src/sdkTypes/UUID.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,aAAa,SAAS,CAAC;AAE7B;;;;GAIG;AACH,cAAM,IAAK,YAAW,OAAO;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,QAAQ,EAAE,OAAO,aAAa,CAAC;IAExC;;;;;;;;;;OAUG;gBACS,IAAI,CAAC,EAAE,MAAM;IAazB;;;;;;;OAOG;IACH,QAAQ,IAAI,MAAM;CAGnB;AAGD,eAAe,IAAI,CAAC;AAGpB,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC"}
|