@vansite/ts-sharetribe-flex-sdk 2.0.0 → 3.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/dist/endpoints/marketplace/SitemapData.d.ts +60 -0
- package/dist/endpoints/marketplace/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.LICENSE.txt +22 -0
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.LICENSE.txt +22 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/sdkTypes/Money.d.ts +8 -1
- package/dist/sdkTypes/UUID.d.ts +7 -0
- package/dist/types/endpoints/marketplace/SitemapData.d.ts +61 -0
- package/dist/types/endpoints/marketplace/SitemapData.d.ts.map +1 -0
- package/dist/types/endpoints/marketplace/index.d.ts +2 -0
- package/dist/types/endpoints/marketplace/index.d.ts.map +1 -1
- package/dist/types/marketplace/sitemapData.d.ts +47 -0
- package/dist/types/sdkTypes/Money.d.ts +8 -1
- package/dist/types/sdkTypes/Money.d.ts.map +1 -1
- package/dist/types/sdkTypes/UUID.d.ts +7 -0
- package/dist/types/sdkTypes/UUID.d.ts.map +1 -1
- package/dist/types/types/marketplace/sitemapData.d.ts +48 -0
- package/dist/types/types/marketplace/sitemapData.d.ts.map +1 -0
- 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 +16 -2
- package/dist/types/utils/stores/BrowserStore.d.ts.map +1 -1
- package/dist/types/utils/stores/ExpressStore.d.ts +20 -1
- package/dist/types/utils/stores/ExpressStore.d.ts.map +1 -1
- package/dist/utils/prepare-axios-instance.d.ts +1 -1
- package/dist/utils/stores/BrowserStore.d.ts +16 -2
- package/dist/utils/stores/ExpressStore.d.ts +20 -1
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Client for querying sitemap data in the Sharetribe Marketplace API.
|
|
3
|
+
*
|
|
4
|
+
* Use this to generate XML sitemaps for SEO:
|
|
5
|
+
* - queryListings: Up to 10,000 most recent public listing IDs
|
|
6
|
+
* - queryAssets: CMS page asset paths from Console
|
|
7
|
+
*
|
|
8
|
+
* Note: Results are cached for 1 day by the API.
|
|
9
|
+
*
|
|
10
|
+
* @see https://www.sharetribe.com/docs/concepts/sitemap-in-sharetribe/
|
|
11
|
+
*/
|
|
12
|
+
import type { AxiosResponse } from "axios";
|
|
13
|
+
import MarketplaceApi from "./index";
|
|
14
|
+
import { SitemapAssetsResponse, SitemapListingsResponse } from "../../types/marketplace/sitemapData";
|
|
15
|
+
/**
|
|
16
|
+
* Sitemap Data API client
|
|
17
|
+
*
|
|
18
|
+
* Provides access to sitemap generation endpoints.
|
|
19
|
+
* These endpoints return minimal data needed for sitemap XML generation.
|
|
20
|
+
*/
|
|
21
|
+
declare class SitemapData {
|
|
22
|
+
private readonly axios;
|
|
23
|
+
private readonly endpoint;
|
|
24
|
+
private readonly headers;
|
|
25
|
+
constructor(api: MarketplaceApi);
|
|
26
|
+
/**
|
|
27
|
+
* Query listing IDs for sitemap generation
|
|
28
|
+
*
|
|
29
|
+
* Returns up to 10,000 most recent public listings.
|
|
30
|
+
* For marketplaces with more listings, use Integration API
|
|
31
|
+
* with createdAt filtering for older listings.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Promise<AxiosResponse<SitemapListingsResponse>>}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const { data } = await sdk.sitemapData.queryListings();
|
|
37
|
+
* // Generate sitemap URLs from listing IDs
|
|
38
|
+
* data.data.forEach(listing => {
|
|
39
|
+
* console.log(`/l/${listing.id}`);
|
|
40
|
+
* });
|
|
41
|
+
*/
|
|
42
|
+
queryListings(): Promise<AxiosResponse<SitemapListingsResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* Query CMS asset paths for sitemap generation
|
|
45
|
+
*
|
|
46
|
+
* Returns pages created in Sharetribe Console.
|
|
47
|
+
* Excludes pages with built-in or custom paths.
|
|
48
|
+
*
|
|
49
|
+
* @returns {Promise<AxiosResponse<SitemapAssetsResponse>>}
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* const { data } = await sdk.sitemapData.queryAssets();
|
|
53
|
+
* // Generate sitemap URLs from asset paths
|
|
54
|
+
* data.data.forEach(asset => {
|
|
55
|
+
* console.log(`/p/${asset.attributes.assetPath}`);
|
|
56
|
+
* });
|
|
57
|
+
*/
|
|
58
|
+
queryAssets(): Promise<AxiosResponse<SitemapAssetsResponse>>;
|
|
59
|
+
}
|
|
60
|
+
export default SitemapData;
|
|
@@ -32,6 +32,7 @@ import OwnListings from "./OwnListings";
|
|
|
32
32
|
import PasswordReset from "./PasswordReset";
|
|
33
33
|
import ProcessTransitions from "./ProcessTransitions";
|
|
34
34
|
import Reviews from "./Reviews";
|
|
35
|
+
import SitemapData from "./SitemapData";
|
|
35
36
|
import Stock from "./Stock";
|
|
36
37
|
import StockAdjustments from "./StockAdjustments";
|
|
37
38
|
import StripeAccount from "./StripeAccount";
|
|
@@ -65,6 +66,7 @@ declare class MarketplaceApi {
|
|
|
65
66
|
readonly passwordReset: PasswordReset;
|
|
66
67
|
readonly processTransitions: ProcessTransitions;
|
|
67
68
|
readonly reviews: Reviews;
|
|
69
|
+
readonly sitemapData: SitemapData;
|
|
68
70
|
readonly stock: Stock;
|
|
69
71
|
readonly stockAdjustments: StockAdjustments;
|
|
70
72
|
readonly stripeAccount: StripeAccount;
|