@longvansoftware/storefront-js-client 1.2.2 → 1.2.4
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/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +10 -1
- package/dist/src/lib/order/index.d.ts +130 -116
- package/dist/src/lib/order/index.js +252 -163
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +16 -0
- package/dist/src/lib/service.js +3 -0
- package/dist/src/types/order.d.ts +46 -0
- package/package.json +1 -1
|
@@ -112,5 +112,21 @@ class ProductService extends service_1.Service {
|
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
getPolicy(groupId) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const query = queries_1.GET_POLICY;
|
|
118
|
+
const variablesHandle = {
|
|
119
|
+
groupId
|
|
120
|
+
};
|
|
121
|
+
try {
|
|
122
|
+
const response = yield this.graphqlQuery(query, variablesHandle);
|
|
123
|
+
return response.getPolicy;
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
console.log(`Error fetching getPolicy: ${error}`);
|
|
127
|
+
throw error;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
115
131
|
}
|
|
116
132
|
exports.ProductService = ProductService;
|
package/dist/src/lib/service.js
CHANGED
|
@@ -5,3 +5,49 @@ export interface LineItem {
|
|
|
5
5
|
input_price: number;
|
|
6
6
|
discount_amount: number;
|
|
7
7
|
}
|
|
8
|
+
export interface DiscountCampaign {
|
|
9
|
+
type_discount: string;
|
|
10
|
+
discount_amount: 0;
|
|
11
|
+
campaign_id: string;
|
|
12
|
+
campaign_action_id: string;
|
|
13
|
+
campaign_action_type: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CancelOrder {
|
|
16
|
+
reason: "CUSTOMER";
|
|
17
|
+
updatedBy: string;
|
|
18
|
+
note: string;
|
|
19
|
+
orderType: "SALES";
|
|
20
|
+
}
|
|
21
|
+
export interface MemberDiscount {
|
|
22
|
+
type: string;
|
|
23
|
+
amount: 0;
|
|
24
|
+
campaignId: string;
|
|
25
|
+
campaignActionId: string;
|
|
26
|
+
campaignActionType: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CampaignPromotion {
|
|
29
|
+
campaign_id: string;
|
|
30
|
+
campaign_action_id: string;
|
|
31
|
+
campaign_action_type: string;
|
|
32
|
+
}
|
|
33
|
+
export interface OrderQuery {
|
|
34
|
+
order_id: string;
|
|
35
|
+
status: [number];
|
|
36
|
+
statusIgnore: [number];
|
|
37
|
+
subStatus: string;
|
|
38
|
+
ffmStatus: string;
|
|
39
|
+
subType: string;
|
|
40
|
+
paymentMethod: string;
|
|
41
|
+
keyword: string;
|
|
42
|
+
customerMultiValue: string;
|
|
43
|
+
productMultiValue: string;
|
|
44
|
+
customerId: string;
|
|
45
|
+
createdBy: string;
|
|
46
|
+
dateCreateFrom: number;
|
|
47
|
+
dateCreateTo: number;
|
|
48
|
+
dateUpdateFrom: number;
|
|
49
|
+
dateUpdateTo: number;
|
|
50
|
+
employeeAssign: string;
|
|
51
|
+
currentPage: 1;
|
|
52
|
+
maxResult: 20;
|
|
53
|
+
}
|