@putiikkipalvelu/storefront-sdk 0.11.2 → 0.12.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/index.cjs +74 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -1
- package/dist/index.d.ts +156 -1
- package/dist/index.js +74 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1849,6 +1849,78 @@ function createWithdrawalResource(fetcher) {
|
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
|
+
// src/resources/reviews.ts
|
|
1853
|
+
function createReviewsResource(fetcher) {
|
|
1854
|
+
return {
|
|
1855
|
+
/**
|
|
1856
|
+
* List approved reviews for a product, with the aggregate rating and a
|
|
1857
|
+
* 1–5 star distribution.
|
|
1858
|
+
*
|
|
1859
|
+
* @param slug - Product URL slug
|
|
1860
|
+
* @param options - Fetch options (caching, headers, etc.)
|
|
1861
|
+
* @returns Approved reviews, average rating, count, and distribution
|
|
1862
|
+
*
|
|
1863
|
+
* @example
|
|
1864
|
+
* ```typescript
|
|
1865
|
+
* const { reviews, averageRating, reviewCount } =
|
|
1866
|
+
* await client.reviews.list('my-product');
|
|
1867
|
+
* ```
|
|
1868
|
+
*/
|
|
1869
|
+
async list(slug, options) {
|
|
1870
|
+
return fetcher.request(
|
|
1871
|
+
`/api/storefront/v1/reviews/${encodeURIComponent(slug)}`,
|
|
1872
|
+
{
|
|
1873
|
+
...options
|
|
1874
|
+
}
|
|
1875
|
+
);
|
|
1876
|
+
},
|
|
1877
|
+
/**
|
|
1878
|
+
* Submit a product review. Anonymous by default; pass a sessionId to submit
|
|
1879
|
+
* as a logged-in customer (enables the verified-purchase check + reward code).
|
|
1880
|
+
* The review is created as PENDING and appears once the store owner approves it.
|
|
1881
|
+
*
|
|
1882
|
+
* @param params - Review data (slug, rating 1–5, body, optional title/authorName)
|
|
1883
|
+
* @param sessionId - Optional customer session id (logged-in submit)
|
|
1884
|
+
* @param options - Fetch options
|
|
1885
|
+
* @returns The created review (PENDING) and a reward code if revealed
|
|
1886
|
+
*
|
|
1887
|
+
* @example Anonymous
|
|
1888
|
+
* ```typescript
|
|
1889
|
+
* await client.reviews.submit({
|
|
1890
|
+
* slug: 'my-product',
|
|
1891
|
+
* rating: 5,
|
|
1892
|
+
* body: 'Loistava tuote!',
|
|
1893
|
+
* authorName: 'Matti',
|
|
1894
|
+
* });
|
|
1895
|
+
* ```
|
|
1896
|
+
*
|
|
1897
|
+
* @example Logged-in (may return a reward code)
|
|
1898
|
+
* ```typescript
|
|
1899
|
+
* const { reward } = await client.reviews.submit(
|
|
1900
|
+
* { slug: 'my-product', rating: 5, body: 'Loistava tuote!' },
|
|
1901
|
+
* sessionId
|
|
1902
|
+
* );
|
|
1903
|
+
* if (reward) console.log(`Käytä koodia ${reward.code}`);
|
|
1904
|
+
* ```
|
|
1905
|
+
*/
|
|
1906
|
+
async submit(params, sessionId, options) {
|
|
1907
|
+
const { headers: optionHeaders, ...restOptions } = _nullishCoalesce(options, () => ( {}));
|
|
1908
|
+
return fetcher.request(
|
|
1909
|
+
"/api/storefront/v1/reviews",
|
|
1910
|
+
{
|
|
1911
|
+
method: "POST",
|
|
1912
|
+
body: params,
|
|
1913
|
+
headers: {
|
|
1914
|
+
...sessionId ? { "x-session-id": sessionId } : {},
|
|
1915
|
+
..._nullishCoalesce(optionHeaders, () => ( {}))
|
|
1916
|
+
},
|
|
1917
|
+
...restOptions
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1852
1924
|
// src/client.ts
|
|
1853
1925
|
function createStorefrontClient(config) {
|
|
1854
1926
|
if (!config.apiKey) {
|
|
@@ -1876,7 +1948,8 @@ function createStorefrontClient(config) {
|
|
|
1876
1948
|
discountCode: createDiscountCodeResource(fetcher),
|
|
1877
1949
|
pages: createPagesResource(fetcher),
|
|
1878
1950
|
tickets: createTicketsResource(fetcher),
|
|
1879
|
-
withdrawal: createWithdrawalResource(fetcher)
|
|
1951
|
+
withdrawal: createWithdrawalResource(fetcher),
|
|
1952
|
+
reviews: createReviewsResource(fetcher)
|
|
1880
1953
|
};
|
|
1881
1954
|
}
|
|
1882
1955
|
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["d:\\Projektit\\Verkkokaupat\\putiikkipalvelu-sdk\\dist\\index.cjs"],"names":[],"mappings":"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AA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"D:\\Projektit\\Verkkokaupat\\putiikkipalvelu-sdk\\dist\\index.cjs","sourcesContent":[null]}
|
|
1
|
+
{"version":3,"sources":["d:\\Projektit\\Verkkokaupat\\putiikkipalvelu-sdk\\dist\\index.cjs"],"names":[],"mappings":"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AA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"D:\\Projektit\\Verkkokaupat\\putiikkipalvelu-sdk\\dist\\index.cjs","sourcesContent":[null]}
|
package/dist/index.d.cts
CHANGED
|
@@ -401,6 +401,10 @@ interface ProductDetail extends Omit<Product, "variations"> {
|
|
|
401
401
|
* Only populated when isDigital=true; null otherwise.
|
|
402
402
|
*/
|
|
403
403
|
digitalContent?: string | null;
|
|
404
|
+
/** Average rating across approved reviews (null when there are none) */
|
|
405
|
+
averageRating: number | null;
|
|
406
|
+
/** Number of approved reviews */
|
|
407
|
+
reviewCount: number;
|
|
404
408
|
}
|
|
405
409
|
/**
|
|
406
410
|
* Response from /sorted-products
|
|
@@ -1887,6 +1891,90 @@ interface WithdrawalResolveTokenResponse {
|
|
|
1887
1891
|
expiresAt: string;
|
|
1888
1892
|
}
|
|
1889
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Review Types
|
|
1896
|
+
*
|
|
1897
|
+
* Types for the product reviews & ratings endpoints.
|
|
1898
|
+
*/
|
|
1899
|
+
/** Moderation status of a review */
|
|
1900
|
+
type ReviewStatus = "PENDING" | "APPROVED" | "REJECTED";
|
|
1901
|
+
/**
|
|
1902
|
+
* A single approved review as returned by the public list endpoint.
|
|
1903
|
+
*/
|
|
1904
|
+
interface Review {
|
|
1905
|
+
/** Unique review identifier */
|
|
1906
|
+
id: string;
|
|
1907
|
+
/** Star rating 1–5 */
|
|
1908
|
+
rating: number;
|
|
1909
|
+
/** Optional short title (null if omitted) */
|
|
1910
|
+
title: string | null;
|
|
1911
|
+
/** Review body (plain text). Empty when the moderator hid the content. */
|
|
1912
|
+
body: string;
|
|
1913
|
+
/** True when the moderator redacted the text — show a placeholder, keep stars */
|
|
1914
|
+
contentHidden: boolean;
|
|
1915
|
+
/** True when tied to a verified purchase (and the store shows the badge) */
|
|
1916
|
+
verifiedPurchase: boolean;
|
|
1917
|
+
/** Store owner's reply (null if none) */
|
|
1918
|
+
merchantReply: string | null;
|
|
1919
|
+
/** Creation timestamp (ISO 8601) */
|
|
1920
|
+
createdAt: string;
|
|
1921
|
+
/** Display name (logged-in first name → anonymous name → fallback) */
|
|
1922
|
+
reviewerName: string;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Response from GET /reviews/{slug} — approved reviews for a product.
|
|
1926
|
+
*/
|
|
1927
|
+
interface ReviewListResponse {
|
|
1928
|
+
/** Average rating across approved reviews (null when none) */
|
|
1929
|
+
averageRating: number | null;
|
|
1930
|
+
/** Number of approved reviews */
|
|
1931
|
+
reviewCount: number;
|
|
1932
|
+
/** Count of approved reviews per star, keyed "1".."5" */
|
|
1933
|
+
distribution: Record<string, number>;
|
|
1934
|
+
/** Most recent approved reviews */
|
|
1935
|
+
reviews: Review[];
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* Parameters for submitting a review.
|
|
1939
|
+
* Pass a sessionId to {@link ReviewsResource.submit} for logged-in reviews
|
|
1940
|
+
* (enables the verified-purchase check + reward code); omit it for anonymous.
|
|
1941
|
+
*/
|
|
1942
|
+
interface SubmitReviewParams {
|
|
1943
|
+
/** Slug of the product being reviewed */
|
|
1944
|
+
slug: string;
|
|
1945
|
+
/** Star rating 1–5 */
|
|
1946
|
+
rating: number;
|
|
1947
|
+
/** Review body text */
|
|
1948
|
+
body: string;
|
|
1949
|
+
/** Optional short title */
|
|
1950
|
+
title?: string;
|
|
1951
|
+
/** Display name for anonymous reviews (ignored when a sessionId is passed) */
|
|
1952
|
+
authorName?: string;
|
|
1953
|
+
}
|
|
1954
|
+
/** Reward discount code revealed to a logged-in reviewer (if enabled). */
|
|
1955
|
+
interface SubmitReviewReward {
|
|
1956
|
+
/** The discount code, e.g. "KIITOS10" */
|
|
1957
|
+
code: string;
|
|
1958
|
+
/** "PERCENTAGE" | "FIXED_AMOUNT" */
|
|
1959
|
+
discountType: string;
|
|
1960
|
+
/** Percentage (e.g. 10) or fixed amount in cents, per discountType */
|
|
1961
|
+
discountValue: number;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Response from POST /reviews. The created review is always PENDING (the store
|
|
1965
|
+
* owner moderates it). `reward` is non-null only for logged-in reviewers when
|
|
1966
|
+
* the store has enabled a (still-live) reward code.
|
|
1967
|
+
*/
|
|
1968
|
+
interface SubmitReviewResponse {
|
|
1969
|
+
success: boolean;
|
|
1970
|
+
review: {
|
|
1971
|
+
id: string;
|
|
1972
|
+
status: ReviewStatus;
|
|
1973
|
+
verifiedPurchase: boolean;
|
|
1974
|
+
};
|
|
1975
|
+
reward: SubmitReviewReward | null;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1890
1978
|
/**
|
|
1891
1979
|
* Putiikkipalvelu Storefront SDK Types
|
|
1892
1980
|
*
|
|
@@ -3185,6 +3273,69 @@ declare function createWithdrawalResource(fetcher: Fetcher): {
|
|
|
3185
3273
|
*/
|
|
3186
3274
|
type WithdrawalResource = ReturnType<typeof createWithdrawalResource>;
|
|
3187
3275
|
|
|
3276
|
+
/**
|
|
3277
|
+
* Reviews Resource
|
|
3278
|
+
*
|
|
3279
|
+
* Read approved product reviews and submit new ones. Submitting works both
|
|
3280
|
+
* anonymously and for logged-in customers — pass a sessionId to run the
|
|
3281
|
+
* verified-purchase check and (if the store enabled it) reveal a reward code.
|
|
3282
|
+
*/
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* Reviews resource for listing and submitting product reviews
|
|
3286
|
+
*/
|
|
3287
|
+
declare function createReviewsResource(fetcher: Fetcher): {
|
|
3288
|
+
/**
|
|
3289
|
+
* List approved reviews for a product, with the aggregate rating and a
|
|
3290
|
+
* 1–5 star distribution.
|
|
3291
|
+
*
|
|
3292
|
+
* @param slug - Product URL slug
|
|
3293
|
+
* @param options - Fetch options (caching, headers, etc.)
|
|
3294
|
+
* @returns Approved reviews, average rating, count, and distribution
|
|
3295
|
+
*
|
|
3296
|
+
* @example
|
|
3297
|
+
* ```typescript
|
|
3298
|
+
* const { reviews, averageRating, reviewCount } =
|
|
3299
|
+
* await client.reviews.list('my-product');
|
|
3300
|
+
* ```
|
|
3301
|
+
*/
|
|
3302
|
+
list(slug: string, options?: FetchOptions): Promise<ReviewListResponse>;
|
|
3303
|
+
/**
|
|
3304
|
+
* Submit a product review. Anonymous by default; pass a sessionId to submit
|
|
3305
|
+
* as a logged-in customer (enables the verified-purchase check + reward code).
|
|
3306
|
+
* The review is created as PENDING and appears once the store owner approves it.
|
|
3307
|
+
*
|
|
3308
|
+
* @param params - Review data (slug, rating 1–5, body, optional title/authorName)
|
|
3309
|
+
* @param sessionId - Optional customer session id (logged-in submit)
|
|
3310
|
+
* @param options - Fetch options
|
|
3311
|
+
* @returns The created review (PENDING) and a reward code if revealed
|
|
3312
|
+
*
|
|
3313
|
+
* @example Anonymous
|
|
3314
|
+
* ```typescript
|
|
3315
|
+
* await client.reviews.submit({
|
|
3316
|
+
* slug: 'my-product',
|
|
3317
|
+
* rating: 5,
|
|
3318
|
+
* body: 'Loistava tuote!',
|
|
3319
|
+
* authorName: 'Matti',
|
|
3320
|
+
* });
|
|
3321
|
+
* ```
|
|
3322
|
+
*
|
|
3323
|
+
* @example Logged-in (may return a reward code)
|
|
3324
|
+
* ```typescript
|
|
3325
|
+
* const { reward } = await client.reviews.submit(
|
|
3326
|
+
* { slug: 'my-product', rating: 5, body: 'Loistava tuote!' },
|
|
3327
|
+
* sessionId
|
|
3328
|
+
* );
|
|
3329
|
+
* if (reward) console.log(`Käytä koodia ${reward.code}`);
|
|
3330
|
+
* ```
|
|
3331
|
+
*/
|
|
3332
|
+
submit(params: SubmitReviewParams, sessionId?: string, options?: FetchOptions): Promise<SubmitReviewResponse>;
|
|
3333
|
+
};
|
|
3334
|
+
/**
|
|
3335
|
+
* Type for the reviews resource
|
|
3336
|
+
*/
|
|
3337
|
+
type ReviewsResource = ReturnType<typeof createReviewsResource>;
|
|
3338
|
+
|
|
3188
3339
|
/**
|
|
3189
3340
|
* The Storefront API client
|
|
3190
3341
|
*/
|
|
@@ -3241,6 +3392,10 @@ interface StorefrontClient {
|
|
|
3241
3392
|
* Withdrawal resource for consumer withdrawal notices (KKV peruutustoiminto)
|
|
3242
3393
|
*/
|
|
3243
3394
|
readonly withdrawal: WithdrawalResource;
|
|
3395
|
+
/**
|
|
3396
|
+
* Reviews resource for listing and submitting product reviews
|
|
3397
|
+
*/
|
|
3398
|
+
readonly reviews: ReviewsResource;
|
|
3244
3399
|
}
|
|
3245
3400
|
/**
|
|
3246
3401
|
* Create a new Storefront API client
|
|
@@ -3488,4 +3643,4 @@ declare class VerificationRequiredError extends StorefrontError {
|
|
|
3488
3643
|
constructor(message: string, customerId: string);
|
|
3489
3644
|
}
|
|
3490
3645
|
|
|
3491
|
-
export { type AboutBlock, type AccordionBlock, type AccordionItem, type AddToCartParams, type AddToWishlistResponse, type AnalyticsConfig, type AppliedDiscount, type ApplyDiscountParams, type ApplyDiscountResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CarouselContentBlock, type CarouselContentItem, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type Customer, type CustomerOrder, type DeleteAccountResponse, type DiscountApplyErrorCode, type DiscountCodeError, type DiscountMessageLocale, type DiscountRemovalReason, type DiscountType, type DownloadUrlResponse, type DownloadsAuthOptions, type FeatureFlags, type FetchOptions, type ForgotPasswordResponse, type FormatDiscountOptions, type GalleryBlock, type GalleryItem, type GetDiscountParams, type GetDiscountResponse, type GetOrdersResponse, type GetUserResponse, type HomeDeliveryOption, type ImageAspectRatio, type ImageGridBlock, type ImageGridItem, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, type MarkdownBlock, type NavPage, NotFoundError, type OpeningHours, type OpeningHoursBlock, type OpeningHoursEntry, type Order, type OrderDownload, type OrderDownloadLineItem, type OrderDownloadsResponse, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PageBlock, type PageSeo, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupPointOption, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductTicketInfo, type ProductVariation, type ProductVariationListing, type PurchasedTicket, RateLimitError, type RegisterData, type RegisterResponse, type RemoveDiscountParams, type RemoveDiscountResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ResetPasswordResponse, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShowcaseBlock, type ShowcaseItem, type StoreConfig, type StoreInfo, type StorePage, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type TableBlock, type TextGridBlock, type TextGridItem, type TicketEvent, type TicketEventsResponse, type TicketGetResponse, type TicketHolderData, type TicketStatus, type TicketUseResponse, type TicketValidatePinResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, VerificationRequiredError, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, type WithdrawalItem, type WithdrawalNoticeParams, type WithdrawalResolveTokenResponse, type WithdrawalSubmitResponse, calculateCartWithCampaigns, calculateDiscountAmount, createStorefrontClient, formatDiscountValue, getDiscountApplyErrorMessage, getDiscountRemovalMessage, getPriceInfo, isSaleActive };
|
|
3646
|
+
export { type AboutBlock, type AccordionBlock, type AccordionItem, type AddToCartParams, type AddToWishlistResponse, type AnalyticsConfig, type AppliedDiscount, type ApplyDiscountParams, type ApplyDiscountResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CarouselContentBlock, type CarouselContentItem, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type Customer, type CustomerOrder, type DeleteAccountResponse, type DiscountApplyErrorCode, type DiscountCodeError, type DiscountMessageLocale, type DiscountRemovalReason, type DiscountType, type DownloadUrlResponse, type DownloadsAuthOptions, type FeatureFlags, type FetchOptions, type ForgotPasswordResponse, type FormatDiscountOptions, type GalleryBlock, type GalleryItem, type GetDiscountParams, type GetDiscountResponse, type GetOrdersResponse, type GetUserResponse, type HomeDeliveryOption, type ImageAspectRatio, type ImageGridBlock, type ImageGridItem, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, type MarkdownBlock, type NavPage, NotFoundError, type OpeningHours, type OpeningHoursBlock, type OpeningHoursEntry, type Order, type OrderDownload, type OrderDownloadLineItem, type OrderDownloadsResponse, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PageBlock, type PageSeo, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupPointOption, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductTicketInfo, type ProductVariation, type ProductVariationListing, type PurchasedTicket, RateLimitError, type RegisterData, type RegisterResponse, type RemoveDiscountParams, type RemoveDiscountResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ResetPasswordResponse, type Review, type ReviewListResponse, type ReviewStatus, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShowcaseBlock, type ShowcaseItem, type StoreConfig, type StoreInfo, type StorePage, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type SubmitReviewParams, type SubmitReviewResponse, type SubmitReviewReward, type TableBlock, type TextGridBlock, type TextGridItem, type TicketEvent, type TicketEventsResponse, type TicketGetResponse, type TicketHolderData, type TicketStatus, type TicketUseResponse, type TicketValidatePinResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, VerificationRequiredError, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, type WithdrawalItem, type WithdrawalNoticeParams, type WithdrawalResolveTokenResponse, type WithdrawalSubmitResponse, calculateCartWithCampaigns, calculateDiscountAmount, createStorefrontClient, formatDiscountValue, getDiscountApplyErrorMessage, getDiscountRemovalMessage, getPriceInfo, isSaleActive };
|
package/dist/index.d.ts
CHANGED
|
@@ -401,6 +401,10 @@ interface ProductDetail extends Omit<Product, "variations"> {
|
|
|
401
401
|
* Only populated when isDigital=true; null otherwise.
|
|
402
402
|
*/
|
|
403
403
|
digitalContent?: string | null;
|
|
404
|
+
/** Average rating across approved reviews (null when there are none) */
|
|
405
|
+
averageRating: number | null;
|
|
406
|
+
/** Number of approved reviews */
|
|
407
|
+
reviewCount: number;
|
|
404
408
|
}
|
|
405
409
|
/**
|
|
406
410
|
* Response from /sorted-products
|
|
@@ -1887,6 +1891,90 @@ interface WithdrawalResolveTokenResponse {
|
|
|
1887
1891
|
expiresAt: string;
|
|
1888
1892
|
}
|
|
1889
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Review Types
|
|
1896
|
+
*
|
|
1897
|
+
* Types for the product reviews & ratings endpoints.
|
|
1898
|
+
*/
|
|
1899
|
+
/** Moderation status of a review */
|
|
1900
|
+
type ReviewStatus = "PENDING" | "APPROVED" | "REJECTED";
|
|
1901
|
+
/**
|
|
1902
|
+
* A single approved review as returned by the public list endpoint.
|
|
1903
|
+
*/
|
|
1904
|
+
interface Review {
|
|
1905
|
+
/** Unique review identifier */
|
|
1906
|
+
id: string;
|
|
1907
|
+
/** Star rating 1–5 */
|
|
1908
|
+
rating: number;
|
|
1909
|
+
/** Optional short title (null if omitted) */
|
|
1910
|
+
title: string | null;
|
|
1911
|
+
/** Review body (plain text). Empty when the moderator hid the content. */
|
|
1912
|
+
body: string;
|
|
1913
|
+
/** True when the moderator redacted the text — show a placeholder, keep stars */
|
|
1914
|
+
contentHidden: boolean;
|
|
1915
|
+
/** True when tied to a verified purchase (and the store shows the badge) */
|
|
1916
|
+
verifiedPurchase: boolean;
|
|
1917
|
+
/** Store owner's reply (null if none) */
|
|
1918
|
+
merchantReply: string | null;
|
|
1919
|
+
/** Creation timestamp (ISO 8601) */
|
|
1920
|
+
createdAt: string;
|
|
1921
|
+
/** Display name (logged-in first name → anonymous name → fallback) */
|
|
1922
|
+
reviewerName: string;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Response from GET /reviews/{slug} — approved reviews for a product.
|
|
1926
|
+
*/
|
|
1927
|
+
interface ReviewListResponse {
|
|
1928
|
+
/** Average rating across approved reviews (null when none) */
|
|
1929
|
+
averageRating: number | null;
|
|
1930
|
+
/** Number of approved reviews */
|
|
1931
|
+
reviewCount: number;
|
|
1932
|
+
/** Count of approved reviews per star, keyed "1".."5" */
|
|
1933
|
+
distribution: Record<string, number>;
|
|
1934
|
+
/** Most recent approved reviews */
|
|
1935
|
+
reviews: Review[];
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* Parameters for submitting a review.
|
|
1939
|
+
* Pass a sessionId to {@link ReviewsResource.submit} for logged-in reviews
|
|
1940
|
+
* (enables the verified-purchase check + reward code); omit it for anonymous.
|
|
1941
|
+
*/
|
|
1942
|
+
interface SubmitReviewParams {
|
|
1943
|
+
/** Slug of the product being reviewed */
|
|
1944
|
+
slug: string;
|
|
1945
|
+
/** Star rating 1–5 */
|
|
1946
|
+
rating: number;
|
|
1947
|
+
/** Review body text */
|
|
1948
|
+
body: string;
|
|
1949
|
+
/** Optional short title */
|
|
1950
|
+
title?: string;
|
|
1951
|
+
/** Display name for anonymous reviews (ignored when a sessionId is passed) */
|
|
1952
|
+
authorName?: string;
|
|
1953
|
+
}
|
|
1954
|
+
/** Reward discount code revealed to a logged-in reviewer (if enabled). */
|
|
1955
|
+
interface SubmitReviewReward {
|
|
1956
|
+
/** The discount code, e.g. "KIITOS10" */
|
|
1957
|
+
code: string;
|
|
1958
|
+
/** "PERCENTAGE" | "FIXED_AMOUNT" */
|
|
1959
|
+
discountType: string;
|
|
1960
|
+
/** Percentage (e.g. 10) or fixed amount in cents, per discountType */
|
|
1961
|
+
discountValue: number;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Response from POST /reviews. The created review is always PENDING (the store
|
|
1965
|
+
* owner moderates it). `reward` is non-null only for logged-in reviewers when
|
|
1966
|
+
* the store has enabled a (still-live) reward code.
|
|
1967
|
+
*/
|
|
1968
|
+
interface SubmitReviewResponse {
|
|
1969
|
+
success: boolean;
|
|
1970
|
+
review: {
|
|
1971
|
+
id: string;
|
|
1972
|
+
status: ReviewStatus;
|
|
1973
|
+
verifiedPurchase: boolean;
|
|
1974
|
+
};
|
|
1975
|
+
reward: SubmitReviewReward | null;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1890
1978
|
/**
|
|
1891
1979
|
* Putiikkipalvelu Storefront SDK Types
|
|
1892
1980
|
*
|
|
@@ -3185,6 +3273,69 @@ declare function createWithdrawalResource(fetcher: Fetcher): {
|
|
|
3185
3273
|
*/
|
|
3186
3274
|
type WithdrawalResource = ReturnType<typeof createWithdrawalResource>;
|
|
3187
3275
|
|
|
3276
|
+
/**
|
|
3277
|
+
* Reviews Resource
|
|
3278
|
+
*
|
|
3279
|
+
* Read approved product reviews and submit new ones. Submitting works both
|
|
3280
|
+
* anonymously and for logged-in customers — pass a sessionId to run the
|
|
3281
|
+
* verified-purchase check and (if the store enabled it) reveal a reward code.
|
|
3282
|
+
*/
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* Reviews resource for listing and submitting product reviews
|
|
3286
|
+
*/
|
|
3287
|
+
declare function createReviewsResource(fetcher: Fetcher): {
|
|
3288
|
+
/**
|
|
3289
|
+
* List approved reviews for a product, with the aggregate rating and a
|
|
3290
|
+
* 1–5 star distribution.
|
|
3291
|
+
*
|
|
3292
|
+
* @param slug - Product URL slug
|
|
3293
|
+
* @param options - Fetch options (caching, headers, etc.)
|
|
3294
|
+
* @returns Approved reviews, average rating, count, and distribution
|
|
3295
|
+
*
|
|
3296
|
+
* @example
|
|
3297
|
+
* ```typescript
|
|
3298
|
+
* const { reviews, averageRating, reviewCount } =
|
|
3299
|
+
* await client.reviews.list('my-product');
|
|
3300
|
+
* ```
|
|
3301
|
+
*/
|
|
3302
|
+
list(slug: string, options?: FetchOptions): Promise<ReviewListResponse>;
|
|
3303
|
+
/**
|
|
3304
|
+
* Submit a product review. Anonymous by default; pass a sessionId to submit
|
|
3305
|
+
* as a logged-in customer (enables the verified-purchase check + reward code).
|
|
3306
|
+
* The review is created as PENDING and appears once the store owner approves it.
|
|
3307
|
+
*
|
|
3308
|
+
* @param params - Review data (slug, rating 1–5, body, optional title/authorName)
|
|
3309
|
+
* @param sessionId - Optional customer session id (logged-in submit)
|
|
3310
|
+
* @param options - Fetch options
|
|
3311
|
+
* @returns The created review (PENDING) and a reward code if revealed
|
|
3312
|
+
*
|
|
3313
|
+
* @example Anonymous
|
|
3314
|
+
* ```typescript
|
|
3315
|
+
* await client.reviews.submit({
|
|
3316
|
+
* slug: 'my-product',
|
|
3317
|
+
* rating: 5,
|
|
3318
|
+
* body: 'Loistava tuote!',
|
|
3319
|
+
* authorName: 'Matti',
|
|
3320
|
+
* });
|
|
3321
|
+
* ```
|
|
3322
|
+
*
|
|
3323
|
+
* @example Logged-in (may return a reward code)
|
|
3324
|
+
* ```typescript
|
|
3325
|
+
* const { reward } = await client.reviews.submit(
|
|
3326
|
+
* { slug: 'my-product', rating: 5, body: 'Loistava tuote!' },
|
|
3327
|
+
* sessionId
|
|
3328
|
+
* );
|
|
3329
|
+
* if (reward) console.log(`Käytä koodia ${reward.code}`);
|
|
3330
|
+
* ```
|
|
3331
|
+
*/
|
|
3332
|
+
submit(params: SubmitReviewParams, sessionId?: string, options?: FetchOptions): Promise<SubmitReviewResponse>;
|
|
3333
|
+
};
|
|
3334
|
+
/**
|
|
3335
|
+
* Type for the reviews resource
|
|
3336
|
+
*/
|
|
3337
|
+
type ReviewsResource = ReturnType<typeof createReviewsResource>;
|
|
3338
|
+
|
|
3188
3339
|
/**
|
|
3189
3340
|
* The Storefront API client
|
|
3190
3341
|
*/
|
|
@@ -3241,6 +3392,10 @@ interface StorefrontClient {
|
|
|
3241
3392
|
* Withdrawal resource for consumer withdrawal notices (KKV peruutustoiminto)
|
|
3242
3393
|
*/
|
|
3243
3394
|
readonly withdrawal: WithdrawalResource;
|
|
3395
|
+
/**
|
|
3396
|
+
* Reviews resource for listing and submitting product reviews
|
|
3397
|
+
*/
|
|
3398
|
+
readonly reviews: ReviewsResource;
|
|
3244
3399
|
}
|
|
3245
3400
|
/**
|
|
3246
3401
|
* Create a new Storefront API client
|
|
@@ -3488,4 +3643,4 @@ declare class VerificationRequiredError extends StorefrontError {
|
|
|
3488
3643
|
constructor(message: string, customerId: string);
|
|
3489
3644
|
}
|
|
3490
3645
|
|
|
3491
|
-
export { type AboutBlock, type AccordionBlock, type AccordionItem, type AddToCartParams, type AddToWishlistResponse, type AnalyticsConfig, type AppliedDiscount, type ApplyDiscountParams, type ApplyDiscountResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CarouselContentBlock, type CarouselContentItem, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type Customer, type CustomerOrder, type DeleteAccountResponse, type DiscountApplyErrorCode, type DiscountCodeError, type DiscountMessageLocale, type DiscountRemovalReason, type DiscountType, type DownloadUrlResponse, type DownloadsAuthOptions, type FeatureFlags, type FetchOptions, type ForgotPasswordResponse, type FormatDiscountOptions, type GalleryBlock, type GalleryItem, type GetDiscountParams, type GetDiscountResponse, type GetOrdersResponse, type GetUserResponse, type HomeDeliveryOption, type ImageAspectRatio, type ImageGridBlock, type ImageGridItem, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, type MarkdownBlock, type NavPage, NotFoundError, type OpeningHours, type OpeningHoursBlock, type OpeningHoursEntry, type Order, type OrderDownload, type OrderDownloadLineItem, type OrderDownloadsResponse, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PageBlock, type PageSeo, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupPointOption, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductTicketInfo, type ProductVariation, type ProductVariationListing, type PurchasedTicket, RateLimitError, type RegisterData, type RegisterResponse, type RemoveDiscountParams, type RemoveDiscountResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ResetPasswordResponse, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShowcaseBlock, type ShowcaseItem, type StoreConfig, type StoreInfo, type StorePage, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type TableBlock, type TextGridBlock, type TextGridItem, type TicketEvent, type TicketEventsResponse, type TicketGetResponse, type TicketHolderData, type TicketStatus, type TicketUseResponse, type TicketValidatePinResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, VerificationRequiredError, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, type WithdrawalItem, type WithdrawalNoticeParams, type WithdrawalResolveTokenResponse, type WithdrawalSubmitResponse, calculateCartWithCampaigns, calculateDiscountAmount, createStorefrontClient, formatDiscountValue, getDiscountApplyErrorMessage, getDiscountRemovalMessage, getPriceInfo, isSaleActive };
|
|
3646
|
+
export { type AboutBlock, type AccordionBlock, type AccordionItem, type AddToCartParams, type AddToWishlistResponse, type AnalyticsConfig, type AppliedDiscount, type ApplyDiscountParams, type ApplyDiscountResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CarouselContentBlock, type CarouselContentItem, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type Customer, type CustomerOrder, type DeleteAccountResponse, type DiscountApplyErrorCode, type DiscountCodeError, type DiscountMessageLocale, type DiscountRemovalReason, type DiscountType, type DownloadUrlResponse, type DownloadsAuthOptions, type FeatureFlags, type FetchOptions, type ForgotPasswordResponse, type FormatDiscountOptions, type GalleryBlock, type GalleryItem, type GetDiscountParams, type GetDiscountResponse, type GetOrdersResponse, type GetUserResponse, type HomeDeliveryOption, type ImageAspectRatio, type ImageGridBlock, type ImageGridItem, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, type MarkdownBlock, type NavPage, NotFoundError, type OpeningHours, type OpeningHoursBlock, type OpeningHoursEntry, type Order, type OrderDownload, type OrderDownloadLineItem, type OrderDownloadsResponse, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PageBlock, type PageSeo, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupPointOption, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductTicketInfo, type ProductVariation, type ProductVariationListing, type PurchasedTicket, RateLimitError, type RegisterData, type RegisterResponse, type RemoveDiscountParams, type RemoveDiscountResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ResetPasswordResponse, type Review, type ReviewListResponse, type ReviewStatus, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShowcaseBlock, type ShowcaseItem, type StoreConfig, type StoreInfo, type StorePage, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type SubmitReviewParams, type SubmitReviewResponse, type SubmitReviewReward, type TableBlock, type TextGridBlock, type TextGridItem, type TicketEvent, type TicketEventsResponse, type TicketGetResponse, type TicketHolderData, type TicketStatus, type TicketUseResponse, type TicketValidatePinResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, VerificationRequiredError, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, type WithdrawalItem, type WithdrawalNoticeParams, type WithdrawalResolveTokenResponse, type WithdrawalSubmitResponse, calculateCartWithCampaigns, calculateDiscountAmount, createStorefrontClient, formatDiscountValue, getDiscountApplyErrorMessage, getDiscountRemovalMessage, getPriceInfo, isSaleActive };
|
package/dist/index.js
CHANGED
|
@@ -1849,6 +1849,78 @@ function createWithdrawalResource(fetcher) {
|
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
|
+
// src/resources/reviews.ts
|
|
1853
|
+
function createReviewsResource(fetcher) {
|
|
1854
|
+
return {
|
|
1855
|
+
/**
|
|
1856
|
+
* List approved reviews for a product, with the aggregate rating and a
|
|
1857
|
+
* 1–5 star distribution.
|
|
1858
|
+
*
|
|
1859
|
+
* @param slug - Product URL slug
|
|
1860
|
+
* @param options - Fetch options (caching, headers, etc.)
|
|
1861
|
+
* @returns Approved reviews, average rating, count, and distribution
|
|
1862
|
+
*
|
|
1863
|
+
* @example
|
|
1864
|
+
* ```typescript
|
|
1865
|
+
* const { reviews, averageRating, reviewCount } =
|
|
1866
|
+
* await client.reviews.list('my-product');
|
|
1867
|
+
* ```
|
|
1868
|
+
*/
|
|
1869
|
+
async list(slug, options) {
|
|
1870
|
+
return fetcher.request(
|
|
1871
|
+
`/api/storefront/v1/reviews/${encodeURIComponent(slug)}`,
|
|
1872
|
+
{
|
|
1873
|
+
...options
|
|
1874
|
+
}
|
|
1875
|
+
);
|
|
1876
|
+
},
|
|
1877
|
+
/**
|
|
1878
|
+
* Submit a product review. Anonymous by default; pass a sessionId to submit
|
|
1879
|
+
* as a logged-in customer (enables the verified-purchase check + reward code).
|
|
1880
|
+
* The review is created as PENDING and appears once the store owner approves it.
|
|
1881
|
+
*
|
|
1882
|
+
* @param params - Review data (slug, rating 1–5, body, optional title/authorName)
|
|
1883
|
+
* @param sessionId - Optional customer session id (logged-in submit)
|
|
1884
|
+
* @param options - Fetch options
|
|
1885
|
+
* @returns The created review (PENDING) and a reward code if revealed
|
|
1886
|
+
*
|
|
1887
|
+
* @example Anonymous
|
|
1888
|
+
* ```typescript
|
|
1889
|
+
* await client.reviews.submit({
|
|
1890
|
+
* slug: 'my-product',
|
|
1891
|
+
* rating: 5,
|
|
1892
|
+
* body: 'Loistava tuote!',
|
|
1893
|
+
* authorName: 'Matti',
|
|
1894
|
+
* });
|
|
1895
|
+
* ```
|
|
1896
|
+
*
|
|
1897
|
+
* @example Logged-in (may return a reward code)
|
|
1898
|
+
* ```typescript
|
|
1899
|
+
* const { reward } = await client.reviews.submit(
|
|
1900
|
+
* { slug: 'my-product', rating: 5, body: 'Loistava tuote!' },
|
|
1901
|
+
* sessionId
|
|
1902
|
+
* );
|
|
1903
|
+
* if (reward) console.log(`Käytä koodia ${reward.code}`);
|
|
1904
|
+
* ```
|
|
1905
|
+
*/
|
|
1906
|
+
async submit(params, sessionId, options) {
|
|
1907
|
+
const { headers: optionHeaders, ...restOptions } = options ?? {};
|
|
1908
|
+
return fetcher.request(
|
|
1909
|
+
"/api/storefront/v1/reviews",
|
|
1910
|
+
{
|
|
1911
|
+
method: "POST",
|
|
1912
|
+
body: params,
|
|
1913
|
+
headers: {
|
|
1914
|
+
...sessionId ? { "x-session-id": sessionId } : {},
|
|
1915
|
+
...optionHeaders ?? {}
|
|
1916
|
+
},
|
|
1917
|
+
...restOptions
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1852
1924
|
// src/client.ts
|
|
1853
1925
|
function createStorefrontClient(config) {
|
|
1854
1926
|
if (!config.apiKey) {
|
|
@@ -1876,7 +1948,8 @@ function createStorefrontClient(config) {
|
|
|
1876
1948
|
discountCode: createDiscountCodeResource(fetcher),
|
|
1877
1949
|
pages: createPagesResource(fetcher),
|
|
1878
1950
|
tickets: createTicketsResource(fetcher),
|
|
1879
|
-
withdrawal: createWithdrawalResource(fetcher)
|
|
1951
|
+
withdrawal: createWithdrawalResource(fetcher),
|
|
1952
|
+
reviews: createReviewsResource(fetcher)
|
|
1880
1953
|
};
|
|
1881
1954
|
}
|
|
1882
1955
|
|