@gofynd/fdk-client-javascript 0.1.35 → 0.1.36

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.
Files changed (109) hide show
  1. package/README.md +1 -1
  2. package/documentation/application/CART.md +256 -239
  3. package/documentation/application/CATALOG.md +413 -409
  4. package/documentation/application/COMMON.md +4 -0
  5. package/documentation/application/COMMUNICATION.md +4 -0
  6. package/documentation/application/CONFIGURATION.md +4 -0
  7. package/documentation/application/CONTENT.md +7 -20
  8. package/documentation/application/FILESTORAGE.md +85 -0
  9. package/documentation/application/LEAD.md +6 -2
  10. package/documentation/application/LOGISTIC.md +4 -0
  11. package/documentation/application/ORDER.md +307 -303
  12. package/documentation/application/PAYMENT.md +445 -259
  13. package/documentation/application/POSCART.md +317 -300
  14. package/documentation/application/REWARDS.md +153 -160
  15. package/documentation/application/SHARE.md +4 -0
  16. package/documentation/application/THEME.md +4 -0
  17. package/documentation/application/USER.md +4 -0
  18. package/documentation/platform/ANALYTICS.md +4 -0
  19. package/documentation/platform/AUDITTRAIL.md +4 -0
  20. package/documentation/platform/BILLING.md +4 -0
  21. package/documentation/platform/CART.md +480 -463
  22. package/documentation/platform/CATALOG.md +3895 -2942
  23. package/documentation/platform/COMMON.md +4 -0
  24. package/documentation/platform/COMMUNICATION.md +4 -0
  25. package/documentation/platform/COMPANYPROFILE.md +224 -193
  26. package/documentation/platform/CONFIGURATION.md +4 -0
  27. package/documentation/platform/CONTENT.md +8 -21
  28. package/documentation/platform/DISCOUNT.md +4 -0
  29. package/documentation/platform/FILESTORAGE.md +85 -0
  30. package/documentation/platform/INVENTORY.md +4 -0
  31. package/documentation/platform/LEAD.md +6 -2
  32. package/documentation/platform/ORDER.md +6298 -1448
  33. package/documentation/platform/PARTNER.md +12 -8
  34. package/documentation/platform/PAYMENT.md +107 -103
  35. package/documentation/platform/README.md +2 -2
  36. package/documentation/platform/REWARDS.md +219 -152
  37. package/documentation/platform/SHARE.md +4 -0
  38. package/documentation/platform/THEME.md +4 -0
  39. package/documentation/platform/USER.md +4 -0
  40. package/documentation/platform/WEBHOOK.md +4 -0
  41. package/documentation/public/CONFIGURATION.md +4 -0
  42. package/documentation/public/INVENTORY.md +4 -0
  43. package/documentation/public/WEBHOOK.md +4 -0
  44. package/package.json +1 -1
  45. package/sdk/application/ApplicationModels.d.ts +77 -73
  46. package/sdk/application/ApplicationModels.js +1751 -1725
  47. package/sdk/application/client/CartApplicationClient.d.ts +36 -36
  48. package/sdk/application/client/CatalogApplicationClient.d.ts +39 -39
  49. package/sdk/application/client/CatalogApplicationClient.js +16 -16
  50. package/sdk/application/client/CommonApplicationClient.d.ts +2 -2
  51. package/sdk/application/client/CommunicationApplicationClient.d.ts +5 -5
  52. package/sdk/application/client/ConfigurationApplicationClient.d.ts +17 -17
  53. package/sdk/application/client/ContentApplicationClient.d.ts +19 -19
  54. package/sdk/application/client/FileStorageApplicationClient.d.ts +14 -6
  55. package/sdk/application/client/FileStorageApplicationClient.js +2 -0
  56. package/sdk/application/client/LeadApplicationClient.d.ts +10 -10
  57. package/sdk/application/client/LogisticApplicationClient.d.ts +5 -5
  58. package/sdk/application/client/OrderApplicationClient.d.ts +15 -15
  59. package/sdk/application/client/OrderApplicationClient.js +1 -1
  60. package/sdk/application/client/PaymentApplicationClient.d.ts +79 -57
  61. package/sdk/application/client/PaymentApplicationClient.js +66 -0
  62. package/sdk/application/client/PosCartApplicationClient.d.ts +38 -38
  63. package/sdk/application/client/RewardsApplicationClient.d.ts +34 -34
  64. package/sdk/application/client/RewardsApplicationClient.js +77 -77
  65. package/sdk/application/client/ShareApplicationClient.d.ts +8 -8
  66. package/sdk/application/client/ThemeApplicationClient.d.ts +4 -4
  67. package/sdk/application/client/UserApplicationClient.d.ts +63 -63
  68. package/sdk/application/models/CatalogValidator.d.ts +1 -1
  69. package/sdk/application/models/CatalogValidator.js +2 -2
  70. package/sdk/application/models/PaymentValidator.d.ts +2 -0
  71. package/sdk/application/models/PaymentValidator.js +12 -0
  72. package/sdk/application/models/RewardsValidator.d.ts +3 -3
  73. package/sdk/application/models/RewardsValidator.js +12 -12
  74. package/sdk/common/AxiosHelper.js +1 -1
  75. package/sdk/common/Constant.d.ts +9 -0
  76. package/sdk/common/Constant.js +11 -0
  77. package/sdk/platform/PlatformApplicationClient.d.ts +8600 -7286
  78. package/sdk/platform/PlatformApplicationClient.js +4338 -3678
  79. package/sdk/platform/PlatformApplicationModels.d.ts +21 -26
  80. package/sdk/platform/PlatformApplicationModels.js +5561 -4301
  81. package/sdk/platform/PlatformClient.d.ts +3448 -2801
  82. package/sdk/platform/PlatformClient.js +3903 -3108
  83. package/sdk/platform/PlatformModels.d.ts +352 -278
  84. package/sdk/platform/PlatformModels.js +5230 -3942
  85. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +5 -5
  86. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +1 -1
  87. package/sdk/platform/client/BillingPlatformClient.d.ts +4 -4
  88. package/sdk/platform/client/CatalogPlatformClient.d.ts +209 -150
  89. package/sdk/platform/client/CatalogPlatformClient.js +441 -294
  90. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +8 -8
  91. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +9 -9
  92. package/sdk/platform/client/DiscountPlatformClient.d.ts +4 -4
  93. package/sdk/platform/client/FileStoragePlatformClient.d.ts +20 -4
  94. package/sdk/platform/client/FileStoragePlatformClient.js +49 -0
  95. package/sdk/platform/client/InventoryPlatformClient.d.ts +3 -3
  96. package/sdk/platform/client/LeadPlatformClient.d.ts +6 -6
  97. package/sdk/platform/client/OrderPlatformClient.d.ts +557 -131
  98. package/sdk/platform/client/OrderPlatformClient.js +1551 -247
  99. package/sdk/platform/client/PaymentPlatformClient.d.ts +4 -4
  100. package/sdk/platform/client/WebhookPlatformClient.d.ts +2 -2
  101. package/sdk/platform/models/CatalogValidator.d.ts +24 -21
  102. package/sdk/platform/models/CatalogValidator.js +103 -72
  103. package/sdk/platform/models/OrderValidator.d.ts +43 -11
  104. package/sdk/platform/models/OrderValidator.js +312 -51
  105. package/sdk/public/client/ConfigurationPublicClient.d.ts +2 -2
  106. package/sdk/public/client/InventoryPublicClient.d.ts +7 -7
  107. package/sdk/public/client/WebhookPublicClient.d.ts +3 -3
  108. package/tests/common/schema/action-url.json +15 -0
  109. package/tests/common/schema/url-action.json +16 -0
@@ -7,6 +7,37 @@ class Catalog {
7
7
  this.config = config;
8
8
  }
9
9
 
10
+ /**
11
+ * @param {Object} arg - Arg object.
12
+ * @param {ProductBundleRequest} arg.body
13
+ * @summary: Create Product Bundle
14
+ * @description: Create Product Bundle. See `ProductBundleRequest` for the request body parameter need to create a product bundle. On successful request, returns in `ProductBundleRequest` with id
15
+ */
16
+ createProductBundle({ body } = {}) {
17
+ const { error } = CatalogValidator.createProductBundle().validate(
18
+ {
19
+ body,
20
+ },
21
+ { abortEarly: false, allowUnknown: true }
22
+ );
23
+ if (error) {
24
+ return Promise.reject(new FDKClientValidationError(error));
25
+ }
26
+
27
+ const query_params = {};
28
+
29
+ const xHeaders = {};
30
+
31
+ return PlatformAPIClient.execute(
32
+ this.config,
33
+ "post",
34
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
35
+ query_params,
36
+ body,
37
+ xHeaders
38
+ );
39
+ }
40
+
10
41
  /**
11
42
  * @param {Object} arg - Arg object.
12
43
  * @param {string} [arg.q] - A search string that is searched with product
@@ -45,13 +76,16 @@ class Catalog {
45
76
 
46
77
  /**
47
78
  * @param {Object} arg - Arg object.
48
- * @param {ProductBundleRequest} arg.body
49
- * @summary: Create Product Bundle
50
- * @description: Create Product Bundle. See `ProductBundleRequest` for the request body parameter need to create a product bundle. On successful request, returns in `ProductBundleRequest` with id
79
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
80
+ * detail. Pass the `id` of the keywords which you want to delete.
81
+ * @param {ProductBundleUpdateRequest} arg.body
82
+ * @summary: Update a Product Bundle
83
+ * @description: Update a Product Bundle by its id. On successful request, returns the updated product bundle
51
84
  */
52
- createProductBundle({ body } = {}) {
53
- const { error } = CatalogValidator.createProductBundle().validate(
85
+ updateProductBundle({ id, body } = {}) {
86
+ const { error } = CatalogValidator.updateProductBundle().validate(
54
87
  {
88
+ id,
55
89
  body,
56
90
  },
57
91
  { abortEarly: false, allowUnknown: true }
@@ -66,8 +100,8 @@ class Catalog {
66
100
 
67
101
  return PlatformAPIClient.execute(
68
102
  this.config,
69
- "post",
70
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
103
+ "put",
104
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
71
105
  query_params,
72
106
  body,
73
107
  xHeaders
@@ -108,16 +142,13 @@ class Catalog {
108
142
 
109
143
  /**
110
144
  * @param {Object} arg - Arg object.
111
- * @param {string} arg.id - A `id` is a unique identifier for a particular
112
- * detail. Pass the `id` of the keywords which you want to delete.
113
- * @param {ProductBundleUpdateRequest} arg.body
114
- * @summary: Update a Product Bundle
115
- * @description: Update a Product Bundle by its id. On successful request, returns the updated product bundle
145
+ * @param {ValidateSizeGuide} arg.body
146
+ * @summary: Create a size guide.
147
+ * @description: This API allows to create a size guide associated to a brand.
116
148
  */
117
- updateProductBundle({ id, body } = {}) {
118
- const { error } = CatalogValidator.updateProductBundle().validate(
149
+ createSizeGuide({ body } = {}) {
150
+ const { error } = CatalogValidator.createSizeGuide().validate(
119
151
  {
120
- id,
121
152
  body,
122
153
  },
123
154
  { abortEarly: false, allowUnknown: true }
@@ -132,8 +163,8 @@ class Catalog {
132
163
 
133
164
  return PlatformAPIClient.execute(
134
165
  this.config,
135
- "put",
136
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
166
+ "post",
167
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide`,
137
168
  query_params,
138
169
  body,
139
170
  xHeaders
@@ -188,13 +219,15 @@ class Catalog {
188
219
 
189
220
  /**
190
221
  * @param {Object} arg - Arg object.
222
+ * @param {string} arg.id - Mongo id of the size guide to be edited
191
223
  * @param {ValidateSizeGuide} arg.body
192
- * @summary: Create a size guide.
193
- * @description: This API allows to create a size guide associated to a brand.
224
+ * @summary: Edit a size guide.
225
+ * @description: This API allows to edit a size guide.
194
226
  */
195
- createSizeGuide({ body } = {}) {
196
- const { error } = CatalogValidator.createSizeGuide().validate(
227
+ updateSizeGuide({ id, body } = {}) {
228
+ const { error } = CatalogValidator.updateSizeGuide().validate(
197
229
  {
230
+ id,
198
231
  body,
199
232
  },
200
233
  { abortEarly: false, allowUnknown: true }
@@ -209,8 +242,8 @@ class Catalog {
209
242
 
210
243
  return PlatformAPIClient.execute(
211
244
  this.config,
212
- "post",
213
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide`,
245
+ "put",
246
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
214
247
  query_params,
215
248
  body,
216
249
  xHeaders
@@ -248,39 +281,6 @@ class Catalog {
248
281
  );
249
282
  }
250
283
 
251
- /**
252
- * @param {Object} arg - Arg object.
253
- * @param {string} arg.id - Mongo id of the size guide to be edited
254
- * @param {ValidateSizeGuide} arg.body
255
- * @summary: Edit a size guide.
256
- * @description: This API allows to edit a size guide.
257
- */
258
- updateSizeGuide({ id, body } = {}) {
259
- const { error } = CatalogValidator.updateSizeGuide().validate(
260
- {
261
- id,
262
- body,
263
- },
264
- { abortEarly: false, allowUnknown: true }
265
- );
266
- if (error) {
267
- return Promise.reject(new FDKClientValidationError(error));
268
- }
269
-
270
- const query_params = {};
271
-
272
- const xHeaders = {};
273
-
274
- return PlatformAPIClient.execute(
275
- this.config,
276
- "put",
277
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
278
- query_params,
279
- body,
280
- xHeaders
281
- );
282
- }
283
-
284
284
  /**
285
285
  * @param {Object} arg - Arg object.
286
286
  * @param {string} arg.sellerAppId - Id of the seller application which is
@@ -585,6 +585,37 @@ class Catalog {
585
585
  );
586
586
  }
587
587
 
588
+ /**
589
+ * @param {Object} arg - Arg object.
590
+ * @param {DepartmentCreateUpdate} arg.body
591
+ * @summary: Create the department.
592
+ * @description: Create departments using the API.
593
+ */
594
+ createDepartments({ body } = {}) {
595
+ const { error } = CatalogValidator.createDepartments().validate(
596
+ {
597
+ body,
598
+ },
599
+ { abortEarly: false, allowUnknown: true }
600
+ );
601
+ if (error) {
602
+ return Promise.reject(new FDKClientValidationError(error));
603
+ }
604
+
605
+ const query_params = {};
606
+
607
+ const xHeaders = {};
608
+
609
+ return PlatformAPIClient.execute(
610
+ this.config,
611
+ "post",
612
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
613
+ query_params,
614
+ body,
615
+ xHeaders
616
+ );
617
+ }
618
+
588
619
  /**
589
620
  * @param {Object} arg - Arg object.
590
621
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -635,13 +666,15 @@ class Catalog {
635
666
 
636
667
  /**
637
668
  * @param {Object} arg - Arg object.
669
+ * @param {string} arg.uid - A `uid` is a unique identifier of a department.
638
670
  * @param {DepartmentCreateUpdate} arg.body
639
- * @summary: Create the department.
640
- * @description: Create departments using the API.
671
+ * @summary: Update the department by their uid.
672
+ * @description: Update the department by their uid using this API.
641
673
  */
642
- createDepartments({ body } = {}) {
643
- const { error } = CatalogValidator.createDepartments().validate(
674
+ updateDepartment({ uid, body } = {}) {
675
+ const { error } = CatalogValidator.updateDepartment().validate(
644
676
  {
677
+ uid,
645
678
  body,
646
679
  },
647
680
  { abortEarly: false, allowUnknown: true }
@@ -656,8 +689,8 @@ class Catalog {
656
689
 
657
690
  return PlatformAPIClient.execute(
658
691
  this.config,
659
- "post",
660
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
692
+ "put",
693
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
661
694
  query_params,
662
695
  body,
663
696
  xHeaders
@@ -695,39 +728,6 @@ class Catalog {
695
728
  );
696
729
  }
697
730
 
698
- /**
699
- * @param {Object} arg - Arg object.
700
- * @param {string} arg.uid - A `uid` is a unique identifier of a department.
701
- * @param {DepartmentCreateUpdate} arg.body
702
- * @summary: Update the department by their uid.
703
- * @description: Update the department by their uid using this API.
704
- */
705
- updateDepartment({ uid, body } = {}) {
706
- const { error } = CatalogValidator.updateDepartment().validate(
707
- {
708
- uid,
709
- body,
710
- },
711
- { abortEarly: false, allowUnknown: true }
712
- );
713
- if (error) {
714
- return Promise.reject(new FDKClientValidationError(error));
715
- }
716
-
717
- const query_params = {};
718
-
719
- const xHeaders = {};
720
-
721
- return PlatformAPIClient.execute(
722
- this.config,
723
- "put",
724
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
725
- query_params,
726
- body,
727
- xHeaders
728
- );
729
- }
730
-
731
731
  /**
732
732
  * @param {Object} arg - Arg object.
733
733
  * @param {string} arg.department - A `department` is the name of a
@@ -831,8 +831,8 @@ class Catalog {
831
831
  * @summary: Download Product Template View
832
832
  * @description: Allows you to download product template data
833
833
  */
834
- downloadProductTemplateView({ itemType } = {}) {
835
- const { error } = CatalogValidator.downloadProductTemplateView().validate(
834
+ downloadInventoryTemplateView({ itemType } = {}) {
835
+ const { error } = CatalogValidator.downloadInventoryTemplateView().validate(
836
836
  {
837
837
  itemType,
838
838
  },
@@ -981,6 +981,37 @@ class Catalog {
981
981
  );
982
982
  }
983
983
 
984
+ /**
985
+ * @param {Object} arg - Arg object.
986
+ * @param {CategoryRequestBody} arg.body
987
+ * @summary: Create product categories
988
+ * @description: This API lets user create product categories
989
+ */
990
+ createCategories({ body } = {}) {
991
+ const { error } = CatalogValidator.createCategories().validate(
992
+ {
993
+ body,
994
+ },
995
+ { abortEarly: false, allowUnknown: true }
996
+ );
997
+ if (error) {
998
+ return Promise.reject(new FDKClientValidationError(error));
999
+ }
1000
+
1001
+ const query_params = {};
1002
+
1003
+ const xHeaders = {};
1004
+
1005
+ return PlatformAPIClient.execute(
1006
+ this.config,
1007
+ "post",
1008
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/`,
1009
+ query_params,
1010
+ body,
1011
+ xHeaders
1012
+ );
1013
+ }
1014
+
984
1015
  /**
985
1016
  * @param {Object} arg - Arg object.
986
1017
  * @param {string} [arg.level] - Get category for multiple levels
@@ -1029,13 +1060,15 @@ class Catalog {
1029
1060
 
1030
1061
  /**
1031
1062
  * @param {Object} arg - Arg object.
1063
+ * @param {string} arg.uid - Category unique id
1032
1064
  * @param {CategoryRequestBody} arg.body
1033
- * @summary: Create product categories
1034
- * @description: This API lets user create product categories
1065
+ * @summary: Update product categories
1066
+ * @description: Update a product category using this apu
1035
1067
  */
1036
- createCategories({ body } = {}) {
1037
- const { error } = CatalogValidator.createCategories().validate(
1068
+ updateCategory({ uid, body } = {}) {
1069
+ const { error } = CatalogValidator.updateCategory().validate(
1038
1070
  {
1071
+ uid,
1039
1072
  body,
1040
1073
  },
1041
1074
  { abortEarly: false, allowUnknown: true }
@@ -1050,8 +1083,8 @@ class Catalog {
1050
1083
 
1051
1084
  return PlatformAPIClient.execute(
1052
1085
  this.config,
1053
- "post",
1054
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/`,
1086
+ "put",
1087
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
1055
1088
  query_params,
1056
1089
  body,
1057
1090
  xHeaders
@@ -1091,15 +1124,13 @@ class Catalog {
1091
1124
 
1092
1125
  /**
1093
1126
  * @param {Object} arg - Arg object.
1094
- * @param {string} arg.uid - Category unique id
1095
- * @param {CategoryRequestBody} arg.body
1096
- * @summary: Update product categories
1097
- * @description: Update a product category using this apu
1127
+ * @param {ProductCreateUpdate} arg.body
1128
+ * @summary: Create a product.
1129
+ * @description: This API allows to create product.
1098
1130
  */
1099
- updateCategory({ uid, body } = {}) {
1100
- const { error } = CatalogValidator.updateCategory().validate(
1131
+ createProduct({ body } = {}) {
1132
+ const { error } = CatalogValidator.createProduct().validate(
1101
1133
  {
1102
- uid,
1103
1134
  body,
1104
1135
  },
1105
1136
  { abortEarly: false, allowUnknown: true }
@@ -1114,8 +1145,8 @@ class Catalog {
1114
1145
 
1115
1146
  return PlatformAPIClient.execute(
1116
1147
  this.config,
1117
- "put",
1118
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
1148
+ "post",
1149
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/`,
1119
1150
  query_params,
1120
1151
  body,
1121
1152
  xHeaders
@@ -1194,14 +1225,22 @@ class Catalog {
1194
1225
 
1195
1226
  /**
1196
1227
  * @param {Object} arg - Arg object.
1197
- * @param {ProductCreateUpdate} arg.body
1198
- * @summary: Create a product.
1199
- * @description: This API allows to create product.
1200
- */
1201
- createProduct({ body } = {}) {
1202
- const { error } = CatalogValidator.createProduct().validate(
1228
+ * @param {number} arg.itemId - Get list of variants of item Id
1229
+ * @param {string} arg.variantType - Get multiple products filtered by variant type
1230
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1231
+ * given set of results
1232
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1233
+ * page. Default is 10.
1234
+ * @summary: Get product list
1235
+ * @description: This API gets meta associated to products.
1236
+ */
1237
+ getVariantsOfProducts({ itemId, variantType, pageNo, pageSize } = {}) {
1238
+ const { error } = CatalogValidator.getVariantsOfProducts().validate(
1203
1239
  {
1204
- body,
1240
+ itemId,
1241
+ variantType,
1242
+ pageNo,
1243
+ pageSize,
1205
1244
  },
1206
1245
  { abortEarly: false, allowUnknown: true }
1207
1246
  );
@@ -1210,15 +1249,17 @@ class Catalog {
1210
1249
  }
1211
1250
 
1212
1251
  const query_params = {};
1252
+ query_params["page_no"] = pageNo;
1253
+ query_params["page_size"] = pageSize;
1213
1254
 
1214
1255
  const xHeaders = {};
1215
1256
 
1216
1257
  return PlatformAPIClient.execute(
1217
1258
  this.config,
1218
- "post",
1219
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/`,
1259
+ "get",
1260
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/variants/${variantType}`,
1220
1261
  query_params,
1221
- body,
1262
+ undefined,
1222
1263
  xHeaders
1223
1264
  );
1224
1265
  }
@@ -1261,18 +1302,16 @@ class Catalog {
1261
1302
 
1262
1303
  /**
1263
1304
  * @param {Object} arg - Arg object.
1264
- * @param {string} [arg.itemCode] - Item code of the product.
1265
- * @param {number} arg.itemId - Item Id of the product.
1266
- * @param {number} [arg.brandUid] - Brand Id of the product.
1267
- * @summary: Get a single product.
1268
- * @description: This API helps to get data associated to a particular product.
1305
+ * @param {number} arg.itemId - Id of the product to be updated.
1306
+ * @param {ProductCreateUpdate} arg.body
1307
+ * @summary: Edit a product.
1308
+ * @description: This API allows to edit product.
1269
1309
  */
1270
- getProduct({ itemId, itemCode, brandUid } = {}) {
1271
- const { error } = CatalogValidator.getProduct().validate(
1310
+ editProduct({ itemId, body } = {}) {
1311
+ const { error } = CatalogValidator.editProduct().validate(
1272
1312
  {
1273
1313
  itemId,
1274
- itemCode,
1275
- brandUid,
1314
+ body,
1276
1315
  },
1277
1316
  { abortEarly: false, allowUnknown: true }
1278
1317
  );
@@ -1281,33 +1320,33 @@ class Catalog {
1281
1320
  }
1282
1321
 
1283
1322
  const query_params = {};
1284
- query_params["item_code"] = itemCode;
1285
- query_params["brand_uid"] = brandUid;
1286
1323
 
1287
1324
  const xHeaders = {};
1288
1325
 
1289
1326
  return PlatformAPIClient.execute(
1290
1327
  this.config,
1291
- "get",
1328
+ "put",
1292
1329
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/`,
1293
1330
  query_params,
1294
- undefined,
1331
+ body,
1295
1332
  xHeaders
1296
1333
  );
1297
1334
  }
1298
1335
 
1299
1336
  /**
1300
1337
  * @param {Object} arg - Arg object.
1301
- * @param {number} arg.itemId - Id of the product to be updated.
1302
- * @param {ProductCreateUpdate} arg.body
1303
- * @summary: Edit a product.
1304
- * @description: This API allows to edit product.
1338
+ * @param {string} [arg.itemCode] - Item code of the product.
1339
+ * @param {number} arg.itemId - Item Id of the product.
1340
+ * @param {number} [arg.brandUid] - Brand Id of the product.
1341
+ * @summary: Get a single product.
1342
+ * @description: This API helps to get data associated to a particular product.
1305
1343
  */
1306
- editProduct({ itemId, body } = {}) {
1307
- const { error } = CatalogValidator.editProduct().validate(
1344
+ getProduct({ itemId, itemCode, brandUid } = {}) {
1345
+ const { error } = CatalogValidator.getProduct().validate(
1308
1346
  {
1309
1347
  itemId,
1310
- body,
1348
+ itemCode,
1349
+ brandUid,
1311
1350
  },
1312
1351
  { abortEarly: false, allowUnknown: true }
1313
1352
  );
@@ -1316,15 +1355,17 @@ class Catalog {
1316
1355
  }
1317
1356
 
1318
1357
  const query_params = {};
1358
+ query_params["item_code"] = itemCode;
1359
+ query_params["brand_uid"] = brandUid;
1319
1360
 
1320
1361
  const xHeaders = {};
1321
1362
 
1322
1363
  return PlatformAPIClient.execute(
1323
1364
  this.config,
1324
- "put",
1365
+ "get",
1325
1366
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/`,
1326
1367
  query_params,
1327
- body,
1368
+ undefined,
1328
1369
  xHeaders
1329
1370
  );
1330
1371
  }
@@ -1430,6 +1471,38 @@ class Catalog {
1430
1471
 
1431
1472
  /**
1432
1473
  * @param {Object} arg - Arg object.
1474
+ * @param {BulkJob} arg.body
1475
+ * @summary: Create a Bulk product to upload job.
1476
+ * @description: This API helps to create a bulk products upload job.
1477
+ */
1478
+ createBulkProductUploadJob({ body } = {}) {
1479
+ const { error } = CatalogValidator.createBulkProductUploadJob().validate(
1480
+ {
1481
+ body,
1482
+ },
1483
+ { abortEarly: false, allowUnknown: true }
1484
+ );
1485
+ if (error) {
1486
+ return Promise.reject(new FDKClientValidationError(error));
1487
+ }
1488
+
1489
+ const query_params = {};
1490
+
1491
+ const xHeaders = {};
1492
+
1493
+ return PlatformAPIClient.execute(
1494
+ this.config,
1495
+ "post",
1496
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk`,
1497
+ query_params,
1498
+ body,
1499
+ xHeaders
1500
+ );
1501
+ }
1502
+
1503
+ /**
1504
+ * @param {Object} arg - Arg object.
1505
+ * @param {string} [arg.search] - Search string to filter the results by batch id
1433
1506
  * @param {number} [arg.pageNo] - The page number to navigate through the
1434
1507
  * given set of results
1435
1508
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
@@ -1437,9 +1510,10 @@ class Catalog {
1437
1510
  * @summary: Get a list of all bulk product upload jobs.
1438
1511
  * @description: This API helps to get bulk product upload jobs data.
1439
1512
  */
1440
- getProductBulkUploadHistory({ pageNo, pageSize } = {}) {
1513
+ getProductBulkUploadHistory({ search, pageNo, pageSize } = {}) {
1441
1514
  const { error } = CatalogValidator.getProductBulkUploadHistory().validate(
1442
1515
  {
1516
+ search,
1443
1517
  pageNo,
1444
1518
  pageSize,
1445
1519
  },
@@ -1450,6 +1524,7 @@ class Catalog {
1450
1524
  }
1451
1525
 
1452
1526
  const query_params = {};
1527
+ query_params["search"] = search;
1453
1528
  query_params["page_no"] = pageNo;
1454
1529
  query_params["page_size"] = pageSize;
1455
1530
 
@@ -1467,13 +1542,18 @@ class Catalog {
1467
1542
 
1468
1543
  /**
1469
1544
  * @param {Object} arg - Arg object.
1545
+ * @param {string} arg.department - Department of the product to be uploaded.
1546
+ * @param {string} arg.productType - Product type of the product to be
1547
+ * uploaded i.e. set, standard , digital.
1470
1548
  * @param {BulkJob} arg.body
1471
1549
  * @summary: Create a Bulk product to upload job.
1472
1550
  * @description: This API helps to create a bulk products upload job.
1473
1551
  */
1474
- createBulkProductUploadJob({ body } = {}) {
1475
- const { error } = CatalogValidator.createBulkProductUploadJob().validate(
1552
+ uploadBulkProducts({ department, productType, body } = {}) {
1553
+ const { error } = CatalogValidator.uploadBulkProducts().validate(
1476
1554
  {
1555
+ department,
1556
+ productType,
1477
1557
  body,
1478
1558
  },
1479
1559
  { abortEarly: false, allowUnknown: true }
@@ -1483,13 +1563,15 @@ class Catalog {
1483
1563
  }
1484
1564
 
1485
1565
  const query_params = {};
1566
+ query_params["department"] = department;
1567
+ query_params["product_type"] = productType;
1486
1568
 
1487
1569
  const xHeaders = {};
1488
1570
 
1489
1571
  return PlatformAPIClient.execute(
1490
1572
  this.config,
1491
1573
  "post",
1492
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk`,
1574
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/bulk`,
1493
1575
  query_params,
1494
1576
  body,
1495
1577
  xHeaders
@@ -1498,14 +1580,16 @@ class Catalog {
1498
1580
 
1499
1581
  /**
1500
1582
  * @param {Object} arg - Arg object.
1501
- * @param {number} arg.batchId - Batch Id of the bulk product job to be deleted.
1502
- * @summary: Delete Bulk product job.
1503
- * @description: This API allows to delete bulk product job associated with company.
1583
+ * @param {string} arg.batchId - Batch Id in which assets to be uploaded.
1584
+ * @param {BulkProductRequest} arg.body
1585
+ * @summary: Create products in bulk associated with given batch Id.
1586
+ * @description: This API helps to create products in bulk push to kafka for approval/creation.
1504
1587
  */
1505
- deleteProductBulkJob({ batchId } = {}) {
1506
- const { error } = CatalogValidator.deleteProductBulkJob().validate(
1588
+ createProductsInBulk({ batchId, body } = {}) {
1589
+ const { error } = CatalogValidator.createProductsInBulk().validate(
1507
1590
  {
1508
1591
  batchId,
1592
+ body,
1509
1593
  },
1510
1594
  { abortEarly: false, allowUnknown: true }
1511
1595
  );
@@ -1519,26 +1603,24 @@ class Catalog {
1519
1603
 
1520
1604
  return PlatformAPIClient.execute(
1521
1605
  this.config,
1522
- "delete",
1606
+ "post",
1523
1607
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk/${batchId}`,
1524
1608
  query_params,
1525
- undefined,
1609
+ body,
1526
1610
  xHeaders
1527
1611
  );
1528
1612
  }
1529
1613
 
1530
1614
  /**
1531
1615
  * @param {Object} arg - Arg object.
1532
- * @param {string} arg.batchId - Batch Id in which assets to be uploaded.
1533
- * @param {BulkProductRequest} arg.body
1534
- * @summary: Create products in bulk associated with given batch Id.
1535
- * @description: This API helps to create products in bulk push to kafka for approval/creation.
1616
+ * @param {number} arg.batchId - Batch Id of the bulk product job to be deleted.
1617
+ * @summary: Delete Bulk product job.
1618
+ * @description: This API allows to delete bulk product job associated with company.
1536
1619
  */
1537
- createProductsInBulk({ batchId, body } = {}) {
1538
- const { error } = CatalogValidator.createProductsInBulk().validate(
1620
+ deleteProductBulkJob({ batchId } = {}) {
1621
+ const { error } = CatalogValidator.deleteProductBulkJob().validate(
1539
1622
  {
1540
1623
  batchId,
1541
- body,
1542
1624
  },
1543
1625
  { abortEarly: false, allowUnknown: true }
1544
1626
  );
@@ -1552,10 +1634,10 @@ class Catalog {
1552
1634
 
1553
1635
  return PlatformAPIClient.execute(
1554
1636
  this.config,
1555
- "post",
1637
+ "delete",
1556
1638
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk/${batchId}`,
1557
1639
  query_params,
1558
- body,
1640
+ undefined,
1559
1641
  xHeaders
1560
1642
  );
1561
1643
  }
@@ -1588,6 +1670,37 @@ class Catalog {
1588
1670
  );
1589
1671
  }
1590
1672
 
1673
+ /**
1674
+ * @param {Object} arg - Arg object.
1675
+ * @param {ProductBulkAssets} arg.body
1676
+ * @summary: Create a Bulk asset upload Job.
1677
+ * @description: This API helps to create a bulk asset upload job.
1678
+ */
1679
+ createProductAssetsInBulk({ body } = {}) {
1680
+ const { error } = CatalogValidator.createProductAssetsInBulk().validate(
1681
+ {
1682
+ body,
1683
+ },
1684
+ { abortEarly: false, allowUnknown: true }
1685
+ );
1686
+ if (error) {
1687
+ return Promise.reject(new FDKClientValidationError(error));
1688
+ }
1689
+
1690
+ const query_params = {};
1691
+
1692
+ const xHeaders = {};
1693
+
1694
+ return PlatformAPIClient.execute(
1695
+ this.config,
1696
+ "post",
1697
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk/`,
1698
+ query_params,
1699
+ body,
1700
+ xHeaders
1701
+ );
1702
+ }
1703
+
1591
1704
  /**
1592
1705
  * @param {Object} arg - Arg object.
1593
1706
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -1627,14 +1740,17 @@ class Catalog {
1627
1740
 
1628
1741
  /**
1629
1742
  * @param {Object} arg - Arg object.
1630
- * @param {ProductBulkAssets} arg.body
1631
- * @summary: Create a Bulk asset upload Job.
1632
- * @description: This API helps to create a bulk asset upload job.
1743
+ * @param {number} arg.itemId - Item Id of the product associated with size
1744
+ * to be deleted.
1745
+ * @param {number} arg.size - Size to be deleted.
1746
+ * @summary: Delete a Size associated with product.
1747
+ * @description: This API allows to delete size associated with product.
1633
1748
  */
1634
- createProductAssetsInBulk({ body } = {}) {
1635
- const { error } = CatalogValidator.createProductAssetsInBulk().validate(
1749
+ deleteSize({ itemId, size } = {}) {
1750
+ const { error } = CatalogValidator.deleteSize().validate(
1636
1751
  {
1637
- body,
1752
+ itemId,
1753
+ size,
1638
1754
  },
1639
1755
  { abortEarly: false, allowUnknown: true }
1640
1756
  );
@@ -1648,27 +1764,28 @@ class Catalog {
1648
1764
 
1649
1765
  return PlatformAPIClient.execute(
1650
1766
  this.config,
1651
- "post",
1652
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk/`,
1767
+ "delete",
1768
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
1653
1769
  query_params,
1654
- body,
1770
+ undefined,
1655
1771
  xHeaders
1656
1772
  );
1657
1773
  }
1658
1774
 
1659
1775
  /**
1660
1776
  * @param {Object} arg - Arg object.
1661
- * @param {number} arg.itemId - Item Id of the product associated with size
1662
- * to be deleted.
1663
- * @param {number} arg.size - Size to be deleted.
1664
- * @summary: Delete a Size associated with product.
1665
- * @description: This API allows to delete size associated with product.
1777
+ * @param {number} arg.itemId - Item code of the product of which size is to be get.
1778
+ * @param {string} arg.size - Size in which inventory is to be added.
1779
+ * @param {InventoryRequest} arg.body
1780
+ * @summary: Add Inventory for particular size and store.
1781
+ * @description: This API allows add Inventory for particular size and store.
1666
1782
  */
1667
- deleteSize({ itemId, size } = {}) {
1668
- const { error } = CatalogValidator.deleteSize().validate(
1783
+ addInventory({ itemId, size, body } = {}) {
1784
+ const { error } = CatalogValidator.addInventory().validate(
1669
1785
  {
1670
1786
  itemId,
1671
1787
  size,
1788
+ body,
1672
1789
  },
1673
1790
  { abortEarly: false, allowUnknown: true }
1674
1791
  );
@@ -1682,10 +1799,10 @@ class Catalog {
1682
1799
 
1683
1800
  return PlatformAPIClient.execute(
1684
1801
  this.config,
1685
- "delete",
1802
+ "post",
1686
1803
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
1687
1804
  query_params,
1688
- undefined,
1805
+ body,
1689
1806
  xHeaders
1690
1807
  );
1691
1808
  }
@@ -1739,18 +1856,34 @@ class Catalog {
1739
1856
 
1740
1857
  /**
1741
1858
  * @param {Object} arg - Arg object.
1742
- * @param {number} arg.itemId - Item code of the product of which size is to be get.
1743
- * @param {string} arg.size - Size in which inventory is to be added.
1744
- * @param {InventoryRequest} arg.body
1745
- * @summary: Add Inventory for particular size and store.
1746
- * @description: This API allows add Inventory for particular size and store.
1859
+ * @param {string} arg.itemId - Item code of the product of which size is to be get.
1860
+ * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
1861
+ * or Primary Identifier) of which inventory is to get.
1862
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1863
+ * given set of results
1864
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1865
+ * page. Default is 12.
1866
+ * @param {string} [arg.q] - Search with help of store code.
1867
+ * @param {number[]} [arg.locationIds] - Search by store ids.
1868
+ * @summary: Get Inventory for company
1869
+ * @description: This API allows get Inventory data for particular company grouped by size and store.
1747
1870
  */
1748
- addInventory({ itemId, size, body } = {}) {
1749
- const { error } = CatalogValidator.addInventory().validate(
1871
+ getInventoryBySizeIdentifier({
1872
+ itemId,
1873
+ sizeIdentifier,
1874
+ pageNo,
1875
+ pageSize,
1876
+ q,
1877
+ locationIds,
1878
+ } = {}) {
1879
+ const { error } = CatalogValidator.getInventoryBySizeIdentifier().validate(
1750
1880
  {
1751
1881
  itemId,
1752
- size,
1753
- body,
1882
+ sizeIdentifier,
1883
+ pageNo,
1884
+ pageSize,
1885
+ q,
1886
+ locationIds,
1754
1887
  },
1755
1888
  { abortEarly: false, allowUnknown: true }
1756
1889
  );
@@ -1759,49 +1892,59 @@ class Catalog {
1759
1892
  }
1760
1893
 
1761
1894
  const query_params = {};
1895
+ query_params["page_no"] = pageNo;
1896
+ query_params["page_size"] = pageSize;
1897
+ query_params["q"] = q;
1898
+ query_params["location_ids"] = locationIds;
1762
1899
 
1763
1900
  const xHeaders = {};
1764
1901
 
1765
1902
  return PlatformAPIClient.execute(
1766
1903
  this.config,
1767
- "post",
1768
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
1904
+ "get",
1905
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/inventory/${sizeIdentifier}`,
1769
1906
  query_params,
1770
- body,
1907
+ undefined,
1771
1908
  xHeaders
1772
1909
  );
1773
1910
  }
1774
1911
 
1775
1912
  /**
1776
1913
  * @param {Object} arg - Arg object.
1777
- * @param {string} arg.itemId - Item code of the product of which size is to be get.
1778
- * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
1779
- * or Primary Identifier) of which inventory is to get.
1914
+ * @param {string} [arg.itemId] - Item code of the product of which size is to be get.
1915
+ * @param {string} [arg.size] - Size of which inventory is to get.
1780
1916
  * @param {number} [arg.pageNo] - The page number to navigate through the
1781
1917
  * given set of results
1782
1918
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
1783
1919
  * page. Default is 12.
1784
1920
  * @param {string} [arg.q] - Search with help of store code.
1785
- * @param {number[]} [arg.locationIds] - Search by store ids.
1921
+ * @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
1922
+ * @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
1923
+ * @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
1924
+ * or Primary Identifier) of which inventory is to get.
1786
1925
  * @summary: Get Inventory for company
1787
- * @description: This API allows get Inventory data for particular company grouped by size and store.
1926
+ * @description: This API allows get Inventories data for particular company.
1788
1927
  */
1789
- getInventoryBySizeIdentifier({
1928
+ getInventories({
1790
1929
  itemId,
1791
- sizeIdentifier,
1930
+ size,
1792
1931
  pageNo,
1793
1932
  pageSize,
1794
1933
  q,
1795
- locationIds,
1934
+ sellable,
1935
+ storeIds,
1936
+ sizeIdentifier,
1796
1937
  } = {}) {
1797
- const { error } = CatalogValidator.getInventoryBySizeIdentifier().validate(
1938
+ const { error } = CatalogValidator.getInventories().validate(
1798
1939
  {
1799
1940
  itemId,
1800
- sizeIdentifier,
1941
+ size,
1801
1942
  pageNo,
1802
1943
  pageSize,
1803
1944
  q,
1804
- locationIds,
1945
+ sellable,
1946
+ storeIds,
1947
+ sizeIdentifier,
1805
1948
  },
1806
1949
  { abortEarly: false, allowUnknown: true }
1807
1950
  );
@@ -1810,17 +1953,21 @@ class Catalog {
1810
1953
  }
1811
1954
 
1812
1955
  const query_params = {};
1956
+ query_params["item_id"] = itemId;
1957
+ query_params["size"] = size;
1813
1958
  query_params["page_no"] = pageNo;
1814
1959
  query_params["page_size"] = pageSize;
1815
1960
  query_params["q"] = q;
1816
- query_params["location_ids"] = locationIds;
1961
+ query_params["sellable"] = sellable;
1962
+ query_params["store_ids"] = storeIds;
1963
+ query_params["size_identifier"] = sizeIdentifier;
1817
1964
 
1818
1965
  const xHeaders = {};
1819
1966
 
1820
1967
  return PlatformAPIClient.execute(
1821
1968
  this.config,
1822
1969
  "get",
1823
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/inventory/${sizeIdentifier}`,
1970
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventories`,
1824
1971
  query_params,
1825
1972
  undefined,
1826
1973
  xHeaders
@@ -1864,6 +2011,37 @@ class Catalog {
1864
2011
  );
1865
2012
  }
1866
2013
 
2014
+ /**
2015
+ * @param {Object} arg - Arg object.
2016
+ * @param {BulkJob} arg.body
2017
+ * @summary: Create a Bulk Inventory upload Job.
2018
+ * @description: This API helps to create a bulk Inventory upload job.
2019
+ */
2020
+ createBulkInventoryJob({ body } = {}) {
2021
+ const { error } = CatalogValidator.createBulkInventoryJob().validate(
2022
+ {
2023
+ body,
2024
+ },
2025
+ { abortEarly: false, allowUnknown: true }
2026
+ );
2027
+ if (error) {
2028
+ return Promise.reject(new FDKClientValidationError(error));
2029
+ }
2030
+
2031
+ const query_params = {};
2032
+
2033
+ const xHeaders = {};
2034
+
2035
+ return PlatformAPIClient.execute(
2036
+ this.config,
2037
+ "post",
2038
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
2039
+ query_params,
2040
+ body,
2041
+ xHeaders
2042
+ );
2043
+ }
2044
+
1867
2045
  /**
1868
2046
  * @param {Object} arg - Arg object.
1869
2047
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -1903,13 +2081,15 @@ class Catalog {
1903
2081
 
1904
2082
  /**
1905
2083
  * @param {Object} arg - Arg object.
1906
- * @param {BulkJob} arg.body
1907
- * @summary: Create a Bulk Inventory upload Job.
1908
- * @description: This API helps to create a bulk Inventory upload job.
2084
+ * @param {string} arg.batchId - Batch Id of the bulk create job.
2085
+ * @param {InventoryBulkRequest} arg.body
2086
+ * @summary: Create products in bulk associated with given batch Id.
2087
+ * @description: This API helps to create products in bulk push to kafka for approval/creation.
1909
2088
  */
1910
- createBulkInventoryJob({ body } = {}) {
1911
- const { error } = CatalogValidator.createBulkInventoryJob().validate(
2089
+ createBulkInventory({ batchId, body } = {}) {
2090
+ const { error } = CatalogValidator.createBulkInventory().validate(
1912
2091
  {
2092
+ batchId,
1913
2093
  body,
1914
2094
  },
1915
2095
  { abortEarly: false, allowUnknown: true }
@@ -1925,7 +2105,7 @@ class Catalog {
1925
2105
  return PlatformAPIClient.execute(
1926
2106
  this.config,
1927
2107
  "post",
1928
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
2108
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
1929
2109
  query_params,
1930
2110
  body,
1931
2111
  xHeaders
@@ -1965,15 +2145,13 @@ class Catalog {
1965
2145
 
1966
2146
  /**
1967
2147
  * @param {Object} arg - Arg object.
1968
- * @param {string} arg.batchId - Batch Id of the bulk create job.
1969
- * @param {InventoryBulkRequest} arg.body
1970
- * @summary: Create products in bulk associated with given batch Id.
1971
- * @description: This API helps to create products in bulk push to kafka for approval/creation.
2148
+ * @param {InventoryExportRequest} arg.body
2149
+ * @summary: Create a Inventory export Job.
2150
+ * @description: This API helps to create a Inventory export job.
1972
2151
  */
1973
- createBulkInventory({ batchId, body } = {}) {
1974
- const { error } = CatalogValidator.createBulkInventory().validate(
2152
+ createInventoryExportJob({ body } = {}) {
2153
+ const { error } = CatalogValidator.createInventoryExportJob().validate(
1975
2154
  {
1976
- batchId,
1977
2155
  body,
1978
2156
  },
1979
2157
  { abortEarly: false, allowUnknown: true }
@@ -1989,7 +2167,7 @@ class Catalog {
1989
2167
  return PlatformAPIClient.execute(
1990
2168
  this.config,
1991
2169
  "post",
1992
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
2170
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
1993
2171
  query_params,
1994
2172
  body,
1995
2173
  xHeaders
@@ -2026,14 +2204,15 @@ class Catalog {
2026
2204
 
2027
2205
  /**
2028
2206
  * @param {Object} arg - Arg object.
2029
- * @param {InventoryExportRequest} arg.body
2030
- * @summary: Create a Inventory export Job.
2031
- * @description: This API helps to create a Inventory export job.
2207
+ * @param {string} [arg.filterType] - Filter type from any one of ['brand',
2208
+ * 'store', 'type']
2209
+ * @summary: Get List of different filters for inventory export
2210
+ * @description: This API allows get List of different filters like brand, store, and type for inventory export.
2032
2211
  */
2033
- createInventoryExportJob({ body } = {}) {
2034
- const { error } = CatalogValidator.createInventoryExportJob().validate(
2212
+ exportInventoryConfig({ filterType } = {}) {
2213
+ const { error } = CatalogValidator.exportInventoryConfig().validate(
2035
2214
  {
2036
- body,
2215
+ filterType,
2037
2216
  },
2038
2217
  { abortEarly: false, allowUnknown: true }
2039
2218
  );
@@ -2042,30 +2221,35 @@ class Catalog {
2042
2221
  }
2043
2222
 
2044
2223
  const query_params = {};
2224
+ query_params["filter_type"] = filterType;
2045
2225
 
2046
2226
  const xHeaders = {};
2047
2227
 
2048
2228
  return PlatformAPIClient.execute(
2049
2229
  this.config,
2050
- "post",
2051
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
2230
+ "get",
2231
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration/`,
2052
2232
  query_params,
2053
- body,
2233
+ undefined,
2054
2234
  xHeaders
2055
2235
  );
2056
2236
  }
2057
2237
 
2058
2238
  /**
2059
2239
  * @param {Object} arg - Arg object.
2060
- * @param {string} [arg.filterType] - Filter type from any one of ['brand',
2061
- * 'store', 'type']
2062
- * @summary: Get List of different filters for inventory export
2063
- * @description: This API allows get List of different filters like brand, store, and type for inventory export.
2240
+ * @param {number} arg.itemId - Item code of the product of which size is to be get.
2241
+ * @param {string} arg.sellerIdentifier - Size Identifier (Seller Identifier
2242
+ * or Primary Identifier) of which inventory is to get.
2243
+ * @param {InventoryRequestSchemaV2} arg.body
2244
+ * @summary: Add Inventory for particular size and store.
2245
+ * @description: This API allows add Inventory for particular size and store.
2064
2246
  */
2065
- exportInventoryConfig({ filterType } = {}) {
2066
- const { error } = CatalogValidator.exportInventoryConfig().validate(
2247
+ updateRealtimeInventory({ itemId, sellerIdentifier, body } = {}) {
2248
+ const { error } = CatalogValidator.updateRealtimeInventory().validate(
2067
2249
  {
2068
- filterType,
2250
+ itemId,
2251
+ sellerIdentifier,
2252
+ body,
2069
2253
  },
2070
2254
  { abortEarly: false, allowUnknown: true }
2071
2255
  );
@@ -2074,16 +2258,15 @@ class Catalog {
2074
2258
  }
2075
2259
 
2076
2260
  const query_params = {};
2077
- query_params["filter_type"] = filterType;
2078
2261
 
2079
2262
  const xHeaders = {};
2080
2263
 
2081
2264
  return PlatformAPIClient.execute(
2082
2265
  this.config,
2083
- "get",
2084
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration/`,
2266
+ "post",
2267
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}/`,
2085
2268
  query_params,
2086
- undefined,
2269
+ body,
2087
2270
  xHeaders
2088
2271
  );
2089
2272
  }
@@ -2126,18 +2309,13 @@ class Catalog {
2126
2309
 
2127
2310
  /**
2128
2311
  * @param {Object} arg - Arg object.
2129
- * @param {number} arg.itemId - Item code of the product of which size is to be get.
2130
- * @param {string} arg.sellerIdentifier - Size Identifier (Seller Identifier
2131
- * or Primary Identifier) of which inventory is to get.
2132
2312
  * @param {InventoryRequestSchemaV2} arg.body
2133
2313
  * @summary: Add Inventory for particular size and store.
2134
2314
  * @description: This API allows add Inventory for particular size and store.
2135
2315
  */
2136
- updateRealtimeInventory({ itemId, sellerIdentifier, body } = {}) {
2137
- const { error } = CatalogValidator.updateRealtimeInventory().validate(
2316
+ updateInventories({ body } = {}) {
2317
+ const { error } = CatalogValidator.updateInventories().validate(
2138
2318
  {
2139
- itemId,
2140
- sellerIdentifier,
2141
2319
  body,
2142
2320
  },
2143
2321
  { abortEarly: false, allowUnknown: true }
@@ -2153,7 +2331,7 @@ class Catalog {
2153
2331
  return PlatformAPIClient.execute(
2154
2332
  this.config,
2155
2333
  "post",
2156
- `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}/`,
2334
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
2157
2335
  query_params,
2158
2336
  body,
2159
2337
  xHeaders
@@ -2162,12 +2340,12 @@ class Catalog {
2162
2340
 
2163
2341
  /**
2164
2342
  * @param {Object} arg - Arg object.
2165
- * @param {InventoryRequestSchemaV2} arg.body
2166
- * @summary: Add Inventory for particular size and store.
2167
- * @description: This API allows add Inventory for particular size and store.
2343
+ * @param {HsnUpsert} arg.body
2344
+ * @summary: Create Hsn Code.
2345
+ * @description: Create Hsn Code.
2168
2346
  */
2169
- updateInventories({ body } = {}) {
2170
- const { error } = CatalogValidator.updateInventories().validate(
2347
+ createHsnCode({ body } = {}) {
2348
+ const { error } = CatalogValidator.createHsnCode().validate(
2171
2349
  {
2172
2350
  body,
2173
2351
  },
@@ -2184,7 +2362,7 @@ class Catalog {
2184
2362
  return PlatformAPIClient.execute(
2185
2363
  this.config,
2186
2364
  "post",
2187
- `/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
2365
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/`,
2188
2366
  query_params,
2189
2367
  body,
2190
2368
  xHeaders
@@ -2231,13 +2409,15 @@ class Catalog {
2231
2409
 
2232
2410
  /**
2233
2411
  * @param {Object} arg - Arg object.
2412
+ * @param {string} arg.id - Unique id
2234
2413
  * @param {HsnUpsert} arg.body
2235
- * @summary: Create Hsn Code.
2236
- * @description: Create Hsn Code.
2414
+ * @summary: Update Hsn Code.
2415
+ * @description: Update Hsn Code.
2237
2416
  */
2238
- createHsnCode({ body } = {}) {
2239
- const { error } = CatalogValidator.createHsnCode().validate(
2417
+ updateHsnCode({ id, body } = {}) {
2418
+ const { error } = CatalogValidator.updateHsnCode().validate(
2240
2419
  {
2420
+ id,
2241
2421
  body,
2242
2422
  },
2243
2423
  { abortEarly: false, allowUnknown: true }
@@ -2252,8 +2432,8 @@ class Catalog {
2252
2432
 
2253
2433
  return PlatformAPIClient.execute(
2254
2434
  this.config,
2255
- "post",
2256
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/`,
2435
+ "put",
2436
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
2257
2437
  query_params,
2258
2438
  body,
2259
2439
  xHeaders
@@ -2291,39 +2471,6 @@ class Catalog {
2291
2471
  );
2292
2472
  }
2293
2473
 
2294
- /**
2295
- * @param {Object} arg - Arg object.
2296
- * @param {string} arg.id - Unique id
2297
- * @param {HsnUpsert} arg.body
2298
- * @summary: Update Hsn Code.
2299
- * @description: Update Hsn Code.
2300
- */
2301
- updateHsnCode({ id, body } = {}) {
2302
- const { error } = CatalogValidator.updateHsnCode().validate(
2303
- {
2304
- id,
2305
- body,
2306
- },
2307
- { abortEarly: false, allowUnknown: true }
2308
- );
2309
- if (error) {
2310
- return Promise.reject(new FDKClientValidationError(error));
2311
- }
2312
-
2313
- const query_params = {};
2314
-
2315
- const xHeaders = {};
2316
-
2317
- return PlatformAPIClient.execute(
2318
- this.config,
2319
- "put",
2320
- `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
2321
- query_params,
2322
- body,
2323
- xHeaders
2324
- );
2325
- }
2326
-
2327
2474
  /**
2328
2475
  * @param {Object} arg - Arg object.
2329
2476
  * @param {BulkHsnUpsert} arg.body