@longvansoftware/storefront-js-client 4.7.4 → 4.7.6

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,5 +7,6 @@ export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
7
7
  export declare const GET_PAYMENT_METHOD_TITLES: import("graphql").DocumentNode;
8
8
  export declare const GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE: import("graphql").DocumentNode;
9
9
  export declare const GET_PAYMENT_METHOD_TYPES_V2: import("graphql").DocumentNode;
10
+ export declare const GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG: import("graphql").DocumentNode;
10
11
  export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
11
12
  export declare const PAYMENT_METHODS_BY_PARTNER: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYMENT_METHODS_BY_PARTNER = exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
3
+ exports.PAYMENT_METHODS_BY_PARTNER = exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
6
6
  query PaymentsByOrders($orderIds: [String!]!) {
@@ -255,6 +255,44 @@ exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
255
255
  }
256
256
  }
257
257
  `;
258
+ exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
259
+ query GetPaymentMethodTypesWithGatewayConfig(
260
+ $partnerId: String!
261
+ $storeId: String!
262
+ ) {
263
+ getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
264
+ code
265
+ name
266
+ description
267
+ image
268
+ storeActive
269
+ paymentGatewayConfig {
270
+ id
271
+ methodCode
272
+ partnerCode
273
+ subMethodCode
274
+ gwPartnerCode
275
+ gwPartnerName
276
+ gwPaymentMethod
277
+ gwSubChannel
278
+ gwMethodVersion
279
+ hashAlgorithm
280
+ accessKey
281
+ secretKey
282
+ responseUrl
283
+ requestUrl
284
+ methodType
285
+ publicKey
286
+ redirectUrl
287
+ activated
288
+ paymentRecordingMethod
289
+ userId
290
+ name
291
+ description
292
+ }
293
+ }
294
+ }
295
+ `;
258
296
  exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
259
297
  query GetTransferInfo(
260
298
  $partnerId: String!
@@ -33,3 +33,4 @@ export declare const GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG: DocumentNode;
33
33
  export declare const GET_PRODUCT_MARKET_PLACE_BY_ID: DocumentNode;
34
34
  export declare const GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER: DocumentNode;
35
35
  export declare const GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC: (fields?: string[]) => DocumentNode;
36
+ export declare const GET_PRODUCT_RELATED_TO_ARTICLE: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = 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_V2 = 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_RELATED_TO_ARTICLE = exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = 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_V2 = 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(
@@ -90,16 +90,8 @@ 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(
94
- $partnerId: String!
95
- $storeChannel: String!
96
- $productId: String!
97
- ) {
98
- getProductById(
99
- partnerId: $partnerId
100
- storeChannel: $storeChannel
101
- productId: $productId
102
- ) {
93
+ query GetProductById($partnerId: String!, $storeChannel: String!, $productId: String!) {
94
+ getProductById(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
103
95
  id
104
96
  title
105
97
  description
@@ -210,16 +202,8 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
210
202
  }
211
203
  `;
212
204
  exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
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
- ) {
205
+ query GetSimpleProductById($partnerId: String!, $storeChannel: String!, $productId: String!) {
206
+ getSimpleProductById(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
223
207
  id
224
208
  title
225
209
  description
@@ -340,16 +324,8 @@ exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
340
324
  }
341
325
  `;
342
326
  exports.GET_PRODUCT_BY_SLUG_QUERY = (0, graphql_tag_1.gql) `
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
- ) {
327
+ query GetProductByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
328
+ getProductByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
353
329
  id
354
330
  title
355
331
  subType
@@ -533,18 +509,8 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
533
509
  }
534
510
  `;
535
511
  exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
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
- ) {
512
+ query GetCategories($partnerId: String!, $storeChannel: String!, $typeBuild: String!, $level: Int!) {
513
+ getCategories(partnerId: $partnerId, storeChannel: $storeChannel, typeBuild: $typeBuild, level: $level) {
548
514
  id
549
515
  title
550
516
  image
@@ -567,16 +533,8 @@ exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
567
533
  }
568
534
  `;
569
535
  exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
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
- ) {
536
+ query GetCategoryByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
537
+ getCategoryByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
580
538
  id
581
539
  title
582
540
  image
@@ -597,16 +555,8 @@ exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
597
555
  }
598
556
  `;
599
557
  exports.GET_CATEGORY_BY_ID_QUERY = (0, graphql_tag_1.gql) `
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
- ) {
558
+ query GetCategoryById($partnerId: String!, $storeChannel: String!, $categoryId: String!) {
559
+ getCategoryById(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {
610
560
  id
611
561
  title
612
562
  image
@@ -657,16 +607,8 @@ exports.GET_BRAND_DETAIL_QUERY = `
657
607
  }
658
608
  `;
659
609
  exports.GET_PRODUCT_OPTION = (0, graphql_tag_1.gql) `
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
- ) {
610
+ query GetProductOption($partnerId: String!, $storeChannel: String!, $productId: String!) {
611
+ getProductOption(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
670
612
  id
671
613
  name
672
614
  subType
@@ -714,18 +656,8 @@ exports.GET_STORES = (0, graphql_tag_1.gql) `
714
656
  }
715
657
  `;
716
658
  exports.GET_STORES_V2 = (0, graphql_tag_1.gql) `
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
- ) {
659
+ query GetStores($partnerId: String!, $enable: Boolean, $type: String, $enablePortal: Boolean) {
660
+ getStores(partnerId: $partnerId, enable: $enable, type: $type, enablePortal: $enablePortal) {
729
661
  id
730
662
  createdStamp
731
663
  name
@@ -803,22 +735,8 @@ exports.GET_PRODUCT_IMAGE = (0, graphql_tag_1.gql) `
803
735
  }
804
736
  `;
805
737
  exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
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
- ) {
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) {
822
740
  total
823
741
  currentPage
824
742
  maxResult
@@ -882,16 +800,8 @@ exports.GET_UNITS = (0, graphql_tag_1.gql) `
882
800
  }
883
801
  `;
884
802
  exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
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
- ) {
803
+ query GetProductVariantById($partnerId: String!, $storeChannel: String!, $variantId: String!) {
804
+ getProductVariantById(partnerId: $partnerId, storeChannel: $storeChannel, variantId: $variantId) {
895
805
  id
896
806
  title
897
807
  subType
@@ -997,16 +907,8 @@ exports.GET_TAGS = (0, graphql_tag_1.gql) `
997
907
  }
998
908
  `;
999
909
  exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
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
- ) {
910
+ query GetProducts($partnerId: String!, $storeChannel: String!, $group: String) {
911
+ getProducts(partnerId: $partnerId, storeChannel: $storeChannel, group: $group) {
1010
912
  total
1011
913
  currentPage
1012
914
  maxResult
@@ -1103,16 +1005,8 @@ exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
1103
1005
  }
1104
1006
  `;
1105
1007
  exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
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
- ) {
1008
+ query GetCategoryById($partnerId: String!, $storeChannel: String!, $categoryId: String!) {
1009
+ getCategoryById(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {
1116
1010
  id
1117
1011
  title
1118
1012
  image
@@ -1135,16 +1029,8 @@ exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
1135
1029
  }
1136
1030
  `;
1137
1031
  exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
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
- ) {
1032
+ query GetCategoryByHandle($partnerId: String!, $storeChannel: String!, $handle: String!) {
1033
+ getCategoryByHandle(partnerId: $partnerId, storeChannel: $storeChannel, handle: $handle) {
1148
1034
  id
1149
1035
  title
1150
1036
  image
@@ -1167,16 +1053,8 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
1167
1053
  }
1168
1054
  `;
1169
1055
  exports.GET_TAGS_BY_PRODUCT = (0, graphql_tag_1.gql) `
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
- ) {
1056
+ query GetTagsByProduct($partnerId: String!, $storeChannel: String!, $productId: String!) {
1057
+ getTagsByProduct(partnerId: $partnerId, storeChannel: $storeChannel, productId: $productId) {
1180
1058
  id
1181
1059
  name
1182
1060
  slug
@@ -1242,16 +1120,8 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
1242
1120
  }
1243
1121
  `;
1244
1122
  exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
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
- ) {
1123
+ query GetProductMarketplace($storeChannel: String!, $currentPage: Int, $maxResult: Int) {
1124
+ getProductMarketplace(storeChannel: $storeChannel, currentPage: $currentPage, maxResult: $maxResult) {
1255
1125
  total
1256
1126
  currentPage
1257
1127
  maxResult
@@ -1363,14 +1233,8 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1363
1233
  }
1364
1234
  `;
1365
1235
  exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = (0, graphql_tag_1.gql) `
1366
- query GetProductMarketplaceDetailBySlug(
1367
- $storeChannel: String!
1368
- $slug: String!
1369
- ) {
1370
- getProductMarketplaceDetailBySlug(
1371
- storeChannel: $storeChannel
1372
- slug: $slug
1373
- ) {
1236
+ query GetProductMarketplaceDetailBySlug($storeChannel: String!, $slug: String!) {
1237
+ getProductMarketplaceDetailBySlug(storeChannel: $storeChannel, slug: $slug) {
1374
1238
  partyId
1375
1239
  id
1376
1240
  title
@@ -1609,18 +1473,8 @@ exports.GET_PRODUCT_MARKET_PLACE_BY_ID = (0, graphql_tag_1.gql) `
1609
1473
  }
1610
1474
  `;
1611
1475
  exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
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
- ) {
1476
+ query GetProductMarketplaceBySupplier($storeChannel: String!, $supplierId: String!, $currentPage: Int, $maxResult: Int) {
1477
+ getProductMarketplaceBySupplier(storeChannel: $storeChannel, supplierId: $supplierId, currentPage: $currentPage, maxResult: $maxResult) {
1624
1478
  total
1625
1479
  currentPage
1626
1480
  maxResult
@@ -1749,3 +1603,19 @@ const GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = (fields = []) => {
1749
1603
  `;
1750
1604
  };
1751
1605
  exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC;
1606
+ const GET_PRODUCT_RELATED_TO_ARTICLE = (fields = []) => {
1607
+ const fieldStr = fields.join("\n ");
1608
+ const hasFields = fields.length > 0;
1609
+ return (0, graphql_tag_1.gql) `query getProductRelatedToArticle(
1610
+ $partnerId: String!
1611
+ $storeId: String!
1612
+ $articleId: String!
1613
+ ){
1614
+ getProductRelatedToArticle(
1615
+ partnerId: $partnerId
1616
+ storeId: $storeId
1617
+ articleId: $articleId
1618
+ ) ${hasFields ? `{ ${fieldStr} }` : ""}
1619
+ }`;
1620
+ };
1621
+ exports.GET_PRODUCT_RELATED_TO_ARTICLE = GET_PRODUCT_RELATED_TO_ARTICLE;
@@ -25,4 +25,5 @@ export declare class PaymentServiceV2 extends Service {
25
25
  email?: string;
26
26
  }): Promise<any>;
27
27
  paymentMethodsByPartner(partnerCode?: string): Promise<any>;
28
+ getPaymentMethodTypesWithGatewayConfig(partnerId?: string, storeId?: string): Promise<any>;
28
29
  }
@@ -286,5 +286,18 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
286
286
  }
287
287
  });
288
288
  }
289
+ getPaymentMethodTypesWithGatewayConfig(partnerId, storeId) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ const query = queries_1.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG;
292
+ const variables = { partnerId, storeId };
293
+ try {
294
+ const response = yield this.graphqlQueryV3(query, variables);
295
+ return response.getPaymentMethodTypes;
296
+ }
297
+ catch (error) {
298
+ throw error;
299
+ }
300
+ });
301
+ }
289
302
  }
290
303
  exports.PaymentServiceV2 = PaymentServiceV2;
@@ -96,4 +96,5 @@ export declare class ProductService extends Service {
96
96
  getProductMarketplaceBySupplier(dataQuery: any): Promise<any>;
97
97
  getProductSimpleByHandle(handle: string, store: string, fields: string[]): Promise<any>;
98
98
  getStoresAndDescription(dataQuery: any): Promise<any>;
99
+ getProductRealtedToArticle(articleId: string, fields: string[]): Promise<any>;
99
100
  }
@@ -30,7 +30,7 @@ class ProductService extends serviceSDK_1.Service {
30
30
  const query = queries_1.GET_PRODUCT_IMAGE;
31
31
  const variables = {
32
32
  partnerId: this.orgId,
33
- productId,
33
+ productId
34
34
  };
35
35
  try {
36
36
  const response = yield this.graphqlQuery(query, variables);
@@ -54,7 +54,7 @@ class ProductService extends serviceSDK_1.Service {
54
54
  const variables = {
55
55
  partnerId: this.orgId,
56
56
  storeChannel: this.storeId,
57
- productId,
57
+ productId
58
58
  };
59
59
  try {
60
60
  const response = yield this.graphqlQuery(query, variables);
@@ -72,7 +72,7 @@ class ProductService extends serviceSDK_1.Service {
72
72
  const variables = {
73
73
  partnerId: this.orgId,
74
74
  storeChannel: "",
75
- productId,
75
+ productId
76
76
  };
77
77
  try {
78
78
  const response = yield this.graphqlQuery(query, variables);
@@ -90,7 +90,7 @@ class ProductService extends serviceSDK_1.Service {
90
90
  const variables = {
91
91
  partnerId: this.orgId,
92
92
  storeChannel: this.storeId,
93
- productId,
93
+ productId
94
94
  };
95
95
  try {
96
96
  const response = yield this.graphqlQuery(query, variables);
@@ -114,7 +114,7 @@ class ProductService extends serviceSDK_1.Service {
114
114
  const variables = {
115
115
  partnerId: this.orgId,
116
116
  storeChannel: this.storeId,
117
- handle: slug,
117
+ handle: slug
118
118
  };
119
119
  try {
120
120
  const response = yield this.graphqlQuery(query, variables);
@@ -152,7 +152,7 @@ class ProductService extends serviceSDK_1.Service {
152
152
  const variablesHandle = {
153
153
  partnerId: this.orgId,
154
154
  storeChannel: this.storeId,
155
- productId,
155
+ productId
156
156
  };
157
157
  try {
158
158
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -168,7 +168,7 @@ class ProductService extends serviceSDK_1.Service {
168
168
  return __awaiter(this, void 0, void 0, function* () {
169
169
  const query = queries_1.GET_POLICY;
170
170
  const variablesHandle = {
171
- groupId,
171
+ groupId
172
172
  };
173
173
  try {
174
174
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -186,7 +186,7 @@ class ProductService extends serviceSDK_1.Service {
186
186
  const query = queries_1.GET_STORES;
187
187
  const variablesHandle = {
188
188
  partnerId: this.orgId,
189
- type,
189
+ type
190
190
  };
191
191
  try {
192
192
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -203,7 +203,7 @@ class ProductService extends serviceSDK_1.Service {
203
203
  const query = queries_1.GET_DETAIL_STORES;
204
204
  const variablesHandle = {
205
205
  partnerId: this.orgId,
206
- storeId: this.storeId,
206
+ storeId: this.storeId
207
207
  };
208
208
  try {
209
209
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -220,7 +220,7 @@ class ProductService extends serviceSDK_1.Service {
220
220
  const query = queries_1.GET_DETAIL_STORES;
221
221
  const variablesHandle = {
222
222
  partnerId: this.orgId,
223
- storeId,
223
+ storeId
224
224
  };
225
225
  try {
226
226
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -236,7 +236,7 @@ class ProductService extends serviceSDK_1.Service {
236
236
  const query = queries_1.GET_DETAIL_STORES;
237
237
  const variables = {
238
238
  partnerId,
239
- storeId,
239
+ storeId
240
240
  };
241
241
  try {
242
242
  const response = yield this.graphqlQuery(query, variables);
@@ -254,7 +254,7 @@ class ProductService extends serviceSDK_1.Service {
254
254
  partnerId: this.orgId,
255
255
  storeChannel: storeId,
256
256
  typeBuild,
257
- level,
257
+ level
258
258
  };
259
259
  try {
260
260
  const response = yield this.graphqlQuery(query, variables);
@@ -274,7 +274,7 @@ class ProductService extends serviceSDK_1.Service {
274
274
  keyword: dataQuery.keyword,
275
275
  category: dataQuery.category,
276
276
  currentPage: dataQuery.currentPage,
277
- maxResult: dataQuery.maxResult,
277
+ maxResult: dataQuery.maxResult
278
278
  };
279
279
  try {
280
280
  const response = yield this.graphqlQuery(query, variables);
@@ -294,7 +294,7 @@ class ProductService extends serviceSDK_1.Service {
294
294
  keyword: dataQuery.keyword,
295
295
  category: dataQuery.category,
296
296
  currentPage: dataQuery.currentPage,
297
- maxResult: dataQuery.maxResult,
297
+ maxResult: dataQuery.maxResult
298
298
  };
299
299
  try {
300
300
  const response = yield this.graphqlQuery(query, variables);
@@ -311,7 +311,7 @@ class ProductService extends serviceSDK_1.Service {
311
311
  const variables = {
312
312
  productId: productId,
313
313
  title: title,
314
- updatedBy: updatedBy,
314
+ updatedBy: updatedBy
315
315
  };
316
316
  try {
317
317
  const response = yield this.graphqlMutation(mutation, variables);
@@ -329,7 +329,7 @@ class ProductService extends serviceSDK_1.Service {
329
329
  productId: productId,
330
330
  storeId: this.storeId,
331
331
  price: price,
332
- updatedBy: updatedBy,
332
+ updatedBy: updatedBy
333
333
  };
334
334
  try {
335
335
  const response = yield this.graphqlMutation(mutation, variables);
@@ -347,7 +347,7 @@ class ProductService extends serviceSDK_1.Service {
347
347
  productId: productId,
348
348
  storeId: this.storeId,
349
349
  price: price,
350
- updatedBy: updatedBy,
350
+ updatedBy: updatedBy
351
351
  };
352
352
  try {
353
353
  const response = yield this.graphqlMutation(mutation, variables);
@@ -364,7 +364,7 @@ class ProductService extends serviceSDK_1.Service {
364
364
  const variables = {
365
365
  productId: productId,
366
366
  categoryId: categoryId,
367
- updatedBy: updatedBy,
367
+ updatedBy: updatedBy
368
368
  };
369
369
  try {
370
370
  const response = yield this.graphqlMutation(mutation, variables);
@@ -381,7 +381,7 @@ class ProductService extends serviceSDK_1.Service {
381
381
  const variables = {
382
382
  productId: productId,
383
383
  shortDescription: shortDescription,
384
- updatedBy: updatedBy,
384
+ updatedBy: updatedBy
385
385
  };
386
386
  try {
387
387
  const response = yield this.graphqlMutation(mutation, variables);
@@ -398,7 +398,7 @@ class ProductService extends serviceSDK_1.Service {
398
398
  const variables = {
399
399
  productId: productId,
400
400
  unitId: unitId,
401
- updatedBy: updatedBy,
401
+ updatedBy: updatedBy
402
402
  };
403
403
  try {
404
404
  const response = yield this.graphqlMutation(mutation, variables);
@@ -413,7 +413,7 @@ class ProductService extends serviceSDK_1.Service {
413
413
  return __awaiter(this, void 0, void 0, function* () {
414
414
  const query = queries_1.GET_UNITS;
415
415
  const variables = {
416
- partnerId: this.orgId,
416
+ partnerId: this.orgId
417
417
  };
418
418
  try {
419
419
  const response = yield this.graphqlQuery(query, variables);
@@ -443,7 +443,7 @@ class ProductService extends serviceSDK_1.Service {
443
443
  const variables = {
444
444
  partnerId: this.orgId,
445
445
  storeChannel: this.storeId,
446
- variantId,
446
+ variantId
447
447
  };
448
448
  try {
449
449
  const response = yield this.graphqlQuery(query, variables);
@@ -458,7 +458,7 @@ class ProductService extends serviceSDK_1.Service {
458
458
  return __awaiter(this, void 0, void 0, function* () {
459
459
  const mutation = mutations_1.CREATE_PRODUCT_TEMPLATES_BY_PARTNER;
460
460
  const variables = {
461
- partnerId: partnerId,
461
+ partnerId: partnerId
462
462
  };
463
463
  try {
464
464
  const response = yield this.graphqlMutation(mutation, variables);
@@ -475,7 +475,7 @@ class ProductService extends serviceSDK_1.Service {
475
475
  const variables = {
476
476
  partnerId: this.orgId,
477
477
  templateId,
478
- createdBy,
478
+ createdBy
479
479
  };
480
480
  try {
481
481
  const response = yield this.graphqlMutation(mutaion, variables);
@@ -491,7 +491,7 @@ class ProductService extends serviceSDK_1.Service {
491
491
  const query = queries_1.GET_PRODUCT_TEMPLATES;
492
492
  const variables = {
493
493
  partnerId: this.orgId,
494
- groupId: groupId,
494
+ groupId: groupId
495
495
  };
496
496
  try {
497
497
  const response = yield this.graphqlQuery(query, variables);
@@ -507,7 +507,7 @@ class ProductService extends serviceSDK_1.Service {
507
507
  const query = queries_1.GET_GROUPS;
508
508
  const variables = {
509
509
  partnerId: this.orgId,
510
- storeChannel: this.storeId,
510
+ storeChannel: this.storeId
511
511
  };
512
512
  try {
513
513
  const response = yield this.graphqlQuery(query, variables);
@@ -522,7 +522,7 @@ class ProductService extends serviceSDK_1.Service {
522
522
  return __awaiter(this, void 0, void 0, function* () {
523
523
  const query = queries_1.GET_BRAND;
524
524
  const variables = {
525
- partnerId: this.orgId,
525
+ partnerId: this.orgId
526
526
  };
527
527
  try {
528
528
  const response = yield this.graphqlQuery(query, variables);
@@ -538,7 +538,7 @@ class ProductService extends serviceSDK_1.Service {
538
538
  const query = queries_1.GET_TAGS;
539
539
  const variables = {
540
540
  partnerId: this.orgId,
541
- storeChannel: this.storeId,
541
+ storeChannel: this.storeId
542
542
  };
543
543
  try {
544
544
  const response = yield this.graphqlQuery(query, variables);
@@ -555,7 +555,7 @@ class ProductService extends serviceSDK_1.Service {
555
555
  const variables = {
556
556
  productId,
557
557
  key,
558
- values,
558
+ values
559
559
  };
560
560
  try {
561
561
  const response = yield this.graphqlMutation(mutaion, variables);
@@ -573,7 +573,7 @@ class ProductService extends serviceSDK_1.Service {
573
573
  partnerId: this.orgId,
574
574
  productId: productId,
575
575
  productInputDTOS: productInputDTOS,
576
- storeId: this.storeId,
576
+ storeId: this.storeId
577
577
  };
578
578
  try {
579
579
  const response = yield this.graphqlMutation(mutaion, variables);
@@ -590,7 +590,7 @@ class ProductService extends serviceSDK_1.Service {
590
590
  const variables = {
591
591
  productId,
592
592
  brandId,
593
- updatedBy,
593
+ updatedBy
594
594
  };
595
595
  try {
596
596
  const response = yield this.graphqlMutation(mutation, variables);
@@ -608,7 +608,7 @@ class ProductService extends serviceSDK_1.Service {
608
608
  productId,
609
609
  attributeId,
610
610
  key,
611
- values,
611
+ values
612
612
  };
613
613
  try {
614
614
  const response = yield this.graphqlMutation(mutation, variables);
@@ -624,7 +624,7 @@ class ProductService extends serviceSDK_1.Service {
624
624
  const mutation = mutations_1.REMOVE_PRODUCT_ATTRIBUTE;
625
625
  const variables = {
626
626
  productId,
627
- key,
627
+ key
628
628
  };
629
629
  try {
630
630
  const response = yield this.graphqlMutation(mutation, variables);
@@ -640,7 +640,7 @@ class ProductService extends serviceSDK_1.Service {
640
640
  const mutation = mutations_1.CREATE_PRODUCT_VARIANT;
641
641
  const variables = {
642
642
  partnerId: this.orgId,
643
- attributes,
643
+ attributes
644
644
  };
645
645
  try {
646
646
  const response = yield this.graphqlMutation(mutation, variables);
@@ -658,7 +658,7 @@ class ProductService extends serviceSDK_1.Service {
658
658
  partnerId: this.orgId,
659
659
  productId,
660
660
  sku,
661
- updatedBy,
661
+ updatedBy
662
662
  };
663
663
  try {
664
664
  const response = yield this.graphqlMutation(mutation, variables);
@@ -675,7 +675,7 @@ class ProductService extends serviceSDK_1.Service {
675
675
  const variables = {
676
676
  productId,
677
677
  vat,
678
- updatedBy,
678
+ updatedBy
679
679
  };
680
680
  try {
681
681
  const response = yield this.graphqlMutation(mutation, variables);
@@ -692,7 +692,7 @@ class ProductService extends serviceSDK_1.Service {
692
692
  const variables = {
693
693
  partnerId: this.orgId,
694
694
  name,
695
- createdBy,
695
+ createdBy
696
696
  };
697
697
  try {
698
698
  const response = yield this.graphqlMutation(mutaion, variables);
@@ -709,7 +709,7 @@ class ProductService extends serviceSDK_1.Service {
709
709
  const variables = {
710
710
  partnerId: this.orgId,
711
711
  name,
712
- createdBy,
712
+ createdBy
713
713
  };
714
714
  try {
715
715
  const response = yield this.graphqlMutation(mutation, variables);
@@ -726,7 +726,7 @@ class ProductService extends serviceSDK_1.Service {
726
726
  const variables = {
727
727
  partnerId: this.orgId,
728
728
  brandName,
729
- createdBy,
729
+ createdBy
730
730
  };
731
731
  try {
732
732
  const response = yield this.graphqlMutation(mutaion, variables);
@@ -742,7 +742,7 @@ class ProductService extends serviceSDK_1.Service {
742
742
  const mutation = mutations_1.CREATE_UNIT;
743
743
  const variables = {
744
744
  partnerId: this.orgId,
745
- name,
745
+ name
746
746
  };
747
747
  try {
748
748
  const response = yield this.graphqlMutation(mutation, variables);
@@ -760,7 +760,7 @@ class ProductService extends serviceSDK_1.Service {
760
760
  partnerId: this.orgId,
761
761
  productId,
762
762
  createdBy,
763
- imageDTO,
763
+ imageDTO
764
764
  };
765
765
  try {
766
766
  const response = yield this.graphqlMutation(mutations, variables);
@@ -777,7 +777,7 @@ class ProductService extends serviceSDK_1.Service {
777
777
  const variables = {
778
778
  partnerId: this.orgId,
779
779
  productId,
780
- imageDTO,
780
+ imageDTO
781
781
  };
782
782
  try {
783
783
  const response = yield this.graphqlMutation(mutations, variables);
@@ -793,7 +793,7 @@ class ProductService extends serviceSDK_1.Service {
793
793
  const mutation = mutations_1.BUILD_PRODUCT_PREBUILD_BY_PRODUCT;
794
794
  const variables = {
795
795
  partnerId: this.orgId,
796
- productId,
796
+ productId
797
797
  };
798
798
  try {
799
799
  const response = yield this.graphqlMutation(mutation, variables);
@@ -809,7 +809,7 @@ class ProductService extends serviceSDK_1.Service {
809
809
  const mutation = mutations_1.BUILD_PRODUCT_PREBUILD_BY_STORE;
810
810
  const variables = {
811
811
  partnerId: this.orgId,
812
- storeIds,
812
+ storeIds
813
813
  };
814
814
  try {
815
815
  const response = yield this.graphqlMutation(mutation, variables);
@@ -826,7 +826,7 @@ class ProductService extends serviceSDK_1.Service {
826
826
  const variables = {
827
827
  partnerId: this.orgId,
828
828
  storeChannel,
829
- group,
829
+ group
830
830
  };
831
831
  try {
832
832
  const response = yield this.graphqlQuery(query, variables);
@@ -842,7 +842,7 @@ class ProductService extends serviceSDK_1.Service {
842
842
  const mutation = mutations_1.REMOVE_IMAGE;
843
843
  const variables = {
844
844
  partnerId: this.orgId,
845
- productId: productId,
845
+ productId: productId
846
846
  };
847
847
  try {
848
848
  const response = yield this.graphqlMutation(mutation, variables);
@@ -858,7 +858,7 @@ class ProductService extends serviceSDK_1.Service {
858
858
  const mutation = mutations_1.CREATE_PRODUCT;
859
859
  const variables = {
860
860
  partnerId: this.orgId,
861
- productInputDTO,
861
+ productInputDTO
862
862
  };
863
863
  try {
864
864
  const response = yield this.graphqlMutation(mutation, variables);
@@ -873,7 +873,7 @@ class ProductService extends serviceSDK_1.Service {
873
873
  const mutation = mutations_1.REMOVE_PRODUCT;
874
874
  const variables = {
875
875
  partnerId: this.orgId,
876
- productId,
876
+ productId
877
877
  };
878
878
  try {
879
879
  const response = yield this.graphqlMutation(mutation, variables);
@@ -889,7 +889,7 @@ class ProductService extends serviceSDK_1.Service {
889
889
  const mutation = mutations_1.UPDATE_PRODUCT_SUBTYPE;
890
890
  const variables = {
891
891
  productId,
892
- subType,
892
+ subType
893
893
  };
894
894
  try {
895
895
  const response = yield this.graphqlMutation(mutation, variables);
@@ -906,7 +906,7 @@ class ProductService extends serviceSDK_1.Service {
906
906
  const variables = {
907
907
  partnerId: this.orgId,
908
908
  storeChannel: this.storeId,
909
- categoryId: categoryId,
909
+ categoryId: categoryId
910
910
  };
911
911
  try {
912
912
  const response = yield this.graphqlQuery(query, variables);
@@ -923,7 +923,7 @@ class ProductService extends serviceSDK_1.Service {
923
923
  const variables = {
924
924
  partnerId: this.orgId,
925
925
  storeChannel: this.storeId,
926
- handle: handle,
926
+ handle: handle
927
927
  };
928
928
  try {
929
929
  const response = yield this.graphqlQuery(query, variables);
@@ -940,7 +940,7 @@ class ProductService extends serviceSDK_1.Service {
940
940
  const variables = {
941
941
  productId,
942
942
  attributeId,
943
- attributeMetadata,
943
+ attributeMetadata
944
944
  };
945
945
  try {
946
946
  const response = yield this.graphqlMutation(mutation, variables);
@@ -994,7 +994,7 @@ class ProductService extends serviceSDK_1.Service {
994
994
  const variables = {
995
995
  partnerId: this.orgId,
996
996
  storeChannel: this.storeId,
997
- productId,
997
+ productId
998
998
  };
999
999
  try {
1000
1000
  const response = yield this.graphqlQuery(queries, variables);
@@ -1010,7 +1010,7 @@ class ProductService extends serviceSDK_1.Service {
1010
1010
  const queries = queries_1.GET_PRODUCT_STORE_BY_SCOPE;
1011
1011
  const variables = {
1012
1012
  scope,
1013
- enable,
1013
+ enable
1014
1014
  };
1015
1015
  try {
1016
1016
  const response = yield this.graphqlQuery(queries, variables);
@@ -1026,7 +1026,7 @@ class ProductService extends serviceSDK_1.Service {
1026
1026
  const queries = queries_1.GET_PRODUCT_STORE_PUBLIC;
1027
1027
  const variables = {
1028
1028
  productId,
1029
- isPublic,
1029
+ isPublic
1030
1030
  };
1031
1031
  try {
1032
1032
  const response = yield this.graphqlQuery(queries, variables);
@@ -1044,7 +1044,7 @@ class ProductService extends serviceSDK_1.Service {
1044
1044
  storeId,
1045
1045
  productId,
1046
1046
  isPublic,
1047
- updatedBy,
1047
+ updatedBy
1048
1048
  };
1049
1049
  try {
1050
1050
  const response = yield this.graphqlMutation(mutation, variables);
@@ -1072,7 +1072,7 @@ class ProductService extends serviceSDK_1.Service {
1072
1072
  const queries = queries_1.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG;
1073
1073
  const variables = {
1074
1074
  storeChannel,
1075
- slug,
1075
+ slug
1076
1076
  };
1077
1077
  try {
1078
1078
  const response = yield this.graphqlQuery(queries, variables);
@@ -1088,7 +1088,7 @@ class ProductService extends serviceSDK_1.Service {
1088
1088
  const queries = queries_1.GET_PRODUCT_MARKET_PLACE_BY_ID;
1089
1089
  const variables = {
1090
1090
  storeChannel,
1091
- id,
1091
+ id
1092
1092
  };
1093
1093
  try {
1094
1094
  const response = yield this.graphqlQuery(queries, variables);
@@ -1118,7 +1118,7 @@ class ProductService extends serviceSDK_1.Service {
1118
1118
  const variablesHandle = {
1119
1119
  partnerId: this.orgId,
1120
1120
  storeChannel: store ? store : this.storeId,
1121
- handle,
1121
+ handle
1122
1122
  };
1123
1123
  try {
1124
1124
  const response = yield this.graphqlQuery(query, variablesHandle);
@@ -1142,5 +1142,23 @@ class ProductService extends serviceSDK_1.Service {
1142
1142
  }
1143
1143
  });
1144
1144
  }
1145
+ getProductRealtedToArticle(articleId, fields) {
1146
+ return __awaiter(this, void 0, void 0, function* () {
1147
+ const query = (0, queries_1.GET_PRODUCT_RELATED_TO_ARTICLE)(fields);
1148
+ const variablesHandle = {
1149
+ partnerId: this.orgId,
1150
+ storeId: this.storeId,
1151
+ articleId: articleId
1152
+ };
1153
+ try {
1154
+ const response = yield this.graphqlQuery(query, variablesHandle);
1155
+ return response.getProductRelatedToArticle;
1156
+ }
1157
+ catch (error) {
1158
+ console.log(error);
1159
+ throw error;
1160
+ }
1161
+ });
1162
+ }
1145
1163
  }
1146
1164
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.7.4",
3
+ "version": "4.7.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [