@longvansoftware/service-js-client 2.9.7 → 2.9.8
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.
|
@@ -80,11 +80,15 @@ const REMOVE_ORDER_REFERRAL_CODE = (fields = []) => {
|
|
|
80
80
|
$partnerId: String!
|
|
81
81
|
$orderId: String!
|
|
82
82
|
$referralCode: String!
|
|
83
|
+
$productId: String
|
|
84
|
+
$quantity: Int
|
|
83
85
|
) {
|
|
84
86
|
removeOrderReferralCode(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
partnerId: $partnerId
|
|
88
|
+
orderId: $orderId
|
|
89
|
+
referralCode: $referralCode
|
|
90
|
+
productId: $productId
|
|
91
|
+
quantity: $quantity
|
|
88
92
|
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
89
93
|
}
|
|
90
94
|
`;
|
|
@@ -12,7 +12,7 @@ export declare class StorefrontService extends Service {
|
|
|
12
12
|
productId: string;
|
|
13
13
|
qty: number;
|
|
14
14
|
}, fields?: string[]): Promise<any>;
|
|
15
|
-
removeOrderReferralCode(partnerId: string, orderId: string, referralCode: string, fields?: string[]): Promise<any>;
|
|
15
|
+
removeOrderReferralCode(partnerId: string, orderId: string, referralCode: string, productId?: string, quantity?: number, fields?: string[]): Promise<any>;
|
|
16
16
|
removeOrderItem(partnerId: string, orderId: string, storeChannel: string, itemId: string, reason?: string, fields?: string[]): Promise<any>;
|
|
17
17
|
getReferralCodeOrders(partnerId: string, voucherCode: string, referrerId: string, pages?: number, size?: number, fields?: string[]): Promise<any>;
|
|
18
18
|
}
|
|
@@ -125,10 +125,14 @@ class StorefrontService extends serviceSDK_1.Service {
|
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
removeOrderReferralCode(partnerId_1, orderId_1, referralCode_1) {
|
|
129
|
-
return __awaiter(this, arguments, void 0, function* (partnerId, orderId, referralCode, fields = ["status", "message"]) {
|
|
128
|
+
removeOrderReferralCode(partnerId_1, orderId_1, referralCode_1, productId_1, quantity_1) {
|
|
129
|
+
return __awaiter(this, arguments, void 0, function* (partnerId, orderId, referralCode, productId, quantity, fields = ["status", "message"]) {
|
|
130
130
|
const mutation = (0, mutation_1.REMOVE_ORDER_REFERRAL_CODE)(fields);
|
|
131
131
|
const variables = { partnerId, orderId, referralCode };
|
|
132
|
+
if (productId != null)
|
|
133
|
+
variables.productId = productId;
|
|
134
|
+
if (quantity != null)
|
|
135
|
+
variables.quantity = quantity;
|
|
132
136
|
try {
|
|
133
137
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
134
138
|
return response.removeOrderReferralCode;
|