@longvansoftware/storefront-js-client 4.5.3 → 4.5.5
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/src/graphql/cloudCloud/mutations.d.ts +1 -0
- package/dist/src/graphql/cloudCloud/mutations.js +6 -1
- package/dist/src/graphql/cloudCloud/queries.d.ts +1 -0
- package/dist/src/graphql/cloudCloud/queries.js +6 -1
- package/dist/src/graphql/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +39 -1
- package/dist/src/lib/cloudCloud/index.d.ts +2 -0
- package/dist/src/lib/cloudCloud/index.js +31 -0
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +16 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_SERVICE_RESOURCE = exports.UPDATE_DESCRIPTION = void 0;
|
|
3
|
+
exports.RECOUNT_USED_BOOKING = exports.UPDATE_SERVICE_RESOURCE = exports.UPDATE_DESCRIPTION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.UPDATE_DESCRIPTION = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation UpdateDescription(
|
|
@@ -34,3 +34,8 @@ exports.UPDATE_SERVICE_RESOURCE = (0, graphql_tag_1.gql) `
|
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
+
exports.RECOUNT_USED_BOOKING = (0, graphql_tag_1.gql) `
|
|
38
|
+
mutation RecountUsedBookings($serviceId: String!, $actorId: String!) {
|
|
39
|
+
recountUsedBookings(serviceId: $serviceId, actorId: $actorId)
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
@@ -2,3 +2,4 @@ export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
|
|
|
2
2
|
export declare const SERVICE_DETAIL: import("graphql").DocumentNode;
|
|
3
3
|
export declare const SEARCH_SERVICE_BY_PHONE: import("graphql").DocumentNode;
|
|
4
4
|
export declare const GET_LIST_LAB_SERVICE: import("graphql").DocumentNode;
|
|
5
|
+
export declare const COUNT_AVAILABLE_BOOKING: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_LIST_LAB_SERVICE = exports.SEARCH_SERVICE_BY_PHONE = exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
|
|
3
|
+
exports.COUNT_AVAILABLE_BOOKING = exports.GET_LIST_LAB_SERVICE = exports.SEARCH_SERVICE_BY_PHONE = exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
|
|
6
6
|
query SearchService($filter: CloudServiceFilterInput) {
|
|
@@ -178,3 +178,8 @@ exports.GET_LIST_LAB_SERVICE = (0, graphql_tag_1.gql) `
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
`;
|
|
181
|
+
exports.COUNT_AVAILABLE_BOOKING = (0, graphql_tag_1.gql) `
|
|
182
|
+
query countAvailableBookings($serviceId: String!) {
|
|
183
|
+
countAvailableBookings(serviceId: $serviceId)
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
@@ -24,3 +24,4 @@ export declare const GET_PRODUCT_BY_GROUPID: import("graphql").DocumentNode;
|
|
|
24
24
|
export declare const GET_CATEGORY_BY_ID: import("graphql").DocumentNode;
|
|
25
25
|
export declare const GET_CATEGORY_BY_HANDLE: import("graphql").DocumentNode;
|
|
26
26
|
export declare const GET_TAGS_BY_PRODUCT: import("graphql").DocumentNode;
|
|
27
|
+
export declare const GET_PRODUCT_STORE_BY_SCOPE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
3
|
+
exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
// export const GET_PRODUCT_BY_ID_QUERY = gql`
|
|
6
6
|
// query GetProductById(
|
|
@@ -1181,3 +1181,41 @@ exports.GET_TAGS_BY_PRODUCT = (0, graphql_tag_1.gql) `
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
`;
|
|
1184
|
+
exports.GET_PRODUCT_STORE_BY_SCOPE = (0, graphql_tag_1.gql) `
|
|
1185
|
+
query GetProductStoreByScope($scope: String!, $enable: Boolean) {
|
|
1186
|
+
getProductStoreByScope(scope: $scope, enable: $enable) {
|
|
1187
|
+
id
|
|
1188
|
+
createdStamp
|
|
1189
|
+
name
|
|
1190
|
+
type
|
|
1191
|
+
enable
|
|
1192
|
+
partyId
|
|
1193
|
+
warehouses
|
|
1194
|
+
warehouseIdDefault
|
|
1195
|
+
enableOrderAbleFuture
|
|
1196
|
+
enableOrderNegativeQuantity
|
|
1197
|
+
storeEcommerceName
|
|
1198
|
+
shippingCompanies
|
|
1199
|
+
shippingCompanyIdPrimary
|
|
1200
|
+
customerIdPrimary
|
|
1201
|
+
paymentMethodIdPrimary
|
|
1202
|
+
enableCustomProductPrice
|
|
1203
|
+
enablePaymentPartial
|
|
1204
|
+
paymentPartialPercent
|
|
1205
|
+
productStoreLink
|
|
1206
|
+
applyVat
|
|
1207
|
+
scope
|
|
1208
|
+
description {
|
|
1209
|
+
name
|
|
1210
|
+
phone
|
|
1211
|
+
address
|
|
1212
|
+
footer
|
|
1213
|
+
showInfoStore
|
|
1214
|
+
showBarcode
|
|
1215
|
+
showFooter
|
|
1216
|
+
showVat
|
|
1217
|
+
showPromotion
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
`;
|
|
@@ -7,4 +7,6 @@ export declare class CloudCloudService extends Service {
|
|
|
7
7
|
searchServiceByPhone(phone: string, serviceScope: string): Promise<any>;
|
|
8
8
|
getListLabService(productId: string): Promise<any>;
|
|
9
9
|
updateServiceResource(data: Record<string, any>): Promise<any>;
|
|
10
|
+
countAvailableBookings(serviceId: string): Promise<any>;
|
|
11
|
+
recountUsedBookings(serviceId: string, actorId: string): Promise<any>;
|
|
10
12
|
}
|
|
@@ -107,5 +107,36 @@ class CloudCloudService extends serviceSDK_1.Service {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
+
countAvailableBookings(serviceId) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const queries = queries_1.COUNT_AVAILABLE_BOOKING;
|
|
113
|
+
const variables = {
|
|
114
|
+
serviceId,
|
|
115
|
+
};
|
|
116
|
+
try {
|
|
117
|
+
const response = yield this.graphqlQueryV4(queries, variables);
|
|
118
|
+
return response.countAvailableBookings;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
recountUsedBookings(serviceId, actorId) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const mutation = mutations_1.RECOUNT_USED_BOOKING;
|
|
128
|
+
const variables = {
|
|
129
|
+
serviceId,
|
|
130
|
+
actorId,
|
|
131
|
+
};
|
|
132
|
+
try {
|
|
133
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
134
|
+
return response.recountUsedBookings;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
110
141
|
}
|
|
111
142
|
exports.CloudCloudService = CloudCloudService;
|
|
@@ -85,4 +85,5 @@ export declare class ProductService extends Service {
|
|
|
85
85
|
addProductTag(dataTag: any): Promise<any>;
|
|
86
86
|
removeProductTag(dataTag: any): Promise<any>;
|
|
87
87
|
getTagsByProduct(productId: string): Promise<any>;
|
|
88
|
+
getProductStoreByScope(scope: string, enable: boolean): Promise<any>;
|
|
88
89
|
}
|
|
@@ -967,5 +967,21 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
967
967
|
}
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
|
+
getProductStoreByScope(scope, enable) {
|
|
971
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
972
|
+
const queries = queries_1.GET_PRODUCT_STORE_BY_SCOPE;
|
|
973
|
+
const variables = {
|
|
974
|
+
scope,
|
|
975
|
+
enable,
|
|
976
|
+
};
|
|
977
|
+
try {
|
|
978
|
+
const response = yield this.graphqlQuery(queries, variables);
|
|
979
|
+
return response.getProductStoreByScope;
|
|
980
|
+
}
|
|
981
|
+
catch (error) {
|
|
982
|
+
throw error;
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
}
|
|
970
986
|
}
|
|
971
987
|
exports.ProductService = ProductService;
|