@gofynd/fdk-client-javascript 1.4.15 → 1.4.16-beta.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 (75) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +11 -11
  4. package/sdk/application/Cart/CartApplicationClient.js +343 -48
  5. package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
  6. package/sdk/application/Common/CommonApplicationClient.js +21 -0
  7. package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
  8. package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
  9. package/sdk/application/Content/ContentApplicationClient.d.ts +20 -0
  10. package/sdk/application/Content/ContentApplicationClient.js +327 -0
  11. package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
  12. package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
  13. package/sdk/application/Lead/LeadApplicationClient.js +73 -0
  14. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
  15. package/sdk/application/Logistic/LogisticApplicationClient.js +182 -2
  16. package/sdk/application/Order/OrderApplicationClient.js +202 -0
  17. package/sdk/application/Payment/PaymentApplicationClient.d.ts +0 -10
  18. package/sdk/application/Payment/PaymentApplicationClient.js +445 -38
  19. package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
  20. package/sdk/application/Share/ShareApplicationClient.js +96 -0
  21. package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
  22. package/sdk/application/User/UserApplicationClient.js +412 -0
  23. package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
  24. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +12 -33
  25. package/sdk/partner/Logistics/LogisticsPartnerClient.js +38 -209
  26. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +19 -399
  27. package/sdk/partner/Logistics/LogisticsPartnerModel.js +11 -212
  28. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -3
  29. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -22
  30. package/sdk/partner/OAuthClient.js +1 -0
  31. package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
  32. package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
  33. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
  34. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
  35. package/sdk/platform/Cart/CartPlatformApplicationClient.js +12 -3
  36. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -1
  37. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -1
  38. package/sdk/platform/Cart/CartPlatformModel.d.ts +14 -28
  39. package/sdk/platform/Cart/CartPlatformModel.js +7 -13
  40. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -24
  41. package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -176
  42. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +29 -80
  43. package/sdk/platform/Catalog/CatalogPlatformModel.js +32 -72
  44. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -45
  45. package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -35
  46. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
  47. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
  48. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +52 -0
  49. package/sdk/platform/Content/ContentPlatformApplicationClient.js +411 -0
  50. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +85 -1
  51. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +73 -0
  52. package/sdk/platform/Content/ContentPlatformModel.d.ts +90 -1
  53. package/sdk/platform/Content/ContentPlatformModel.js +104 -0
  54. package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
  55. package/sdk/platform/Order/OrderPlatformClient.js +0 -8
  56. package/sdk/platform/Order/OrderPlatformModel.d.ts +3 -75
  57. package/sdk/platform/Order/OrderPlatformModel.js +2 -43
  58. package/sdk/platform/Order/OrderPlatformValidator.d.ts +0 -22
  59. package/sdk/platform/Order/OrderPlatformValidator.js +0 -10
  60. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +10 -0
  61. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +118 -0
  62. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +53 -1
  63. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +29 -0
  64. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +0 -104
  65. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +74 -816
  66. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +23 -598
  67. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +20 -382
  68. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -191
  69. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +0 -138
  70. package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
  71. package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
  72. package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
  73. package/sdk/public/Content/ContentPublicClient.js +116 -0
  74. package/sdk/public/Partner/PartnerPublicClient.js +15 -0
  75. package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
@@ -1,3 +1,8 @@
1
+ const {
2
+ FDKClientValidationError,
3
+ FDKResponseValidationError,
4
+ } = require("../../common/FDKError");
5
+
1
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
7
  const constructUrl = require("../constructUrl");
3
8
  const Paginator = require("../../common/Paginator");
@@ -28,6 +33,8 @@ class Content {
28
33
  getPages: "/service/application/content/v2.0/pages",
29
34
  getSEOConfiguration: "/service/application/content/v1.0/seo",
30
35
  getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema",
36
+ getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
37
+ getSlideshows: "/service/application/content/v1.0/slideshow",
31
38
  getSupportInformation: "/service/application/content/v1.0/support",
32
39
  getTags: "/service/application/content/v1.0/tags",
33
40
  };
@@ -59,6 +66,14 @@ class Content {
59
66
  { requestHeaders } = { requestHeaders: {} },
60
67
  { responseHeaders } = { responseHeaders: false }
61
68
  ) {
69
+ let invalidInput = [];
70
+ if (invalidInput.length) {
71
+ const error = new Error();
72
+ error.message = "Missing required field";
73
+ error.details = invalidInput;
74
+ return Promise.reject(new FDKClientValidationError(error));
75
+ }
76
+
62
77
  const query_params = {};
63
78
 
64
79
  const xHeaders = {};
@@ -96,6 +111,21 @@ class Content {
96
111
  { slug, rootId, preview, requestHeaders } = { requestHeaders: {} },
97
112
  { responseHeaders } = { responseHeaders: false }
98
113
  ) {
114
+ let invalidInput = [];
115
+
116
+ if (!slug) {
117
+ invalidInput.push({
118
+ message: `The 'slug' field is required.`,
119
+ path: ["slug"],
120
+ });
121
+ }
122
+ if (invalidInput.length) {
123
+ const error = new Error();
124
+ error.message = "Missing required field";
125
+ error.details = invalidInput;
126
+ return Promise.reject(new FDKClientValidationError(error));
127
+ }
128
+
99
129
  const query_params = {};
100
130
  query_params["root_id"] = rootId;
101
131
  query_params["preview"] = preview;
@@ -135,6 +165,14 @@ class Content {
135
165
  { pageNo, pageSize, tags, search, requestHeaders } = { requestHeaders: {} },
136
166
  { responseHeaders } = { responseHeaders: false }
137
167
  ) {
168
+ let invalidInput = [];
169
+ if (invalidInput.length) {
170
+ const error = new Error();
171
+ error.message = "Missing required field";
172
+ error.details = invalidInput;
173
+ return Promise.reject(new FDKClientValidationError(error));
174
+ }
175
+
138
176
  const query_params = {};
139
177
  query_params["page_no"] = pageNo;
140
178
  query_params["page_size"] = pageSize;
@@ -176,6 +214,27 @@ class Content {
176
214
  { resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
177
215
  { responseHeaders } = { responseHeaders: false }
178
216
  ) {
217
+ let invalidInput = [];
218
+
219
+ if (!resource) {
220
+ invalidInput.push({
221
+ message: `The 'resource' field is required.`,
222
+ path: ["resource"],
223
+ });
224
+ }
225
+ if (!resourceSlug) {
226
+ invalidInput.push({
227
+ message: `The 'resourceSlug' field is required.`,
228
+ path: ["resourceSlug"],
229
+ });
230
+ }
231
+ if (invalidInput.length) {
232
+ const error = new Error();
233
+ error.message = "Missing required field";
234
+ error.details = invalidInput;
235
+ return Promise.reject(new FDKClientValidationError(error));
236
+ }
237
+
179
238
  const query_params = {};
180
239
 
181
240
  const xHeaders = {};
@@ -213,6 +272,27 @@ class Content {
213
272
  { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
214
273
  { responseHeaders } = { responseHeaders: false }
215
274
  ) {
275
+ let invalidInput = [];
276
+
277
+ if (!definitionSlug) {
278
+ invalidInput.push({
279
+ message: `The 'definitionSlug' field is required.`,
280
+ path: ["definitionSlug"],
281
+ });
282
+ }
283
+ if (!slug) {
284
+ invalidInput.push({
285
+ message: `The 'slug' field is required.`,
286
+ path: ["slug"],
287
+ });
288
+ }
289
+ if (invalidInput.length) {
290
+ const error = new Error();
291
+ error.message = "Missing required field";
292
+ error.details = invalidInput;
293
+ return Promise.reject(new FDKClientValidationError(error));
294
+ }
295
+
216
296
  const query_params = {};
217
297
 
218
298
  const xHeaders = {};
@@ -250,6 +330,14 @@ class Content {
250
330
  { requestHeaders } = { requestHeaders: {} },
251
331
  { responseHeaders } = { responseHeaders: false }
252
332
  ) {
333
+ let invalidInput = [];
334
+ if (invalidInput.length) {
335
+ const error = new Error();
336
+ error.message = "Missing required field";
337
+ error.details = invalidInput;
338
+ return Promise.reject(new FDKClientValidationError(error));
339
+ }
340
+
253
341
  const query_params = {};
254
342
 
255
343
  const xHeaders = {};
@@ -287,6 +375,21 @@ class Content {
287
375
  { slug, requestHeaders } = { requestHeaders: {} },
288
376
  { responseHeaders } = { responseHeaders: false }
289
377
  ) {
378
+ let invalidInput = [];
379
+
380
+ if (!slug) {
381
+ invalidInput.push({
382
+ message: `The 'slug' field is required.`,
383
+ path: ["slug"],
384
+ });
385
+ }
386
+ if (invalidInput.length) {
387
+ const error = new Error();
388
+ error.message = "Missing required field";
389
+ error.details = invalidInput;
390
+ return Promise.reject(new FDKClientValidationError(error));
391
+ }
392
+
290
393
  const query_params = {};
291
394
 
292
395
  const xHeaders = {};
@@ -324,6 +427,14 @@ class Content {
324
427
  { requestHeaders } = { requestHeaders: {} },
325
428
  { responseHeaders } = { responseHeaders: false }
326
429
  ) {
430
+ let invalidInput = [];
431
+ if (invalidInput.length) {
432
+ const error = new Error();
433
+ error.message = "Missing required field";
434
+ error.details = invalidInput;
435
+ return Promise.reject(new FDKClientValidationError(error));
436
+ }
437
+
327
438
  const query_params = {};
328
439
 
329
440
  const xHeaders = {};
@@ -361,6 +472,21 @@ class Content {
361
472
  { slug, requestHeaders } = { requestHeaders: {} },
362
473
  { responseHeaders } = { responseHeaders: false }
363
474
  ) {
475
+ let invalidInput = [];
476
+
477
+ if (!slug) {
478
+ invalidInput.push({
479
+ message: `The 'slug' field is required.`,
480
+ path: ["slug"],
481
+ });
482
+ }
483
+ if (invalidInput.length) {
484
+ const error = new Error();
485
+ error.message = "Missing required field";
486
+ error.details = invalidInput;
487
+ return Promise.reject(new FDKClientValidationError(error));
488
+ }
489
+
364
490
  const query_params = {};
365
491
 
366
492
  const xHeaders = {};
@@ -398,6 +524,14 @@ class Content {
398
524
  { requestHeaders } = { requestHeaders: {} },
399
525
  { responseHeaders } = { responseHeaders: false }
400
526
  ) {
527
+ let invalidInput = [];
528
+ if (invalidInput.length) {
529
+ const error = new Error();
530
+ error.message = "Missing required field";
531
+ error.details = invalidInput;
532
+ return Promise.reject(new FDKClientValidationError(error));
533
+ }
534
+
401
535
  const query_params = {};
402
536
 
403
537
  const xHeaders = {};
@@ -435,6 +569,21 @@ class Content {
435
569
  { slug, requestHeaders } = { requestHeaders: {} },
436
570
  { responseHeaders } = { responseHeaders: false }
437
571
  ) {
572
+ let invalidInput = [];
573
+
574
+ if (!slug) {
575
+ invalidInput.push({
576
+ message: `The 'slug' field is required.`,
577
+ path: ["slug"],
578
+ });
579
+ }
580
+ if (invalidInput.length) {
581
+ const error = new Error();
582
+ error.message = "Missing required field";
583
+ error.details = invalidInput;
584
+ return Promise.reject(new FDKClientValidationError(error));
585
+ }
586
+
438
587
  const query_params = {};
439
588
 
440
589
  const xHeaders = {};
@@ -472,6 +621,14 @@ class Content {
472
621
  { requestHeaders } = { requestHeaders: {} },
473
622
  { responseHeaders } = { responseHeaders: false }
474
623
  ) {
624
+ let invalidInput = [];
625
+ if (invalidInput.length) {
626
+ const error = new Error();
627
+ error.message = "Missing required field";
628
+ error.details = invalidInput;
629
+ return Promise.reject(new FDKClientValidationError(error));
630
+ }
631
+
475
632
  const query_params = {};
476
633
 
477
634
  const xHeaders = {};
@@ -509,6 +666,14 @@ class Content {
509
666
  { requestHeaders } = { requestHeaders: {} },
510
667
  { responseHeaders } = { responseHeaders: false }
511
668
  ) {
669
+ let invalidInput = [];
670
+ if (invalidInput.length) {
671
+ const error = new Error();
672
+ error.message = "Missing required field";
673
+ error.details = invalidInput;
674
+ return Promise.reject(new FDKClientValidationError(error));
675
+ }
676
+
512
677
  const query_params = {};
513
678
 
514
679
  const xHeaders = {};
@@ -546,6 +711,14 @@ class Content {
546
711
  { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
547
712
  { responseHeaders } = { responseHeaders: false }
548
713
  ) {
714
+ let invalidInput = [];
715
+ if (invalidInput.length) {
716
+ const error = new Error();
717
+ error.message = "Missing required field";
718
+ error.details = invalidInput;
719
+ return Promise.reject(new FDKClientValidationError(error));
720
+ }
721
+
549
722
  const query_params = {};
550
723
  query_params["page_no"] = pageNo;
551
724
  query_params["page_size"] = pageSize;
@@ -585,6 +758,21 @@ class Content {
585
758
  { slug, rootId, requestHeaders } = { requestHeaders: {} },
586
759
  { responseHeaders } = { responseHeaders: false }
587
760
  ) {
761
+ let invalidInput = [];
762
+
763
+ if (!slug) {
764
+ invalidInput.push({
765
+ message: `The 'slug' field is required.`,
766
+ path: ["slug"],
767
+ });
768
+ }
769
+ if (invalidInput.length) {
770
+ const error = new Error();
771
+ error.message = "Missing required field";
772
+ error.details = invalidInput;
773
+ return Promise.reject(new FDKClientValidationError(error));
774
+ }
775
+
588
776
  const query_params = {};
589
777
  query_params["root_id"] = rootId;
590
778
 
@@ -623,6 +811,14 @@ class Content {
623
811
  { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
624
812
  { responseHeaders } = { responseHeaders: false }
625
813
  ) {
814
+ let invalidInput = [];
815
+ if (invalidInput.length) {
816
+ const error = new Error();
817
+ error.message = "Missing required field";
818
+ error.details = invalidInput;
819
+ return Promise.reject(new FDKClientValidationError(error));
820
+ }
821
+
626
822
  const query_params = {};
627
823
  query_params["page_no"] = pageNo;
628
824
  query_params["page_size"] = pageSize;
@@ -662,6 +858,14 @@ class Content {
662
858
  { requestHeaders } = { requestHeaders: {} },
663
859
  { responseHeaders } = { responseHeaders: false }
664
860
  ) {
861
+ let invalidInput = [];
862
+ if (invalidInput.length) {
863
+ const error = new Error();
864
+ error.message = "Missing required field";
865
+ error.details = invalidInput;
866
+ return Promise.reject(new FDKClientValidationError(error));
867
+ }
868
+
665
869
  const query_params = {};
666
870
 
667
871
  const xHeaders = {};
@@ -699,6 +903,14 @@ class Content {
699
903
  { pageType, active, requestHeaders } = { requestHeaders: {} },
700
904
  { responseHeaders } = { responseHeaders: false }
701
905
  ) {
906
+ let invalidInput = [];
907
+ if (invalidInput.length) {
908
+ const error = new Error();
909
+ error.message = "Missing required field";
910
+ error.details = invalidInput;
911
+ return Promise.reject(new FDKClientValidationError(error));
912
+ }
913
+
702
914
  const query_params = {};
703
915
  query_params["page_type"] = pageType;
704
916
  query_params["active"] = active;
@@ -726,6 +938,105 @@ class Content {
726
938
  return response;
727
939
  }
728
940
 
941
+ /**
942
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
943
+ * @param {import("../ApplicationAPIClient").Options} - Options
944
+ * @returns {Promise<SlideshowSchema>} - Success response
945
+ * @name getSlideshow
946
+ * @summary: Get a Slideshow
947
+ * @description: Get a slideshow using its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshow/).
948
+ */
949
+ async getSlideshow(
950
+ { slug, requestHeaders } = { requestHeaders: {} },
951
+ { responseHeaders } = { responseHeaders: false }
952
+ ) {
953
+ let invalidInput = [];
954
+
955
+ if (!slug) {
956
+ invalidInput.push({
957
+ message: `The 'slug' field is required.`,
958
+ path: ["slug"],
959
+ });
960
+ }
961
+ if (invalidInput.length) {
962
+ const error = new Error();
963
+ error.message = "Missing required field";
964
+ error.details = invalidInput;
965
+ return Promise.reject(new FDKClientValidationError(error));
966
+ }
967
+
968
+ const query_params = {};
969
+
970
+ const xHeaders = {};
971
+
972
+ const response = await ApplicationAPIClient.execute(
973
+ this._conf,
974
+ "get",
975
+ constructUrl({
976
+ url: this._urls["getSlideshow"],
977
+ params: { slug },
978
+ }),
979
+ query_params,
980
+ undefined,
981
+ { ...xHeaders, ...requestHeaders },
982
+ { responseHeaders }
983
+ );
984
+
985
+ let responseData = response;
986
+ if (responseHeaders) {
987
+ responseData = response[0];
988
+ }
989
+
990
+ return response;
991
+ }
992
+
993
+ /**
994
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
995
+ * @param {import("../ApplicationAPIClient").Options} - Options
996
+ * @returns {Promise<SlideshowGetDetails>} - Success response
997
+ * @name getSlideshows
998
+ * @summary: List Slideshows
999
+ * @description: List slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/).
1000
+ */
1001
+ async getSlideshows(
1002
+ { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
1003
+ { responseHeaders } = { responseHeaders: false }
1004
+ ) {
1005
+ let invalidInput = [];
1006
+ if (invalidInput.length) {
1007
+ const error = new Error();
1008
+ error.message = "Missing required field";
1009
+ error.details = invalidInput;
1010
+ return Promise.reject(new FDKClientValidationError(error));
1011
+ }
1012
+
1013
+ const query_params = {};
1014
+ query_params["page_no"] = pageNo;
1015
+ query_params["page_size"] = pageSize;
1016
+
1017
+ const xHeaders = {};
1018
+
1019
+ const response = await ApplicationAPIClient.execute(
1020
+ this._conf,
1021
+ "get",
1022
+ constructUrl({
1023
+ url: this._urls["getSlideshows"],
1024
+ params: {},
1025
+ }),
1026
+ query_params,
1027
+ undefined,
1028
+ { ...xHeaders, ...requestHeaders },
1029
+ { responseHeaders }
1030
+ );
1031
+
1032
+ let responseData = response;
1033
+ if (responseHeaders) {
1034
+ responseData = response[0];
1035
+ }
1036
+
1037
+ return response;
1038
+ }
1039
+
729
1040
  /**
730
1041
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
731
1042
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -738,6 +1049,14 @@ class Content {
738
1049
  { requestHeaders } = { requestHeaders: {} },
739
1050
  { responseHeaders } = { responseHeaders: false }
740
1051
  ) {
1052
+ let invalidInput = [];
1053
+ if (invalidInput.length) {
1054
+ const error = new Error();
1055
+ error.message = "Missing required field";
1056
+ error.details = invalidInput;
1057
+ return Promise.reject(new FDKClientValidationError(error));
1058
+ }
1059
+
741
1060
  const query_params = {};
742
1061
 
743
1062
  const xHeaders = {};
@@ -775,6 +1094,14 @@ class Content {
775
1094
  { requestHeaders } = { requestHeaders: {} },
776
1095
  { responseHeaders } = { responseHeaders: false }
777
1096
  ) {
1097
+ let invalidInput = [];
1098
+ if (invalidInput.length) {
1099
+ const error = new Error();
1100
+ error.message = "Missing required field";
1101
+ error.details = invalidInput;
1102
+ return Promise.reject(new FDKClientValidationError(error));
1103
+ }
1104
+
778
1105
  const query_params = {};
779
1106
 
780
1107
  const xHeaders = {};
@@ -1,3 +1,8 @@
1
+ const {
2
+ FDKClientValidationError,
3
+ FDKResponseValidationError,
4
+ } = require("../../common/FDKError");
5
+
1
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
7
  const constructUrl = require("../constructUrl");
3
8
  const Paginator = require("../../common/Paginator");
@@ -42,6 +47,21 @@ class FileStorage {
42
47
  { namespace, body, requestHeaders } = { requestHeaders: {} },
43
48
  { responseHeaders } = { responseHeaders: false }
44
49
  ) {
50
+ let invalidInput = [];
51
+
52
+ if (!namespace) {
53
+ invalidInput.push({
54
+ message: `The 'namespace' field is required.`,
55
+ path: ["namespace"],
56
+ });
57
+ }
58
+ if (invalidInput.length) {
59
+ const error = new Error();
60
+ error.message = "Missing required field";
61
+ error.details = invalidInput;
62
+ return Promise.reject(new FDKClientValidationError(error));
63
+ }
64
+
45
65
  const query_params = {};
46
66
 
47
67
  const xHeaders = {};
@@ -79,6 +99,14 @@ class FileStorage {
79
99
  { body, requestHeaders } = { requestHeaders: {} },
80
100
  { responseHeaders } = { responseHeaders: false }
81
101
  ) {
102
+ let invalidInput = [];
103
+ if (invalidInput.length) {
104
+ const error = new Error();
105
+ error.message = "Missing required field";
106
+ error.details = invalidInput;
107
+ return Promise.reject(new FDKClientValidationError(error));
108
+ }
109
+
82
110
  const query_params = {};
83
111
 
84
112
  const xHeaders = {};
@@ -116,6 +144,21 @@ class FileStorage {
116
144
  { namespace, body, requestHeaders } = { requestHeaders: {} },
117
145
  { responseHeaders } = { responseHeaders: false }
118
146
  ) {
147
+ let invalidInput = [];
148
+
149
+ if (!namespace) {
150
+ invalidInput.push({
151
+ message: `The 'namespace' field is required.`,
152
+ path: ["namespace"],
153
+ });
154
+ }
155
+ if (invalidInput.length) {
156
+ const error = new Error();
157
+ error.message = "Missing required field";
158
+ error.details = invalidInput;
159
+ return Promise.reject(new FDKClientValidationError(error));
160
+ }
161
+
119
162
  const query_params = {};
120
163
 
121
164
  const xHeaders = {};
@@ -1,3 +1,8 @@
1
+ const {
2
+ FDKClientValidationError,
3
+ FDKResponseValidationError,
4
+ } = require("../../common/FDKError");
5
+
1
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
7
  const constructUrl = require("../constructUrl");
3
8
  const Paginator = require("../../common/Paginator");
@@ -39,6 +44,14 @@ class Finance {
39
44
  { body, requestHeaders } = { requestHeaders: {} },
40
45
  { responseHeaders } = { responseHeaders: false }
41
46
  ) {
47
+ let invalidInput = [];
48
+ if (invalidInput.length) {
49
+ const error = new Error();
50
+ error.message = "Missing required field";
51
+ error.details = invalidInput;
52
+ return Promise.reject(new FDKClientValidationError(error));
53
+ }
54
+
42
55
  const query_params = {};
43
56
 
44
57
  const xHeaders = {};
@@ -76,6 +89,14 @@ class Finance {
76
89
  { body, requestHeaders } = { requestHeaders: {} },
77
90
  { responseHeaders } = { responseHeaders: false }
78
91
  ) {
92
+ let invalidInput = [];
93
+ if (invalidInput.length) {
94
+ const error = new Error();
95
+ error.message = "Missing required field";
96
+ error.details = invalidInput;
97
+ return Promise.reject(new FDKClientValidationError(error));
98
+ }
99
+
79
100
  const query_params = {};
80
101
 
81
102
  const xHeaders = {};
@@ -1,3 +1,8 @@
1
+ const {
2
+ FDKClientValidationError,
3
+ FDKResponseValidationError,
4
+ } = require("../../common/FDKError");
5
+
1
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
7
  const constructUrl = require("../constructUrl");
3
8
  const Paginator = require("../../common/Paginator");
@@ -40,6 +45,21 @@ class Lead {
40
45
  { id, body, requestHeaders } = { requestHeaders: {} },
41
46
  { responseHeaders } = { responseHeaders: false }
42
47
  ) {
48
+ let invalidInput = [];
49
+
50
+ if (!id) {
51
+ invalidInput.push({
52
+ message: `The 'id' field is required.`,
53
+ path: ["id"],
54
+ });
55
+ }
56
+ if (invalidInput.length) {
57
+ const error = new Error();
58
+ error.message = "Missing required field";
59
+ error.details = invalidInput;
60
+ return Promise.reject(new FDKClientValidationError(error));
61
+ }
62
+
43
63
  const query_params = {};
44
64
 
45
65
  const xHeaders = {};
@@ -77,6 +97,14 @@ class Lead {
77
97
  { body, requestHeaders } = { requestHeaders: {} },
78
98
  { responseHeaders } = { responseHeaders: false }
79
99
  ) {
100
+ let invalidInput = [];
101
+ if (invalidInput.length) {
102
+ const error = new Error();
103
+ error.message = "Missing required field";
104
+ error.details = invalidInput;
105
+ return Promise.reject(new FDKClientValidationError(error));
106
+ }
107
+
80
108
  const query_params = {};
81
109
 
82
110
  const xHeaders = {};
@@ -114,6 +142,21 @@ class Lead {
114
142
  { slug, requestHeaders } = { requestHeaders: {} },
115
143
  { responseHeaders } = { responseHeaders: false }
116
144
  ) {
145
+ let invalidInput = [];
146
+
147
+ if (!slug) {
148
+ invalidInput.push({
149
+ message: `The 'slug' field is required.`,
150
+ path: ["slug"],
151
+ });
152
+ }
153
+ if (invalidInput.length) {
154
+ const error = new Error();
155
+ error.message = "Missing required field";
156
+ error.details = invalidInput;
157
+ return Promise.reject(new FDKClientValidationError(error));
158
+ }
159
+
117
160
  const query_params = {};
118
161
 
119
162
  const xHeaders = {};
@@ -151,6 +194,21 @@ class Lead {
151
194
  { id, requestHeaders } = { requestHeaders: {} },
152
195
  { responseHeaders } = { responseHeaders: false }
153
196
  ) {
197
+ let invalidInput = [];
198
+
199
+ if (!id) {
200
+ invalidInput.push({
201
+ message: `The 'id' field is required.`,
202
+ path: ["id"],
203
+ });
204
+ }
205
+ if (invalidInput.length) {
206
+ const error = new Error();
207
+ error.message = "Missing required field";
208
+ error.details = invalidInput;
209
+ return Promise.reject(new FDKClientValidationError(error));
210
+ }
211
+
154
212
  const query_params = {};
155
213
 
156
214
  const xHeaders = {};
@@ -188,6 +246,21 @@ class Lead {
188
246
  { slug, body, requestHeaders } = { requestHeaders: {} },
189
247
  { responseHeaders } = { responseHeaders: false }
190
248
  ) {
249
+ let invalidInput = [];
250
+
251
+ if (!slug) {
252
+ invalidInput.push({
253
+ message: `The 'slug' field is required.`,
254
+ path: ["slug"],
255
+ });
256
+ }
257
+ if (invalidInput.length) {
258
+ const error = new Error();
259
+ error.message = "Missing required field";
260
+ error.details = invalidInput;
261
+ return Promise.reject(new FDKClientValidationError(error));
262
+ }
263
+
191
264
  const query_params = {};
192
265
 
193
266
  const xHeaders = {};
@@ -72,7 +72,7 @@ declare class Logistic {
72
72
  * @summary: Get localities
73
73
  * @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
74
74
  */
75
- getLocalities({ localityType, country, state, city, pageNo, pageSize, q, sector, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocalities>;
75
+ getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocalities>;
76
76
  /**
77
77
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
78
78
  * @param {import("../ApplicationAPIClient").Options} - Options