@lana-commerce/core 14.0.0-alpha.10 → 14.0.0-alpha.12
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/CHANGELOG.md +1 -1
- package/cjs/graphql/fragments/ProductReviewsSummary.js +3 -0
- package/cjs/graphql/operations/LoadProductNoCustomerQuery.js +3 -1
- package/cjs/graphql/operations/LoadProductQuery.js +3 -1
- package/cjs/modules/product.js +6 -0
- package/cjs/shopLinks.js +0 -4
- package/esm/graphql/fragments/ProductReviewsSummary.js +1 -0
- package/esm/graphql/operations/LoadProductNoCustomerQuery.js +3 -1
- package/esm/graphql/operations/LoadProductQuery.js +3 -1
- package/esm/modules/product.js +6 -0
- package/esm/shopLinks.js +0 -3
- package/package.json +1 -1
- package/types/graphql/fragments/ProductReviewsSummary.d.ts +2 -0
- package/types/graphql/types.d.ts +7 -0
- package/types/json/commerceTypes.d.ts +199 -1
- package/types/json/storefrontTypes.d.ts +18 -0
- package/types/modules/product.d.ts +4 -1
- package/types/shopLinks.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -22,7 +22,7 @@ This project adheres to [Semantic Versioning][semantic versioning].
|
|
|
22
22
|
- Add webauthn related fields to customer/shop fragments.
|
|
23
23
|
- "Customer" module: now all signin forms share the custom error type. When custom error happens, it is set on all forms.
|
|
24
24
|
- Add "jobs" option to Mutator. Limits the number of simultaneously running jobs.
|
|
25
|
-
- Add "
|
|
25
|
+
- Add "reviewsSummary" to "product" module.
|
|
26
26
|
|
|
27
27
|
### Patch Changes
|
|
28
28
|
|
|
@@ -20,6 +20,7 @@ const ProductReviewAnswer_js_1 = tslib_1.__importDefault(require("../fragments/P
|
|
|
20
20
|
const ProductReviewAverageScore_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewAverageScore.js"));
|
|
21
21
|
const ProductReviewScore_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewScore.js"));
|
|
22
22
|
const ProductReviewSurveyAnswer_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewSurveyAnswer.js"));
|
|
23
|
+
const ProductReviewsSummary_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewsSummary.js"));
|
|
23
24
|
const ReviewDimension_js_1 = tslib_1.__importDefault(require("../fragments/ReviewDimension.js"));
|
|
24
25
|
const ReviewDimensionSet_js_1 = tslib_1.__importDefault(require("../fragments/ReviewDimensionSet.js"));
|
|
25
26
|
const ReviewImagePage_js_1 = tslib_1.__importDefault(require("../fragments/ReviewImagePage.js"));
|
|
@@ -49,6 +50,7 @@ exports.default = (Category_js_1.default +
|
|
|
49
50
|
ProductReviewAverageScore_js_1.default +
|
|
50
51
|
ProductReviewScore_js_1.default +
|
|
51
52
|
ProductReviewSurveyAnswer_js_1.default +
|
|
53
|
+
ProductReviewsSummary_js_1.default +
|
|
52
54
|
ReviewDimension_js_1.default +
|
|
53
55
|
ReviewDimensionSet_js_1.default +
|
|
54
56
|
ReviewImagePage_js_1.default +
|
|
@@ -59,4 +61,4 @@ exports.default = (Category_js_1.default +
|
|
|
59
61
|
TieredPricing_js_1.default +
|
|
60
62
|
TieredPricingTier_js_1.default +
|
|
61
63
|
VariantOption_js_1.default +
|
|
62
|
-
"query LoadProductNoCustomer($shopID:String!$productID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductReview}}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductQuestion}}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
64
|
+
"query LoadProductNoCustomer($shopID:String!$productID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductReview}}reviewsSummary:storefrontProductReviewsSummary(shop_id:$shopID product_id:$productID){...ProductReviewsSummary}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductQuestion}}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
@@ -22,6 +22,7 @@ const ProductReviewAverageScore_js_1 = tslib_1.__importDefault(require("../fragm
|
|
|
22
22
|
const ProductReviewPage_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewPage.js"));
|
|
23
23
|
const ProductReviewScore_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewScore.js"));
|
|
24
24
|
const ProductReviewSurveyAnswer_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewSurveyAnswer.js"));
|
|
25
|
+
const ProductReviewsSummary_js_1 = tslib_1.__importDefault(require("../fragments/ProductReviewsSummary.js"));
|
|
25
26
|
const ReviewDimension_js_1 = tslib_1.__importDefault(require("../fragments/ReviewDimension.js"));
|
|
26
27
|
const ReviewDimensionSet_js_1 = tslib_1.__importDefault(require("../fragments/ReviewDimensionSet.js"));
|
|
27
28
|
const ReviewImagePage_js_1 = tslib_1.__importDefault(require("../fragments/ReviewImagePage.js"));
|
|
@@ -53,6 +54,7 @@ exports.default = (Category_js_1.default +
|
|
|
53
54
|
ProductReviewPage_js_1.default +
|
|
54
55
|
ProductReviewScore_js_1.default +
|
|
55
56
|
ProductReviewSurveyAnswer_js_1.default +
|
|
57
|
+
ProductReviewsSummary_js_1.default +
|
|
56
58
|
ReviewDimension_js_1.default +
|
|
57
59
|
ReviewDimensionSet_js_1.default +
|
|
58
60
|
ReviewImagePage_js_1.default +
|
|
@@ -63,4 +65,4 @@ exports.default = (Category_js_1.default +
|
|
|
63
65
|
TieredPricing_js_1.default +
|
|
64
66
|
TieredPricingTier_js_1.default +
|
|
65
67
|
VariantOption_js_1.default +
|
|
66
|
-
"query LoadProduct($shopID:String!$productID:String!$customerID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductReview}}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductQuestion}}ownReviews:storefrontProductReviewsPage(shop_id:$shopID product_id:$productID limit:1 customer_id:$customerID){...ProductReviewPage}ownQuestions:storefrontProductQuestionsPage(shop_id:$shopID product_id:$productID limit:10 customer_id:$customerID){...ProductQuestionPage}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
68
|
+
"query LoadProduct($shopID:String!$productID:String!$customerID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductReview}}reviewsSummary:storefrontProductReviewsSummary(shop_id:$shopID product_id:$productID){...ProductReviewsSummary}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductQuestion}}ownReviews:storefrontProductReviewsPage(shop_id:$shopID product_id:$productID limit:1 customer_id:$customerID){...ProductReviewPage}ownQuestions:storefrontProductQuestionsPage(shop_id:$shopID product_id:$productID limit:10 customer_id:$customerID){...ProductQuestionPage}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
package/cjs/modules/product.js
CHANGED
|
@@ -293,6 +293,7 @@ function createProduct(config) {
|
|
|
293
293
|
.reset(load)
|
|
294
294
|
.on(setReviewsSortDesc, (_, v) => v);
|
|
295
295
|
const reviews = (0, effector_1.createStore)(null).reset(load);
|
|
296
|
+
const reviewsSummary = (0, effector_1.createStore)(null).reset(load);
|
|
296
297
|
const questionsSortBy = (0, effector_1.createStore)("rating")
|
|
297
298
|
.reset(load)
|
|
298
299
|
.on(setQuestionsSortBy, (_, v) => v);
|
|
@@ -730,6 +731,10 @@ function createProduct(config) {
|
|
|
730
731
|
from: loadResult.data.map((v) => { var _a; return (0, compact_js_1.compact)(((_a = v.reviews) === null || _a === void 0 ? void 0 : _a.items) || null); }),
|
|
731
732
|
to: reviews,
|
|
732
733
|
});
|
|
734
|
+
(0, effector_1.forward)({
|
|
735
|
+
from: loadResult.data.map((v) => v.reviewsSummary),
|
|
736
|
+
to: reviewsSummary,
|
|
737
|
+
});
|
|
733
738
|
(0, effector_1.forward)({
|
|
734
739
|
from: loadResult.data.map((v) => { var _a; return (0, compact_js_1.compact)((_a = v.questions) === null || _a === void 0 ? void 0 : _a.items); }),
|
|
735
740
|
to: questions,
|
|
@@ -1219,6 +1224,7 @@ function createProduct(config) {
|
|
|
1219
1224
|
product,
|
|
1220
1225
|
images,
|
|
1221
1226
|
reviews,
|
|
1227
|
+
reviewsSummary,
|
|
1222
1228
|
reviewsSortBy,
|
|
1223
1229
|
reviewsSortDesc,
|
|
1224
1230
|
setReviewsSortBy,
|
package/cjs/shopLinks.js
CHANGED
|
@@ -14,7 +14,6 @@ exports.shopRemoteURL = shopRemoteURL;
|
|
|
14
14
|
exports.shopUnsubscribeURL = shopUnsubscribeURL;
|
|
15
15
|
exports.shopSubscriptionURL = shopSubscriptionURL;
|
|
16
16
|
exports.shopPreviewURL = shopPreviewURL;
|
|
17
|
-
exports.shopProfileURL = shopProfileURL;
|
|
18
17
|
const shopDomain_js_1 = require("./shopDomain.js");
|
|
19
18
|
function domain(shop) {
|
|
20
19
|
return typeof shop === "string" ? shop : (0, shopDomain_js_1.shopDomain)(shop);
|
|
@@ -65,6 +64,3 @@ function shopSubscriptionURL(shop, subscriptionID, email) {
|
|
|
65
64
|
function shopPreviewURL(shop) {
|
|
66
65
|
return `https://${domain(shop)}/preview`;
|
|
67
66
|
}
|
|
68
|
-
function shopProfileURL(shop) {
|
|
69
|
-
return `https://${domain(shop)}/profile`;
|
|
70
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "fragment ProductReviewsSummary on ProductReviewsSummary{text positives negatives}\n";
|
|
@@ -17,6 +17,7 @@ import ProductReviewAnswer from "../fragments/ProductReviewAnswer.js";
|
|
|
17
17
|
import ProductReviewAverageScore from "../fragments/ProductReviewAverageScore.js";
|
|
18
18
|
import ProductReviewScore from "../fragments/ProductReviewScore.js";
|
|
19
19
|
import ProductReviewSurveyAnswer from "../fragments/ProductReviewSurveyAnswer.js";
|
|
20
|
+
import ProductReviewsSummary from "../fragments/ProductReviewsSummary.js";
|
|
20
21
|
import ReviewDimension from "../fragments/ReviewDimension.js";
|
|
21
22
|
import ReviewDimensionSet from "../fragments/ReviewDimensionSet.js";
|
|
22
23
|
import ReviewImagePage from "../fragments/ReviewImagePage.js";
|
|
@@ -46,6 +47,7 @@ export default (Category +
|
|
|
46
47
|
ProductReviewAverageScore +
|
|
47
48
|
ProductReviewScore +
|
|
48
49
|
ProductReviewSurveyAnswer +
|
|
50
|
+
ProductReviewsSummary +
|
|
49
51
|
ReviewDimension +
|
|
50
52
|
ReviewDimensionSet +
|
|
51
53
|
ReviewImagePage +
|
|
@@ -56,4 +58,4 @@ export default (Category +
|
|
|
56
58
|
TieredPricing +
|
|
57
59
|
TieredPricingTier +
|
|
58
60
|
VariantOption +
|
|
59
|
-
"query LoadProductNoCustomer($shopID:String!$productID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductReview}}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductQuestion}}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
61
|
+
"query LoadProductNoCustomer($shopID:String!$productID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductReview}}reviewsSummary:storefrontProductReviewsSummary(shop_id:$shopID product_id:$productID){...ProductReviewsSummary}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true){count items{...ProductQuestion}}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
@@ -19,6 +19,7 @@ import ProductReviewAverageScore from "../fragments/ProductReviewAverageScore.js
|
|
|
19
19
|
import ProductReviewPage from "../fragments/ProductReviewPage.js";
|
|
20
20
|
import ProductReviewScore from "../fragments/ProductReviewScore.js";
|
|
21
21
|
import ProductReviewSurveyAnswer from "../fragments/ProductReviewSurveyAnswer.js";
|
|
22
|
+
import ProductReviewsSummary from "../fragments/ProductReviewsSummary.js";
|
|
22
23
|
import ReviewDimension from "../fragments/ReviewDimension.js";
|
|
23
24
|
import ReviewDimensionSet from "../fragments/ReviewDimensionSet.js";
|
|
24
25
|
import ReviewImagePage from "../fragments/ReviewImagePage.js";
|
|
@@ -50,6 +51,7 @@ export default (Category +
|
|
|
50
51
|
ProductReviewPage +
|
|
51
52
|
ProductReviewScore +
|
|
52
53
|
ProductReviewSurveyAnswer +
|
|
54
|
+
ProductReviewsSummary +
|
|
53
55
|
ReviewDimension +
|
|
54
56
|
ReviewDimensionSet +
|
|
55
57
|
ReviewImagePage +
|
|
@@ -60,4 +62,4 @@ export default (Category +
|
|
|
60
62
|
TieredPricing +
|
|
61
63
|
TieredPricingTier +
|
|
62
64
|
VariantOption +
|
|
63
|
-
"query LoadProduct($shopID:String!$productID:String!$customerID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductReview}}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductQuestion}}ownReviews:storefrontProductReviewsPage(shop_id:$shopID product_id:$productID limit:1 customer_id:$customerID){...ProductReviewPage}ownQuestions:storefrontProductQuestionsPage(shop_id:$shopID product_id:$productID limit:10 customer_id:$customerID){...ProductQuestionPage}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
|
65
|
+
"query LoadProduct($shopID:String!$productID:String!$customerID:String!){products:storefrontProducts(shop_id:$shopID ids:[$productID]){...ReviewQuestionProduct}reviews:storefrontSearchReviews(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductReview}}reviewsSummary:storefrontProductReviewsSummary(shop_id:$shopID product_id:$productID){...ProductReviewsSummary}questions:storefrontSearchQuestions(shop_id:$shopID product_id:$productID limit:10 sort_by:rating sort_desc:true not_customer_id:$customerID){count items{...ProductQuestion}}ownReviews:storefrontProductReviewsPage(shop_id:$shopID product_id:$productID limit:1 customer_id:$customerID){...ProductReviewPage}ownQuestions:storefrontProductQuestionsPage(shop_id:$shopID product_id:$productID limit:10 customer_id:$customerID){...ProductQuestionPage}settings:storefrontProductReviewsSettings(shop_id:$shopID){...ReviewSettings}images:storefrontProductReviewsImagesPage(shop_id:$shopID product_id:$productID limit:50){...ReviewImagePage}}");
|
package/esm/modules/product.js
CHANGED
|
@@ -297,6 +297,7 @@ export function createProduct(config) {
|
|
|
297
297
|
.reset(load)
|
|
298
298
|
.on(setReviewsSortDesc, (_, v) => v);
|
|
299
299
|
const reviews = createStore(null).reset(load);
|
|
300
|
+
const reviewsSummary = createStore(null).reset(load);
|
|
300
301
|
const questionsSortBy = createStore("rating")
|
|
301
302
|
.reset(load)
|
|
302
303
|
.on(setQuestionsSortBy, (_, v) => v);
|
|
@@ -750,6 +751,10 @@ export function createProduct(config) {
|
|
|
750
751
|
from: loadResult.data.map((v) => compact(v.reviews?.items || null)),
|
|
751
752
|
to: reviews,
|
|
752
753
|
});
|
|
754
|
+
forward({
|
|
755
|
+
from: loadResult.data.map((v) => v.reviewsSummary),
|
|
756
|
+
to: reviewsSummary,
|
|
757
|
+
});
|
|
753
758
|
forward({
|
|
754
759
|
from: loadResult.data.map((v) => compact(v.questions?.items)),
|
|
755
760
|
to: questions,
|
|
@@ -1237,6 +1242,7 @@ export function createProduct(config) {
|
|
|
1237
1242
|
product,
|
|
1238
1243
|
images,
|
|
1239
1244
|
reviews,
|
|
1245
|
+
reviewsSummary,
|
|
1240
1246
|
reviewsSortBy,
|
|
1241
1247
|
reviewsSortDesc,
|
|
1242
1248
|
setReviewsSortBy,
|
package/esm/shopLinks.js
CHANGED
package/package.json
CHANGED
package/types/graphql/types.d.ts
CHANGED
|
@@ -1180,6 +1180,11 @@ export interface ProductReviewSurveyAnswerFragment {
|
|
|
1180
1180
|
answer_index: number;
|
|
1181
1181
|
survey_question: SurveyQuestionFragment | null;
|
|
1182
1182
|
}
|
|
1183
|
+
export interface ProductReviewsSummaryFragment {
|
|
1184
|
+
negatives: Array<string>;
|
|
1185
|
+
positives: Array<string>;
|
|
1186
|
+
text: string;
|
|
1187
|
+
}
|
|
1183
1188
|
export interface ProductSearchOptionAggFragment {
|
|
1184
1189
|
count: number;
|
|
1185
1190
|
name: string;
|
|
@@ -2114,6 +2119,7 @@ export interface LoadProductNoCustomerQuery {
|
|
|
2114
2119
|
count: number;
|
|
2115
2120
|
items: Array<ProductReviewFragment | null> | null;
|
|
2116
2121
|
} | null;
|
|
2122
|
+
reviewsSummary: ProductReviewsSummaryFragment | null;
|
|
2117
2123
|
settings: ReviewSettingsFragment | null;
|
|
2118
2124
|
}
|
|
2119
2125
|
export interface LoadProductNoCustomerQueryVariables {
|
|
@@ -2138,6 +2144,7 @@ export interface LoadProductQuery {
|
|
|
2138
2144
|
count: number;
|
|
2139
2145
|
items: Array<ProductReviewFragment | null> | null;
|
|
2140
2146
|
} | null;
|
|
2147
|
+
reviewsSummary: ProductReviewsSummaryFragment | null;
|
|
2141
2148
|
settings: ReviewSettingsFragment | null;
|
|
2142
2149
|
}
|
|
2143
2150
|
export interface LoadProductQueryVariables {
|
|
@@ -2505,7 +2505,7 @@ export interface InventoryLocationSpecialHoursCreate {
|
|
|
2505
2505
|
date_ranges: Array<InventoryLocationDateRangeCreate>;
|
|
2506
2506
|
hours: Array<InventoryLocationDayHourCreate>;
|
|
2507
2507
|
}
|
|
2508
|
-
export type InventoryLogType = "fulfillment_canceled" | "fulfillment_completed" | "fulfillment_created" | "manual_adjustment" | "order_cancel_reservation" | "order_reserved" | "purchase_order_created" | "purchase_order_received" | "purchase_order_rejected" | "relocate" | "restock" | "return" | "scheduled_fulfillment_cancel_reservation" | "scheduled_fulfillment_reserved" | "transfer_created" | "transfer_received" | "transfer_rejected";
|
|
2508
|
+
export type InventoryLogType = "fulfillment_canceled" | "fulfillment_completed" | "fulfillment_created" | "manual_adjustment" | "order_cancel_reservation" | "order_reserved" | "purchase_order_created" | "purchase_order_received" | "purchase_order_rejected" | "relocate" | "reservation_created" | "reservation_deleted" | "reservation_expired" | "reservation_modified" | "restock" | "return" | "scheduled_fulfillment_cancel_reservation" | "scheduled_fulfillment_reserved" | "transfer_created" | "transfer_received" | "transfer_rejected";
|
|
2509
2509
|
export type InventoryManagement = "automatic" | "manual";
|
|
2510
2510
|
export type InventoryPolicy = "continue" | "deny";
|
|
2511
2511
|
export interface InventoryRule {
|
|
@@ -5141,6 +5141,14 @@ export interface ProductReviewSurveyAnswerCreate {
|
|
|
5141
5141
|
}
|
|
5142
5142
|
export type ProductReviewsAnswersPageSortBy = "created_at";
|
|
5143
5143
|
export type ProductReviewsPageSortBy = "created_at";
|
|
5144
|
+
export interface ProductReviewsSummary {
|
|
5145
|
+
/** Negative facts */
|
|
5146
|
+
negatives: Array<string>;
|
|
5147
|
+
/** Positive facts */
|
|
5148
|
+
positives: Array<string>;
|
|
5149
|
+
/** Generated summary of the customer reviews */
|
|
5150
|
+
text: string;
|
|
5151
|
+
}
|
|
5144
5152
|
export interface ProductSearchOptionAgg {
|
|
5145
5153
|
/** Number of occurrences in the aggregation */
|
|
5146
5154
|
count: number;
|
|
@@ -5910,6 +5918,67 @@ export interface RecoveryOTP {
|
|
|
5910
5918
|
code: string;
|
|
5911
5919
|
}
|
|
5912
5920
|
export type ReindexingStatus = "done" | "queued" | "reindexing";
|
|
5921
|
+
export interface Reservation {
|
|
5922
|
+
/** Commentary for reference */
|
|
5923
|
+
comment: string;
|
|
5924
|
+
/** Date and time reservation was created */
|
|
5925
|
+
created_at: string;
|
|
5926
|
+
/** Optional customer associated with a reservation */
|
|
5927
|
+
customer?: {
|
|
5928
|
+
id: string;
|
|
5929
|
+
} | Customer | null;
|
|
5930
|
+
/** Date and time when reservation will be automatically nullified */
|
|
5931
|
+
expires_at?: string | null;
|
|
5932
|
+
/** Unique reservation identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
5933
|
+
id: string;
|
|
5934
|
+
items: Array<ReservationItem>;
|
|
5935
|
+
}
|
|
5936
|
+
export interface ReservationCreate {
|
|
5937
|
+
/** Commentary for reference */
|
|
5938
|
+
comment?: string | null;
|
|
5939
|
+
/** Optional customer associated with a reservation */
|
|
5940
|
+
customer_id?: string | null;
|
|
5941
|
+
/** Date and time when reservation will be automatically nullified */
|
|
5942
|
+
expires_at?: string | null;
|
|
5943
|
+
items?: Array<ReservationItemCreate> | null;
|
|
5944
|
+
}
|
|
5945
|
+
export interface ReservationItem {
|
|
5946
|
+
/** Inventory location to reserve items in */
|
|
5947
|
+
inventory_location?: {
|
|
5948
|
+
id: string;
|
|
5949
|
+
} | InventoryLocation | null;
|
|
5950
|
+
/** Amount of items to reserve */
|
|
5951
|
+
quantity: number;
|
|
5952
|
+
/** Product variant of this item */
|
|
5953
|
+
variant?: {
|
|
5954
|
+
id: string;
|
|
5955
|
+
} | ProductVariant | null;
|
|
5956
|
+
}
|
|
5957
|
+
export interface ReservationItemCreate {
|
|
5958
|
+
/** Unique inventory location identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
5959
|
+
inventory_location_id: string;
|
|
5960
|
+
/** Amount of items to reserve */
|
|
5961
|
+
quantity: number;
|
|
5962
|
+
/** A unique product variant identifier */
|
|
5963
|
+
variant_id: string;
|
|
5964
|
+
}
|
|
5965
|
+
export interface ReservationModify {
|
|
5966
|
+
/** Commentary for reference */
|
|
5967
|
+
comment?: string | null;
|
|
5968
|
+
/** Optional customer associated with a reservation */
|
|
5969
|
+
customer_id?: string | null;
|
|
5970
|
+
/** Date and time when reservation will be automatically nullified */
|
|
5971
|
+
expires_at?: string | null;
|
|
5972
|
+
items?: Array<ReservationItemCreate> | null;
|
|
5973
|
+
}
|
|
5974
|
+
export interface ReservationPage {
|
|
5975
|
+
/** Total number of items in the collection */
|
|
5976
|
+
count: number;
|
|
5977
|
+
items: Array<Reservation>;
|
|
5978
|
+
/** Key of the last item for keyset based iteration */
|
|
5979
|
+
last_key: string;
|
|
5980
|
+
}
|
|
5981
|
+
export type ReservationsPageSortBy = "created_at";
|
|
5913
5982
|
export interface Return {
|
|
5914
5983
|
/** The date and time when the return was approved */
|
|
5915
5984
|
approved_at: string | null;
|
|
@@ -8635,6 +8704,33 @@ export interface VariantInventoryLogPage {
|
|
|
8635
8704
|
last_key: string;
|
|
8636
8705
|
}
|
|
8637
8706
|
export type VariantInventoryLogPageSortBy = "created_at";
|
|
8707
|
+
export interface VariantInventoryState {
|
|
8708
|
+
/** A number of items reserved for orders */
|
|
8709
|
+
committed: number;
|
|
8710
|
+
/** A number of items expected to arrive to this inventory location */
|
|
8711
|
+
incoming: number;
|
|
8712
|
+
/** Subject inventory location */
|
|
8713
|
+
inventory_location?: {
|
|
8714
|
+
id: string;
|
|
8715
|
+
} | InventoryLocation | null;
|
|
8716
|
+
order?: {
|
|
8717
|
+
id: string;
|
|
8718
|
+
} | Order | null;
|
|
8719
|
+
purchase_order?: {
|
|
8720
|
+
id: string;
|
|
8721
|
+
} | PurchaseOrder | null;
|
|
8722
|
+
reservation?: {
|
|
8723
|
+
id: string;
|
|
8724
|
+
} | Reservation | null;
|
|
8725
|
+
transfer?: {
|
|
8726
|
+
id: string;
|
|
8727
|
+
} | Transfer | null;
|
|
8728
|
+
}
|
|
8729
|
+
export interface VariantInventoryStatePage {
|
|
8730
|
+
/** Total number of items in the collection */
|
|
8731
|
+
count: number;
|
|
8732
|
+
items: Array<VariantInventoryState>;
|
|
8733
|
+
}
|
|
8638
8734
|
export interface VariantOption {
|
|
8639
8735
|
/** A unique human-readable option identifier */
|
|
8640
8736
|
option_id: string;
|
|
@@ -9526,6 +9622,16 @@ export interface PurchaseOrderPageExpansionMap {
|
|
|
9526
9622
|
export interface PurchaseOrderSearchResultExpansionMap {
|
|
9527
9623
|
items?: true | PurchaseOrderExpansionMap;
|
|
9528
9624
|
}
|
|
9625
|
+
export interface ReservationExpansionMap {
|
|
9626
|
+
customer?: true | CustomerExpansionMap;
|
|
9627
|
+
"items.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9628
|
+
"items.variant"?: true | ProductVariantExpansionMap;
|
|
9629
|
+
}
|
|
9630
|
+
export interface ReservationPageExpansionMap {
|
|
9631
|
+
"items.customer"?: true | CustomerExpansionMap;
|
|
9632
|
+
"items.items.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9633
|
+
"items.items.variant"?: true | ProductVariantExpansionMap;
|
|
9634
|
+
}
|
|
9529
9635
|
export interface ReturnExpansionMap {
|
|
9530
9636
|
"history.customer"?: true | CustomerExpansionMap;
|
|
9531
9637
|
"history.user"?: true | UserExpansionMap;
|
|
@@ -9705,6 +9811,13 @@ export interface VariantInventoryLogPageExpansionMap {
|
|
|
9705
9811
|
"items.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9706
9812
|
"items.user"?: true | UserExpansionMap;
|
|
9707
9813
|
}
|
|
9814
|
+
export interface VariantInventoryStatePageExpansionMap {
|
|
9815
|
+
"items.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9816
|
+
"items.order"?: true | OrderExpansionMap;
|
|
9817
|
+
"items.purchase_order"?: true | PurchaseOrderExpansionMap;
|
|
9818
|
+
"items.reservation"?: true | ReservationExpansionMap;
|
|
9819
|
+
"items.transfer"?: true | TransferExpansionMap;
|
|
9820
|
+
}
|
|
9708
9821
|
export interface WebhookEventExpansionMap {
|
|
9709
9822
|
"status.event"?: true | WebhookEventExpansionMap;
|
|
9710
9823
|
"status.webhook"?: true;
|
|
@@ -12420,6 +12533,15 @@ export interface EndpointProductReviewsSettingsCreate extends Endpoint<EndpointP
|
|
|
12420
12533
|
expand(v: ReviewSettingsExpansionMap): EndpointProductReviewsSettingsCreate;
|
|
12421
12534
|
extract(v: Extractor<ReviewSettings>): EndpointProductReviewsSettingsCreate;
|
|
12422
12535
|
}
|
|
12536
|
+
export interface EndpointProductReviewsSummary extends Endpoint<EndpointProductReviewsSummary, ProductReviewsSummary> {
|
|
12537
|
+
/** Output filtering */
|
|
12538
|
+
fields(v: Array<string>): EndpointProductReviewsSummary;
|
|
12539
|
+
/** Unique product identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12540
|
+
product_id(v: string): EndpointProductReviewsSummary;
|
|
12541
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12542
|
+
shop_id(v: string): EndpointProductReviewsSummary;
|
|
12543
|
+
extract(v: Extractor<ProductReviewsSummary>): EndpointProductReviewsSummary;
|
|
12544
|
+
}
|
|
12423
12545
|
export interface EndpointProductVariantsDelete extends Endpoint<EndpointProductVariantsDelete, void> {
|
|
12424
12546
|
/** List of product variant ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12425
12547
|
ids(v: Array<string>): EndpointProductVariantsDelete;
|
|
@@ -12902,6 +13024,62 @@ export interface EndpointQuickbooksTaxRates extends Endpoint<EndpointQuickbooksT
|
|
|
12902
13024
|
shop_id(v: string): EndpointQuickbooksTaxRates;
|
|
12903
13025
|
extract(v: Extractor<Array<QuickbooksTaxRate>>): EndpointQuickbooksTaxRates;
|
|
12904
13026
|
}
|
|
13027
|
+
export interface EndpointReservationsDelete extends Endpoint<EndpointReservationsDelete, void> {
|
|
13028
|
+
/** List of reservation ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13029
|
+
ids(v: Array<string>): EndpointReservationsDelete;
|
|
13030
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13031
|
+
shop_id(v: string): EndpointReservationsDelete;
|
|
13032
|
+
}
|
|
13033
|
+
export interface EndpointReservations extends Endpoint<EndpointReservations, Array<Reservation>> {
|
|
13034
|
+
/** Output filtering */
|
|
13035
|
+
fields(v: Array<string>): EndpointReservations;
|
|
13036
|
+
/** List of reservation ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13037
|
+
ids(v: Array<string>): EndpointReservations;
|
|
13038
|
+
/** When asking for multiple items, allow returning less than was asked (in case some are missing) */
|
|
13039
|
+
loose(v: boolean): EndpointReservations;
|
|
13040
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13041
|
+
shop_id(v: string): EndpointReservations;
|
|
13042
|
+
expand(v: ReservationExpansionMap): EndpointReservations;
|
|
13043
|
+
extract(v: Extractor<Array<Reservation>>): EndpointReservations;
|
|
13044
|
+
}
|
|
13045
|
+
export interface EndpointReservationsCreate extends Endpoint<EndpointReservationsCreate, Array<Reservation>> {
|
|
13046
|
+
/** Output filtering */
|
|
13047
|
+
fields(v: Array<string>): EndpointReservationsCreate;
|
|
13048
|
+
/** List of reservation ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13049
|
+
ids(v: Array<string>): EndpointReservationsModify;
|
|
13050
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13051
|
+
shop_id(v: string): EndpointReservationsCreate;
|
|
13052
|
+
data(v: Array<ReservationCreate>): EndpointReservationsCreate;
|
|
13053
|
+
expand(v: ReservationExpansionMap): EndpointReservationsCreate;
|
|
13054
|
+
extract(v: Extractor<Array<Reservation>>): EndpointReservationsCreate;
|
|
13055
|
+
}
|
|
13056
|
+
export interface EndpointReservationsModify extends Endpoint<EndpointReservationsModify, Array<Reservation>> {
|
|
13057
|
+
/** Output filtering */
|
|
13058
|
+
fields(v: Array<string>): EndpointReservationsModify;
|
|
13059
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13060
|
+
shop_id(v: string): EndpointReservationsModify;
|
|
13061
|
+
data(v: Array<ReservationModify>): EndpointReservationsModify;
|
|
13062
|
+
expand(v: ReservationExpansionMap): EndpointReservationsModify;
|
|
13063
|
+
extract(v: Extractor<Array<Reservation>>): EndpointReservationsModify;
|
|
13064
|
+
}
|
|
13065
|
+
export interface EndpointReservationsPage extends Endpoint<EndpointReservationsPage, ReservationPage> {
|
|
13066
|
+
/** Output filtering */
|
|
13067
|
+
fields(v: Array<string>): EndpointReservationsPage;
|
|
13068
|
+
/** Key of the last item from previous page. See also: [Pagination](/overview/concepts/pagination) */
|
|
13069
|
+
last_key(v: string): EndpointReservationsPage;
|
|
13070
|
+
/** Return up to N entries (pagination). See also: [Pagination](/overview/concepts/pagination) */
|
|
13071
|
+
limit(v: number): EndpointReservationsPage;
|
|
13072
|
+
/** Skip N entries (pagination). See also: [Pagination](/overview/concepts/pagination) */
|
|
13073
|
+
offset(v: number): EndpointReservationsPage;
|
|
13074
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13075
|
+
shop_id(v: string): EndpointReservationsPage;
|
|
13076
|
+
/** Whether to sort output in some specific way. See also: [Pagination](/overview/concepts/pagination) */
|
|
13077
|
+
sort_by(v: ReservationsPageSortBy): EndpointReservationsPage;
|
|
13078
|
+
/** Whether to use descending sort order. See also: [Pagination](/overview/concepts/pagination) */
|
|
13079
|
+
sort_desc(v: boolean): EndpointReservationsPage;
|
|
13080
|
+
expand(v: ReservationPageExpansionMap): EndpointReservationsPage;
|
|
13081
|
+
extract(v: Extractor<ReservationPage>): EndpointReservationsPage;
|
|
13082
|
+
}
|
|
12905
13083
|
export interface EndpointReturnInspectionsDelete extends Endpoint<EndpointReturnInspectionsDelete, void> {
|
|
12906
13084
|
/** Output filtering */
|
|
12907
13085
|
fields(v: Array<string>): EndpointReturnInspectionsDelete;
|
|
@@ -14773,6 +14951,20 @@ export interface EndpointVariantInventoryLogPage extends Endpoint<EndpointVarian
|
|
|
14773
14951
|
expand(v: VariantInventoryLogPageExpansionMap): EndpointVariantInventoryLogPage;
|
|
14774
14952
|
extract(v: Extractor<VariantInventoryLogPage>): EndpointVariantInventoryLogPage;
|
|
14775
14953
|
}
|
|
14954
|
+
export interface EndpointVariantInventoryStatePage extends Endpoint<EndpointVariantInventoryStatePage, VariantInventoryStatePage> {
|
|
14955
|
+
/** Output filtering */
|
|
14956
|
+
fields(v: Array<string>): EndpointVariantInventoryStatePage;
|
|
14957
|
+
/** Return up to N entries (pagination). See also: [Pagination](/overview/concepts/pagination) */
|
|
14958
|
+
limit(v: number): EndpointVariantInventoryStatePage;
|
|
14959
|
+
/** Skip N entries (pagination). See also: [Pagination](/overview/concepts/pagination) */
|
|
14960
|
+
offset(v: number): EndpointVariantInventoryStatePage;
|
|
14961
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
14962
|
+
shop_id(v: string): EndpointVariantInventoryStatePage;
|
|
14963
|
+
/** Unique variant identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
14964
|
+
variant_id(v: string): EndpointVariantInventoryStatePage;
|
|
14965
|
+
expand(v: VariantInventoryStatePageExpansionMap): EndpointVariantInventoryStatePage;
|
|
14966
|
+
extract(v: Extractor<VariantInventoryStatePage>): EndpointVariantInventoryStatePage;
|
|
14967
|
+
}
|
|
14776
14968
|
export interface EndpointWebhooksDelete extends Endpoint<EndpointWebhooksDelete, void> {
|
|
14777
14969
|
/** List of webhook ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
14778
14970
|
ids(v: Array<string>): EndpointWebhooksDelete;
|
|
@@ -15225,6 +15417,7 @@ export interface ReqFunction {
|
|
|
15225
15417
|
(ctx: Context, v: "GET:product_reviews/page.json"): EndpointProductReviewsPage;
|
|
15226
15418
|
(ctx: Context, v: "GET:product_reviews/settings.json"): EndpointProductReviewsSettings;
|
|
15227
15419
|
(ctx: Context, v: "POST:product_reviews/settings.json"): EndpointProductReviewsSettingsCreate;
|
|
15420
|
+
(ctx: Context, v: "GET:product_reviews/summary.json"): EndpointProductReviewsSummary;
|
|
15228
15421
|
(ctx: Context, v: "DELETE:product_variants.json"): EndpointProductVariantsDelete;
|
|
15229
15422
|
(ctx: Context, v: "GET:product_variants.json"): EndpointProductVariants;
|
|
15230
15423
|
(ctx: Context, v: "POST:product_variants.json"): EndpointProductVariantsCreate;
|
|
@@ -15264,6 +15457,10 @@ export interface ReqFunction {
|
|
|
15264
15457
|
(ctx: Context, v: "POST:quickbooks/authorize.json"): EndpointQuickbooksAuthorize;
|
|
15265
15458
|
(ctx: Context, v: "GET:quickbooks/log.json"): EndpointQuickbooksLog;
|
|
15266
15459
|
(ctx: Context, v: "GET:quickbooks/tax_rates.json"): EndpointQuickbooksTaxRates;
|
|
15460
|
+
(ctx: Context, v: "DELETE:reservations.json"): EndpointReservationsDelete;
|
|
15461
|
+
(ctx: Context, v: "GET:reservations.json"): EndpointReservations;
|
|
15462
|
+
(ctx: Context, v: "POST:reservations.json"): EndpointReservationsCreate;
|
|
15463
|
+
(ctx: Context, v: "GET:reservations/page.json"): EndpointReservationsPage;
|
|
15267
15464
|
(ctx: Context, v: "DELETE:return_inspections.json"): EndpointReturnInspectionsDelete;
|
|
15268
15465
|
(ctx: Context, v: "GET:return_inspections.json"): EndpointReturnInspections;
|
|
15269
15466
|
(ctx: Context, v: "POST:return_inspections.json"): EndpointReturnInspectionsCreate;
|
|
@@ -15445,6 +15642,7 @@ export interface ReqFunction {
|
|
|
15445
15642
|
(ctx: Context, v: "GET:variant_inventory.json"): EndpointVariantInventory;
|
|
15446
15643
|
(ctx: Context, v: "POST:variant_inventory.json"): EndpointVariantInventoryCreate;
|
|
15447
15644
|
(ctx: Context, v: "GET:variant_inventory/log/page.json"): EndpointVariantInventoryLogPage;
|
|
15645
|
+
(ctx: Context, v: "GET:variant_inventory/state/page.json"): EndpointVariantInventoryStatePage;
|
|
15448
15646
|
(ctx: Context, v: "DELETE:webhooks.json"): EndpointWebhooksDelete;
|
|
15449
15647
|
(ctx: Context, v: "GET:webhooks.json"): EndpointWebhooks;
|
|
15450
15648
|
(ctx: Context, v: "POST:webhooks.json"): EndpointWebhooksCreate;
|
|
@@ -1128,6 +1128,14 @@ export interface ProductReviewSurveyAnswerCreate {
|
|
|
1128
1128
|
survey_question_id: string;
|
|
1129
1129
|
}
|
|
1130
1130
|
export type ProductReviewsPageSortBy = "created_at";
|
|
1131
|
+
export interface ProductReviewsSummary {
|
|
1132
|
+
/** Negative facts */
|
|
1133
|
+
negatives: Array<string>;
|
|
1134
|
+
/** Positive facts */
|
|
1135
|
+
positives: Array<string>;
|
|
1136
|
+
/** Generated summary of the customer reviews */
|
|
1137
|
+
text: string;
|
|
1138
|
+
}
|
|
1131
1139
|
export interface ProductSearchOptionAgg {
|
|
1132
1140
|
/** Number of occurrences in the aggregation */
|
|
1133
1141
|
count: number;
|
|
@@ -4509,6 +4517,15 @@ export interface EndpointStorefrontProductReviewsSettings extends Endpoint<Endpo
|
|
|
4509
4517
|
expand(v: StorefrontReviewSettingsExpansionMap): EndpointStorefrontProductReviewsSettings;
|
|
4510
4518
|
extract(v: Extractor<StorefrontReviewSettings>): EndpointStorefrontProductReviewsSettings;
|
|
4511
4519
|
}
|
|
4520
|
+
export interface EndpointStorefrontProductReviewsSummary extends Endpoint<EndpointStorefrontProductReviewsSummary, ProductReviewsSummary> {
|
|
4521
|
+
/** Output filtering */
|
|
4522
|
+
fields(v: Array<string>): EndpointStorefrontProductReviewsSummary;
|
|
4523
|
+
/** Unique product identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4524
|
+
product_id(v: string): EndpointStorefrontProductReviewsSummary;
|
|
4525
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4526
|
+
shop_id(v: string): EndpointStorefrontProductReviewsSummary;
|
|
4527
|
+
extract(v: Extractor<ProductReviewsSummary>): EndpointStorefrontProductReviewsSummary;
|
|
4528
|
+
}
|
|
4512
4529
|
export interface EndpointStorefrontProductReviewsVote extends Endpoint<EndpointStorefrontProductReviewsVote, void> {
|
|
4513
4530
|
/** Whether to delete the vote */
|
|
4514
4531
|
delete(v: boolean): EndpointStorefrontProductReviewsVote;
|
|
@@ -5036,6 +5053,7 @@ export interface ReqFunction {
|
|
|
5036
5053
|
(ctx: Context, v: "GET:storefront/product_reviews/images/page.json"): EndpointStorefrontProductReviewsImagesPage;
|
|
5037
5054
|
(ctx: Context, v: "GET:storefront/product_reviews/page.json"): EndpointStorefrontProductReviewsPage;
|
|
5038
5055
|
(ctx: Context, v: "GET:storefront/product_reviews/settings.json"): EndpointStorefrontProductReviewsSettings;
|
|
5056
|
+
(ctx: Context, v: "GET:storefront/product_reviews/summary.json"): EndpointStorefrontProductReviewsSummary;
|
|
5039
5057
|
(ctx: Context, v: "POST:storefront/product_reviews/vote.json"): EndpointStorefrontProductReviewsVote;
|
|
5040
5058
|
(ctx: Context, v: "GET:storefront/product_variants.json"): EndpointStorefrontProductVariants;
|
|
5041
5059
|
(ctx: Context, v: "GET:storefront/product_variants/page.json"): EndpointStorefrontProductVariantsPage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Event, Store } from "effector";
|
|
2
2
|
import type { AbstractOp, GraphQLOpts, RequestResponseError } from "../request.js";
|
|
3
|
-
import type { AnswerCreate, AnswerModify, FileNoFallbackFragment, ReviewDimensionFragment, ReviewDimensionSetFragment, ReviewSettingsFragment, SearchQuestionsSortBy, SearchReviewsSortBy, StorefrontCustomerVote, StorefrontProductQuestionCreate, StorefrontProductQuestionModify, StorefrontProductReviewCreate, StorefrontProductReviewModify } from "../graphql/types.js";
|
|
3
|
+
import type { AnswerCreate, AnswerModify, FileNoFallbackFragment, ProductReviewsSummaryFragment, ReviewDimensionFragment, ReviewDimensionSetFragment, ReviewSettingsFragment, SearchQuestionsSortBy, SearchReviewsSortBy, StorefrontCustomerVote, StorefrontProductQuestionCreate, StorefrontProductQuestionModify, StorefrontProductReviewCreate, StorefrontProductReviewModify } from "../graphql/types.js";
|
|
4
4
|
import type { Dict } from "../commonTypes.js";
|
|
5
5
|
import type { ResultErrorCode } from "../genericFile.js";
|
|
6
6
|
import type { ScoreValue } from "../rdsToInitialScores.js";
|
|
@@ -49,6 +49,7 @@ interface ReviewTypeReq {
|
|
|
49
49
|
type LoadResponse<ProductType, ReviewType, QuestionType> = {
|
|
50
50
|
products: ProductType[] | null;
|
|
51
51
|
reviews: SearchPage<ReviewType> | null;
|
|
52
|
+
reviewsSummary: ProductReviewsSummaryFragment | null;
|
|
52
53
|
questions: SearchPage<QuestionType> | null;
|
|
53
54
|
ownReviews: Page<ReviewType> | null;
|
|
54
55
|
ownQuestions: Page<QuestionType> | null;
|
|
@@ -78,6 +79,7 @@ export interface ProductConfig<ProductType, ReviewType, QuestionType> {
|
|
|
78
79
|
readonly loadProductNoCustomerQuery: AbstractOp<{
|
|
79
80
|
products: ProductType[] | null;
|
|
80
81
|
reviews: SearchPage<ReviewType> | null;
|
|
82
|
+
reviewsSummary: ProductReviewsSummaryFragment | null;
|
|
81
83
|
questions: SearchPage<QuestionType> | null;
|
|
82
84
|
images: NullPage<FileNoFallbackFragment> | null;
|
|
83
85
|
}, {
|
|
@@ -252,6 +254,7 @@ export interface Product<ProductType extends ProductTypeReq, ReviewType extends
|
|
|
252
254
|
setReviewsSortBy: Event<SearchReviewsSortBy>;
|
|
253
255
|
setReviewsSortDesc: Event<boolean>;
|
|
254
256
|
reviews: Store<ReviewType[] | null>;
|
|
257
|
+
reviewsSummary: Store<ProductReviewsSummaryFragment | null>;
|
|
255
258
|
questionsSortBy: Store<SearchQuestionsSortBy>;
|
|
256
259
|
questionsSortDesc: Store<boolean>;
|
|
257
260
|
setQuestionsSortBy: Event<SearchQuestionsSortBy>;
|
package/types/shopLinks.d.ts
CHANGED
|
@@ -13,4 +13,3 @@ export declare function shopRemoteURL(shop: ShopLike | string): string;
|
|
|
13
13
|
export declare function shopUnsubscribeURL(shop: ShopLike | string, token: string, email: string): string;
|
|
14
14
|
export declare function shopSubscriptionURL(shop: ShopLike | string, subscriptionID: string, email: string): string;
|
|
15
15
|
export declare function shopPreviewURL(shop: ShopLike | string): string;
|
|
16
|
-
export declare function shopProfileURL(shop: ShopLike | string): string;
|