@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15-beta.4

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 (118) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.js +0 -18
  8. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
  9. package/sdk/application/Cart/CartApplicationClient.js +27 -1203
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -142
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +40 -1344
  12. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
  13. package/sdk/application/Common/CommonApplicationClient.js +2 -92
  14. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  15. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
  18. package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
  19. package/sdk/application/Content/ContentApplicationClient.js +23 -941
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -11
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.js +4 -134
  22. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
  23. package/sdk/application/Lead/LeadApplicationClient.js +5 -217
  24. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
  25. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -496
  26. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
  27. package/sdk/application/Order/OrderApplicationClient.js +11 -505
  28. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
  29. package/sdk/application/Payment/PaymentApplicationClient.js +46 -2106
  30. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
  31. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -311
  32. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  33. package/sdk/application/Share/ShareApplicationClient.js +7 -309
  34. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  35. package/sdk/application/Theme/ThemeApplicationClient.js +4 -174
  36. package/sdk/application/User/UserApplicationClient.d.ts +85 -136
  37. package/sdk/application/User/UserApplicationClient.js +42 -1818
  38. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
  39. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -50
  40. package/sdk/application/index.d.ts +0 -18
  41. package/sdk/application/index.js +0 -33
  42. package/sdk/partner/OAuthClient.js +1 -0
  43. package/sdk/platform/Cart/CartPlatformModel.d.ts +7 -0
  44. package/sdk/platform/Cart/CartPlatformModel.js +3 -0
  45. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
  46. package/sdk/platform/Catalog/CatalogPlatformModel.js +0 -3
  47. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
  48. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
  49. package/sdk/public/Configuration/ConfigurationPublicClient.js +4 -2
  50. package/sdk/public/Content/ContentPublicClient.js +4 -2
  51. package/sdk/public/Partner/PartnerPublicClient.js +4 -2
  52. package/sdk/public/Webhook/WebhookPublicClient.js +4 -2
  53. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
  54. package/sdk/application/Cart/CartApplicationModel.js +0 -2497
  55. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
  56. package/sdk/application/Cart/CartApplicationValidator.js +0 -530
  57. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
  58. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
  59. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  60. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  61. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  62. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  63. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  64. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  65. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  66. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  67. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  68. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  69. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
  71. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  73. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
  74. package/sdk/application/Content/ContentApplicationModel.js +0 -1589
  75. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
  76. package/sdk/application/Content/ContentApplicationValidator.js +0 -264
  77. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
  78. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
  79. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  80. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  81. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  82. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  83. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  84. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  85. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
  86. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
  87. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
  88. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
  89. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
  90. package/sdk/application/Order/OrderApplicationModel.js +0 -1471
  91. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
  92. package/sdk/application/Order/OrderApplicationValidator.js +0 -197
  93. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
  94. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
  95. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  96. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  97. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  98. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  99. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  100. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  101. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  102. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  103. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  104. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  105. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
  106. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
  107. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
  108. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
  109. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  110. package/sdk/application/User/UserApplicationModel.js +0 -1382
  111. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  112. package/sdk/application/User/UserApplicationValidator.js +0 -573
  113. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
  114. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
  115. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  116. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  117. package/sdk/common/Clickstream.d.ts +0 -1
  118. package/sdk/common/Clickstream.js +0 -464
@@ -1,14 +1,6 @@
1
1
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
- const {
3
- FDKClientValidationError,
4
- FDKResponseValidationError,
5
- } = require("../../common/FDKError");
6
2
  const constructUrl = require("../constructUrl");
7
3
  const Paginator = require("../../common/Paginator");
8
- const LogisticApplicationValidator = require("./LogisticApplicationValidator");
9
- const LogisticApplicationModel = require("./LogisticApplicationModel");
10
- const { Logger } = require("./../../common/Logger");
11
- const Joi = require("joi");
12
4
 
13
5
  class Logistic {
14
6
  constructor(_conf) {
@@ -48,10 +40,9 @@ class Logistic {
48
40
  }
49
41
 
50
42
  /**
51
- * @param {LogisticApplicationValidator.GetAllCountriesParam} arg - Arg object.
52
43
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
53
44
  * @param {import("../ApplicationAPIClient").Options} - Options
54
- * @returns {Promise<LogisticApplicationModel.CountryListResponse>} - Success response
45
+ * @returns {Promise<CountryListResponse>} - Success response
55
46
  * @name getAllCountries
56
47
  * @summary: Get deliverable countries
57
48
  * @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/).
@@ -60,28 +51,6 @@ class Logistic {
60
51
  { requestHeaders } = { requestHeaders: {} },
61
52
  { responseHeaders } = { responseHeaders: false }
62
53
  ) {
63
- const { error } = LogisticApplicationValidator.getAllCountries().validate(
64
- {},
65
- { abortEarly: false, allowUnknown: true }
66
- );
67
- if (error) {
68
- return Promise.reject(new FDKClientValidationError(error));
69
- }
70
-
71
- // Showing warrnings if extra unknown parameters are found
72
- const {
73
- error: warrning,
74
- } = LogisticApplicationValidator.getAllCountries().validate(
75
- {},
76
- { abortEarly: false, allowUnknown: false }
77
- );
78
- if (warrning) {
79
- Logger({
80
- level: "WARN",
81
- message: `Parameter Validation warrnings for application > Logistic > getAllCountries \n ${warrning}`,
82
- });
83
- }
84
-
85
54
  const query_params = {};
86
55
 
87
56
  const xHeaders = {};
@@ -104,32 +73,13 @@ class Logistic {
104
73
  responseData = response[0];
105
74
  }
106
75
 
107
- const {
108
- error: res_error,
109
- } = LogisticApplicationModel.CountryListResponse().validate(responseData, {
110
- abortEarly: false,
111
- allowUnknown: true,
112
- });
113
-
114
- if (res_error) {
115
- if (this._conf.options.strictResponseCheck === true) {
116
- return Promise.reject(new FDKResponseValidationError(res_error));
117
- } else {
118
- Logger({
119
- level: "WARN",
120
- message: `Response Validation Warnings for application > Logistic > getAllCountries \n ${res_error}`,
121
- });
122
- }
123
- }
124
-
125
76
  return response;
126
77
  }
127
78
 
128
79
  /**
129
- * @param {LogisticApplicationValidator.GetCountriesParam} arg - Arg object.
130
80
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
131
81
  * @param {import("../ApplicationAPIClient").Options} - Options
132
- * @returns {Promise<LogisticApplicationModel.GetCountries>} - Success response
82
+ * @returns {Promise<GetCountries>} - Success response
133
83
  * @name getCountries
134
84
  * @summary: Get countries
135
85
  * @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
@@ -140,28 +90,6 @@ class Logistic {
140
90
  },
141
91
  { responseHeaders } = { responseHeaders: false }
142
92
  ) {
143
- const { error } = LogisticApplicationValidator.getCountries().validate(
144
- { onboarding, pageNo, pageSize, q },
145
- { abortEarly: false, allowUnknown: true }
146
- );
147
- if (error) {
148
- return Promise.reject(new FDKClientValidationError(error));
149
- }
150
-
151
- // Showing warrnings if extra unknown parameters are found
152
- const {
153
- error: warrning,
154
- } = LogisticApplicationValidator.getCountries().validate(
155
- { onboarding, pageNo, pageSize, q },
156
- { abortEarly: false, allowUnknown: false }
157
- );
158
- if (warrning) {
159
- Logger({
160
- level: "WARN",
161
- message: `Parameter Validation warrnings for application > Logistic > getCountries \n ${warrning}`,
162
- });
163
- }
164
-
165
93
  const query_params = {};
166
94
  query_params["onboarding"] = onboarding;
167
95
  query_params["page_no"] = pageNo;
@@ -188,32 +116,13 @@ class Logistic {
188
116
  responseData = response[0];
189
117
  }
190
118
 
191
- const {
192
- error: res_error,
193
- } = LogisticApplicationModel.GetCountries().validate(responseData, {
194
- abortEarly: false,
195
- allowUnknown: true,
196
- });
197
-
198
- if (res_error) {
199
- if (this._conf.options.strictResponseCheck === true) {
200
- return Promise.reject(new FDKResponseValidationError(res_error));
201
- } else {
202
- Logger({
203
- level: "WARN",
204
- message: `Response Validation Warnings for application > Logistic > getCountries \n ${res_error}`,
205
- });
206
- }
207
- }
208
-
209
119
  return response;
210
120
  }
211
121
 
212
122
  /**
213
- * @param {LogisticApplicationValidator.GetCountryParam} arg - Arg object.
214
123
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
215
124
  * @param {import("../ApplicationAPIClient").Options} - Options
216
- * @returns {Promise<LogisticApplicationModel.GetCountry>} - Success response
125
+ * @returns {Promise<GetCountry>} - Success response
217
126
  * @name getCountry
218
127
  * @summary: Get country details
219
128
  * @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
@@ -222,28 +131,6 @@ class Logistic {
222
131
  { countryIsoCode, requestHeaders } = { requestHeaders: {} },
223
132
  { responseHeaders } = { responseHeaders: false }
224
133
  ) {
225
- const { error } = LogisticApplicationValidator.getCountry().validate(
226
- { countryIsoCode },
227
- { abortEarly: false, allowUnknown: true }
228
- );
229
- if (error) {
230
- return Promise.reject(new FDKClientValidationError(error));
231
- }
232
-
233
- // Showing warrnings if extra unknown parameters are found
234
- const {
235
- error: warrning,
236
- } = LogisticApplicationValidator.getCountry().validate(
237
- { countryIsoCode },
238
- { abortEarly: false, allowUnknown: false }
239
- );
240
- if (warrning) {
241
- Logger({
242
- level: "WARN",
243
- message: `Parameter Validation warrnings for application > Logistic > getCountry \n ${warrning}`,
244
- });
245
- }
246
-
247
134
  const query_params = {};
248
135
 
249
136
  const xHeaders = {};
@@ -266,32 +153,13 @@ class Logistic {
266
153
  responseData = response[0];
267
154
  }
268
155
 
269
- const {
270
- error: res_error,
271
- } = LogisticApplicationModel.GetCountry().validate(responseData, {
272
- abortEarly: false,
273
- allowUnknown: true,
274
- });
275
-
276
- if (res_error) {
277
- if (this._conf.options.strictResponseCheck === true) {
278
- return Promise.reject(new FDKResponseValidationError(res_error));
279
- } else {
280
- Logger({
281
- level: "WARN",
282
- message: `Response Validation Warnings for application > Logistic > getCountry \n ${res_error}`,
283
- });
284
- }
285
- }
286
-
287
156
  return response;
288
157
  }
289
158
 
290
159
  /**
291
- * @param {LogisticApplicationValidator.GetLocalitiesParam} arg - Arg object.
292
160
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
293
161
  * @param {import("../ApplicationAPIClient").Options} - Options
294
- * @returns {Promise<LogisticApplicationModel.GetLocalities>} - Success response
162
+ * @returns {Promise<GetLocalities>} - Success response
295
163
  * @name getLocalities
296
164
  * @summary: Get localities
297
165
  * @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/).
@@ -309,28 +177,6 @@ class Logistic {
309
177
  } = { requestHeaders: {} },
310
178
  { responseHeaders } = { responseHeaders: false }
311
179
  ) {
312
- const { error } = LogisticApplicationValidator.getLocalities().validate(
313
- { localityType, country, state, city, pageNo, pageSize, q },
314
- { abortEarly: false, allowUnknown: true }
315
- );
316
- if (error) {
317
- return Promise.reject(new FDKClientValidationError(error));
318
- }
319
-
320
- // Showing warrnings if extra unknown parameters are found
321
- const {
322
- error: warrning,
323
- } = LogisticApplicationValidator.getLocalities().validate(
324
- { localityType, country, state, city, pageNo, pageSize, q },
325
- { abortEarly: false, allowUnknown: false }
326
- );
327
- if (warrning) {
328
- Logger({
329
- level: "WARN",
330
- message: `Parameter Validation warrnings for application > Logistic > getLocalities \n ${warrning}`,
331
- });
332
- }
333
-
334
180
  const query_params = {};
335
181
  query_params["country"] = country;
336
182
  query_params["state"] = state;
@@ -359,32 +205,13 @@ class Logistic {
359
205
  responseData = response[0];
360
206
  }
361
207
 
362
- const {
363
- error: res_error,
364
- } = LogisticApplicationModel.GetLocalities().validate(responseData, {
365
- abortEarly: false,
366
- allowUnknown: true,
367
- });
368
-
369
- if (res_error) {
370
- if (this._conf.options.strictResponseCheck === true) {
371
- return Promise.reject(new FDKResponseValidationError(res_error));
372
- } else {
373
- Logger({
374
- level: "WARN",
375
- message: `Response Validation Warnings for application > Logistic > getLocalities \n ${res_error}`,
376
- });
377
- }
378
- }
379
-
380
208
  return response;
381
209
  }
382
210
 
383
211
  /**
384
- * @param {LogisticApplicationValidator.GetLocalityParam} arg - Arg object.
385
212
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
386
213
  * @param {import("../ApplicationAPIClient").Options} - Options
387
- * @returns {Promise<LogisticApplicationModel.GetLocality>} - Success response
214
+ * @returns {Promise<GetLocality>} - Success response
388
215
  * @name getLocality
389
216
  * @summary: Get locality detail
390
217
  * @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
@@ -395,28 +222,6 @@ class Logistic {
395
222
  },
396
223
  { responseHeaders } = { responseHeaders: false }
397
224
  ) {
398
- const { error } = LogisticApplicationValidator.getLocality().validate(
399
- { localityType, localityValue, country, state, city },
400
- { abortEarly: false, allowUnknown: true }
401
- );
402
- if (error) {
403
- return Promise.reject(new FDKClientValidationError(error));
404
- }
405
-
406
- // Showing warrnings if extra unknown parameters are found
407
- const {
408
- error: warrning,
409
- } = LogisticApplicationValidator.getLocality().validate(
410
- { localityType, localityValue, country, state, city },
411
- { abortEarly: false, allowUnknown: false }
412
- );
413
- if (warrning) {
414
- Logger({
415
- level: "WARN",
416
- message: `Parameter Validation warrnings for application > Logistic > getLocality \n ${warrning}`,
417
- });
418
- }
419
-
420
225
  const query_params = {};
421
226
  query_params["country"] = country;
422
227
  query_params["state"] = state;
@@ -442,32 +247,13 @@ class Logistic {
442
247
  responseData = response[0];
443
248
  }
444
249
 
445
- const {
446
- error: res_error,
447
- } = LogisticApplicationModel.GetLocality().validate(responseData, {
448
- abortEarly: false,
449
- allowUnknown: true,
450
- });
451
-
452
- if (res_error) {
453
- if (this._conf.options.strictResponseCheck === true) {
454
- return Promise.reject(new FDKResponseValidationError(res_error));
455
- } else {
456
- Logger({
457
- level: "WARN",
458
- message: `Response Validation Warnings for application > Logistic > getLocality \n ${res_error}`,
459
- });
460
- }
461
- }
462
-
463
250
  return response;
464
251
  }
465
252
 
466
253
  /**
467
- * @param {LogisticApplicationValidator.GetLocationsParam} arg - Arg object.
468
254
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
469
255
  * @param {import("../ApplicationAPIClient").Options} - Options
470
- * @returns {Promise<LogisticApplicationModel.GetStoreResponse>} - Success response
256
+ * @returns {Promise<GetStoreResponse>} - Success response
471
257
  * @name getLocations
472
258
  * @summary: Get available selling locations
473
259
  * @description: Get stores available for the application based on Delivery Zones and Order Orchestration rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocations/).
@@ -487,48 +273,6 @@ class Logistic {
487
273
  } = { requestHeaders: {} },
488
274
  { responseHeaders } = { responseHeaders: false }
489
275
  ) {
490
- const { error } = LogisticApplicationValidator.getLocations().validate(
491
- {
492
- xApplicationId,
493
- xApplicationData,
494
- country,
495
- state,
496
- city,
497
- pincode,
498
- sector,
499
- pageNo,
500
- pageSize,
501
- },
502
- { abortEarly: false, allowUnknown: true }
503
- );
504
- if (error) {
505
- return Promise.reject(new FDKClientValidationError(error));
506
- }
507
-
508
- // Showing warrnings if extra unknown parameters are found
509
- const {
510
- error: warrning,
511
- } = LogisticApplicationValidator.getLocations().validate(
512
- {
513
- xApplicationId,
514
- xApplicationData,
515
- country,
516
- state,
517
- city,
518
- pincode,
519
- sector,
520
- pageNo,
521
- pageSize,
522
- },
523
- { abortEarly: false, allowUnknown: false }
524
- );
525
- if (warrning) {
526
- Logger({
527
- level: "WARN",
528
- message: `Parameter Validation warrnings for application > Logistic > getLocations \n ${warrning}`,
529
- });
530
- }
531
-
532
276
  const query_params = {};
533
277
  query_params["x-application-id"] = xApplicationId;
534
278
  query_params["x-application-data"] = xApplicationData;
@@ -560,33 +304,13 @@ class Logistic {
560
304
  responseData = response[0];
561
305
  }
562
306
 
563
- const {
564
- error: res_error,
565
- } = LogisticApplicationModel.GetStoreResponse().validate(responseData, {
566
- abortEarly: false,
567
- allowUnknown: true,
568
- });
569
-
570
- if (res_error) {
571
- if (this._conf.options.strictResponseCheck === true) {
572
- return Promise.reject(new FDKResponseValidationError(res_error));
573
- } else {
574
- Logger({
575
- level: "WARN",
576
- message: `Response Validation Warnings for application > Logistic > getLocations \n ${res_error}`,
577
- });
578
- }
579
- }
580
-
581
307
  return response;
582
308
  }
583
309
 
584
310
  /**
585
- * @param {LogisticApplicationValidator.GetOptimalLocationsParam} arg - Arg object.
586
311
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
587
312
  * @param {import("../ApplicationAPIClient").Options} - Options
588
- * @returns {Promise<LogisticApplicationModel.ReAssignStoreResponse>} -
589
- * Success response
313
+ * @returns {Promise<ReAssignStoreResponse>} - Success response
590
314
  * @name getOptimalLocations
591
315
  * @summary: Get selling locations
592
316
  * @description: Get optimal fulfillment centre for customers by analyzing their location, product availability, and inventory levels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getOptimalLocations/).
@@ -595,30 +319,6 @@ class Logistic {
595
319
  { body, requestHeaders } = { requestHeaders: {} },
596
320
  { responseHeaders } = { responseHeaders: false }
597
321
  ) {
598
- const {
599
- error,
600
- } = LogisticApplicationValidator.getOptimalLocations().validate(
601
- { body },
602
- { abortEarly: false, allowUnknown: true }
603
- );
604
- if (error) {
605
- return Promise.reject(new FDKClientValidationError(error));
606
- }
607
-
608
- // Showing warrnings if extra unknown parameters are found
609
- const {
610
- error: warrning,
611
- } = LogisticApplicationValidator.getOptimalLocations().validate(
612
- { body },
613
- { abortEarly: false, allowUnknown: false }
614
- );
615
- if (warrning) {
616
- Logger({
617
- level: "WARN",
618
- message: `Parameter Validation warrnings for application > Logistic > getOptimalLocations \n ${warrning}`,
619
- });
620
- }
621
-
622
322
  const query_params = {};
623
323
 
624
324
  const xHeaders = {};
@@ -641,32 +341,13 @@ class Logistic {
641
341
  responseData = response[0];
642
342
  }
643
343
 
644
- const {
645
- error: res_error,
646
- } = LogisticApplicationModel.ReAssignStoreResponse().validate(
647
- responseData,
648
- { abortEarly: false, allowUnknown: true }
649
- );
650
-
651
- if (res_error) {
652
- if (this._conf.options.strictResponseCheck === true) {
653
- return Promise.reject(new FDKResponseValidationError(res_error));
654
- } else {
655
- Logger({
656
- level: "WARN",
657
- message: `Response Validation Warnings for application > Logistic > getOptimalLocations \n ${res_error}`,
658
- });
659
- }
660
- }
661
-
662
344
  return response;
663
345
  }
664
346
 
665
347
  /**
666
- * @param {LogisticApplicationValidator.GetPincodeCityParam} arg - Arg object.
667
348
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
668
349
  * @param {import("../ApplicationAPIClient").Options} - Options
669
- * @returns {Promise<LogisticApplicationModel.PincodeApiResponse>} - Success response
350
+ * @returns {Promise<PincodeApiResponse>} - Success response
670
351
  * @name getPincodeCity
671
352
  * @summary: Get pincode details
672
353
  * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
@@ -675,28 +356,6 @@ class Logistic {
675
356
  { pincode, requestHeaders } = { requestHeaders: {} },
676
357
  { responseHeaders } = { responseHeaders: false }
677
358
  ) {
678
- const { error } = LogisticApplicationValidator.getPincodeCity().validate(
679
- { pincode },
680
- { abortEarly: false, allowUnknown: true }
681
- );
682
- if (error) {
683
- return Promise.reject(new FDKClientValidationError(error));
684
- }
685
-
686
- // Showing warrnings if extra unknown parameters are found
687
- const {
688
- error: warrning,
689
- } = LogisticApplicationValidator.getPincodeCity().validate(
690
- { pincode },
691
- { abortEarly: false, allowUnknown: false }
692
- );
693
- if (warrning) {
694
- Logger({
695
- level: "WARN",
696
- message: `Parameter Validation warrnings for application > Logistic > getPincodeCity \n ${warrning}`,
697
- });
698
- }
699
-
700
359
  const query_params = {};
701
360
 
702
361
  const xHeaders = {};
@@ -719,34 +378,13 @@ class Logistic {
719
378
  responseData = response[0];
720
379
  }
721
380
 
722
- const {
723
- error: res_error,
724
- } = LogisticApplicationModel.PincodeApiResponse().validate(responseData, {
725
- abortEarly: false,
726
- allowUnknown: true,
727
- });
728
-
729
- if (res_error) {
730
- if (this._conf.options.strictResponseCheck === true) {
731
- return Promise.reject(new FDKResponseValidationError(res_error));
732
- } else {
733
- Logger({
734
- level: "WARN",
735
- message: `Response Validation Warnings for application > Logistic > getPincodeCity \n ${res_error}`,
736
- });
737
- }
738
- }
739
-
740
381
  return response;
741
382
  }
742
383
 
743
384
  /**
744
- * @param {LogisticApplicationValidator.GetPincodeZonesParam} arg - Arg object.
745
385
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
746
386
  * @param {import("../ApplicationAPIClient").Options} - Options
747
- * @returns {Promise<LogisticApplicationModel.GetZoneFromPincodeViewResponse>}
748
- * - Success response
749
- *
387
+ * @returns {Promise<GetZoneFromPincodeViewResponse>} - Success response
750
388
  * @name getPincodeZones
751
389
  * @summary: Get zones
752
390
  * @description: Get the delivery zone associated with a given pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeZones/).
@@ -755,28 +393,6 @@ class Logistic {
755
393
  { body, requestHeaders } = { requestHeaders: {} },
756
394
  { responseHeaders } = { responseHeaders: false }
757
395
  ) {
758
- const { error } = LogisticApplicationValidator.getPincodeZones().validate(
759
- { body },
760
- { abortEarly: false, allowUnknown: true }
761
- );
762
- if (error) {
763
- return Promise.reject(new FDKClientValidationError(error));
764
- }
765
-
766
- // Showing warrnings if extra unknown parameters are found
767
- const {
768
- error: warrning,
769
- } = LogisticApplicationValidator.getPincodeZones().validate(
770
- { body },
771
- { abortEarly: false, allowUnknown: false }
772
- );
773
- if (warrning) {
774
- Logger({
775
- level: "WARN",
776
- message: `Parameter Validation warrnings for application > Logistic > getPincodeZones \n ${warrning}`,
777
- });
778
- }
779
-
780
396
  const query_params = {};
781
397
 
782
398
  const xHeaders = {};
@@ -799,32 +415,13 @@ class Logistic {
799
415
  responseData = response[0];
800
416
  }
801
417
 
802
- const {
803
- error: res_error,
804
- } = LogisticApplicationModel.GetZoneFromPincodeViewResponse().validate(
805
- responseData,
806
- { abortEarly: false, allowUnknown: true }
807
- );
808
-
809
- if (res_error) {
810
- if (this._conf.options.strictResponseCheck === true) {
811
- return Promise.reject(new FDKResponseValidationError(res_error));
812
- } else {
813
- Logger({
814
- level: "WARN",
815
- message: `Response Validation Warnings for application > Logistic > getPincodeZones \n ${res_error}`,
816
- });
817
- }
818
- }
819
-
820
418
  return response;
821
419
  }
822
420
 
823
421
  /**
824
- * @param {LogisticApplicationValidator.GetTatProductParam} arg - Arg object.
825
422
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
826
423
  * @param {import("../ApplicationAPIClient").Options} - Options
827
- * @returns {Promise<LogisticApplicationModel.TATViewResponse>} - Success response
424
+ * @returns {Promise<TATViewResponse>} - Success response
828
425
  * @name getTatProduct
829
426
  * @summary: Get product's turnaround time
830
427
  * @description: Get the estimated delivery time frame for a specific product from a designated store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/).
@@ -833,28 +430,6 @@ class Logistic {
833
430
  { body, requestHeaders } = { requestHeaders: {} },
834
431
  { responseHeaders } = { responseHeaders: false }
835
432
  ) {
836
- const { error } = LogisticApplicationValidator.getTatProduct().validate(
837
- { body },
838
- { abortEarly: false, allowUnknown: true }
839
- );
840
- if (error) {
841
- return Promise.reject(new FDKClientValidationError(error));
842
- }
843
-
844
- // Showing warrnings if extra unknown parameters are found
845
- const {
846
- error: warrning,
847
- } = LogisticApplicationValidator.getTatProduct().validate(
848
- { body },
849
- { abortEarly: false, allowUnknown: false }
850
- );
851
- if (warrning) {
852
- Logger({
853
- level: "WARN",
854
- message: `Parameter Validation warrnings for application > Logistic > getTatProduct \n ${warrning}`,
855
- });
856
- }
857
-
858
433
  const query_params = {};
859
434
 
860
435
  const xHeaders = {};
@@ -877,33 +452,13 @@ class Logistic {
877
452
  responseData = response[0];
878
453
  }
879
454
 
880
- const {
881
- error: res_error,
882
- } = LogisticApplicationModel.TATViewResponse().validate(responseData, {
883
- abortEarly: false,
884
- allowUnknown: true,
885
- });
886
-
887
- if (res_error) {
888
- if (this._conf.options.strictResponseCheck === true) {
889
- return Promise.reject(new FDKResponseValidationError(res_error));
890
- } else {
891
- Logger({
892
- level: "WARN",
893
- message: `Response Validation Warnings for application > Logistic > getTatProduct \n ${res_error}`,
894
- });
895
- }
896
- }
897
-
898
455
  return response;
899
456
  }
900
457
 
901
458
  /**
902
- * @param {LogisticApplicationValidator.ValidateAddressParam} arg - Arg object.
903
459
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
904
460
  * @param {import("../ApplicationAPIClient").Options} - Options
905
- * @returns {Promise<LogisticApplicationModel.ValidateAddressRequest>} -
906
- * Success response
461
+ * @returns {Promise<ValidateAddressRequest>} - Success response
907
462
  * @name validateAddress
908
463
  * @summary: Validate address
909
464
  * @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
@@ -914,28 +469,6 @@ class Logistic {
914
469
  },
915
470
  { responseHeaders } = { responseHeaders: false }
916
471
  ) {
917
- const { error } = LogisticApplicationValidator.validateAddress().validate(
918
- { countryIsoCode, templateName, body },
919
- { abortEarly: false, allowUnknown: true }
920
- );
921
- if (error) {
922
- return Promise.reject(new FDKClientValidationError(error));
923
- }
924
-
925
- // Showing warrnings if extra unknown parameters are found
926
- const {
927
- error: warrning,
928
- } = LogisticApplicationValidator.validateAddress().validate(
929
- { countryIsoCode, templateName, body },
930
- { abortEarly: false, allowUnknown: false }
931
- );
932
- if (warrning) {
933
- Logger({
934
- level: "WARN",
935
- message: `Parameter Validation warrnings for application > Logistic > validateAddress \n ${warrning}`,
936
- });
937
- }
938
-
939
472
  const query_params = {};
940
473
 
941
474
  const xHeaders = {};
@@ -958,24 +491,6 @@ class Logistic {
958
491
  responseData = response[0];
959
492
  }
960
493
 
961
- const {
962
- error: res_error,
963
- } = LogisticApplicationModel.ValidateAddressRequest().validate(
964
- responseData,
965
- { abortEarly: false, allowUnknown: true }
966
- );
967
-
968
- if (res_error) {
969
- if (this._conf.options.strictResponseCheck === true) {
970
- return Promise.reject(new FDKResponseValidationError(res_error));
971
- } else {
972
- Logger({
973
- level: "WARN",
974
- message: `Response Validation Warnings for application > Logistic > validateAddress \n ${res_error}`,
975
- });
976
- }
977
- }
978
-
979
494
  return response;
980
495
  }
981
496
  }