@longvansoftware/service-js-client 1.3.3 → 1.3.5

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.
@@ -28,6 +28,7 @@ exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
28
28
  password
29
29
  attrs
30
30
  description
31
+ ips
31
32
  }
32
33
  resources {
33
34
  type
@@ -116,6 +117,8 @@ exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
116
117
  username
117
118
  password
118
119
  attrs
120
+ description
121
+ ips
119
122
  }
120
123
  }
121
124
  }
@@ -10,3 +10,4 @@ export declare const CPU_USAGE_DATE_RANGE: import("graphql").DocumentNode;
10
10
  export declare const NETWORK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
11
11
  export declare const DISK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
12
12
  export declare const BACKUP_POINT: import("graphql").DocumentNode;
13
+ export declare const GET_COMPUTINGS: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
3
+ exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
6
6
  query ComputingDetail($computingId: String!) {
@@ -184,3 +184,27 @@ exports.BACKUP_POINT = (0, graphql_tag_1.gql) `
184
184
  }
185
185
  }
186
186
  `;
187
+ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
188
+ query GetComputings($userId: String!) {
189
+ getComputings(userId: $userId) {
190
+ id
191
+ name
192
+ username
193
+ password
194
+ state
195
+ os
196
+ ips
197
+ province
198
+ console
199
+ consoleCookieName
200
+ consoleCookieValue
201
+ existPortNat
202
+ ipConnect
203
+ portConnect
204
+ protocolConnect
205
+ lastBackup
206
+ backupSequence
207
+ serviceId
208
+ }
209
+ }
210
+ `;
@@ -13,3 +13,4 @@ export declare const GET_PRODUCTS: import("graphql").DocumentNode;
13
13
  export declare const GET_HANDLE_BY_SERVICETYPE: import("graphql").DocumentNode;
14
14
  export declare const GET_RESOURCE_BY_PRODUCT: import("graphql").DocumentNode;
15
15
  export declare const GET_PRODUCT_VARIANT_BY_ID: import("graphql").DocumentNode;
16
+ export declare const GET_RELATED_INFOR: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -477,15 +477,38 @@ exports.GET_PRODUCT_OPTION = (0, graphql_tag_1.gql) `
477
477
  ) {
478
478
  id
479
479
  name
480
+ position
481
+ type
480
482
  subType
483
+ fill
484
+ requireData
485
+ values
486
+ valuesFull {
487
+ id
488
+ name
489
+ }
490
+ valuesPortal {
491
+ id
492
+ name
493
+ }
481
494
  productFeatureDTOS {
495
+ id
496
+ featureTypeId
482
497
  productOptionGroupItemDTOS {
483
498
  id
499
+ price
484
500
  productId
485
501
  productName
502
+ }
503
+ productOptionConfigs {
504
+ id
486
505
  price
506
+ productId
507
+ productName
487
508
  }
488
509
  }
510
+ createStamp
511
+ createdBy
489
512
  }
490
513
  }
491
514
  `;
@@ -760,3 +783,11 @@ exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
760
783
  }
761
784
  }
762
785
  `;
786
+ exports.GET_RELATED_INFOR = (0, graphql_tag_1.gql) `
787
+ query GetProductVariantById($id: String!) {
788
+ getRelatedInfor(id: $id) {
789
+ id
790
+ type
791
+ }
792
+ }
793
+ `;
@@ -31,4 +31,5 @@ export declare class ComputingService extends Service {
31
31
  diskUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
32
32
  networkUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
33
33
  diskUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
34
+ getComputings(userId: string): Promise<any>;
34
35
  }
@@ -410,5 +410,21 @@ class ComputingService extends serviceSDK_1.Service {
410
410
  }
411
411
  });
412
412
  }
413
+ getComputings(userId) {
414
+ return __awaiter(this, void 0, void 0, function* () {
415
+ const query = queries_1.GET_COMPUTINGS;
416
+ const variables = {
417
+ userId,
418
+ };
419
+ try {
420
+ const response = yield this.graphqlQueryV2(query, variables);
421
+ return response.getComputings;
422
+ }
423
+ catch (error) {
424
+ console.log(`Error fetching get getComputings method: ${error}`);
425
+ throw error;
426
+ }
427
+ });
428
+ }
413
429
  }
414
430
  exports.ComputingService = ComputingService;
@@ -38,4 +38,5 @@ export declare class ProductService extends Service {
38
38
  getHandleByServiceTypes(serviceTypes: [string]): Promise<any>;
39
39
  getResourceByProduct(productId: string): Promise<any>;
40
40
  getProductVariantById(variantId: string): Promise<any>;
41
+ getRelatedInfor(id: string): Promise<any>;
41
42
  }
@@ -196,5 +196,21 @@ class ProductService extends serviceSDK_1.Service {
196
196
  }
197
197
  });
198
198
  }
199
+ getRelatedInfor(id) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ const query = queries_1.GET_RELATED_INFOR;
202
+ const variablesHandle = {
203
+ id,
204
+ };
205
+ try {
206
+ const response = yield this.graphqlQueryV2(query, variablesHandle);
207
+ return response.getRelatedInfor;
208
+ }
209
+ catch (error) {
210
+ console.log(`Error fetching getRelatedInfor error : ${error}`);
211
+ throw error;
212
+ }
213
+ });
214
+ }
199
215
  }
200
216
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [