@longvansoftware/service-js-client 1.9.6 → 1.9.8

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.
@@ -13,3 +13,4 @@ export declare const ADD_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
13
13
  export declare const REMOVE_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
14
14
  export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
15
15
  export declare const ADD_PORT_NAT: import("graphql").DocumentNode;
16
+ export declare const UPDATE_DESCRIPTION_COMPUTING: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
3
+ exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.RESTARTVM = (0, graphql_tag_1.gql) `
6
6
  mutation Restart($computingId: String!, $actor: String!) {
@@ -208,3 +208,16 @@ exports.ADD_PORT_NAT = (0, graphql_tag_1.gql) `
208
208
  )
209
209
  }
210
210
  `;
211
+ exports.UPDATE_DESCRIPTION_COMPUTING = (0, graphql_tag_1.gql) `
212
+ mutation UpdateDescriptionComputing(
213
+ $computingId: String!
214
+ $description: String!
215
+ $updateBy: String!
216
+ ) {
217
+ updateDescriptionComputing(
218
+ computingId: $computingId
219
+ description: $description
220
+ updateBy: $updateBy
221
+ )
222
+ }
223
+ `;
@@ -37,6 +37,7 @@ exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
37
37
  url
38
38
  baremetalId
39
39
  platform
40
+ description
40
41
  }
41
42
  }
42
43
  `;
@@ -53,6 +54,7 @@ exports.PORTNATS = (0, graphql_tag_1.gql) `
53
54
  description
54
55
  status
55
56
  domain
57
+ computingId
56
58
  }
57
59
  }
58
60
  `;
@@ -244,6 +246,7 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
244
246
  url
245
247
  baremetalId
246
248
  platform
249
+ description
247
250
  }
248
251
  }
249
252
  `;
@@ -338,6 +341,7 @@ exports.GET_COMPUTING_BY_CLUSTER = (0, graphql_tag_1.gql) `
338
341
  url
339
342
  baremetalId
340
343
  platform
344
+ description
341
345
  }
342
346
  }
343
347
  `;
@@ -376,6 +380,7 @@ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) `
376
380
  url
377
381
  baremetalId
378
382
  platform
383
+ description
379
384
  }
380
385
  }
381
386
  `;
@@ -404,6 +409,7 @@ exports.GET_PORT_NATS_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
404
409
  description
405
410
  status
406
411
  domain
412
+ computingId
407
413
  }
408
414
  }
409
415
  `;
@@ -6,27 +6,79 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
6
6
  query getOrderDetail($orderId: String!) {
7
7
  orderDetail(orderId: $orderId) {
8
8
  order {
9
+ cancelReason
10
+ currencyCode
11
+ orderStatus
12
+ totalPrice {
13
+ amount
14
+ }
15
+ discountTotalPrice {
16
+ amount
17
+ }
18
+ totalVAT {
19
+ amount
20
+ }
21
+ currentTotalPrice {
22
+ amount
23
+ }
9
24
  currentSubtotalPrice {
10
25
  amount
11
26
  currencyCode
12
27
  }
28
+ createdStamp
29
+ edited
13
30
  financialStatus
31
+ fulfillmentStatus
14
32
  orderStatus
33
+ id
34
+ partnerId
15
35
  ownerName
16
36
  ownerEmail
17
37
  ownerPhone
18
38
  ownerPartyId
39
+ orderNumber
40
+ rawData
19
41
  orderId
20
42
  id
43
+ note
44
+ pending
45
+ checkCommodities
46
+ shipmentNote
47
+ shopId
48
+ facilityId
49
+ orderType
50
+ shippingServiceId
51
+ carrierId
52
+ fromOrderId
53
+ externalCode
21
54
  createdAt
22
55
  currentTotalPrice {
23
56
  amount
24
57
  currencyCode
25
58
  }
26
59
  createdStamp
60
+ customAttribute
61
+ canceledAt
62
+ updatedAt
63
+ approvedAt
64
+ processedAt
65
+ completedAt
66
+ createdBy
67
+ saleName
68
+ salePartyId
69
+ ownerPartyId
70
+ customerLocale
71
+ orderParentId
72
+ shopName
73
+ version
74
+ description
27
75
  }
28
76
  lineItems {
29
77
  orderLineItem {
78
+ originalTotalPrice {
79
+ amount
80
+ }
81
+ description
30
82
  unitType
31
83
  customAttributes {
32
84
  key
@@ -74,6 +126,7 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
74
126
  unit
75
127
  productId
76
128
  }
129
+ itemType
77
130
  }
78
131
  }
79
132
  }
@@ -16,3 +16,5 @@ export declare const GET_PRODUCT_VARIANT_BY_ID: import("graphql").DocumentNode;
16
16
  export declare const GET_RELATED_INFOR: import("graphql").DocumentNode;
17
17
  export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
18
18
  export declare const GET_LIST_PRICE: import("graphql").DocumentNode;
19
+ export declare const GET_TAGS: import("graphql").DocumentNode;
20
+ export declare const GET_TAGS_BY_CATEGORY: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = 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;
3
+ exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = 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(
@@ -851,3 +851,37 @@ exports.GET_LIST_PRICE = (0, graphql_tag_1.gql) `
851
851
  )
852
852
  }
853
853
  `;
854
+ exports.GET_TAGS = (0, graphql_tag_1.gql) `
855
+ query GetTags($partnerId: String!, $storeChannel: String!) {
856
+ getTags(partnerId: $partnerId, storeChannel: $storeChannel) {
857
+ id
858
+ name
859
+ slug
860
+ type
861
+ scope
862
+ storeIds
863
+ selected
864
+ }
865
+ }
866
+ `;
867
+ exports.GET_TAGS_BY_CATEGORY = (0, graphql_tag_1.gql) `
868
+ query GetTagsByCategory(
869
+ $partnerId: String!
870
+ $storeChannel: String!
871
+ $categoryId: String!
872
+ ) {
873
+ getTagsByCategory(
874
+ partnerId: $partnerId
875
+ storeChannel: $storeChannel
876
+ categoryId: $categoryId
877
+ ) {
878
+ id
879
+ name
880
+ slug
881
+ type
882
+ scope
883
+ storeIds
884
+ selected
885
+ }
886
+ }
887
+ `;
@@ -45,4 +45,5 @@ export declare class ComputingService extends Service {
45
45
  getEdges(serviceId: string): Promise<any>;
46
46
  addPortNat(data: any): Promise<any>;
47
47
  getPortNatsByServiceId(serviceId: any): Promise<any>;
48
+ updateDescriptionComputing(computingId: string, description: string, updateBy: string): Promise<any>;
48
49
  }
@@ -571,7 +571,7 @@ class ComputingService extends serviceSDK_1.Service {
571
571
  const mutation = mutations_1.STOP_USE_COMPUTING;
572
572
  const variables = {
573
573
  computingId,
574
- userId
574
+ userId,
575
575
  };
576
576
  try {
577
577
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -587,7 +587,7 @@ class ComputingService extends serviceSDK_1.Service {
587
587
  return __awaiter(this, void 0, void 0, function* () {
588
588
  const query = queries_1.GET_EDGES;
589
589
  const variables = {
590
- serviceId
590
+ serviceId,
591
591
  };
592
592
  try {
593
593
  const response = yield this.graphqlQueryV2(query, variables);
@@ -617,7 +617,7 @@ class ComputingService extends serviceSDK_1.Service {
617
617
  return __awaiter(this, void 0, void 0, function* () {
618
618
  const query = queries_1.GET_PORT_NATS_BY_SERVICE_ID;
619
619
  const variables = {
620
- serviceId
620
+ serviceId,
621
621
  };
622
622
  try {
623
623
  const response = yield this.graphqlQueryV2(query, variables);
@@ -629,5 +629,23 @@ class ComputingService extends serviceSDK_1.Service {
629
629
  }
630
630
  });
631
631
  }
632
+ updateDescriptionComputing(computingId, description, updateBy) {
633
+ return __awaiter(this, void 0, void 0, function* () {
634
+ const query = mutations_1.UPDATE_DESCRIPTION_COMPUTING;
635
+ const variables = {
636
+ computingId,
637
+ description,
638
+ updateBy,
639
+ };
640
+ try {
641
+ const response = yield this.graphqlMutationV2(query, variables);
642
+ return response.updateDescriptionComputing;
643
+ }
644
+ catch (error) {
645
+ console.log(`Error fetching get updateDescriptionComputing method: ${error}`);
646
+ throw error;
647
+ }
648
+ });
649
+ }
632
650
  }
633
651
  exports.ComputingService = ComputingService;
@@ -44,4 +44,6 @@ export declare class ProductService extends Service {
44
44
  getRelatedInfor(id: string): Promise<any>;
45
45
  getDetailStores(storeId: string): Promise<any>;
46
46
  getListPrice(productIds: string[], storeId: string): Promise<any>;
47
+ getTags(storeId: string): Promise<any>;
48
+ getTagsByCategory(categoryId: string, storeId: string): Promise<any>;
47
49
  }
@@ -250,5 +250,40 @@ class ProductService extends serviceSDK_1.Service {
250
250
  }
251
251
  });
252
252
  }
253
+ getTags(storeId) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const query = queries_1.GET_TAGS;
256
+ const variablesHandle = {
257
+ partnerId: this.orgId,
258
+ storeChannel: storeId ? storeId : this.storeId,
259
+ };
260
+ try {
261
+ const response = yield this.graphqlQueryV2(query, variablesHandle);
262
+ return response.getTags;
263
+ }
264
+ catch (error) {
265
+ console.log(`Error fetching getTags error : ${error}`);
266
+ throw error;
267
+ }
268
+ });
269
+ }
270
+ getTagsByCategory(categoryId, storeId) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const query = queries_1.GET_TAGS_BY_CATEGORY;
273
+ const variablesHandle = {
274
+ partnerId: this.orgId,
275
+ storeChannel: storeId ? storeId : this.storeId,
276
+ categoryId,
277
+ };
278
+ try {
279
+ const response = yield this.graphqlQueryV2(query, variablesHandle);
280
+ return response.getTagsByCategory;
281
+ }
282
+ catch (error) {
283
+ console.log(`Error fetching getTagsByCategory error : ${error}`);
284
+ throw error;
285
+ }
286
+ });
287
+ }
253
288
  }
254
289
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [