@vansite/ts-sharetribe-flex-sdk 1.0.34 → 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} +13 -5
- 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/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/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 +16 -14
- 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":"sharetribe.d.ts","sourceRoot":"","sources":["../../../src/types/sharetribe.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"sharetribe.d.ts","sourceRoot":"","sources":["../../../src/types/sharetribe.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,IAAI,EAAC,MAAM,o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S,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;IAErC,0CAA0C;IAC1C,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IAEpC,qBAAqB;IACrB,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;IAE3C,2BAA2B;IAC3B,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IAElC,sBAAsB;IACtB,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAEnC,kCAAkC;IAClC,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAEnC,sCAAsC;IACtC,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { AuthToken } from "./authentication";
|
|
2
|
-
/**
|
|
3
|
-
* Represents the possible scopes for authentication tokens.
|
|
4
|
-
*/
|
|
5
|
-
type Scope = "public-read" | "trusted:user" | "user" | "integ";
|
|
6
2
|
/**
|
|
7
3
|
* Interface for managing authentication tokens in a store.
|
|
8
4
|
*/
|
|
@@ -13,22 +9,15 @@ export interface TokenStore {
|
|
|
13
9
|
* Retrieves the current authentication token.
|
|
14
10
|
* @returns A promise resolving to the current token or null if no token exists.
|
|
15
11
|
*/
|
|
16
|
-
getToken: () => AuthToken | null;
|
|
12
|
+
getToken: (() => AuthToken | null) | (() => Promise<AuthToken | null>);
|
|
17
13
|
/**
|
|
18
14
|
* Sets a new authentication token.
|
|
19
15
|
* @param args - Object containing the token's details.
|
|
20
16
|
*/
|
|
21
|
-
setToken: (args:
|
|
22
|
-
access_token: string;
|
|
23
|
-
token_type: "bearer";
|
|
24
|
-
expires_in: number;
|
|
25
|
-
scope?: Scope;
|
|
26
|
-
refresh_token?: string;
|
|
27
|
-
}) => void;
|
|
17
|
+
setToken: ((args: AuthToken) => void) | ((args: AuthToken) => Promise<void>);
|
|
28
18
|
/**
|
|
29
19
|
* Removes the current authentication token.
|
|
30
20
|
*/
|
|
31
|
-
removeToken: () => void;
|
|
21
|
+
removeToken: (() => void) | (() => Promise<void>);
|
|
32
22
|
}
|
|
33
|
-
export {};
|
|
34
23
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAO3C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvE;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7E;;OAEG;IACH,WAAW,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../../src/utils/apis.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../../src/utils/apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,OAAO,GAAG,KAAK,EACzD,mBAAkB,CAAc,KAC/B,UAAU,CAAC,CAAC,CA0Cd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AACrC,OAAO,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,MAAM,CAAC;AACxC,OAAO,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,OAAO,CAAC;AAE1C,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B,CAAC;AAoBF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBAO9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,+BAUzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-axios-instance.d.ts","sourceRoot":"","sources":["../../../src/utils/prepare-axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"prepare-axios-instance.d.ts","sourceRoot":"","sources":["../../../src/utils/prepare-axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAOjG,OAAO,aAAa,MAAM,QAAQ,CAAC;AAEnC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAK/C,eAAO,MAAM,gBAAgB,UAO5B,CAAC;AAiBF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,YAA2B,CAAC;AAC9E,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,YAAgC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,GAAI,OAAO,UAAU,wBAC0D,CAAA;AAEnH,eAAO,MAAM,qBAAqB,GAChC,eAAe,0BAA0B,EACzC,KAAK,aAAa,GAAG,cAAc,wBAepC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,MAAM,GAAG,WACT,CAAC;AAG5C,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,IAC3C,UAAU,aAAa,KAAG,aAAa,CAwBpE;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,KAAK,EAAE,UAAU,GAAG,GAAG,wCA2FxB;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,aAAa,EAAE,0BAA0B,GACxC,OAAO,CAAC,0BAA0B,CAAC,CAiHrC;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,MAAM,EAAE,kBAAkB,2BAY3B;AAGD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,QAqBvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/BrowserStore.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"BrowserStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/BrowserStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,UAAU,EAAE,MAAM,CAAM;IACxB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C;;;OAGG;gBACS,EAAC,QAAQ,EAAE,MAAM,EAAC,EAAE,mBAAmB;IAKnD;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAK5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAQhC;;OAEG;IACH,WAAW,IAAI,IAAI;CAGpB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Request, Response } from "express";
|
|
2
|
-
import { TokenStore } from "../../types
|
|
3
|
-
import { AuthToken } from "../../types/authentication";
|
|
2
|
+
import { AuthToken, TokenStore } from "../../types";
|
|
4
3
|
/**
|
|
5
4
|
* Configuration options for the `ExpressStore`.
|
|
6
5
|
*/
|
|
@@ -26,11 +25,6 @@ declare class ExpressStore implements TokenStore {
|
|
|
26
25
|
* @param options - Configuration options for the store.
|
|
27
26
|
*/
|
|
28
27
|
constructor({ clientId, req, res, secure }: ExpressStoreOptions);
|
|
29
|
-
/**
|
|
30
|
-
* Reads the authentication token from the request cookies.
|
|
31
|
-
* @returns The `AuthToken` if present in cookies, otherwise null.
|
|
32
|
-
*/
|
|
33
|
-
private readCookie;
|
|
34
28
|
/**
|
|
35
29
|
* Retrieves the authentication token, either from cache or from the request cookies.
|
|
36
30
|
* @returns A promise that resolves to the `AuthToken` or null if no token exists.
|
|
@@ -45,6 +39,11 @@ declare class ExpressStore implements TokenStore {
|
|
|
45
39
|
* Removes the authentication token from the response cookies.
|
|
46
40
|
*/
|
|
47
41
|
removeToken(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Reads the authentication token from the request cookies.
|
|
44
|
+
* @returns The `AuthToken` if present in cookies, otherwise null.
|
|
45
|
+
*/
|
|
46
|
+
private readCookie;
|
|
48
47
|
}
|
|
49
48
|
export default ExpressStore;
|
|
50
49
|
//# sourceMappingURL=ExpressStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/ExpressStore.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ExpressStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/ExpressStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,UAAU,EAAE,MAAM,CAAO;IACzB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,GAAG,CAAU;IACrB,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,YAAY,CAA0B;IAE9C;;;OAGG;gBACS,EAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAC,EAAE,mBAAmB;IAY7D;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAK5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAShC;;OAEG;IACH,WAAW,IAAI,IAAI;IAKnB;;;OAGG;IACH,OAAO,CAAC,UAAU;CAInB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TokenStore } from "../../types
|
|
2
|
-
import { AuthToken } from "../../types/authentication";
|
|
1
|
+
import { AuthToken, TokenStore } from "../../types";
|
|
3
2
|
/**
|
|
4
3
|
* `MemoryStore` is an in-memory implementation of the `TokenStore` interface.
|
|
5
4
|
* It is suitable for short-lived or testing purposes, where tokens do not need to persist beyond the application's lifecycle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/MemoryStore.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MemoryStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/MemoryStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;;GAGG;AACH,cAAM,WAAY,YAAW,UAAU;IACrC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAQ;IAE/B;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAI5B;;OAEG;IACH,WAAW,IAAI,IAAI;IAInB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;CAGjC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transit.d.ts","sourceRoot":"","sources":["../../../src/utils/transit.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"transit.d.ts","sourceRoot":"","sources":["../../../src/utils/transit.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAIrC,KAAK,YAAY,GAAG,GAAG,CAAC;AAqBxB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,KAAK,OAAO,CAAC;IAC3D,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAuHD,eAAO,MAAM,MAAM,GAAI,iBAAgB,aAAa,EAAO,uCAyB1D,CAAC;AAiBF,eAAO,MAAM,MAAM,GACjB,iBAAgB,aAAa,EAAO,EACpC,OAAM,cAAmB,uCAuC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAc,WAAW,EAAO,EAChC,OAAM,cAAmB;;;CA8B1B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,EAAE,OAAM,cAAmB,QAI1D,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,MAAM,GAAG,EAAE,OAAM,cAAmB,WAIzD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SharetribeApiError } from "../types";
|
|
2
2
|
import { AxiosError } from "axios";
|
|
3
3
|
type ObjectQueryStringParam = Record<string, any>;
|
|
4
4
|
/**
|
|
@@ -11,6 +11,6 @@ type ObjectQueryStringParam = Record<string, any>;
|
|
|
11
11
|
* @returns {string} A semicolon-separated query string.
|
|
12
12
|
*/
|
|
13
13
|
export declare const objectQueryString: (obj: ObjectQueryStringParam) => string;
|
|
14
|
-
export declare const createSharetribeApiError: (error: AxiosError) =>
|
|
14
|
+
export declare const createSharetribeApiError: (error: AxiosError) => SharetribeApiError;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/utils/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/utils/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AAEjC,KAAK,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAkBlD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,sBAAsB,KAAG,MAgB/D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,OAAO,UAAU,KAAG,kBAM3D,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiConfigs } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Creates API configurations for the SDK.
|
|
4
|
+
*
|
|
5
|
+
* @param isIntegrationSdk - Determines whether the configuration is for the Integration SDK (default: false).
|
|
6
|
+
* @returns An object containing API configurations for the standard SDK or Integration SDK.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createApisConfigs: <I extends boolean = false>(isIntegrationSdk?: I) => ApiConfigs<I>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import MemoryStore from "./stores/MemoryStore";
|
|
2
|
+
import { TypeHandler } from "../types";
|
|
3
|
+
import { Agent as HttpAgent } from "http";
|
|
4
|
+
import { Agent as HttpsAgent } from "https";
|
|
5
|
+
type DefaultSdkConfigType = {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
assetCdnBaseUrl?: string;
|
|
8
|
+
version: string;
|
|
9
|
+
transitVerbose: boolean;
|
|
10
|
+
tokenStore?: MemoryStore;
|
|
11
|
+
typeHandlers?: TypeHandler[];
|
|
12
|
+
httpAgent?: HttpAgent;
|
|
13
|
+
httpsAgent?: HttpsAgent;
|
|
14
|
+
};
|
|
15
|
+
type DefaultIntegrationSdkConfigType = {
|
|
16
|
+
baseUrl: string;
|
|
17
|
+
version: string;
|
|
18
|
+
transitVerbose: boolean;
|
|
19
|
+
tokenStore?: MemoryStore;
|
|
20
|
+
httpAgent?: HttpAgent;
|
|
21
|
+
httpsAgent?: HttpsAgent;
|
|
22
|
+
typeHandlers?: TypeHandler[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Default SDK configuration object for the Sharetribe Flex API.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DefaultSdkConfig: DefaultSdkConfigType;
|
|
28
|
+
/**
|
|
29
|
+
* Default SDK configuration object for the Sharetribe Flex Integration API.
|
|
30
|
+
*/
|
|
31
|
+
export declare const DefaultIntegrationSdkConfig: DefaultIntegrationSdkConfigType;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Money from "../sdkTypes/Money";
|
|
2
|
+
import LatLng from "../sdkTypes/LatLng";
|
|
3
|
+
import LatLngBounds from "../sdkTypes/LatLngBounds";
|
|
4
|
+
import UUID from "../sdkTypes/UUID";
|
|
5
|
+
import BigDecimal from "../sdkTypes/BigDecimal";
|
|
6
|
+
/**
|
|
7
|
+
* Converts a value based on its `_sdkType` property to the appropriate SDK type.
|
|
8
|
+
* @param {*} value - The value to convert.
|
|
9
|
+
* @returns {*} The converted value or the original value if no conversion is needed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toSdkTypes(value: any): LatLng | LatLngBounds | UUID | Money | BigDecimal | any;
|
|
12
|
+
export declare const replacer: (key: string, value: any) => any;
|
|
13
|
+
export declare const reviver: (key: string, value: any) => any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializes a value into a string representation for URL query parameters.
|
|
3
|
+
*
|
|
4
|
+
* @param {*} value - The value to serialize. Supported types:
|
|
5
|
+
* - `UUID` instance: serialized as its `uuid` string.
|
|
6
|
+
* - `LatLng` instance: serialized as "lat,lng".
|
|
7
|
+
* - `LatLngBounds` instance: serialized as "ne.lat,ne.lng,sw.lat,sw.lng".
|
|
8
|
+
* - `Array`: serialized by recursively serializing each element.
|
|
9
|
+
* - `Date`: serialized as an ISO string.
|
|
10
|
+
* - Primitive types and `null`: returned as-is.
|
|
11
|
+
* @throws {Error} Will throw an error if the value type is unsupported.
|
|
12
|
+
* @returns {string|*} The serialized value.
|
|
13
|
+
*/
|
|
14
|
+
export declare const serializeValue: (value: any) => any;
|
|
15
|
+
/**
|
|
16
|
+
* Serializes a record of parameters into a query string.
|
|
17
|
+
*
|
|
18
|
+
* @param {Record<string, any>} params - The parameters to serialize. Each value is serialized
|
|
19
|
+
* using the `serializeValue` function.
|
|
20
|
+
* @returns {string} A URL-encoded query string.
|
|
21
|
+
*/
|
|
22
|
+
declare function parameterSerializer(params: Record<string, any>): string;
|
|
23
|
+
export default parameterSerializer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosError, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from "axios";
|
|
2
|
+
import SharetribeSdk from "../sdk";
|
|
3
|
+
import IntegrationSdk from "../integrationSdk";
|
|
4
|
+
export declare const QUERY_PARAMETERS: string[];
|
|
5
|
+
export declare const isTokenUnauthorized: (status: number) => boolean;
|
|
6
|
+
export declare const isTokenExpired: (status: number) => boolean;
|
|
7
|
+
export declare const isAuthTokenUnauthorized: (error: AxiosError) => boolean | undefined;
|
|
8
|
+
export declare const routeNeedsTrustedUser: (requestConfig: InternalAxiosRequestConfig, sdk: SharetribeSdk | IntegrationSdk) => boolean | undefined;
|
|
9
|
+
export declare const prepareAuthorizationHeader: (data: any) => string;
|
|
10
|
+
export declare function handleResponseSuccess(sdk: SharetribeSdk | IntegrationSdk): (response: AxiosResponse) => AxiosResponse;
|
|
11
|
+
export declare function handleResponseFailure(sdk: SharetribeSdk | IntegrationSdk, error: AxiosError | any): Promise<AxiosResponse<any, any, {}>>;
|
|
12
|
+
export declare function handleRequestSuccess(sdk: SharetribeSdk | IntegrationSdk, requestConfig: InternalAxiosRequestConfig): Promise<InternalAxiosRequestConfig>;
|
|
13
|
+
export declare function createAxiosConfig(sdk: SharetribeSdk | IntegrationSdk, config: AxiosRequestConfig): AxiosRequestConfig<any>;
|
|
14
|
+
export declare function prepareAxiosInstance(sdk: SharetribeSdk | IntegrationSdk): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AuthToken, TokenStore } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the `BrowserStore`.
|
|
4
|
+
*/
|
|
5
|
+
export type BrowserStoreOptions = {
|
|
6
|
+
clientId: string;
|
|
7
|
+
secure?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* `BrowserStore` is an implementation of the `TokenStore` interface for storing authentication tokens in browser cookies.
|
|
11
|
+
*/
|
|
12
|
+
declare class BrowserStore implements TokenStore {
|
|
13
|
+
expiration: number;
|
|
14
|
+
private namespace;
|
|
15
|
+
private readonly key;
|
|
16
|
+
private readonly secure;
|
|
17
|
+
/**
|
|
18
|
+
* Initializes the `BrowserStore` with client-specific options.
|
|
19
|
+
* @param options - Configuration options for the store.
|
|
20
|
+
*/
|
|
21
|
+
constructor({ clientId, secure }: BrowserStoreOptions);
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the authentication token from browser cookies.
|
|
24
|
+
* @returns A promise that resolves to the `AuthToken` or null if no token exists.
|
|
25
|
+
*/
|
|
26
|
+
getToken(): AuthToken | null;
|
|
27
|
+
/**
|
|
28
|
+
* Stores the authentication token in a browser cookie.
|
|
29
|
+
* @param token - The authentication token to store.
|
|
30
|
+
*/
|
|
31
|
+
setToken(token: AuthToken): void;
|
|
32
|
+
/**
|
|
33
|
+
* Removes the authentication token from browser cookies.
|
|
34
|
+
*/
|
|
35
|
+
removeToken(): void;
|
|
36
|
+
}
|
|
37
|
+
export default BrowserStore;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Request, Response } from "express";
|
|
2
|
+
import { AuthToken, TokenStore } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for the `ExpressStore`.
|
|
5
|
+
*/
|
|
6
|
+
export type ExpressStoreOptions = {
|
|
7
|
+
clientId: string;
|
|
8
|
+
req: Request;
|
|
9
|
+
res: Response;
|
|
10
|
+
secure?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* `ExpressStore` is an implementation of the `TokenStore` interface for managing authentication tokens via cookies in an Express application.
|
|
14
|
+
*/
|
|
15
|
+
declare class ExpressStore implements TokenStore {
|
|
16
|
+
expiration: number;
|
|
17
|
+
private namespace;
|
|
18
|
+
private key;
|
|
19
|
+
private secure;
|
|
20
|
+
private req;
|
|
21
|
+
private res;
|
|
22
|
+
private currentToken;
|
|
23
|
+
/**
|
|
24
|
+
* Initializes the `ExpressStore` with client-specific options.
|
|
25
|
+
* @param options - Configuration options for the store.
|
|
26
|
+
*/
|
|
27
|
+
constructor({ clientId, req, res, secure }: ExpressStoreOptions);
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves the authentication token, either from cache or from the request cookies.
|
|
30
|
+
* @returns A promise that resolves to the `AuthToken` or null if no token exists.
|
|
31
|
+
*/
|
|
32
|
+
getToken(): AuthToken | null;
|
|
33
|
+
/**
|
|
34
|
+
* Stores the authentication token in a response cookie.
|
|
35
|
+
* @param token - The authentication token to store.
|
|
36
|
+
*/
|
|
37
|
+
setToken(token: AuthToken): void;
|
|
38
|
+
/**
|
|
39
|
+
* Removes the authentication token from the response cookies.
|
|
40
|
+
*/
|
|
41
|
+
removeToken(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Reads the authentication token from the request cookies.
|
|
44
|
+
* @returns The `AuthToken` if present in cookies, otherwise null.
|
|
45
|
+
*/
|
|
46
|
+
private readCookie;
|
|
47
|
+
}
|
|
48
|
+
export default ExpressStore;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AuthToken, TokenStore } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* `MemoryStore` is an in-memory implementation of the `TokenStore` interface.
|
|
4
|
+
* It is suitable for short-lived or testing purposes, where tokens do not need to persist beyond the application's lifecycle.
|
|
5
|
+
*/
|
|
6
|
+
declare class MemoryStore implements TokenStore {
|
|
7
|
+
token: AuthToken | null;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the stored authentication token.
|
|
10
|
+
* @returns A promise resolving to the `AuthToken` or `null` if no token is stored.
|
|
11
|
+
*/
|
|
12
|
+
getToken(): AuthToken | null;
|
|
13
|
+
/**
|
|
14
|
+
* Removes the stored authentication token from memory.
|
|
15
|
+
*/
|
|
16
|
+
removeToken(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Stores the provided authentication token in memory.
|
|
19
|
+
* @param token - The authentication token to store.
|
|
20
|
+
*/
|
|
21
|
+
setToken(token: AuthToken): void;
|
|
22
|
+
}
|
|
23
|
+
export default MemoryStore;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a unique key for storing tokens.
|
|
3
|
+
*
|
|
4
|
+
* @param clientId - The unique identifier for the client.
|
|
5
|
+
* @param namespace - The namespace to organize and scope the key.
|
|
6
|
+
* @returns A string combining the namespace, client ID, and a token suffix.
|
|
7
|
+
*/
|
|
8
|
+
export declare const generateKey: (clientId: string, namespace: string) => string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TypeHandler } from "../types";
|
|
2
|
+
type SdkTypeClass = any;
|
|
3
|
+
export interface TransitReader {
|
|
4
|
+
sdkType: SdkTypeClass;
|
|
5
|
+
reader: (value: any) => any;
|
|
6
|
+
}
|
|
7
|
+
export interface TransitWriter {
|
|
8
|
+
sdkType?: SdkTypeClass;
|
|
9
|
+
appType?: any;
|
|
10
|
+
canHandle?: (args: {
|
|
11
|
+
key: string;
|
|
12
|
+
value: any;
|
|
13
|
+
}) => boolean;
|
|
14
|
+
writer: (value: any) => any;
|
|
15
|
+
}
|
|
16
|
+
export declare const reader: (appTypeReaders?: TransitReader[]) => import("transit-js").TransitReader;
|
|
17
|
+
export declare const writer: (appTypeWriters?: TransitWriter[], opts?: TransitOptions) => import("transit-js").TransitWriter;
|
|
18
|
+
export type TransitOptions = {
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
typeHandlers?: TypeHandler[];
|
|
21
|
+
};
|
|
22
|
+
export declare const createTransitConverters: (typeHandlers?: TypeHandler[], opts?: TransitOptions) => {
|
|
23
|
+
reader: import("transit-js").TransitReader;
|
|
24
|
+
writer: import("transit-js").TransitWriter;
|
|
25
|
+
};
|
|
26
|
+
export declare const read: (str: string, opts?: TransitOptions) => any;
|
|
27
|
+
export declare const write: (data: any, opts?: TransitOptions) => string;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SharetribeApiError } from "../types";
|
|
2
|
+
import { AxiosError } from "axios";
|
|
3
|
+
type ObjectQueryStringParam = Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* Serializes an object into a custom query string format.
|
|
6
|
+
*
|
|
7
|
+
* @param {ObjectQueryStringParam} obj - The object to serialize. Each key-value pair
|
|
8
|
+
* is serialized in the format `key:value`. Attributes are processed using
|
|
9
|
+
* `serializeAttribute`.
|
|
10
|
+
* @throws {Error} If the input is not an object or is null.
|
|
11
|
+
* @returns {string} A semicolon-separated query string.
|
|
12
|
+
*/
|
|
13
|
+
export declare const objectQueryString: (obj: ObjectQueryStringParam) => string;
|
|
14
|
+
export declare const createSharetribeApiError: (error: AxiosError) => SharetribeApiError;
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vansite/ts-sharetribe-flex-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "This is a TypeScript SDK for Sharetribe Flex API. It reduces the complexity of the API and provides a more user-friendly interface.",
|
|
5
|
-
"main": "./dist/ts-sharetribe-flex-sdk.cjs",
|
|
6
|
-
"module": "./dist/ts-sharetribe-flex-sdk.mjs",
|
|
7
|
-
"types": "./dist/types/index.d.ts",
|
|
8
5
|
"keywords": [
|
|
9
6
|
"sharetribe",
|
|
10
7
|
"flex",
|
|
@@ -13,13 +10,22 @@
|
|
|
13
10
|
"api",
|
|
14
11
|
"client"
|
|
15
12
|
],
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"module": "dist/index.mjs",
|
|
15
|
+
"browser": "dist/index.umd.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
18
|
-
"types": "./dist/
|
|
19
|
-
"import": "./dist/
|
|
20
|
-
"require": "./dist/
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.js",
|
|
22
|
+
"browser": "./dist/index.umd.js",
|
|
23
|
+
"default": "./dist/index.js"
|
|
21
24
|
}
|
|
22
25
|
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/**/*"
|
|
28
|
+
],
|
|
23
29
|
"author": "DKogan90 <david_kogan@hotmail.de>",
|
|
24
30
|
"homepage": "https://github.com/VanSite/ts-sharetribe-flex-sdk",
|
|
25
31
|
"repository": {
|
|
@@ -28,15 +34,12 @@
|
|
|
28
34
|
},
|
|
29
35
|
"license": "MIT",
|
|
30
36
|
"private": false,
|
|
31
|
-
"files": [
|
|
32
|
-
"dist",
|
|
33
|
-
"types"
|
|
34
|
-
],
|
|
35
37
|
"scripts": {
|
|
36
38
|
"clean": "rm -rf dist lib types",
|
|
37
|
-
"build": "
|
|
39
|
+
"build": "npm run build:bundles && npm run build:types",
|
|
40
|
+
"build:bundles": "yarn clean && webpack --mode production",
|
|
38
41
|
"build:test": "webpack --mode development",
|
|
39
|
-
"build:types": "tsc
|
|
42
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
40
43
|
"build:publish": "yarn run build && npm publish",
|
|
41
44
|
"analyze": "ANALYZE=true yarn build",
|
|
42
45
|
"test": "jest"
|
|
@@ -82,7 +85,6 @@
|
|
|
82
85
|
"@babel/preset-typescript"
|
|
83
86
|
]
|
|
84
87
|
},
|
|
85
|
-
"browser": {},
|
|
86
88
|
"tslint": {
|
|
87
89
|
"extends": [
|
|
88
90
|
"tslint:recommended"
|