@gofynd/fdk-client-javascript 1.0.0 → 1.0.1

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 (104) hide show
  1. package/documentation/application/CATALOG.md +371 -371
  2. package/documentation/application/ORDER.md +272 -272
  3. package/documentation/application/PAYMENT.md +269 -269
  4. package/documentation/platform/CATALOG.md +1678 -1664
  5. package/documentation/platform/COMPANYPROFILE.md +201 -201
  6. package/documentation/platform/ORDER.md +1442 -1323
  7. package/documentation/platform/PAYMENT.md +88 -88
  8. package/index.js +7 -1
  9. package/package.json +1 -1
  10. package/sdk/application/Cart/CartApplicationClient.js +302 -0
  11. package/sdk/application/Cart/CartApplicationValidator.js +1 -0
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
  16. package/sdk/application/Common/CommonApplicationClient.js +22 -0
  17. package/sdk/application/Common/CommonApplicationValidator.js +1 -0
  18. package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
  19. package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
  20. package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
  21. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  22. package/sdk/application/Content/ContentApplicationClient.js +215 -0
  23. package/sdk/application/Content/ContentApplicationValidator.js +1 -0
  24. package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
  25. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
  26. package/sdk/application/Lead/LeadApplicationClient.js +81 -0
  27. package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
  28. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
  29. package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
  30. package/sdk/application/Order/OrderApplicationClient.js +146 -0
  31. package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
  32. package/sdk/application/Order/OrderApplicationModel.js +329 -329
  33. package/sdk/application/Order/OrderApplicationValidator.js +1 -0
  34. package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
  35. package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
  36. package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
  37. package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
  38. package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
  39. package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
  40. package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
  41. package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
  42. package/sdk/application/Share/ShareApplicationClient.js +87 -0
  43. package/sdk/application/Share/ShareApplicationValidator.js +1 -0
  44. package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
  45. package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
  46. package/sdk/application/User/UserApplicationClient.js +405 -0
  47. package/sdk/application/User/UserApplicationValidator.js +1 -0
  48. package/sdk/common/AxiosHelper.js +1 -1
  49. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
  51. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
  52. package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
  54. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
  55. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
  56. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
  57. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
  58. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
  59. package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
  60. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
  61. package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
  62. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
  63. package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
  64. package/sdk/platform/Common/CommonPlatformClient.js +26 -0
  65. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
  66. package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
  69. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
  70. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
  71. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
  73. package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
  74. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
  75. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
  76. package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
  77. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
  78. package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
  79. package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
  80. package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
  81. package/sdk/platform/Order/OrderPlatformClient.js +674 -15
  82. package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
  83. package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
  84. package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
  85. package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
  86. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
  87. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
  88. package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
  89. package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
  90. package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
  91. package/sdk/platform/PlatformApplicationClient.js +2514 -2524
  92. package/sdk/platform/PlatformClient.d.ts +2217 -2243
  93. package/sdk/platform/PlatformClient.js +2514 -2524
  94. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
  95. package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
  96. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
  97. package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
  98. package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
  99. package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
  100. package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
  101. package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
  102. package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
  103. package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
  104. package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
@@ -27,6 +27,19 @@ class Catalog {
27
27
  return Promise.reject(new FDKClientValidationError(error));
28
28
  }
29
29
 
30
+ // Showing warrnings if extra unknown parameters are found
31
+ const { error: warrning } = CatalogValidator.getProductBundle().validate(
32
+ {
33
+ q,
34
+ slug,
35
+ },
36
+ { abortEarly: false, allowUnknown: false }
37
+ );
38
+ if (warrning) {
39
+ console.log("Parameter Validation warrnings for getProductBundle");
40
+ console.log(warrning);
41
+ }
42
+
30
43
  const query_params = {};
31
44
  query_params["q"] = q;
32
45
  query_params["slug"] = slug;
@@ -60,6 +73,18 @@ class Catalog {
60
73
  return Promise.reject(new FDKClientValidationError(error));
61
74
  }
62
75
 
76
+ // Showing warrnings if extra unknown parameters are found
77
+ const { error: warrning } = CatalogValidator.createProductBundle().validate(
78
+ {
79
+ body,
80
+ },
81
+ { abortEarly: false, allowUnknown: false }
82
+ );
83
+ if (warrning) {
84
+ console.log("Parameter Validation warrnings for createProductBundle");
85
+ console.log(warrning);
86
+ }
87
+
63
88
  const query_params = {};
64
89
 
65
90
  const xHeaders = {};
@@ -77,16 +102,14 @@ class Catalog {
77
102
  /**
78
103
  * @param {Object} arg - Arg object.
79
104
  * @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
105
+ * detail. Pass the `id` of the keywords which you want to retrieve.
106
+ * @summary: Get a particular Product Bundle details
107
+ * @description: Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse`
84
108
  */
85
- updateProductBundle({ id, body } = {}) {
86
- const { error } = CatalogValidator.updateProductBundle().validate(
109
+ getProductBundleDetail({ id } = {}) {
110
+ const { error } = CatalogValidator.getProductBundleDetail().validate(
87
111
  {
88
112
  id,
89
- body,
90
113
  },
91
114
  { abortEarly: false, allowUnknown: true }
92
115
  );
@@ -94,16 +117,30 @@ class Catalog {
94
117
  return Promise.reject(new FDKClientValidationError(error));
95
118
  }
96
119
 
120
+ // Showing warrnings if extra unknown parameters are found
121
+ const {
122
+ error: warrning,
123
+ } = CatalogValidator.getProductBundleDetail().validate(
124
+ {
125
+ id,
126
+ },
127
+ { abortEarly: false, allowUnknown: false }
128
+ );
129
+ if (warrning) {
130
+ console.log("Parameter Validation warrnings for getProductBundleDetail");
131
+ console.log(warrning);
132
+ }
133
+
97
134
  const query_params = {};
98
135
 
99
136
  const xHeaders = {};
100
137
 
101
138
  return PlatformAPIClient.execute(
102
139
  this.config,
103
- "put",
140
+ "get",
104
141
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
105
142
  query_params,
106
- body,
143
+ undefined,
107
144
  xHeaders
108
145
  );
109
146
  }
@@ -111,14 +148,16 @@ class Catalog {
111
148
  /**
112
149
  * @param {Object} arg - Arg object.
113
150
  * @param {string} arg.id - A `id` is a unique identifier for a particular
114
- * detail. Pass the `id` of the keywords which you want to retrieve.
115
- * @summary: Get a particular Product Bundle details
116
- * @description: Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse`
151
+ * detail. Pass the `id` of the keywords which you want to delete.
152
+ * @param {ProductBundleUpdateRequest} arg.body
153
+ * @summary: Update a Product Bundle
154
+ * @description: Update a Product Bundle by its id. On successful request, returns the updated product bundle
117
155
  */
118
- getProductBundleDetail({ id } = {}) {
119
- const { error } = CatalogValidator.getProductBundleDetail().validate(
156
+ updateProductBundle({ id, body } = {}) {
157
+ const { error } = CatalogValidator.updateProductBundle().validate(
120
158
  {
121
159
  id,
160
+ body,
122
161
  },
123
162
  { abortEarly: false, allowUnknown: true }
124
163
  );
@@ -126,16 +165,29 @@ class Catalog {
126
165
  return Promise.reject(new FDKClientValidationError(error));
127
166
  }
128
167
 
168
+ // Showing warrnings if extra unknown parameters are found
169
+ const { error: warrning } = CatalogValidator.updateProductBundle().validate(
170
+ {
171
+ id,
172
+ body,
173
+ },
174
+ { abortEarly: false, allowUnknown: false }
175
+ );
176
+ if (warrning) {
177
+ console.log("Parameter Validation warrnings for updateProductBundle");
178
+ console.log(warrning);
179
+ }
180
+
129
181
  const query_params = {};
130
182
 
131
183
  const xHeaders = {};
132
184
 
133
185
  return PlatformAPIClient.execute(
134
186
  this.config,
135
- "get",
187
+ "put",
136
188
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
137
189
  query_params,
138
- undefined,
190
+ body,
139
191
  xHeaders
140
192
  );
141
193
  }
@@ -167,6 +219,22 @@ class Catalog {
167
219
  return Promise.reject(new FDKClientValidationError(error));
168
220
  }
169
221
 
222
+ // Showing warrnings if extra unknown parameters are found
223
+ const { error: warrning } = CatalogValidator.getSizeGuides().validate(
224
+ {
225
+ active,
226
+ q,
227
+ tag,
228
+ pageNo,
229
+ pageSize,
230
+ },
231
+ { abortEarly: false, allowUnknown: false }
232
+ );
233
+ if (warrning) {
234
+ console.log("Parameter Validation warrnings for getSizeGuides");
235
+ console.log(warrning);
236
+ }
237
+
170
238
  const query_params = {};
171
239
  query_params["active"] = active;
172
240
  query_params["q"] = q;
@@ -203,6 +271,18 @@ class Catalog {
203
271
  return Promise.reject(new FDKClientValidationError(error));
204
272
  }
205
273
 
274
+ // Showing warrnings if extra unknown parameters are found
275
+ const { error: warrning } = CatalogValidator.createSizeGuide().validate(
276
+ {
277
+ body,
278
+ },
279
+ { abortEarly: false, allowUnknown: false }
280
+ );
281
+ if (warrning) {
282
+ console.log("Parameter Validation warrnings for createSizeGuide");
283
+ console.log(warrning);
284
+ }
285
+
206
286
  const query_params = {};
207
287
 
208
288
  const xHeaders = {};
@@ -219,16 +299,14 @@ class Catalog {
219
299
 
220
300
  /**
221
301
  * @param {Object} arg - Arg object.
222
- * @param {string} arg.id - Mongo id of the size guide to be edited
223
- * @param {ValidateSizeGuide} arg.body
224
- * @summary: Edit a size guide.
225
- * @description: This API allows to edit a size guide.
302
+ * @param {string} arg.id - Id of the size guide to be viewed.
303
+ * @summary: Get a single size guide.
304
+ * @description: This API helps to get data associated to a size guide.
226
305
  */
227
- updateSizeGuide({ id, body } = {}) {
228
- const { error } = CatalogValidator.updateSizeGuide().validate(
306
+ getSizeGuide({ id } = {}) {
307
+ const { error } = CatalogValidator.getSizeGuide().validate(
229
308
  {
230
309
  id,
231
- body,
232
310
  },
233
311
  { abortEarly: false, allowUnknown: true }
234
312
  );
@@ -236,30 +314,44 @@ class Catalog {
236
314
  return Promise.reject(new FDKClientValidationError(error));
237
315
  }
238
316
 
317
+ // Showing warrnings if extra unknown parameters are found
318
+ const { error: warrning } = CatalogValidator.getSizeGuide().validate(
319
+ {
320
+ id,
321
+ },
322
+ { abortEarly: false, allowUnknown: false }
323
+ );
324
+ if (warrning) {
325
+ console.log("Parameter Validation warrnings for getSizeGuide");
326
+ console.log(warrning);
327
+ }
328
+
239
329
  const query_params = {};
240
330
 
241
331
  const xHeaders = {};
242
332
 
243
333
  return PlatformAPIClient.execute(
244
334
  this.config,
245
- "put",
335
+ "get",
246
336
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
247
337
  query_params,
248
- body,
338
+ undefined,
249
339
  xHeaders
250
340
  );
251
341
  }
252
342
 
253
343
  /**
254
344
  * @param {Object} arg - Arg object.
255
- * @param {string} arg.id - Id of the size guide to be viewed.
256
- * @summary: Get a single size guide.
257
- * @description: This API helps to get data associated to a size guide.
345
+ * @param {string} arg.id - Mongo id of the size guide to be edited
346
+ * @param {ValidateSizeGuide} arg.body
347
+ * @summary: Edit a size guide.
348
+ * @description: This API allows to edit a size guide.
258
349
  */
259
- getSizeGuide({ id } = {}) {
260
- const { error } = CatalogValidator.getSizeGuide().validate(
350
+ updateSizeGuide({ id, body } = {}) {
351
+ const { error } = CatalogValidator.updateSizeGuide().validate(
261
352
  {
262
353
  id,
354
+ body,
263
355
  },
264
356
  { abortEarly: false, allowUnknown: true }
265
357
  );
@@ -267,16 +359,29 @@ class Catalog {
267
359
  return Promise.reject(new FDKClientValidationError(error));
268
360
  }
269
361
 
362
+ // Showing warrnings if extra unknown parameters are found
363
+ const { error: warrning } = CatalogValidator.updateSizeGuide().validate(
364
+ {
365
+ id,
366
+ body,
367
+ },
368
+ { abortEarly: false, allowUnknown: false }
369
+ );
370
+ if (warrning) {
371
+ console.log("Parameter Validation warrnings for updateSizeGuide");
372
+ console.log(warrning);
373
+ }
374
+
270
375
  const query_params = {};
271
376
 
272
377
  const xHeaders = {};
273
378
 
274
379
  return PlatformAPIClient.execute(
275
380
  this.config,
276
- "get",
381
+ "put",
277
382
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
278
383
  query_params,
279
- undefined,
384
+ body,
280
385
  xHeaders
281
386
  );
282
387
  }
@@ -299,6 +404,18 @@ class Catalog {
299
404
  return Promise.reject(new FDKClientValidationError(error));
300
405
  }
301
406
 
407
+ // Showing warrnings if extra unknown parameters are found
408
+ const { error: warrning } = CatalogValidator.getSellerInsights().validate(
409
+ {
410
+ sellerAppId,
411
+ },
412
+ { abortEarly: false, allowUnknown: false }
413
+ );
414
+ if (warrning) {
415
+ console.log("Parameter Validation warrnings for getSellerInsights");
416
+ console.log(warrning);
417
+ }
418
+
302
419
  const query_params = {};
303
420
 
304
421
  const xHeaders = {};
@@ -333,6 +450,21 @@ class Catalog {
333
450
  return Promise.reject(new FDKClientValidationError(error));
334
451
  }
335
452
 
453
+ // Showing warrnings if extra unknown parameters are found
454
+ const {
455
+ error: warrning,
456
+ } = CatalogValidator.createMarketplaceOptin().validate(
457
+ {
458
+ marketplace,
459
+ body,
460
+ },
461
+ { abortEarly: false, allowUnknown: false }
462
+ );
463
+ if (warrning) {
464
+ console.log("Parameter Validation warrnings for createMarketplaceOptin");
465
+ console.log(warrning);
466
+ }
467
+
336
468
  const query_params = {};
337
469
 
338
470
  const xHeaders = {};
@@ -361,6 +493,20 @@ class Catalog {
361
493
  return Promise.reject(new FDKClientValidationError(error));
362
494
  }
363
495
 
496
+ // Showing warrnings if extra unknown parameters are found
497
+ const {
498
+ error: warrning,
499
+ } = CatalogValidator.getMarketplaceOptinDetail().validate(
500
+ {},
501
+ { abortEarly: false, allowUnknown: false }
502
+ );
503
+ if (warrning) {
504
+ console.log(
505
+ "Parameter Validation warrnings for getMarketplaceOptinDetail"
506
+ );
507
+ console.log(warrning);
508
+ }
509
+
364
510
  const query_params = {};
365
511
 
366
512
  const xHeaders = {};
@@ -389,6 +535,16 @@ class Catalog {
389
535
  return Promise.reject(new FDKClientValidationError(error));
390
536
  }
391
537
 
538
+ // Showing warrnings if extra unknown parameters are found
539
+ const { error: warrning } = CatalogValidator.getCompanyDetail().validate(
540
+ {},
541
+ { abortEarly: false, allowUnknown: false }
542
+ );
543
+ if (warrning) {
544
+ console.log("Parameter Validation warrnings for getCompanyDetail");
545
+ console.log(warrning);
546
+ }
547
+
392
548
  const query_params = {};
393
549
 
394
550
  const xHeaders = {};
@@ -430,6 +586,24 @@ class Catalog {
430
586
  return Promise.reject(new FDKClientValidationError(error));
431
587
  }
432
588
 
589
+ // Showing warrnings if extra unknown parameters are found
590
+ const {
591
+ error: warrning,
592
+ } = CatalogValidator.getCompanyBrandDetail().validate(
593
+ {
594
+ isActive,
595
+ q,
596
+ pageNo,
597
+ pageSize,
598
+ marketplace,
599
+ },
600
+ { abortEarly: false, allowUnknown: false }
601
+ );
602
+ if (warrning) {
603
+ console.log("Parameter Validation warrnings for getCompanyBrandDetail");
604
+ console.log(warrning);
605
+ }
606
+
433
607
  const query_params = {};
434
608
  query_params["is_active"] = isActive;
435
609
  query_params["q"] = q;
@@ -463,6 +637,16 @@ class Catalog {
463
637
  return Promise.reject(new FDKClientValidationError(error));
464
638
  }
465
639
 
640
+ // Showing warrnings if extra unknown parameters are found
641
+ const { error: warrning } = CatalogValidator.getCompanyMetrics().validate(
642
+ {},
643
+ { abortEarly: false, allowUnknown: false }
644
+ );
645
+ if (warrning) {
646
+ console.log("Parameter Validation warrnings for getCompanyMetrics");
647
+ console.log(warrning);
648
+ }
649
+
466
650
  const query_params = {};
467
651
 
468
652
  const xHeaders = {};
@@ -499,6 +683,20 @@ class Catalog {
499
683
  return Promise.reject(new FDKClientValidationError(error));
500
684
  }
501
685
 
686
+ // Showing warrnings if extra unknown parameters are found
687
+ const { error: warrning } = CatalogValidator.getStoreDetail().validate(
688
+ {
689
+ q,
690
+ pageNo,
691
+ pageSize,
692
+ },
693
+ { abortEarly: false, allowUnknown: false }
694
+ );
695
+ if (warrning) {
696
+ console.log("Parameter Validation warrnings for getStoreDetail");
697
+ console.log(warrning);
698
+ }
699
+
502
700
  const query_params = {};
503
701
  query_params["q"] = q;
504
702
  query_params["page_no"] = pageNo;
@@ -534,6 +732,18 @@ class Catalog {
534
732
  return Promise.reject(new FDKClientValidationError(error));
535
733
  }
536
734
 
735
+ // Showing warrnings if extra unknown parameters are found
736
+ const { error: warrning } = CatalogValidator.getGenderAttribute().validate(
737
+ {
738
+ attributeSlug,
739
+ },
740
+ { abortEarly: false, allowUnknown: false }
741
+ );
742
+ if (warrning) {
743
+ console.log("Parameter Validation warrnings for getGenderAttribute");
744
+ console.log(warrning);
745
+ }
746
+
537
747
  const query_params = {};
538
748
 
539
749
  const xHeaders = {};
@@ -569,6 +779,23 @@ class Catalog {
569
779
  return Promise.reject(new FDKClientValidationError(error));
570
780
  }
571
781
 
782
+ // Showing warrnings if extra unknown parameters are found
783
+ const {
784
+ error: warrning,
785
+ } = CatalogValidator.listProductTemplateCategories().validate(
786
+ {
787
+ departments,
788
+ itemType,
789
+ },
790
+ { abortEarly: false, allowUnknown: false }
791
+ );
792
+ if (warrning) {
793
+ console.log(
794
+ "Parameter Validation warrnings for listProductTemplateCategories"
795
+ );
796
+ console.log(warrning);
797
+ }
798
+
572
799
  const query_params = {};
573
800
  query_params["departments"] = departments;
574
801
  query_params["item_type"] = itemType;
@@ -614,6 +841,22 @@ class Catalog {
614
841
  return Promise.reject(new FDKClientValidationError(error));
615
842
  }
616
843
 
844
+ // Showing warrnings if extra unknown parameters are found
845
+ const { error: warrning } = CatalogValidator.listDepartmentsData().validate(
846
+ {
847
+ pageNo,
848
+ pageSize,
849
+ name,
850
+ search,
851
+ isActive,
852
+ },
853
+ { abortEarly: false, allowUnknown: false }
854
+ );
855
+ if (warrning) {
856
+ console.log("Parameter Validation warrnings for listDepartmentsData");
857
+ console.log(warrning);
858
+ }
859
+
617
860
  const query_params = {};
618
861
  query_params["page_no"] = pageNo;
619
862
  query_params["page_size"] = pageSize;
@@ -650,6 +893,18 @@ class Catalog {
650
893
  return Promise.reject(new FDKClientValidationError(error));
651
894
  }
652
895
 
896
+ // Showing warrnings if extra unknown parameters are found
897
+ const { error: warrning } = CatalogValidator.createDepartments().validate(
898
+ {
899
+ body,
900
+ },
901
+ { abortEarly: false, allowUnknown: false }
902
+ );
903
+ if (warrning) {
904
+ console.log("Parameter Validation warrnings for createDepartments");
905
+ console.log(warrning);
906
+ }
907
+
653
908
  const query_params = {};
654
909
 
655
910
  const xHeaders = {};
@@ -667,15 +922,13 @@ class Catalog {
667
922
  /**
668
923
  * @param {Object} arg - Arg object.
669
924
  * @param {string} arg.uid - A `uid` is a unique identifier of a department.
670
- * @param {DepartmentCreateUpdate} arg.body
671
- * @summary: Update the department by their uid.
672
- * @description: Update the department by their uid using this API.
925
+ * @summary: Get specific departments details by passing in unique id of the department.
926
+ * @description: Allows you to get department data, by uid.
673
927
  */
674
- updateDepartment({ uid, body } = {}) {
675
- const { error } = CatalogValidator.updateDepartment().validate(
928
+ getDepartmentData({ uid } = {}) {
929
+ const { error } = CatalogValidator.getDepartmentData().validate(
676
930
  {
677
931
  uid,
678
- body,
679
932
  },
680
933
  { abortEarly: false, allowUnknown: true }
681
934
  );
@@ -683,16 +936,28 @@ class Catalog {
683
936
  return Promise.reject(new FDKClientValidationError(error));
684
937
  }
685
938
 
939
+ // Showing warrnings if extra unknown parameters are found
940
+ const { error: warrning } = CatalogValidator.getDepartmentData().validate(
941
+ {
942
+ uid,
943
+ },
944
+ { abortEarly: false, allowUnknown: false }
945
+ );
946
+ if (warrning) {
947
+ console.log("Parameter Validation warrnings for getDepartmentData");
948
+ console.log(warrning);
949
+ }
950
+
686
951
  const query_params = {};
687
952
 
688
953
  const xHeaders = {};
689
954
 
690
955
  return PlatformAPIClient.execute(
691
956
  this.config,
692
- "put",
957
+ "get",
693
958
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
694
959
  query_params,
695
- body,
960
+ undefined,
696
961
  xHeaders
697
962
  );
698
963
  }
@@ -700,13 +965,15 @@ class Catalog {
700
965
  /**
701
966
  * @param {Object} arg - Arg object.
702
967
  * @param {string} arg.uid - A `uid` is a unique identifier of a department.
703
- * @summary: Get specific departments details by passing in unique id of the department.
704
- * @description: Allows you to get department data, by uid.
968
+ * @param {DepartmentCreateUpdate} arg.body
969
+ * @summary: Update the department by their uid.
970
+ * @description: Update the department by their uid using this API.
705
971
  */
706
- getDepartmentData({ uid } = {}) {
707
- const { error } = CatalogValidator.getDepartmentData().validate(
972
+ updateDepartment({ uid, body } = {}) {
973
+ const { error } = CatalogValidator.updateDepartment().validate(
708
974
  {
709
975
  uid,
976
+ body,
710
977
  },
711
978
  { abortEarly: false, allowUnknown: true }
712
979
  );
@@ -714,16 +981,29 @@ class Catalog {
714
981
  return Promise.reject(new FDKClientValidationError(error));
715
982
  }
716
983
 
984
+ // Showing warrnings if extra unknown parameters are found
985
+ const { error: warrning } = CatalogValidator.updateDepartment().validate(
986
+ {
987
+ uid,
988
+ body,
989
+ },
990
+ { abortEarly: false, allowUnknown: false }
991
+ );
992
+ if (warrning) {
993
+ console.log("Parameter Validation warrnings for updateDepartment");
994
+ console.log(warrning);
995
+ }
996
+
717
997
  const query_params = {};
718
998
 
719
999
  const xHeaders = {};
720
1000
 
721
1001
  return PlatformAPIClient.execute(
722
1002
  this.config,
723
- "get",
1003
+ "put",
724
1004
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
725
1005
  query_params,
726
- undefined,
1006
+ body,
727
1007
  xHeaders
728
1008
  );
729
1009
  }
@@ -746,6 +1026,18 @@ class Catalog {
746
1026
  return Promise.reject(new FDKClientValidationError(error));
747
1027
  }
748
1028
 
1029
+ // Showing warrnings if extra unknown parameters are found
1030
+ const { error: warrning } = CatalogValidator.listProductTemplate().validate(
1031
+ {
1032
+ department,
1033
+ },
1034
+ { abortEarly: false, allowUnknown: false }
1035
+ );
1036
+ if (warrning) {
1037
+ console.log("Parameter Validation warrnings for listProductTemplate");
1038
+ console.log(warrning);
1039
+ }
1040
+
749
1041
  const query_params = {};
750
1042
  query_params["department"] = department;
751
1043
 
@@ -779,6 +1071,20 @@ class Catalog {
779
1071
  return Promise.reject(new FDKClientValidationError(error));
780
1072
  }
781
1073
 
1074
+ // Showing warrnings if extra unknown parameters are found
1075
+ const {
1076
+ error: warrning,
1077
+ } = CatalogValidator.validateProductTemplate().validate(
1078
+ {
1079
+ slug,
1080
+ },
1081
+ { abortEarly: false, allowUnknown: false }
1082
+ );
1083
+ if (warrning) {
1084
+ console.log("Parameter Validation warrnings for validateProductTemplate");
1085
+ console.log(warrning);
1086
+ }
1087
+
782
1088
  const query_params = {};
783
1089
 
784
1090
  const xHeaders = {};
@@ -811,6 +1117,22 @@ class Catalog {
811
1117
  return Promise.reject(new FDKClientValidationError(error));
812
1118
  }
813
1119
 
1120
+ // Showing warrnings if extra unknown parameters are found
1121
+ const {
1122
+ error: warrning,
1123
+ } = CatalogValidator.downloadProductTemplateViews().validate(
1124
+ {
1125
+ slug,
1126
+ },
1127
+ { abortEarly: false, allowUnknown: false }
1128
+ );
1129
+ if (warrning) {
1130
+ console.log(
1131
+ "Parameter Validation warrnings for downloadProductTemplateViews"
1132
+ );
1133
+ console.log(warrning);
1134
+ }
1135
+
814
1136
  const query_params = {};
815
1137
 
816
1138
  const xHeaders = {};
@@ -842,6 +1164,22 @@ class Catalog {
842
1164
  return Promise.reject(new FDKClientValidationError(error));
843
1165
  }
844
1166
 
1167
+ // Showing warrnings if extra unknown parameters are found
1168
+ const {
1169
+ error: warrning,
1170
+ } = CatalogValidator.downloadInventoryTemplateView().validate(
1171
+ {
1172
+ itemType,
1173
+ },
1174
+ { abortEarly: false, allowUnknown: false }
1175
+ );
1176
+ if (warrning) {
1177
+ console.log(
1178
+ "Parameter Validation warrnings for downloadInventoryTemplateView"
1179
+ );
1180
+ console.log(warrning);
1181
+ }
1182
+
845
1183
  const query_params = {};
846
1184
  query_params["item_type"] = itemType;
847
1185
 
@@ -875,6 +1213,22 @@ class Catalog {
875
1213
  return Promise.reject(new FDKClientValidationError(error));
876
1214
  }
877
1215
 
1216
+ // Showing warrnings if extra unknown parameters are found
1217
+ const {
1218
+ error: warrning,
1219
+ } = CatalogValidator.validateProductTemplateSchema().validate(
1220
+ {
1221
+ itemType,
1222
+ },
1223
+ { abortEarly: false, allowUnknown: false }
1224
+ );
1225
+ if (warrning) {
1226
+ console.log(
1227
+ "Parameter Validation warrnings for validateProductTemplateSchema"
1228
+ );
1229
+ console.log(warrning);
1230
+ }
1231
+
878
1232
  const query_params = {};
879
1233
  query_params["item_type"] = itemType;
880
1234
 
@@ -904,6 +1258,16 @@ class Catalog {
904
1258
  return Promise.reject(new FDKClientValidationError(error));
905
1259
  }
906
1260
 
1261
+ // Showing warrnings if extra unknown parameters are found
1262
+ const { error: warrning } = CatalogValidator.listHSNCodes().validate(
1263
+ {},
1264
+ { abortEarly: false, allowUnknown: false }
1265
+ );
1266
+ if (warrning) {
1267
+ console.log("Parameter Validation warrnings for listHSNCodes");
1268
+ console.log(warrning);
1269
+ }
1270
+
907
1271
  const query_params = {};
908
1272
 
909
1273
  const xHeaders = {};
@@ -934,6 +1298,20 @@ class Catalog {
934
1298
  return Promise.reject(new FDKClientValidationError(error));
935
1299
  }
936
1300
 
1301
+ // Showing warrnings if extra unknown parameters are found
1302
+ const {
1303
+ error: warrning,
1304
+ } = CatalogValidator.listProductTemplateExportDetails().validate(
1305
+ {},
1306
+ { abortEarly: false, allowUnknown: false }
1307
+ );
1308
+ if (warrning) {
1309
+ console.log(
1310
+ "Parameter Validation warrnings for listProductTemplateExportDetails"
1311
+ );
1312
+ console.log(warrning);
1313
+ }
1314
+
937
1315
  const query_params = {};
938
1316
 
939
1317
  const xHeaders = {};
@@ -966,6 +1344,22 @@ class Catalog {
966
1344
  return Promise.reject(new FDKClientValidationError(error));
967
1345
  }
968
1346
 
1347
+ // Showing warrnings if extra unknown parameters are found
1348
+ const {
1349
+ error: warrning,
1350
+ } = CatalogValidator.listTemplateBrandTypeValues().validate(
1351
+ {
1352
+ filter,
1353
+ },
1354
+ { abortEarly: false, allowUnknown: false }
1355
+ );
1356
+ if (warrning) {
1357
+ console.log(
1358
+ "Parameter Validation warrnings for listTemplateBrandTypeValues"
1359
+ );
1360
+ console.log(warrning);
1361
+ }
1362
+
969
1363
  const query_params = {};
970
1364
  query_params["filter"] = filter;
971
1365
 
@@ -1008,6 +1402,22 @@ class Catalog {
1008
1402
  return Promise.reject(new FDKClientValidationError(error));
1009
1403
  }
1010
1404
 
1405
+ // Showing warrnings if extra unknown parameters are found
1406
+ const { error: warrning } = CatalogValidator.listCategories().validate(
1407
+ {
1408
+ level,
1409
+ departments,
1410
+ q,
1411
+ pageNo,
1412
+ pageSize,
1413
+ },
1414
+ { abortEarly: false, allowUnknown: false }
1415
+ );
1416
+ if (warrning) {
1417
+ console.log("Parameter Validation warrnings for listCategories");
1418
+ console.log(warrning);
1419
+ }
1420
+
1011
1421
  const query_params = {};
1012
1422
  query_params["level"] = level;
1013
1423
  query_params["departments"] = departments;
@@ -1044,6 +1454,18 @@ class Catalog {
1044
1454
  return Promise.reject(new FDKClientValidationError(error));
1045
1455
  }
1046
1456
 
1457
+ // Showing warrnings if extra unknown parameters are found
1458
+ const { error: warrning } = CatalogValidator.createCategories().validate(
1459
+ {
1460
+ body,
1461
+ },
1462
+ { abortEarly: false, allowUnknown: false }
1463
+ );
1464
+ if (warrning) {
1465
+ console.log("Parameter Validation warrnings for createCategories");
1466
+ console.log(warrning);
1467
+ }
1468
+
1047
1469
  const query_params = {};
1048
1470
 
1049
1471
  const xHeaders = {};
@@ -1061,15 +1483,13 @@ class Catalog {
1061
1483
  /**
1062
1484
  * @param {Object} arg - Arg object.
1063
1485
  * @param {string} arg.uid - Category unique id
1064
- * @param {CategoryRequestBody} arg.body
1065
- * @summary: Update product categories
1066
- * @description: Update a product category using this apu
1486
+ * @summary: Get product category by uid
1487
+ * @description: This API gets meta associated to product categories.
1067
1488
  */
1068
- updateCategory({ uid, body } = {}) {
1069
- const { error } = CatalogValidator.updateCategory().validate(
1489
+ getCategoryData({ uid } = {}) {
1490
+ const { error } = CatalogValidator.getCategoryData().validate(
1070
1491
  {
1071
1492
  uid,
1072
- body,
1073
1493
  },
1074
1494
  { abortEarly: false, allowUnknown: true }
1075
1495
  );
@@ -1077,16 +1497,28 @@ class Catalog {
1077
1497
  return Promise.reject(new FDKClientValidationError(error));
1078
1498
  }
1079
1499
 
1500
+ // Showing warrnings if extra unknown parameters are found
1501
+ const { error: warrning } = CatalogValidator.getCategoryData().validate(
1502
+ {
1503
+ uid,
1504
+ },
1505
+ { abortEarly: false, allowUnknown: false }
1506
+ );
1507
+ if (warrning) {
1508
+ console.log("Parameter Validation warrnings for getCategoryData");
1509
+ console.log(warrning);
1510
+ }
1511
+
1080
1512
  const query_params = {};
1081
1513
 
1082
1514
  const xHeaders = {};
1083
1515
 
1084
1516
  return PlatformAPIClient.execute(
1085
1517
  this.config,
1086
- "put",
1518
+ "get",
1087
1519
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
1088
1520
  query_params,
1089
- body,
1521
+ undefined,
1090
1522
  xHeaders
1091
1523
  );
1092
1524
  }
@@ -1094,13 +1526,15 @@ class Catalog {
1094
1526
  /**
1095
1527
  * @param {Object} arg - Arg object.
1096
1528
  * @param {string} arg.uid - Category unique id
1097
- * @summary: Get product category by uid
1098
- * @description: This API gets meta associated to product categories.
1529
+ * @param {CategoryRequestBody} arg.body
1530
+ * @summary: Update product categories
1531
+ * @description: Update a product category using this apu
1099
1532
  */
1100
- getCategoryData({ uid } = {}) {
1101
- const { error } = CatalogValidator.getCategoryData().validate(
1533
+ updateCategory({ uid, body } = {}) {
1534
+ const { error } = CatalogValidator.updateCategory().validate(
1102
1535
  {
1103
1536
  uid,
1537
+ body,
1104
1538
  },
1105
1539
  { abortEarly: false, allowUnknown: true }
1106
1540
  );
@@ -1108,16 +1542,29 @@ class Catalog {
1108
1542
  return Promise.reject(new FDKClientValidationError(error));
1109
1543
  }
1110
1544
 
1545
+ // Showing warrnings if extra unknown parameters are found
1546
+ const { error: warrning } = CatalogValidator.updateCategory().validate(
1547
+ {
1548
+ uid,
1549
+ body,
1550
+ },
1551
+ { abortEarly: false, allowUnknown: false }
1552
+ );
1553
+ if (warrning) {
1554
+ console.log("Parameter Validation warrnings for updateCategory");
1555
+ console.log(warrning);
1556
+ }
1557
+
1111
1558
  const query_params = {};
1112
1559
 
1113
1560
  const xHeaders = {};
1114
1561
 
1115
1562
  return PlatformAPIClient.execute(
1116
1563
  this.config,
1117
- "get",
1564
+ "put",
1118
1565
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
1119
1566
  query_params,
1120
- undefined,
1567
+ body,
1121
1568
  xHeaders
1122
1569
  );
1123
1570
  }
@@ -1169,6 +1616,26 @@ class Catalog {
1169
1616
  return Promise.reject(new FDKClientValidationError(error));
1170
1617
  }
1171
1618
 
1619
+ // Showing warrnings if extra unknown parameters are found
1620
+ const { error: warrning } = CatalogValidator.getProducts().validate(
1621
+ {
1622
+ brandIds,
1623
+ categoryIds,
1624
+ itemIds,
1625
+ departmentIds,
1626
+ itemCode,
1627
+ q,
1628
+ tags,
1629
+ pageNo,
1630
+ pageSize,
1631
+ },
1632
+ { abortEarly: false, allowUnknown: false }
1633
+ );
1634
+ if (warrning) {
1635
+ console.log("Parameter Validation warrnings for getProducts");
1636
+ console.log(warrning);
1637
+ }
1638
+
1172
1639
  const query_params = {};
1173
1640
  query_params["brand_ids"] = brandIds;
1174
1641
  query_params["category_ids"] = categoryIds;
@@ -1209,6 +1676,18 @@ class Catalog {
1209
1676
  return Promise.reject(new FDKClientValidationError(error));
1210
1677
  }
1211
1678
 
1679
+ // Showing warrnings if extra unknown parameters are found
1680
+ const { error: warrning } = CatalogValidator.createProduct().validate(
1681
+ {
1682
+ body,
1683
+ },
1684
+ { abortEarly: false, allowUnknown: false }
1685
+ );
1686
+ if (warrning) {
1687
+ console.log("Parameter Validation warrnings for createProduct");
1688
+ console.log(warrning);
1689
+ }
1690
+
1212
1691
  const query_params = {};
1213
1692
 
1214
1693
  const xHeaders = {};
@@ -1248,6 +1727,23 @@ class Catalog {
1248
1727
  return Promise.reject(new FDKClientValidationError(error));
1249
1728
  }
1250
1729
 
1730
+ // Showing warrnings if extra unknown parameters are found
1731
+ const {
1732
+ error: warrning,
1733
+ } = CatalogValidator.getVariantsOfProducts().validate(
1734
+ {
1735
+ itemId,
1736
+ variantType,
1737
+ pageNo,
1738
+ pageSize,
1739
+ },
1740
+ { abortEarly: false, allowUnknown: false }
1741
+ );
1742
+ if (warrning) {
1743
+ console.log("Parameter Validation warrnings for getVariantsOfProducts");
1744
+ console.log(warrning);
1745
+ }
1746
+
1251
1747
  const query_params = {};
1252
1748
  query_params["page_no"] = pageNo;
1253
1749
  query_params["page_size"] = pageSize;
@@ -1284,6 +1780,21 @@ class Catalog {
1284
1780
  return Promise.reject(new FDKClientValidationError(error));
1285
1781
  }
1286
1782
 
1783
+ // Showing warrnings if extra unknown parameters are found
1784
+ const {
1785
+ error: warrning,
1786
+ } = CatalogValidator.getProductAttributes().validate(
1787
+ {
1788
+ category,
1789
+ filter,
1790
+ },
1791
+ { abortEarly: false, allowUnknown: false }
1792
+ );
1793
+ if (warrning) {
1794
+ console.log("Parameter Validation warrnings for getProductAttributes");
1795
+ console.log(warrning);
1796
+ }
1797
+
1287
1798
  const query_params = {};
1288
1799
  query_params["category"] = category;
1289
1800
  query_params["filter"] = filter;
@@ -1302,16 +1813,18 @@ class Catalog {
1302
1813
 
1303
1814
  /**
1304
1815
  * @param {Object} arg - Arg object.
1305
- * @param {number} arg.itemId - Id of the product to be updated.
1306
- * @param {ProductCreateUpdateSchemaV2} arg.body
1307
- * @summary: Edit a product.
1308
- * @description: This API allows to edit product.
1816
+ * @param {number} arg.itemId - Item Id of the product.
1817
+ * @param {number} [arg.brandUid] - Brand Id of the product.
1818
+ * @param {string} [arg.itemCode] - Item code of the product.
1819
+ * @summary: Get a single product.
1820
+ * @description: This API helps to get data associated to a particular product.
1309
1821
  */
1310
- editProduct({ itemId, body } = {}) {
1311
- const { error } = CatalogValidator.editProduct().validate(
1822
+ getProduct({ itemId, brandUid, itemCode } = {}) {
1823
+ const { error } = CatalogValidator.getProduct().validate(
1312
1824
  {
1313
1825
  itemId,
1314
- body,
1826
+ brandUid,
1827
+ itemCode,
1315
1828
  },
1316
1829
  { abortEarly: false, allowUnknown: true }
1317
1830
  );
@@ -1319,34 +1832,48 @@ class Catalog {
1319
1832
  return Promise.reject(new FDKClientValidationError(error));
1320
1833
  }
1321
1834
 
1835
+ // Showing warrnings if extra unknown parameters are found
1836
+ const { error: warrning } = CatalogValidator.getProduct().validate(
1837
+ {
1838
+ itemId,
1839
+ brandUid,
1840
+ itemCode,
1841
+ },
1842
+ { abortEarly: false, allowUnknown: false }
1843
+ );
1844
+ if (warrning) {
1845
+ console.log("Parameter Validation warrnings for getProduct");
1846
+ console.log(warrning);
1847
+ }
1848
+
1322
1849
  const query_params = {};
1850
+ query_params["brand_uid"] = brandUid;
1851
+ query_params["item_code"] = itemCode;
1323
1852
 
1324
1853
  const xHeaders = {};
1325
1854
 
1326
1855
  return PlatformAPIClient.execute(
1327
1856
  this.config,
1328
- "put",
1857
+ "get",
1329
1858
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
1330
1859
  query_params,
1331
- body,
1860
+ undefined,
1332
1861
  xHeaders
1333
1862
  );
1334
1863
  }
1335
1864
 
1336
1865
  /**
1337
1866
  * @param {Object} arg - Arg object.
1338
- * @param {number} arg.itemId - Item Id of the product.
1339
- * @param {number} [arg.brandUid] - Brand Id of the product.
1340
- * @param {string} [arg.itemCode] - Item code of the product.
1341
- * @summary: Get a single product.
1342
- * @description: This API helps to get data associated to a particular product.
1867
+ * @param {number} arg.itemId - Id of the product to be updated.
1868
+ * @param {ProductCreateUpdateSchemaV2} arg.body
1869
+ * @summary: Edit a product.
1870
+ * @description: This API allows to edit product.
1343
1871
  */
1344
- getProduct({ itemId, brandUid, itemCode } = {}) {
1345
- const { error } = CatalogValidator.getProduct().validate(
1872
+ editProduct({ itemId, body } = {}) {
1873
+ const { error } = CatalogValidator.editProduct().validate(
1346
1874
  {
1347
1875
  itemId,
1348
- brandUid,
1349
- itemCode,
1876
+ body,
1350
1877
  },
1351
1878
  { abortEarly: false, allowUnknown: true }
1352
1879
  );
@@ -1354,18 +1881,29 @@ class Catalog {
1354
1881
  return Promise.reject(new FDKClientValidationError(error));
1355
1882
  }
1356
1883
 
1884
+ // Showing warrnings if extra unknown parameters are found
1885
+ const { error: warrning } = CatalogValidator.editProduct().validate(
1886
+ {
1887
+ itemId,
1888
+ body,
1889
+ },
1890
+ { abortEarly: false, allowUnknown: false }
1891
+ );
1892
+ if (warrning) {
1893
+ console.log("Parameter Validation warrnings for editProduct");
1894
+ console.log(warrning);
1895
+ }
1896
+
1357
1897
  const query_params = {};
1358
- query_params["brand_uid"] = brandUid;
1359
- query_params["item_code"] = itemCode;
1360
1898
 
1361
1899
  const xHeaders = {};
1362
1900
 
1363
1901
  return PlatformAPIClient.execute(
1364
1902
  this.config,
1365
- "get",
1903
+ "put",
1366
1904
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
1367
1905
  query_params,
1368
- undefined,
1906
+ body,
1369
1907
  xHeaders
1370
1908
  );
1371
1909
  }
@@ -1387,6 +1925,18 @@ class Catalog {
1387
1925
  return Promise.reject(new FDKClientValidationError(error));
1388
1926
  }
1389
1927
 
1928
+ // Showing warrnings if extra unknown parameters are found
1929
+ const { error: warrning } = CatalogValidator.deleteProduct().validate(
1930
+ {
1931
+ itemId,
1932
+ },
1933
+ { abortEarly: false, allowUnknown: false }
1934
+ );
1935
+ if (warrning) {
1936
+ console.log("Parameter Validation warrnings for deleteProduct");
1937
+ console.log(warrning);
1938
+ }
1939
+
1390
1940
  const query_params = {};
1391
1941
 
1392
1942
  const xHeaders = {};
@@ -1418,6 +1968,18 @@ class Catalog {
1418
1968
  return Promise.reject(new FDKClientValidationError(error));
1419
1969
  }
1420
1970
 
1971
+ // Showing warrnings if extra unknown parameters are found
1972
+ const { error: warrning } = CatalogValidator.allSizes().validate(
1973
+ {
1974
+ itemId,
1975
+ },
1976
+ { abortEarly: false, allowUnknown: false }
1977
+ );
1978
+ if (warrning) {
1979
+ console.log("Parameter Validation warrnings for allSizes");
1980
+ console.log(warrning);
1981
+ }
1982
+
1421
1983
  const query_params = {};
1422
1984
 
1423
1985
  const xHeaders = {};
@@ -1446,6 +2008,18 @@ class Catalog {
1446
2008
  return Promise.reject(new FDKClientValidationError(error));
1447
2009
  }
1448
2010
 
2011
+ // Showing warrnings if extra unknown parameters are found
2012
+ const {
2013
+ error: warrning,
2014
+ } = CatalogValidator.getProductValidation().validate(
2015
+ {},
2016
+ { abortEarly: false, allowUnknown: false }
2017
+ );
2018
+ if (warrning) {
2019
+ console.log("Parameter Validation warrnings for getProductValidation");
2020
+ console.log(warrning);
2021
+ }
2022
+
1449
2023
  const query_params = {};
1450
2024
 
1451
2025
  const xHeaders = {};
@@ -1483,6 +2057,21 @@ class Catalog {
1483
2057
  return Promise.reject(new FDKClientValidationError(error));
1484
2058
  }
1485
2059
 
2060
+ // Showing warrnings if extra unknown parameters are found
2061
+ const { error: warrning } = CatalogValidator.getProductSize().validate(
2062
+ {
2063
+ itemId,
2064
+ itemCode,
2065
+ brandUid,
2066
+ uid,
2067
+ },
2068
+ { abortEarly: false, allowUnknown: false }
2069
+ );
2070
+ if (warrning) {
2071
+ console.log("Parameter Validation warrnings for getProductSize");
2072
+ console.log(warrning);
2073
+ }
2074
+
1486
2075
  const query_params = {};
1487
2076
  query_params["item_code"] = itemCode;
1488
2077
  query_params["brand_uid"] = brandUid;
@@ -1523,6 +2112,24 @@ class Catalog {
1523
2112
  return Promise.reject(new FDKClientValidationError(error));
1524
2113
  }
1525
2114
 
2115
+ // Showing warrnings if extra unknown parameters are found
2116
+ const {
2117
+ error: warrning,
2118
+ } = CatalogValidator.getProductBulkUploadHistory().validate(
2119
+ {
2120
+ search,
2121
+ pageNo,
2122
+ pageSize,
2123
+ },
2124
+ { abortEarly: false, allowUnknown: false }
2125
+ );
2126
+ if (warrning) {
2127
+ console.log(
2128
+ "Parameter Validation warrnings for getProductBulkUploadHistory"
2129
+ );
2130
+ console.log(warrning);
2131
+ }
2132
+
1526
2133
  const query_params = {};
1527
2134
  query_params["search"] = search;
1528
2135
  query_params["page_no"] = pageNo;
@@ -1557,6 +2164,22 @@ class Catalog {
1557
2164
  return Promise.reject(new FDKClientValidationError(error));
1558
2165
  }
1559
2166
 
2167
+ // Showing warrnings if extra unknown parameters are found
2168
+ const {
2169
+ error: warrning,
2170
+ } = CatalogValidator.createBulkProductUploadJob().validate(
2171
+ {
2172
+ body,
2173
+ },
2174
+ { abortEarly: false, allowUnknown: false }
2175
+ );
2176
+ if (warrning) {
2177
+ console.log(
2178
+ "Parameter Validation warrnings for createBulkProductUploadJob"
2179
+ );
2180
+ console.log(warrning);
2181
+ }
2182
+
1560
2183
  const query_params = {};
1561
2184
 
1562
2185
  const xHeaders = {};
@@ -1593,6 +2216,20 @@ class Catalog {
1593
2216
  return Promise.reject(new FDKClientValidationError(error));
1594
2217
  }
1595
2218
 
2219
+ // Showing warrnings if extra unknown parameters are found
2220
+ const { error: warrning } = CatalogValidator.uploadBulkProducts().validate(
2221
+ {
2222
+ department,
2223
+ productType,
2224
+ body,
2225
+ },
2226
+ { abortEarly: false, allowUnknown: false }
2227
+ );
2228
+ if (warrning) {
2229
+ console.log("Parameter Validation warrnings for uploadBulkProducts");
2230
+ console.log(warrning);
2231
+ }
2232
+
1596
2233
  const query_params = {};
1597
2234
  query_params["department"] = department;
1598
2235
  query_params["product_type"] = productType;
@@ -1626,6 +2263,20 @@ class Catalog {
1626
2263
  return Promise.reject(new FDKClientValidationError(error));
1627
2264
  }
1628
2265
 
2266
+ // Showing warrnings if extra unknown parameters are found
2267
+ const {
2268
+ error: warrning,
2269
+ } = CatalogValidator.deleteProductBulkJob().validate(
2270
+ {
2271
+ batchId,
2272
+ },
2273
+ { abortEarly: false, allowUnknown: false }
2274
+ );
2275
+ if (warrning) {
2276
+ console.log("Parameter Validation warrnings for deleteProductBulkJob");
2277
+ console.log(warrning);
2278
+ }
2279
+
1629
2280
  const query_params = {};
1630
2281
 
1631
2282
  const xHeaders = {};
@@ -1659,6 +2310,21 @@ class Catalog {
1659
2310
  return Promise.reject(new FDKClientValidationError(error));
1660
2311
  }
1661
2312
 
2313
+ // Showing warrnings if extra unknown parameters are found
2314
+ const {
2315
+ error: warrning,
2316
+ } = CatalogValidator.createProductsInBulk().validate(
2317
+ {
2318
+ batchId,
2319
+ body,
2320
+ },
2321
+ { abortEarly: false, allowUnknown: false }
2322
+ );
2323
+ if (warrning) {
2324
+ console.log("Parameter Validation warrnings for createProductsInBulk");
2325
+ console.log(warrning);
2326
+ }
2327
+
1662
2328
  const query_params = {};
1663
2329
 
1664
2330
  const xHeaders = {};
@@ -1687,6 +2353,16 @@ class Catalog {
1687
2353
  return Promise.reject(new FDKClientValidationError(error));
1688
2354
  }
1689
2355
 
2356
+ // Showing warrnings if extra unknown parameters are found
2357
+ const { error: warrning } = CatalogValidator.getProductTags().validate(
2358
+ {},
2359
+ { abortEarly: false, allowUnknown: false }
2360
+ );
2361
+ if (warrning) {
2362
+ console.log("Parameter Validation warrnings for getProductTags");
2363
+ console.log(warrning);
2364
+ }
2365
+
1690
2366
  const query_params = {};
1691
2367
 
1692
2368
  const xHeaders = {};
@@ -1722,6 +2398,21 @@ class Catalog {
1722
2398
  return Promise.reject(new FDKClientValidationError(error));
1723
2399
  }
1724
2400
 
2401
+ // Showing warrnings if extra unknown parameters are found
2402
+ const {
2403
+ error: warrning,
2404
+ } = CatalogValidator.getProductAssetsInBulk().validate(
2405
+ {
2406
+ pageNo,
2407
+ pageSize,
2408
+ },
2409
+ { abortEarly: false, allowUnknown: false }
2410
+ );
2411
+ if (warrning) {
2412
+ console.log("Parameter Validation warrnings for getProductAssetsInBulk");
2413
+ console.log(warrning);
2414
+ }
2415
+
1725
2416
  const query_params = {};
1726
2417
  query_params["page_no"] = pageNo;
1727
2418
  query_params["page_size"] = pageSize;
@@ -1755,6 +2446,22 @@ class Catalog {
1755
2446
  return Promise.reject(new FDKClientValidationError(error));
1756
2447
  }
1757
2448
 
2449
+ // Showing warrnings if extra unknown parameters are found
2450
+ const {
2451
+ error: warrning,
2452
+ } = CatalogValidator.createProductAssetsInBulk().validate(
2453
+ {
2454
+ body,
2455
+ },
2456
+ { abortEarly: false, allowUnknown: false }
2457
+ );
2458
+ if (warrning) {
2459
+ console.log(
2460
+ "Parameter Validation warrnings for createProductAssetsInBulk"
2461
+ );
2462
+ console.log(warrning);
2463
+ }
2464
+
1758
2465
  const query_params = {};
1759
2466
 
1760
2467
  const xHeaders = {};
@@ -1789,6 +2496,19 @@ class Catalog {
1789
2496
  return Promise.reject(new FDKClientValidationError(error));
1790
2497
  }
1791
2498
 
2499
+ // Showing warrnings if extra unknown parameters are found
2500
+ const { error: warrning } = CatalogValidator.deleteSize().validate(
2501
+ {
2502
+ itemId,
2503
+ size,
2504
+ },
2505
+ { abortEarly: false, allowUnknown: false }
2506
+ );
2507
+ if (warrning) {
2508
+ console.log("Parameter Validation warrnings for deleteSize");
2509
+ console.log(warrning);
2510
+ }
2511
+
1792
2512
  const query_params = {};
1793
2513
 
1794
2514
  const xHeaders = {};
@@ -1832,6 +2552,23 @@ class Catalog {
1832
2552
  return Promise.reject(new FDKClientValidationError(error));
1833
2553
  }
1834
2554
 
2555
+ // Showing warrnings if extra unknown parameters are found
2556
+ const { error: warrning } = CatalogValidator.getInventoryBySize().validate(
2557
+ {
2558
+ itemId,
2559
+ size,
2560
+ pageNo,
2561
+ pageSize,
2562
+ q,
2563
+ sellable,
2564
+ },
2565
+ { abortEarly: false, allowUnknown: false }
2566
+ );
2567
+ if (warrning) {
2568
+ console.log("Parameter Validation warrnings for getInventoryBySize");
2569
+ console.log(warrning);
2570
+ }
2571
+
1835
2572
  const query_params = {};
1836
2573
  query_params["page_no"] = pageNo;
1837
2574
  query_params["page_size"] = pageSize;
@@ -1871,6 +2608,20 @@ class Catalog {
1871
2608
  return Promise.reject(new FDKClientValidationError(error));
1872
2609
  }
1873
2610
 
2611
+ // Showing warrnings if extra unknown parameters are found
2612
+ const { error: warrning } = CatalogValidator.addInventory().validate(
2613
+ {
2614
+ itemId,
2615
+ size,
2616
+ body,
2617
+ },
2618
+ { abortEarly: false, allowUnknown: false }
2619
+ );
2620
+ if (warrning) {
2621
+ console.log("Parameter Validation warrnings for addInventory");
2622
+ console.log(warrning);
2623
+ }
2624
+
1874
2625
  const query_params = {};
1875
2626
 
1876
2627
  const xHeaders = {};
@@ -1922,6 +2673,27 @@ class Catalog {
1922
2673
  return Promise.reject(new FDKClientValidationError(error));
1923
2674
  }
1924
2675
 
2676
+ // Showing warrnings if extra unknown parameters are found
2677
+ const {
2678
+ error: warrning,
2679
+ } = CatalogValidator.getInventoryBySizeIdentifier().validate(
2680
+ {
2681
+ itemId,
2682
+ sizeIdentifier,
2683
+ pageNo,
2684
+ pageSize,
2685
+ q,
2686
+ locationIds,
2687
+ },
2688
+ { abortEarly: false, allowUnknown: false }
2689
+ );
2690
+ if (warrning) {
2691
+ console.log(
2692
+ "Parameter Validation warrnings for getInventoryBySizeIdentifier"
2693
+ );
2694
+ console.log(warrning);
2695
+ }
2696
+
1925
2697
  const query_params = {};
1926
2698
  query_params["page_no"] = pageNo;
1927
2699
  query_params["page_size"] = pageSize;
@@ -1983,6 +2755,25 @@ class Catalog {
1983
2755
  return Promise.reject(new FDKClientValidationError(error));
1984
2756
  }
1985
2757
 
2758
+ // Showing warrnings if extra unknown parameters are found
2759
+ const { error: warrning } = CatalogValidator.getInventories().validate(
2760
+ {
2761
+ itemId,
2762
+ size,
2763
+ pageNo,
2764
+ pageSize,
2765
+ q,
2766
+ sellable,
2767
+ storeIds,
2768
+ sizeIdentifier,
2769
+ },
2770
+ { abortEarly: false, allowUnknown: false }
2771
+ );
2772
+ if (warrning) {
2773
+ console.log("Parameter Validation warrnings for getInventories");
2774
+ console.log(warrning);
2775
+ }
2776
+
1986
2777
  const query_params = {};
1987
2778
  query_params["item_id"] = itemId;
1988
2779
  query_params["size"] = size;
@@ -2028,6 +2819,20 @@ class Catalog {
2028
2819
  return Promise.reject(new FDKClientValidationError(error));
2029
2820
  }
2030
2821
 
2822
+ // Showing warrnings if extra unknown parameters are found
2823
+ const { error: warrning } = CatalogValidator.deleteInventory().validate(
2824
+ {
2825
+ size,
2826
+ itemId,
2827
+ locationId,
2828
+ },
2829
+ { abortEarly: false, allowUnknown: false }
2830
+ );
2831
+ if (warrning) {
2832
+ console.log("Parameter Validation warrnings for deleteInventory");
2833
+ console.log(warrning);
2834
+ }
2835
+
2031
2836
  const query_params = {};
2032
2837
 
2033
2838
  const xHeaders = {};
@@ -2063,6 +2868,23 @@ class Catalog {
2063
2868
  return Promise.reject(new FDKClientValidationError(error));
2064
2869
  }
2065
2870
 
2871
+ // Showing warrnings if extra unknown parameters are found
2872
+ const {
2873
+ error: warrning,
2874
+ } = CatalogValidator.getInventoryBulkUploadHistory().validate(
2875
+ {
2876
+ pageNo,
2877
+ pageSize,
2878
+ },
2879
+ { abortEarly: false, allowUnknown: false }
2880
+ );
2881
+ if (warrning) {
2882
+ console.log(
2883
+ "Parameter Validation warrnings for getInventoryBulkUploadHistory"
2884
+ );
2885
+ console.log(warrning);
2886
+ }
2887
+
2066
2888
  const query_params = {};
2067
2889
  query_params["page_no"] = pageNo;
2068
2890
  query_params["page_size"] = pageSize;
@@ -2096,6 +2918,20 @@ class Catalog {
2096
2918
  return Promise.reject(new FDKClientValidationError(error));
2097
2919
  }
2098
2920
 
2921
+ // Showing warrnings if extra unknown parameters are found
2922
+ const {
2923
+ error: warrning,
2924
+ } = CatalogValidator.createBulkInventoryJob().validate(
2925
+ {
2926
+ body,
2927
+ },
2928
+ { abortEarly: false, allowUnknown: false }
2929
+ );
2930
+ if (warrning) {
2931
+ console.log("Parameter Validation warrnings for createBulkInventoryJob");
2932
+ console.log(warrning);
2933
+ }
2934
+
2099
2935
  const query_params = {};
2100
2936
 
2101
2937
  const xHeaders = {};
@@ -2127,6 +2963,20 @@ class Catalog {
2127
2963
  return Promise.reject(new FDKClientValidationError(error));
2128
2964
  }
2129
2965
 
2966
+ // Showing warrnings if extra unknown parameters are found
2967
+ const {
2968
+ error: warrning,
2969
+ } = CatalogValidator.deleteBulkInventoryJob().validate(
2970
+ {
2971
+ batchId,
2972
+ },
2973
+ { abortEarly: false, allowUnknown: false }
2974
+ );
2975
+ if (warrning) {
2976
+ console.log("Parameter Validation warrnings for deleteBulkInventoryJob");
2977
+ console.log(warrning);
2978
+ }
2979
+
2130
2980
  const query_params = {};
2131
2981
 
2132
2982
  const xHeaders = {};
@@ -2160,6 +3010,19 @@ class Catalog {
2160
3010
  return Promise.reject(new FDKClientValidationError(error));
2161
3011
  }
2162
3012
 
3013
+ // Showing warrnings if extra unknown parameters are found
3014
+ const { error: warrning } = CatalogValidator.createBulkInventory().validate(
3015
+ {
3016
+ batchId,
3017
+ body,
3018
+ },
3019
+ { abortEarly: false, allowUnknown: false }
3020
+ );
3021
+ if (warrning) {
3022
+ console.log("Parameter Validation warrnings for createBulkInventory");
3023
+ console.log(warrning);
3024
+ }
3025
+
2163
3026
  const query_params = {};
2164
3027
 
2165
3028
  const xHeaders = {};
@@ -2188,6 +3051,16 @@ class Catalog {
2188
3051
  return Promise.reject(new FDKClientValidationError(error));
2189
3052
  }
2190
3053
 
3054
+ // Showing warrnings if extra unknown parameters are found
3055
+ const { error: warrning } = CatalogValidator.getInventoryExport().validate(
3056
+ {},
3057
+ { abortEarly: false, allowUnknown: false }
3058
+ );
3059
+ if (warrning) {
3060
+ console.log("Parameter Validation warrnings for getInventoryExport");
3061
+ console.log(warrning);
3062
+ }
3063
+
2191
3064
  const query_params = {};
2192
3065
 
2193
3066
  const xHeaders = {};
@@ -2219,6 +3092,22 @@ class Catalog {
2219
3092
  return Promise.reject(new FDKClientValidationError(error));
2220
3093
  }
2221
3094
 
3095
+ // Showing warrnings if extra unknown parameters are found
3096
+ const {
3097
+ error: warrning,
3098
+ } = CatalogValidator.createInventoryExportJob().validate(
3099
+ {
3100
+ body,
3101
+ },
3102
+ { abortEarly: false, allowUnknown: false }
3103
+ );
3104
+ if (warrning) {
3105
+ console.log(
3106
+ "Parameter Validation warrnings for createInventoryExportJob"
3107
+ );
3108
+ console.log(warrning);
3109
+ }
3110
+
2222
3111
  const query_params = {};
2223
3112
 
2224
3113
  const xHeaders = {};
@@ -2251,6 +3140,20 @@ class Catalog {
2251
3140
  return Promise.reject(new FDKClientValidationError(error));
2252
3141
  }
2253
3142
 
3143
+ // Showing warrnings if extra unknown parameters are found
3144
+ const {
3145
+ error: warrning,
3146
+ } = CatalogValidator.exportInventoryConfig().validate(
3147
+ {
3148
+ filterType,
3149
+ },
3150
+ { abortEarly: false, allowUnknown: false }
3151
+ );
3152
+ if (warrning) {
3153
+ console.log("Parameter Validation warrnings for exportInventoryConfig");
3154
+ console.log(warrning);
3155
+ }
3156
+
2254
3157
  const query_params = {};
2255
3158
  query_params["filter_type"] = filterType;
2256
3159
 
@@ -2288,6 +3191,22 @@ class Catalog {
2288
3191
  return Promise.reject(new FDKClientValidationError(error));
2289
3192
  }
2290
3193
 
3194
+ // Showing warrnings if extra unknown parameters are found
3195
+ const {
3196
+ error: warrning,
3197
+ } = CatalogValidator.deleteRealtimeInventory().validate(
3198
+ {
3199
+ itemId,
3200
+ sellerIdentifier,
3201
+ body,
3202
+ },
3203
+ { abortEarly: false, allowUnknown: false }
3204
+ );
3205
+ if (warrning) {
3206
+ console.log("Parameter Validation warrnings for deleteRealtimeInventory");
3207
+ console.log(warrning);
3208
+ }
3209
+
2291
3210
  const query_params = {};
2292
3211
 
2293
3212
  const xHeaders = {};
@@ -2324,6 +3243,22 @@ class Catalog {
2324
3243
  return Promise.reject(new FDKClientValidationError(error));
2325
3244
  }
2326
3245
 
3246
+ // Showing warrnings if extra unknown parameters are found
3247
+ const {
3248
+ error: warrning,
3249
+ } = CatalogValidator.updateRealtimeInventory().validate(
3250
+ {
3251
+ itemId,
3252
+ sellerIdentifier,
3253
+ body,
3254
+ },
3255
+ { abortEarly: false, allowUnknown: false }
3256
+ );
3257
+ if (warrning) {
3258
+ console.log("Parameter Validation warrnings for updateRealtimeInventory");
3259
+ console.log(warrning);
3260
+ }
3261
+
2327
3262
  const query_params = {};
2328
3263
 
2329
3264
  const xHeaders = {};
@@ -2355,6 +3290,18 @@ class Catalog {
2355
3290
  return Promise.reject(new FDKClientValidationError(error));
2356
3291
  }
2357
3292
 
3293
+ // Showing warrnings if extra unknown parameters are found
3294
+ const { error: warrning } = CatalogValidator.updateInventories().validate(
3295
+ {
3296
+ body,
3297
+ },
3298
+ { abortEarly: false, allowUnknown: false }
3299
+ );
3300
+ if (warrning) {
3301
+ console.log("Parameter Validation warrnings for updateInventories");
3302
+ console.log(warrning);
3303
+ }
3304
+
2358
3305
  const query_params = {};
2359
3306
 
2360
3307
  const xHeaders = {};
@@ -2390,6 +3337,20 @@ class Catalog {
2390
3337
  return Promise.reject(new FDKClientValidationError(error));
2391
3338
  }
2392
3339
 
3340
+ // Showing warrnings if extra unknown parameters are found
3341
+ const { error: warrning } = CatalogValidator.getAllHsnCodes().validate(
3342
+ {
3343
+ pageNo,
3344
+ pageSize,
3345
+ q,
3346
+ },
3347
+ { abortEarly: false, allowUnknown: false }
3348
+ );
3349
+ if (warrning) {
3350
+ console.log("Parameter Validation warrnings for getAllHsnCodes");
3351
+ console.log(warrning);
3352
+ }
3353
+
2393
3354
  const query_params = {};
2394
3355
  query_params["page_no"] = pageNo;
2395
3356
  query_params["page_size"] = pageSize;
@@ -2424,6 +3385,18 @@ class Catalog {
2424
3385
  return Promise.reject(new FDKClientValidationError(error));
2425
3386
  }
2426
3387
 
3388
+ // Showing warrnings if extra unknown parameters are found
3389
+ const { error: warrning } = CatalogValidator.createHsnCode().validate(
3390
+ {
3391
+ body,
3392
+ },
3393
+ { abortEarly: false, allowUnknown: false }
3394
+ );
3395
+ if (warrning) {
3396
+ console.log("Parameter Validation warrnings for createHsnCode");
3397
+ console.log(warrning);
3398
+ }
3399
+
2427
3400
  const query_params = {};
2428
3401
 
2429
3402
  const xHeaders = {};
@@ -2441,15 +3414,13 @@ class Catalog {
2441
3414
  /**
2442
3415
  * @param {Object} arg - Arg object.
2443
3416
  * @param {string} arg.id - Unique id
2444
- * @param {HsnUpsert} arg.body
2445
- * @summary: Update Hsn Code.
2446
- * @description: Update Hsn Code.
3417
+ * @summary: Fetch Hsn Code.
3418
+ * @description: Fetch Hsn Code.
2447
3419
  */
2448
- updateHsnCode({ id, body } = {}) {
2449
- const { error } = CatalogValidator.updateHsnCode().validate(
3420
+ getHsnCode({ id } = {}) {
3421
+ const { error } = CatalogValidator.getHsnCode().validate(
2450
3422
  {
2451
3423
  id,
2452
- body,
2453
3424
  },
2454
3425
  { abortEarly: false, allowUnknown: true }
2455
3426
  );
@@ -2457,16 +3428,28 @@ class Catalog {
2457
3428
  return Promise.reject(new FDKClientValidationError(error));
2458
3429
  }
2459
3430
 
3431
+ // Showing warrnings if extra unknown parameters are found
3432
+ const { error: warrning } = CatalogValidator.getHsnCode().validate(
3433
+ {
3434
+ id,
3435
+ },
3436
+ { abortEarly: false, allowUnknown: false }
3437
+ );
3438
+ if (warrning) {
3439
+ console.log("Parameter Validation warrnings for getHsnCode");
3440
+ console.log(warrning);
3441
+ }
3442
+
2460
3443
  const query_params = {};
2461
3444
 
2462
3445
  const xHeaders = {};
2463
3446
 
2464
3447
  return PlatformAPIClient.execute(
2465
3448
  this.config,
2466
- "put",
3449
+ "get",
2467
3450
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
2468
3451
  query_params,
2469
- body,
3452
+ undefined,
2470
3453
  xHeaders
2471
3454
  );
2472
3455
  }
@@ -2474,13 +3457,15 @@ class Catalog {
2474
3457
  /**
2475
3458
  * @param {Object} arg - Arg object.
2476
3459
  * @param {string} arg.id - Unique id
2477
- * @summary: Fetch Hsn Code.
2478
- * @description: Fetch Hsn Code.
3460
+ * @param {HsnUpsert} arg.body
3461
+ * @summary: Update Hsn Code.
3462
+ * @description: Update Hsn Code.
2479
3463
  */
2480
- getHsnCode({ id } = {}) {
2481
- const { error } = CatalogValidator.getHsnCode().validate(
3464
+ updateHsnCode({ id, body } = {}) {
3465
+ const { error } = CatalogValidator.updateHsnCode().validate(
2482
3466
  {
2483
3467
  id,
3468
+ body,
2484
3469
  },
2485
3470
  { abortEarly: false, allowUnknown: true }
2486
3471
  );
@@ -2488,16 +3473,29 @@ class Catalog {
2488
3473
  return Promise.reject(new FDKClientValidationError(error));
2489
3474
  }
2490
3475
 
3476
+ // Showing warrnings if extra unknown parameters are found
3477
+ const { error: warrning } = CatalogValidator.updateHsnCode().validate(
3478
+ {
3479
+ id,
3480
+ body,
3481
+ },
3482
+ { abortEarly: false, allowUnknown: false }
3483
+ );
3484
+ if (warrning) {
3485
+ console.log("Parameter Validation warrnings for updateHsnCode");
3486
+ console.log(warrning);
3487
+ }
3488
+
2491
3489
  const query_params = {};
2492
3490
 
2493
3491
  const xHeaders = {};
2494
3492
 
2495
3493
  return PlatformAPIClient.execute(
2496
3494
  this.config,
2497
- "get",
3495
+ "put",
2498
3496
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
2499
3497
  query_params,
2500
- undefined,
3498
+ body,
2501
3499
  xHeaders
2502
3500
  );
2503
3501
  }
@@ -2519,6 +3517,18 @@ class Catalog {
2519
3517
  return Promise.reject(new FDKClientValidationError(error));
2520
3518
  }
2521
3519
 
3520
+ // Showing warrnings if extra unknown parameters are found
3521
+ const { error: warrning } = CatalogValidator.bulkHsnCode().validate(
3522
+ {
3523
+ body,
3524
+ },
3525
+ { abortEarly: false, allowUnknown: false }
3526
+ );
3527
+ if (warrning) {
3528
+ console.log("Parameter Validation warrnings for bulkHsnCode");
3529
+ console.log(warrning);
3530
+ }
3531
+
2522
3532
  const query_params = {};
2523
3533
 
2524
3534
  const xHeaders = {};
@@ -2556,6 +3566,23 @@ class Catalog {
2556
3566
  return Promise.reject(new FDKClientValidationError(error));
2557
3567
  }
2558
3568
 
3569
+ // Showing warrnings if extra unknown parameters are found
3570
+ const {
3571
+ error: warrning,
3572
+ } = CatalogValidator.getAllProductHsnCodes().validate(
3573
+ {
3574
+ pageNo,
3575
+ pageSize,
3576
+ q,
3577
+ type,
3578
+ },
3579
+ { abortEarly: false, allowUnknown: false }
3580
+ );
3581
+ if (warrning) {
3582
+ console.log("Parameter Validation warrnings for getAllProductHsnCodes");
3583
+ console.log(warrning);
3584
+ }
3585
+
2559
3586
  const query_params = {};
2560
3587
  query_params["page_no"] = pageNo;
2561
3588
  query_params["page_size"] = pageSize;
@@ -2591,6 +3618,20 @@ class Catalog {
2591
3618
  return Promise.reject(new FDKClientValidationError(error));
2592
3619
  }
2593
3620
 
3621
+ // Showing warrnings if extra unknown parameters are found
3622
+ const {
3623
+ error: warrning,
3624
+ } = CatalogValidator.getSingleProductHSNCode().validate(
3625
+ {
3626
+ reportingHsn,
3627
+ },
3628
+ { abortEarly: false, allowUnknown: false }
3629
+ );
3630
+ if (warrning) {
3631
+ console.log("Parameter Validation warrnings for getSingleProductHSNCode");
3632
+ console.log(warrning);
3633
+ }
3634
+
2594
3635
  const query_params = {};
2595
3636
 
2596
3637
  const xHeaders = {};
@@ -2622,6 +3663,18 @@ class Catalog {
2622
3663
  return Promise.reject(new FDKClientValidationError(error));
2623
3664
  }
2624
3665
 
3666
+ // Showing warrnings if extra unknown parameters are found
3667
+ const { error: warrning } = CatalogValidator.getOptimalLocations().validate(
3668
+ {
3669
+ body,
3670
+ },
3671
+ { abortEarly: false, allowUnknown: false }
3672
+ );
3673
+ if (warrning) {
3674
+ console.log("Parameter Validation warrnings for getOptimalLocations");
3675
+ console.log(warrning);
3676
+ }
3677
+
2625
3678
  const query_params = {};
2626
3679
 
2627
3680
  const xHeaders = {};