@longvansoftware/storefront-js-client 3.8.9 → 3.9.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FIND_ORDER_BY_OWNER_PARTYID: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FIND_ORDER_BY_OWNER_PARTYID = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
|
6
|
+
query FindOrderByOwnerPartyId(
|
|
7
|
+
$partnerId: String!
|
|
8
|
+
$ownerPartyId: String!
|
|
9
|
+
) {
|
|
10
|
+
findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OrderCloudService = void 0;
|
|
13
13
|
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
-
const
|
|
14
|
+
const queries_1 = require("../../graphql/orderCloud/queries");
|
|
15
15
|
class OrderCloudService extends serviceSDK_1.Service {
|
|
16
16
|
constructor(endpoint, orgId, storeId) {
|
|
17
17
|
super(endpoint, orgId, storeId);
|
|
@@ -19,13 +19,13 @@ class OrderCloudService extends serviceSDK_1.Service {
|
|
|
19
19
|
//
|
|
20
20
|
findOrderByOwnerPartyId(ownerPartyId) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const
|
|
22
|
+
const query = queries_1.FIND_ORDER_BY_OWNER_PARTYID;
|
|
23
23
|
const variables = {
|
|
24
24
|
partnerId: this.orgId,
|
|
25
25
|
ownerPartyId,
|
|
26
26
|
};
|
|
27
27
|
try {
|
|
28
|
-
const response = yield this.
|
|
28
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
29
29
|
return response.findOrderByOwnerPartyId;
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|