@longvansoftware/storefront-js-client 4.6.2-truedoc.1 → 4.6.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.
@@ -7,9 +7,9 @@ exports.defaultTokens = {
7
7
  };
8
8
  exports.environmentEndpoints = {
9
9
  dev: {
10
- product: "https://dev.api-gateway.io.vn/product-service/graphql",
10
+ product: "https://product-service.dev.longvan.vn/product-service/graphql",
11
11
  crm: "https://crm-ticket-gateway.dev.longvan.vn/crm-graph-gateway/graphql",
12
- auth: "https://dev.api-gateway.io.vn/authorization-gateway/graphql",
12
+ auth: "https://crm.dev.longvan.vn/authorization-gateway/graphql",
13
13
  order: "https://storefront.dev.longvan.vn/v2",
14
14
  user: "https://user.dev.longvan.vn/user-gateway/graphql",
15
15
  payment: "https://portal.dev.longvan.vn/invoice-gateway/graphql",
@@ -32,18 +32,18 @@ exports.environmentEndpoints = {
32
32
  cashbook: "https://api-gateway.dev.longvan.vn/cashbook-service/graphql",
33
33
  store: "https://storefront.dev.longvan.vn/v2",
34
34
  fileService: "https://fileservice.dev.longvan.vn/omnichannel",
35
- orderCloud: "https://dev.api-gateway.io.vn/order-cloud-service/graphql",
36
- cloudCloud: "https://dev.api-gateway.io.vn/cloud-service-api/graphql",
37
- truedoc: "https://dev.api-gateway.io.vn/bmlconnector/graphql",
35
+ orderCloud: "https://api-gateway.dev.longvan.vn/order-cloud-service/graphql",
36
+ cloudCloud: "https://api-gateway.dev.longvan.vn/cloud-service-api/graphql",
37
+ truedoc: "https://api-gateway.dev.truedoc.vn/bmlconnector/graphql",
38
38
  },
39
39
  live: {
40
- product: "https://api-gateway.io.vn/product-service/graphql",
40
+ product: "https://product-service.longvan.vn/product-service/graphql",
41
41
  crm: "https://crm-ticket-gateway.longvan.vn/crm-graph-gateway/graphql",
42
- auth: "https://api-gateway.io.vn/authorization-gateway/graphql",
42
+ auth: "https://crm.longvan.vn/authorization-gateway/graphql",
43
43
  order: "https://storefront.longvan.vn/v2",
44
- user: "https://api-gateway.io.vn/user-gateway/graphql",
44
+ user: "https://user.longvan.vn/user-gateway/graphql",
45
45
  payment: "https://portal.longvan.vn/invoice-gateway/graphql",
46
- service: "https://api-gateway.io.vn/service-api/graphql",
46
+ service: "https://api-gateway.longvan.vn/service-api/graphql",
47
47
  warehouse: "https://portal.longvan.vn/facility-api/public-facility/1.0.0/inventory-item",
48
48
  computing: "https://api-gateway.longvan.vn/computing-service/graphql",
49
49
  campaign: "https://crm.longvan.vn/campaign-gateway/graphql",
@@ -62,8 +62,8 @@ exports.environmentEndpoints = {
62
62
  cashbook: "https://api-gateway.longvan.vn/cashbook-service/graphql",
63
63
  store: "https://storefront.longvan.vn/v2",
64
64
  fileService: "https://fileservice.longvan.vn/longvan",
65
- orderCloud: "https://api-gateway.io.vn/order-cloud-service/graphql",
66
- cloudCloud: "https://api-gateway.io.vn/cloud-service-api/graphql",
65
+ orderCloud: "https://api-gateway.longvan.vn/order-cloud-service/graphql",
66
+ cloudCloud: "https://api-gateway.longvan.vn/cloud-service-api/graphql",
67
67
  truedoc: "https://api-gateway.truedoc.vn/bmlconnector/graphql",
68
68
  },
69
69
  };
@@ -27,3 +27,6 @@ export declare const GET_TAGS_BY_PRODUCT: import("graphql").DocumentNode;
27
27
  export declare const GET_PRODUCT_STORE_BY_SCOPE: import("graphql").DocumentNode;
28
28
  export declare const GET_PRODUCT_STORE_PUBLIC: import("graphql").DocumentNode;
29
29
  export declare const GET_PRODUCT_MARKET_PLACE: import("graphql").DocumentNode;
30
+ export declare const GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG: import("graphql").DocumentNode;
31
+ export declare const GET_PRODUCT_MARKET_PLACE_BY_ID: import("graphql").DocumentNode;
32
+ export declare const GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = 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_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = exports.GET_PRODUCT_MARKET_PLACE_BY_ID = exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = 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_SIMPLE_PRODUCT_BY_ID_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(
@@ -1238,17 +1238,13 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
1238
1238
  exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1239
1239
  query GetProductMarketplace(
1240
1240
  $storeChannel: String!
1241
- $supplierId: String
1242
- $categoryId: String
1243
- $productId: String
1244
- $handle: String
1241
+ $currentPage:Int
1242
+ $maxResult: Int
1245
1243
  ) {
1246
1244
  getProductMarketplace(
1247
1245
  storeChannel: $storeChannel
1248
- supplierId: $supplierId
1249
- categoryId: $categoryId
1250
- productId: $productId
1251
- handle: $handle
1246
+ currentPage:$currentPage
1247
+ maxResult:$maxResult
1252
1248
  ) {
1253
1249
  total
1254
1250
  currentPage
@@ -1369,3 +1365,399 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1369
1365
  }
1370
1366
  }
1371
1367
  `;
1368
+ exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = (0, graphql_tag_1.gql) `
1369
+ query GetProductMarketplaceDetailBySlug(
1370
+ $storeChannel: String!
1371
+ $slug: String!
1372
+ ) {
1373
+ getProductMarketplaceDetailBySlug(
1374
+ storeChannel: $storeChannel
1375
+ slug: $slug
1376
+ ) {
1377
+ partyId
1378
+ id
1379
+ title
1380
+ subType
1381
+ description
1382
+ sku
1383
+ shortDescription
1384
+ weight
1385
+ width
1386
+ depth
1387
+ height
1388
+ vat
1389
+ qualify
1390
+ parentId
1391
+ handle
1392
+ price
1393
+ displayPrice
1394
+ hint
1395
+ compareAtPrices
1396
+ priceUnit
1397
+ priceQuantity
1398
+ priceType
1399
+ salePolicy
1400
+ priceTypeName
1401
+ priceVaries
1402
+ available
1403
+ options
1404
+ optionsRelationship
1405
+ compareAtPrice
1406
+ featuredImage
1407
+ version
1408
+ images
1409
+ brand {
1410
+ id
1411
+ createStamp
1412
+ createdBy
1413
+ name
1414
+ image
1415
+ imageIcon
1416
+ }
1417
+ unitDTO {
1418
+ id
1419
+ name
1420
+ }
1421
+ productAttributes {
1422
+ attributeName
1423
+ attributeValue
1424
+ }
1425
+ attributeDTOS {
1426
+ id
1427
+ key
1428
+ keyId
1429
+ extendFromSource
1430
+ value {
1431
+ name
1432
+ value
1433
+ }
1434
+ metadata {
1435
+ type
1436
+ dataFrom
1437
+ description
1438
+ requiredData
1439
+ otherItem
1440
+ fill
1441
+ usedCreatedChild
1442
+ }
1443
+ }
1444
+ tags {
1445
+ id
1446
+ name
1447
+ slug
1448
+ type
1449
+ scope
1450
+ storeIds
1451
+ selected
1452
+ }
1453
+ variants {
1454
+ id
1455
+ handle
1456
+ title
1457
+ price
1458
+ priceType
1459
+ compareAtPrice
1460
+ options
1461
+ optionsIds
1462
+ featuredImage
1463
+ sku
1464
+ }
1465
+ featureTypes {
1466
+ id
1467
+ keyId
1468
+ name
1469
+ position
1470
+ type
1471
+ subType
1472
+ fill
1473
+ requireData
1474
+ otherItem
1475
+ values
1476
+ description
1477
+ createStamp
1478
+ createdBy
1479
+ usedCreatedChild
1480
+ }
1481
+ categories {
1482
+ id
1483
+ title
1484
+ image
1485
+ icon
1486
+ parentId
1487
+ level
1488
+ handle
1489
+ description
1490
+ }
1491
+ groups {
1492
+ id
1493
+ name
1494
+ policy
1495
+ image
1496
+ resourceId
1497
+ resourceType
1498
+ scope
1499
+ }
1500
+ }
1501
+ }
1502
+ `;
1503
+ exports.GET_PRODUCT_MARKET_PLACE_BY_ID = (0, graphql_tag_1.gql) `
1504
+ query GetProductMarketplaceDetailById($storeChannel: String!, $id: String!) {
1505
+ getProductMarketplaceDetailById(storeChannel: $storeChannel, id: $id) {
1506
+ partyId
1507
+ id
1508
+ title
1509
+ subType
1510
+ description
1511
+ sku
1512
+ shortDescription
1513
+ weight
1514
+ width
1515
+ depth
1516
+ height
1517
+ vat
1518
+ qualify
1519
+ parentId
1520
+ handle
1521
+ price
1522
+ displayPrice
1523
+ hint
1524
+ compareAtPrices
1525
+ priceUnit
1526
+ priceQuantity
1527
+ priceType
1528
+ salePolicy
1529
+ priceTypeName
1530
+ priceVaries
1531
+ available
1532
+ options
1533
+ optionsRelationship
1534
+ compareAtPrice
1535
+ featuredImage
1536
+ version
1537
+ images
1538
+ brand {
1539
+ id
1540
+ createStamp
1541
+ createdBy
1542
+ name
1543
+ image
1544
+ imageIcon
1545
+ }
1546
+ unitDTO {
1547
+ id
1548
+ name
1549
+ }
1550
+ productAttributes {
1551
+ attributeName
1552
+ attributeValue
1553
+ }
1554
+ attributeDTOS {
1555
+ id
1556
+ key
1557
+ keyId
1558
+ extendFromSource
1559
+ value {
1560
+ name
1561
+ value
1562
+ }
1563
+ metadata {
1564
+ type
1565
+ dataFrom
1566
+ description
1567
+ requiredData
1568
+ otherItem
1569
+ fill
1570
+ usedCreatedChild
1571
+ }
1572
+ }
1573
+ tags {
1574
+ id
1575
+ name
1576
+ slug
1577
+ type
1578
+ scope
1579
+ storeIds
1580
+ selected
1581
+ }
1582
+ variants {
1583
+ id
1584
+ handle
1585
+ title
1586
+ price
1587
+ priceType
1588
+ compareAtPrice
1589
+ options
1590
+ optionsIds
1591
+ featuredImage
1592
+ sku
1593
+ }
1594
+ featureTypes {
1595
+ id
1596
+ keyId
1597
+ name
1598
+ position
1599
+ type
1600
+ subType
1601
+ fill
1602
+ requireData
1603
+ otherItem
1604
+ values
1605
+ description
1606
+ createStamp
1607
+ createdBy
1608
+ usedCreatedChild
1609
+ }
1610
+ categories {
1611
+ id
1612
+ title
1613
+ image
1614
+ icon
1615
+ parentId
1616
+ level
1617
+ handle
1618
+ description
1619
+ }
1620
+ groups {
1621
+ id
1622
+ name
1623
+ policy
1624
+ image
1625
+ resourceId
1626
+ resourceType
1627
+ scope
1628
+ }
1629
+ }
1630
+ }
1631
+ `;
1632
+ exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
1633
+ query GetProductMarketplaceBySupplier(
1634
+ $storeChannel: String!
1635
+ $supplierId: String!
1636
+ $currentPage: Int
1637
+ $maxResult: Int
1638
+ ) {
1639
+ getProductMarketplaceBySupplier(
1640
+ storeChannel: $storeChannel
1641
+ supplierId: $supplierId
1642
+ currentPage: $currentPage
1643
+ maxResult: $maxResult
1644
+ ) {
1645
+ total
1646
+ currentPage
1647
+ maxResult
1648
+ totalPage
1649
+ data {
1650
+ partyId
1651
+ id
1652
+ title
1653
+ subType
1654
+ description
1655
+ sku
1656
+ shortDescription
1657
+ weight
1658
+ width
1659
+ depth
1660
+ height
1661
+ vat
1662
+ qualify
1663
+ parentId
1664
+ handle
1665
+ price
1666
+ displayPrice
1667
+ hint
1668
+ compareAtPrices
1669
+ priceUnit
1670
+ priceQuantity
1671
+ priceType
1672
+ salePolicy
1673
+ priceTypeName
1674
+ priceVaries
1675
+ available
1676
+ options
1677
+ optionsRelationship
1678
+ compareAtPrice
1679
+ featuredImage
1680
+ version
1681
+ images
1682
+ brand {
1683
+ id
1684
+ createStamp
1685
+ createdBy
1686
+ name
1687
+ image
1688
+ imageIcon
1689
+ }
1690
+ unitDTO {
1691
+ id
1692
+ name
1693
+ }
1694
+ productAttributes {
1695
+ attributeName
1696
+ attributeValue
1697
+ }
1698
+ attributeDTOS {
1699
+ id
1700
+ key
1701
+ keyId
1702
+ extendFromSource
1703
+ }
1704
+ variants {
1705
+ id
1706
+ handle
1707
+ title
1708
+ price
1709
+ priceType
1710
+ compareAtPrice
1711
+ options
1712
+ optionsIds
1713
+ featuredImage
1714
+ sku
1715
+ }
1716
+ featureTypes {
1717
+ id
1718
+ keyId
1719
+ name
1720
+ position
1721
+ type
1722
+ subType
1723
+ fill
1724
+ requireData
1725
+ otherItem
1726
+ values
1727
+ description
1728
+ createStamp
1729
+ createdBy
1730
+ usedCreatedChild
1731
+ }
1732
+ categories {
1733
+ id
1734
+ title
1735
+ image
1736
+ icon
1737
+ parentId
1738
+ level
1739
+ handle
1740
+ description
1741
+ }
1742
+ groups {
1743
+ id
1744
+ name
1745
+ policy
1746
+ image
1747
+ resourceId
1748
+ resourceType
1749
+ scope
1750
+ }
1751
+ tags {
1752
+ id
1753
+ name
1754
+ slug
1755
+ type
1756
+ scope
1757
+ storeIds
1758
+ selected
1759
+ }
1760
+ }
1761
+ }
1762
+ }
1763
+ `;
@@ -89,4 +89,7 @@ export declare class ProductService extends Service {
89
89
  getProductStorePublic(productId: string, isPublic: boolean): Promise<any>;
90
90
  publicProduct(storeId: string, productId: string, isPublic: boolean, updatedBy: string): Promise<any>;
91
91
  getProductMarketplace(dataQuery: any): Promise<any>;
92
+ getProductMarketplaceDetailBySlug(storeChannel: string, slug: string): Promise<any>;
93
+ getProductMarketplaceDetailById(storeChannel: string, id: string): Promise<any>;
94
+ getProductMarketplaceBySupplier(dataQuery: any): Promise<any>;
92
95
  }
@@ -1029,5 +1029,50 @@ class ProductService extends serviceSDK_1.Service {
1029
1029
  }
1030
1030
  });
1031
1031
  }
1032
+ getProductMarketplaceDetailBySlug(storeChannel, slug) {
1033
+ return __awaiter(this, void 0, void 0, function* () {
1034
+ const queries = queries_1.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG;
1035
+ const variables = {
1036
+ storeChannel,
1037
+ slug,
1038
+ };
1039
+ try {
1040
+ const response = yield this.graphqlQuery(queries, variables);
1041
+ return response.getProductMarketplaceDetailBySlug;
1042
+ }
1043
+ catch (error) {
1044
+ throw error;
1045
+ }
1046
+ });
1047
+ }
1048
+ getProductMarketplaceDetailById(storeChannel, id) {
1049
+ return __awaiter(this, void 0, void 0, function* () {
1050
+ const queries = queries_1.GET_PRODUCT_MARKET_PLACE_BY_ID;
1051
+ const variables = {
1052
+ storeChannel,
1053
+ id,
1054
+ };
1055
+ try {
1056
+ const response = yield this.graphqlQuery(queries, variables);
1057
+ return response;
1058
+ }
1059
+ catch (error) {
1060
+ throw error;
1061
+ }
1062
+ });
1063
+ }
1064
+ getProductMarketplaceBySupplier(dataQuery) {
1065
+ return __awaiter(this, void 0, void 0, function* () {
1066
+ const queries = queries_1.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER;
1067
+ const variables = {};
1068
+ try {
1069
+ const response = yield this.graphqlQuery(queries, dataQuery);
1070
+ return response.getProductMarketplaceBySupplier;
1071
+ }
1072
+ catch (error) {
1073
+ throw error;
1074
+ }
1075
+ });
1076
+ }
1032
1077
  }
1033
1078
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.6.2-truedoc.1",
3
+ "version": "4.6.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [