@longvansoftware/service-js-client 1.13.1 → 1.13.2
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.
@@ -2,3 +2,4 @@ export declare const GET_ORDER_DETAIL: import("graphql").DocumentNode;
|
|
2
2
|
export declare const GET_QUANTITY_ORDER_LINEITEMS: import("graphql").DocumentNode;
|
3
3
|
export declare const GET_ORDER_LINE_ITEM_BY_SERVICE_ID: import("graphql").DocumentNode;
|
4
4
|
export declare const GET_ORDER_BY_SERVICE_ID: import("graphql").DocumentNode;
|
5
|
+
export declare const FIND_ORDER_BY_OWNER_PARTYID: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_ORDER_BY_SERVICE_ID = exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = exports.GET_QUANTITY_ORDER_LINEITEMS = exports.GET_ORDER_DETAIL = void 0;
|
3
|
+
exports.FIND_ORDER_BY_OWNER_PARTYID = exports.GET_ORDER_BY_SERVICE_ID = exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = exports.GET_QUANTITY_ORDER_LINEITEMS = exports.GET_ORDER_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query getOrderDetail($orderId: String!) {
|
@@ -371,3 +371,8 @@ exports.GET_ORDER_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
371
371
|
}
|
372
372
|
}
|
373
373
|
`;
|
374
|
+
exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
375
|
+
query FindOrderByOwnerPartyId($partnerId: String!, $ownerPartyId: String!) {
|
376
|
+
findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
|
377
|
+
}
|
378
|
+
`;
|
@@ -11,4 +11,5 @@ export declare class OrderGraphQLService extends Service {
|
|
11
11
|
getOrderByServiceId(serviceId: string): Promise<any>;
|
12
12
|
addToCart(serviceId: string, actorId: string, cartId: string): Promise<any>;
|
13
13
|
removeProductOptionOrderLineItem(orderLineItemId: string, optionId: string, updateBy: string): Promise<any>;
|
14
|
+
findOrderByOwnerPartyId(ownerPartyId: string): Promise<any>;
|
14
15
|
}
|
@@ -155,5 +155,22 @@ class OrderGraphQLService extends serviceSDK_1.Service {
|
|
155
155
|
}
|
156
156
|
});
|
157
157
|
}
|
158
|
+
findOrderByOwnerPartyId(ownerPartyId) {
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
160
|
+
const query = queries_1.FIND_ORDER_BY_OWNER_PARTYID;
|
161
|
+
const variables = {
|
162
|
+
partnerId: this.orgId,
|
163
|
+
ownerPartyId,
|
164
|
+
};
|
165
|
+
try {
|
166
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
167
|
+
return response.findOrderByOwnerPartyId;
|
168
|
+
}
|
169
|
+
catch (error) {
|
170
|
+
console.log(`Error in findOrderByOwnerPartyId: ${error}`);
|
171
|
+
throw error;
|
172
|
+
}
|
173
|
+
});
|
174
|
+
}
|
158
175
|
}
|
159
176
|
exports.OrderGraphQLService = OrderGraphQLService;
|