@longvansoftware/storefront-js-client 4.5.0 → 4.5.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_DESCRIPTION = void 0;
|
|
3
|
+
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(
|
|
@@ -15,3 +15,22 @@ exports.UPDATE_DESCRIPTION = (0, graphql_tag_1.gql) `
|
|
|
15
15
|
)
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
|
+
exports.UPDATE_SERVICE_RESOURCE = (0, graphql_tag_1.gql) `
|
|
19
|
+
mutation UpdateServiceResource(
|
|
20
|
+
$serviceId: String!
|
|
21
|
+
$keyId: String!
|
|
22
|
+
$name: String
|
|
23
|
+
$value: String
|
|
24
|
+
$unit: String
|
|
25
|
+
$actorId: String!
|
|
26
|
+
) {
|
|
27
|
+
updateServiceResource(
|
|
28
|
+
serviceId: $serviceId
|
|
29
|
+
keyId: $keyId
|
|
30
|
+
name: $name
|
|
31
|
+
value: $value
|
|
32
|
+
unit: $unit
|
|
33
|
+
actorId: $actorId
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
@@ -6,4 +6,5 @@ export declare class CloudCloudService extends Service {
|
|
|
6
6
|
updateDescription(serviceId: string, description: string, updatedBy: string): Promise<any>;
|
|
7
7
|
searchServiceByPhone(phone: string, serviceScope: string): Promise<any>;
|
|
8
8
|
getListLabService(productId: string): Promise<any>;
|
|
9
|
+
updateServiceResource(data: Record<string, any>): Promise<any>;
|
|
9
10
|
}
|
|
@@ -95,5 +95,17 @@ class CloudCloudService extends serviceSDK_1.Service {
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
updateServiceResource(data) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const mutation = mutations_1.UPDATE_SERVICE_RESOURCE;
|
|
101
|
+
try {
|
|
102
|
+
const response = yield this.graphqlMutationV2(mutation, data);
|
|
103
|
+
return response.updateServiceResource;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
98
110
|
}
|
|
99
111
|
exports.CloudCloudService = CloudCloudService;
|