@longvansoftware/storefront-js-client 4.4.6 → 4.4.7

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,2 +1,3 @@
1
1
  export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
2
2
  export declare const SERVICE_DETAIL: import("graphql").DocumentNode;
3
+ export declare const SEARCH_SERVICE_BY_PHONE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
3
+ exports.SEARCH_SERVICE_BY_PHONE = exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
6
6
  query SearchService($filter: CloudServiceFilterInput) {
@@ -125,3 +125,44 @@ exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
125
125
  }
126
126
  }
127
127
  `;
128
+ exports.SEARCH_SERVICE_BY_PHONE = (0, graphql_tag_1.gql) `
129
+ query SearchServiceByPhone($phone: String, $serviceScope: String) {
130
+ searchServiceByPhone(phone: $phone, serviceScope: $serviceScope) {
131
+ total
132
+ offset
133
+ maxResult
134
+ resultList {
135
+ supplierId
136
+ serviceId
137
+ partnerId
138
+ serviceName
139
+ serviceGroup
140
+ type
141
+ typeName
142
+ status
143
+ statusFulfillment
144
+ ownerId
145
+ startDate
146
+ endDate
147
+ serviceType
148
+ urlPrivate
149
+ urlPublic
150
+ username
151
+ password
152
+ attrs
153
+ description
154
+ ips
155
+ productGroupId
156
+ orderId
157
+ sponsorId
158
+ sponsorName
159
+ providedFromId
160
+ providedFromName
161
+ productConfiguration {
162
+ productId
163
+ productTitle
164
+ }
165
+ }
166
+ }
167
+ }
168
+ `;
@@ -4,4 +4,5 @@ export declare class CloudCloudService extends Service {
4
4
  searchService(data: any): Promise<any>;
5
5
  serviceDetail(serviceId: string): Promise<any>;
6
6
  updateDescription(serviceId: string, description: string, updatedBy: string): Promise<any>;
7
+ searchServiceByPhone(phone: string, serviceScope: string): Promise<any>;
7
8
  }
@@ -53,7 +53,7 @@ class CloudCloudService extends serviceSDK_1.Service {
53
53
  const variables = {
54
54
  serviceId,
55
55
  description,
56
- updatedBy
56
+ updatedBy,
57
57
  };
58
58
  try {
59
59
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -64,5 +64,21 @@ class CloudCloudService extends serviceSDK_1.Service {
64
64
  }
65
65
  });
66
66
  }
67
+ searchServiceByPhone(phone, serviceScope) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const query = queries_1.SEARCH_SERVICE_BY_PHONE;
70
+ const variables = {
71
+ phone,
72
+ serviceScope,
73
+ };
74
+ try {
75
+ const response = yield this.graphqlQueryV4(query, variables);
76
+ return response.searchServiceByPhone;
77
+ }
78
+ catch (error) {
79
+ throw error;
80
+ }
81
+ });
82
+ }
67
83
  }
68
84
  exports.CloudCloudService = CloudCloudService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.4.6",
3
+ "version": "4.4.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [