@longvansoftware/storefront-js-client 4.7.1 → 4.7.2

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.
@@ -33,6 +33,7 @@ export declare const environmentEndpoints: {
33
33
  cloudCloud: string;
34
34
  truedoc: string;
35
35
  marketplace: string;
36
+ tag: string;
36
37
  };
37
38
  live: {
38
39
  product: string;
@@ -64,5 +65,6 @@ export declare const environmentEndpoints: {
64
65
  cloudCloud: string;
65
66
  truedoc: string;
66
67
  marketplace: string;
68
+ tag: string;
67
69
  };
68
70
  };
@@ -36,6 +36,7 @@ exports.environmentEndpoints = {
36
36
  cloudCloud: "https://api-gateway.dev.longvan.vn/cloud-service-api/graphql",
37
37
  truedoc: "https://api-gateway.dev.truedoc.vn/bmlconnector/graphql",
38
38
  marketplace: "https://api-gateway.dev.longvan.vn/marketplace/graphql",
39
+ tag: "https://portal.dev.longvan.vn/tag-api/graphql",
39
40
  },
40
41
  live: {
41
42
  product: "https://product-service.longvan.vn/product-service/graphql",
@@ -67,5 +68,6 @@ exports.environmentEndpoints = {
67
68
  cloudCloud: "https://api-gateway.longvan.vn/cloud-service-api/graphql",
68
69
  truedoc: "https://api-gateway.truedoc.vn/bmlconnector/graphql",
69
70
  marketplace: "https://api-gateway.longvan.vn/marketplace/graphql",
71
+ tag: "https://portal.longvan.vn/tag-api/graphql",
70
72
  },
71
73
  };
@@ -0,0 +1 @@
1
+ export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEARCH_SERVICE = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
6
+ query SearchService($filter: CloudServiceFilterInput) {
7
+ searchService(filter: $filter) {
8
+ total
9
+ offset
10
+ maxResult
11
+ resultList {
12
+ supplierId
13
+ serviceId
14
+ partnerId
15
+ serviceName
16
+ type
17
+ typeName
18
+ status
19
+ statusFulfillment
20
+ ownerId
21
+ startDate
22
+ endDate
23
+ serviceType
24
+ urlPrivate
25
+ urlPublic
26
+ username
27
+ password
28
+ attrs
29
+ description
30
+ productGroupId
31
+ orderId
32
+ actionRequest {
33
+ id
34
+ name
35
+ uri
36
+ type
37
+ }
38
+ billingCycle {
39
+ quantity
40
+ unit
41
+ }
42
+ productConfiguration {
43
+ productId
44
+ productTitle
45
+ productResources {
46
+ name
47
+ quantity
48
+ unit
49
+ productId
50
+ giftProductId
51
+ gift
52
+ giftQuantity
53
+ campaignId
54
+ campaignActionId
55
+ qualify
56
+ idParent
57
+ addQuantity
58
+ defaultQuantity
59
+ title
60
+ price
61
+ unitPrice
62
+ totalResource
63
+ unitGift
64
+ giftDuration
65
+ giftDurationUnit
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ `;
@@ -90,8 +90,16 @@ const graphql_tag_1 = require("graphql-tag");
90
90
  // }
91
91
  // `;
92
92
  exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
93
- query GetProductById($partnerId: String!, $storeChannel: String!, $productId: String!) {
94
- getProductById(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
93
+ query GetProductById(
94
+ $partnerId: String!
95
+ $storeChannel: String!
96
+ $productId: String!
97
+ ) {
98
+ getProductById(
99
+ partnerId: $partnerId
100
+ storeChannel: $storeChannel
101
+ productId: $productId
102
+ ) {
95
103
  id
96
104
  title
97
105
  description
@@ -202,8 +210,16 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
202
210
  }
203
211
  `;
204
212
  exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
205
- query GetSimpleProductById($partnerId: String!, $storeChannel: String!, $productId: String!) {
206
- getSimpleProductById(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
213
+ query GetSimpleProductById(
214
+ $partnerId: String!
215
+ $storeChannel: String!
216
+ $productId: String!
217
+ ) {
218
+ getSimpleProductById(
219
+ partnerId: $partnerId
220
+ storeChannel: $storeChannel
221
+ productId: $productId
222
+ ) {
207
223
  id
208
224
  title
209
225
  description
@@ -324,8 +340,16 @@ exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
324
340
  }
325
341
  `;
326
342
  exports.GET_PRODUCT_BY_SLUG_QUERY = (0, graphql_tag_1.gql) `
327
- query GetProductByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
328
- getProductByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
343
+ query GetProductByHandle(
344
+ $partnerId: String!
345
+ $storeChannel: String!
346
+ $handle: String!
347
+ ) {
348
+ getProductByHandle(
349
+ partnerId: $partnerId
350
+ storeChannel: $storeChannel
351
+ handle: $handle
352
+ ) {
329
353
  id
330
354
  title
331
355
  subType
@@ -509,8 +533,18 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
509
533
  }
510
534
  `;
511
535
  exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
512
- query GetCategories($partnerId: String!, $storeChannel: String!, $typeBuild: String!, $level: Int!) {
513
- getCategories(partnerId: $partnerId, storeChannel: $storeChannel, typeBuild: $typeBuild, level: $level) {
536
+ query GetCategories(
537
+ $partnerId: String!
538
+ $storeChannel: String!
539
+ $typeBuild: String!
540
+ $level: Int!
541
+ ) {
542
+ getCategories(
543
+ partnerId: $partnerId
544
+ storeChannel: $storeChannel
545
+ typeBuild: $typeBuild
546
+ level: $level
547
+ ) {
514
548
  id
515
549
  title
516
550
  image
@@ -533,8 +567,16 @@ exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
533
567
  }
534
568
  `;
535
569
  exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
536
- query GetCategoryByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
537
- getCategoryByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
570
+ query GetCategoryByHandle(
571
+ $partnerId: String!
572
+ $storeChannel: String!
573
+ $handle: String!
574
+ ) {
575
+ getCategoryByHandle(
576
+ partnerId: $partnerId
577
+ storeChannel: $storeChannel
578
+ handle: $handle
579
+ ) {
538
580
  id
539
581
  title
540
582
  image
@@ -555,8 +597,16 @@ exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
555
597
  }
556
598
  `;
557
599
  exports.GET_CATEGORY_BY_ID_QUERY = (0, graphql_tag_1.gql) `
558
- query GetCategoryById($partnerId: String!, $storeChannel: String!, $categoryId: String!) {
559
- getCategoryById(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {
600
+ query GetCategoryById(
601
+ $partnerId: String!
602
+ $storeChannel: String!
603
+ $categoryId: String!
604
+ ) {
605
+ getCategoryById(
606
+ partnerId: $partnerId
607
+ storeChannel: $storeChannel
608
+ categoryId: $categoryId
609
+ ) {
560
610
  id
561
611
  title
562
612
  image
@@ -607,8 +657,16 @@ exports.GET_BRAND_DETAIL_QUERY = `
607
657
  }
608
658
  `;
609
659
  exports.GET_PRODUCT_OPTION = (0, graphql_tag_1.gql) `
610
- query GetProductOption($partnerId: String!, $storeChannel: String!, $productId: String!) {
611
- getProductOption(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
660
+ query GetProductOption(
661
+ $partnerId: String!
662
+ $storeChannel: String!
663
+ $productId: String!
664
+ ) {
665
+ getProductOption(
666
+ partnerId: $partnerId
667
+ storeChannel: $storeChannel
668
+ productId: $productId
669
+ ) {
612
670
  id
613
671
  name
614
672
  subType
@@ -656,8 +714,18 @@ exports.GET_STORES = (0, graphql_tag_1.gql) `
656
714
  }
657
715
  `;
658
716
  exports.GET_STORES_V2 = (0, graphql_tag_1.gql) `
659
- query GetStores($partnerId: String!, $enable: Boolean, $type: String, $enablePortal: Boolean) {
660
- getStores(partnerId: $partnerId, enable: $enable, type: $type, enablePortal: $enablePortal) {
717
+ query GetStores(
718
+ $partnerId: String!
719
+ $enable: Boolean
720
+ $type: String
721
+ $enablePortal: Boolean
722
+ ) {
723
+ getStores(
724
+ partnerId: $partnerId
725
+ enable: $enable
726
+ type: $type
727
+ enablePortal: $enablePortal
728
+ ) {
661
729
  id
662
730
  createdStamp
663
731
  name
@@ -735,8 +803,22 @@ exports.GET_PRODUCT_IMAGE = (0, graphql_tag_1.gql) `
735
803
  }
736
804
  `;
737
805
  exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
738
- query GetProducts($partnerId: String!, $storeChannel: String!, $keyword: String, $category: String, $currentPage: Int, $maxResult: Int) {
739
- getProducts(partnerId: $partnerId, storeChannel: $storeChannel, keyword: $keyword, category: $category, currentPage: $currentPage, maxResult: $maxResult) {
806
+ query GetProducts(
807
+ $partnerId: String!
808
+ $storeChannel: String!
809
+ $keyword: String
810
+ $category: String
811
+ $currentPage: Int
812
+ $maxResult: Int
813
+ ) {
814
+ getProducts(
815
+ partnerId: $partnerId
816
+ storeChannel: $storeChannel
817
+ keyword: $keyword
818
+ category: $category
819
+ currentPage: $currentPage
820
+ maxResult: $maxResult
821
+ ) {
740
822
  total
741
823
  currentPage
742
824
  maxResult
@@ -800,8 +882,16 @@ exports.GET_UNITS = (0, graphql_tag_1.gql) `
800
882
  }
801
883
  `;
802
884
  exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
803
- query GetProductVariantById($partnerId: String!, $storeChannel: String!, $variantId: String!) {
804
- getProductVariantById(partnerId: $partnerId, storeChannel: $storeChannel, variantId: $variantId) {
885
+ query GetProductVariantById(
886
+ $partnerId: String!
887
+ $storeChannel: String!
888
+ $variantId: String!
889
+ ) {
890
+ getProductVariantById(
891
+ partnerId: $partnerId
892
+ storeChannel: $storeChannel
893
+ variantId: $variantId
894
+ ) {
805
895
  id
806
896
  title
807
897
  subType
@@ -907,8 +997,16 @@ exports.GET_TAGS = (0, graphql_tag_1.gql) `
907
997
  }
908
998
  `;
909
999
  exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
910
- query GetProducts($partnerId: String!, $storeChannel: String!, $group: String) {
911
- getProducts(partnerId: $partnerId, storeChannel: $storeChannel, group: $group) {
1000
+ query GetProducts(
1001
+ $partnerId: String!
1002
+ $storeChannel: String!
1003
+ $group: String
1004
+ ) {
1005
+ getProducts(
1006
+ partnerId: $partnerId
1007
+ storeChannel: $storeChannel
1008
+ group: $group
1009
+ ) {
912
1010
  total
913
1011
  currentPage
914
1012
  maxResult
@@ -1005,8 +1103,16 @@ exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
1005
1103
  }
1006
1104
  `;
1007
1105
  exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
1008
- query GetCategoryById($partnerId: String!, $storeChannel: String!, $categoryId: String!) {
1009
- getCategoryById(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {
1106
+ query GetCategoryById(
1107
+ $partnerId: String!
1108
+ $storeChannel: String!
1109
+ $categoryId: String!
1110
+ ) {
1111
+ getCategoryById(
1112
+ partnerId: $partnerId
1113
+ storeChannel: $storeChannel
1114
+ categoryId: $categoryId
1115
+ ) {
1010
1116
  id
1011
1117
  title
1012
1118
  image
@@ -1029,8 +1135,16 @@ exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
1029
1135
  }
1030
1136
  `;
1031
1137
  exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
1032
- query GetCategoryByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
1033
- getCategoryByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
1138
+ query GetCategoryByHandle(
1139
+ $partnerId: String!
1140
+ $storeChannel: String!
1141
+ $handle: String!
1142
+ ) {
1143
+ getCategoryByHandle(
1144
+ partnerId: $partnerId
1145
+ storeChannel: $storeChannel
1146
+ handle: $handle
1147
+ ) {
1034
1148
  id
1035
1149
  title
1036
1150
  image
@@ -1053,8 +1167,16 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
1053
1167
  }
1054
1168
  `;
1055
1169
  exports.GET_TAGS_BY_PRODUCT = (0, graphql_tag_1.gql) `
1056
- query GetTagsByProduct($partnerId: String!, $storeChannel: String!, $productId: String!) {
1057
- getTagsByProduct(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
1170
+ query GetTagsByProduct(
1171
+ $partnerId: String!
1172
+ $storeChannel: String!
1173
+ $productId: String!
1174
+ ) {
1175
+ getTagsByProduct(
1176
+ partnerId: $partnerId
1177
+ storeChannel: $storeChannel
1178
+ productId: $productId
1179
+ ) {
1058
1180
  id
1059
1181
  name
1060
1182
  slug
@@ -1120,8 +1242,16 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
1120
1242
  }
1121
1243
  `;
1122
1244
  exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1123
- query GetProductMarketplace($storeChannel: String!, $currentPage: Int, $maxResult: Int) {
1124
- getProductMarketplace(storeChannel: $storeChannel, currentPage: $currentPage, maxResult: $maxResult) {
1245
+ query GetProductMarketplace(
1246
+ $storeChannel: String!
1247
+ $currentPage: Int
1248
+ $maxResult: Int
1249
+ ) {
1250
+ getProductMarketplace(
1251
+ storeChannel: $storeChannel
1252
+ currentPage: $currentPage
1253
+ maxResult: $maxResult
1254
+ ) {
1125
1255
  total
1126
1256
  currentPage
1127
1257
  maxResult
@@ -1142,7 +1272,6 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1142
1272
  qualify
1143
1273
  parentId
1144
1274
  handle
1145
- slug
1146
1275
  price
1147
1276
  displayPrice
1148
1277
  hint
@@ -1234,8 +1363,14 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1234
1363
  }
1235
1364
  `;
1236
1365
  exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = (0, graphql_tag_1.gql) `
1237
- query GetProductMarketplaceDetailBySlug($storeChannel: String!, $slug: String!) {
1238
- getProductMarketplaceDetailBySlug(storeChannel: $storeChannel, slug: $slug) {
1366
+ query GetProductMarketplaceDetailBySlug(
1367
+ $storeChannel: String!
1368
+ $slug: String!
1369
+ ) {
1370
+ getProductMarketplaceDetailBySlug(
1371
+ storeChannel: $storeChannel
1372
+ slug: $slug
1373
+ ) {
1239
1374
  partyId
1240
1375
  id
1241
1376
  title
@@ -1474,8 +1609,18 @@ exports.GET_PRODUCT_MARKET_PLACE_BY_ID = (0, graphql_tag_1.gql) `
1474
1609
  }
1475
1610
  `;
1476
1611
  exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
1477
- query GetProductMarketplaceBySupplier($storeChannel: String!, $supplierId: String!, $currentPage: Int, $maxResult: Int) {
1478
- getProductMarketplaceBySupplier(storeChannel: $storeChannel, supplierId: $supplierId, currentPage: $currentPage, maxResult: $maxResult) {
1612
+ query GetProductMarketplaceBySupplier(
1613
+ $storeChannel: String!
1614
+ $supplierId: String!
1615
+ $currentPage: Int
1616
+ $maxResult: Int
1617
+ ) {
1618
+ getProductMarketplaceBySupplier(
1619
+ storeChannel: $storeChannel
1620
+ supplierId: $supplierId
1621
+ currentPage: $currentPage
1622
+ maxResult: $maxResult
1623
+ ) {
1479
1624
  total
1480
1625
  currentPage
1481
1626
  maxResult
@@ -0,0 +1,2 @@
1
+ export declare const ADD_TAG_TO_TAG_GROUP: import("graphql").DocumentNode;
2
+ export declare const REMOVE_TAG_TO_TAG_GROUP: import("graphql").DocumentNode;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMOVE_TAG_TO_TAG_GROUP = exports.ADD_TAG_TO_TAG_GROUP = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.ADD_TAG_TO_TAG_GROUP = (0, graphql_tag_1.gql) `
6
+ mutation AddTagToTagGroup(
7
+ $resourceId: String!
8
+ $resourceType: String!
9
+ $tagId: String!
10
+ $tagGroupId: String
11
+ $addedBy: String!
12
+ ) {
13
+ addTagToTagGroup(
14
+ resourceId: $resourceId
15
+ resourceType: $resourceType
16
+ tagId: $tagId
17
+ tagGroupId: $tagGroupId
18
+ addedBy: $addedBy
19
+ ) {
20
+ code
21
+ message
22
+ }
23
+ }
24
+ `;
25
+ exports.REMOVE_TAG_TO_TAG_GROUP = (0, graphql_tag_1.gql) `
26
+ mutation RemoveTagToTagGroup(
27
+ $resourceId: String!
28
+ $resourceType: String!
29
+ $tagId: String!
30
+ $tagGroupId: String
31
+ $updateBy: String!
32
+ ) {
33
+ removeTagToTagGroup(
34
+ resourceId: $resourceId
35
+ resourceType: $resourceType
36
+ tagId: $tagId
37
+ tagGroupId: $tagGroupId
38
+ updateBy: $updateBy
39
+ ) {
40
+ code
41
+ message
42
+ }
43
+ }
44
+ `;
@@ -0,0 +1 @@
1
+ export declare const GET_RESULT_TAG: import("graphql").DocumentNode;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_RESULT_TAG = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.GET_RESULT_TAG = (0, graphql_tag_1.gql) `
6
+ query GetResultTag($resourceId: String!, $resourceType: String!) {
7
+ getResultTag(resourceId: $resourceId, resourceType: $resourceType) {
8
+ id
9
+ title
10
+ items {
11
+ id
12
+ title
13
+ items {
14
+ id
15
+ title
16
+ }
17
+ }
18
+ }
19
+ }
20
+ `;
@@ -27,6 +27,7 @@ import { OrderCloudService } from "./orderCloud";
27
27
  import { CloudCloudService } from "./cloudCloud";
28
28
  import { TruedocService } from "./truedoc";
29
29
  import { MarketPlaceService } from "./marketplace";
30
+ import { TagService } from "./tag";
30
31
  export interface Endpoints {
31
32
  product: string;
32
33
  crm: string;
@@ -57,6 +58,7 @@ export interface Endpoints {
57
58
  cloudCloud: string;
58
59
  truedoc: string;
59
60
  marketplace: string;
61
+ tag: string;
60
62
  }
61
63
  export declare class SDK {
62
64
  orgId: string;
@@ -91,6 +93,7 @@ export declare class SDK {
91
93
  cloudCloud: CloudCloudService;
92
94
  truedoc: TruedocService;
93
95
  marketplace: MarketPlaceService;
96
+ tag: TagService;
94
97
  token: string | null;
95
98
  constructor(orgId: string, storeId: string, environment: "dev" | "live");
96
99
  setToken(token: string): void;
@@ -32,6 +32,7 @@ const orderCloud_1 = require("./orderCloud");
32
32
  const cloudCloud_1 = require("./cloudCloud");
33
33
  const truedoc_1 = require("./truedoc");
34
34
  const marketplace_1 = require("./marketplace");
35
+ const tag_1 = require("./tag");
35
36
  class SDK {
36
37
  constructor(orgId, storeId, environment) {
37
38
  this.orgId = orgId;
@@ -68,6 +69,7 @@ class SDK {
68
69
  this.cloudCloud = new cloudCloud_1.CloudCloudService(endpoints.cloudCloud, orgId, storeId);
69
70
  this.truedoc = new truedoc_1.TruedocService(endpoints.truedoc, orgId, storeId);
70
71
  this.marketplace = new marketplace_1.MarketPlaceService(endpoints.marketplace, orgId, storeId);
72
+ this.tag = new tag_1.TagService(endpoints.tag, orgId, storeId);
71
73
  // Initialize other services here
72
74
  }
73
75
  setToken(token) {
@@ -103,6 +105,7 @@ class SDK {
103
105
  this.cloudCloud.setToken(token);
104
106
  this.truedoc.setToken(token);
105
107
  this.marketplace.setToken(token);
108
+ this.tag.setToken(token);
106
109
  }
107
110
  // các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
108
111
  // src/service.ts
@@ -135,6 +138,7 @@ class SDK {
135
138
  this.cloudCloud.setStoreId(storeId);
136
139
  this.truedoc.setStoreId(storeId);
137
140
  this.marketplace.setStoreId(storeId);
141
+ this.tag.setStoreId(storeId);
138
142
  // Set storeId for other services here
139
143
  }
140
144
  setOrgId(orgId) {
@@ -166,6 +170,7 @@ class SDK {
166
170
  this.cloudCloud.setOrgId(orgId);
167
171
  this.truedoc.setOrgId(orgId);
168
172
  this.marketplace.setOrgId(orgId);
173
+ this.tag.setOrgId(orgId);
169
174
  }
170
175
  }
171
176
  exports.SDK = SDK;
@@ -0,0 +1,5 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class CloudServiceService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ searchService(data: any): Promise<any>;
5
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CloudServiceService = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ const queries_1 = require("../../graphql/cloudService/queries");
15
+ class CloudServiceService extends serviceSDK_1.Service {
16
+ constructor(endpoint, orgId, storeId) {
17
+ super(endpoint, orgId, storeId);
18
+ }
19
+ searchService(data) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const query = queries_1.SEARCH_SERVICE;
22
+ const variables = {
23
+ filter: data,
24
+ };
25
+ try {
26
+ const response = yield this.graphqlQueryV4(query, variables);
27
+ return response.searchService;
28
+ }
29
+ catch (error) {
30
+ throw error;
31
+ }
32
+ });
33
+ }
34
+ }
35
+ exports.CloudServiceService = CloudServiceService;
@@ -30,4 +30,7 @@ export declare class PortalService extends Service {
30
30
  getPosition(query?: Record<string, any>): Promise<any>;
31
31
  getPositionForTime(query?: Record<string, any>): Promise<any>;
32
32
  getBookingCount(query?: Record<string, any>): Promise<any>;
33
+ getSlugPathFromDynamicFrom(query?: Record<string, any>): Promise<any>;
34
+ putSlugPathFromDynamicFrom(data: any): Promise<any>;
35
+ postSlugPathFromDynamicFrom(data: any): Promise<any>;
33
36
  }
@@ -452,5 +452,55 @@ class PortalService extends serviceSDK_1.Service {
452
452
  }
453
453
  });
454
454
  }
455
+ getSlugPathFromDynamicFrom(query) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ const method = "GET";
458
+ const baseUrl = `/dynamic-collection/public/v2/records/slug_path/slug_path_view`;
459
+ const params = new URLSearchParams();
460
+ if (query) {
461
+ Object.entries(query).forEach(([key, value]) => {
462
+ if (value !== undefined && value !== null) {
463
+ params.append(key, String(value));
464
+ }
465
+ });
466
+ }
467
+ const endpoint = params.toString()
468
+ ? `${baseUrl}?${params.toString()}`
469
+ : baseUrl;
470
+ try {
471
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
472
+ return response;
473
+ }
474
+ catch (error) {
475
+ throw error;
476
+ }
477
+ });
478
+ }
479
+ putSlugPathFromDynamicFrom(data) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ const method = "PUT";
482
+ const endpoint = `/dynamic-collection/public/v2/records/slug_path/slug_path_form`;
483
+ try {
484
+ const response = yield this.restApiCallWithNoToken(endpoint, method, data);
485
+ return response;
486
+ }
487
+ catch (error) {
488
+ throw error;
489
+ }
490
+ });
491
+ }
492
+ postSlugPathFromDynamicFrom(data) {
493
+ return __awaiter(this, void 0, void 0, function* () {
494
+ const method = "POST";
495
+ const endpoint = `/dynamic-collection/public/v2/records/slug_path/slug_path_form`;
496
+ try {
497
+ const response = yield this.restApiCallWithNoHeader(endpoint, method, data);
498
+ return response;
499
+ }
500
+ catch (error) {
501
+ throw error;
502
+ }
503
+ });
504
+ }
455
505
  }
456
506
  exports.PortalService = PortalService;
@@ -0,0 +1,7 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class TagService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ addTagToTagGroup(data: any): Promise<any>;
5
+ removeTagToTagGroup(data: any): Promise<any>;
6
+ getResultTag(resourceId: string, resourceType: string): Promise<any>;
7
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TagService = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ const mutations_1 = require("../../graphql/tag/mutations");
15
+ const queries_1 = require("../../graphql/tag/queries");
16
+ class TagService extends serviceSDK_1.Service {
17
+ constructor(endpoint, orgId, storeId) {
18
+ super(endpoint, orgId, storeId);
19
+ }
20
+ addTagToTagGroup(data) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const mutation = mutations_1.ADD_TAG_TO_TAG_GROUP;
23
+ try {
24
+ const response = yield this.graphqlMutation(mutation, data);
25
+ return response.addTagToTagGroup;
26
+ }
27
+ catch (error) {
28
+ throw error;
29
+ }
30
+ });
31
+ }
32
+ removeTagToTagGroup(data) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const mutation = mutations_1.REMOVE_TAG_TO_TAG_GROUP;
35
+ try {
36
+ const response = yield this.graphqlMutation(mutation, data);
37
+ return response.removeTagToTagGroup;
38
+ }
39
+ catch (error) {
40
+ throw error;
41
+ }
42
+ });
43
+ }
44
+ getResultTag(resourceId, resourceType) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const queries = queries_1.GET_RESULT_TAG;
47
+ const variables = {
48
+ resourceId,
49
+ resourceType,
50
+ };
51
+ try {
52
+ const response = yield this.graphqlMutationV3(queries, variables);
53
+ return response.getResultTag;
54
+ }
55
+ catch (error) {
56
+ throw error;
57
+ }
58
+ });
59
+ }
60
+ }
61
+ exports.TagService = TagService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.7.1",
3
+ "version": "4.7.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [