@gofynd/fdk-client-javascript 1.1.6 → 1.2.0

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 (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const constructUrl = require("../constructUrl");
4
4
  const Paginator = require("../../common/Paginator");
5
- const LeadValidator = require("./LeadApplicationValidator");
6
- const LeadModel = require("./LeadApplicationModel");
5
+ const LeadApplicationValidator = require("./LeadApplicationValidator");
6
+ const LeadApplicationModel = require("./LeadApplicationModel");
7
7
  const { Logger } = require("./../../common/Logger");
8
8
  const Joi = require("joi");
9
9
 
@@ -38,15 +38,15 @@ class Lead {
38
38
  }
39
39
 
40
40
  /**
41
- * @param {Object} arg - Arg object.
42
- * @param {string} arg.id - Ticket ID for which history is created
43
- * @param {TicketHistoryPayload} arg.body
44
- * @returns {Promise<TicketHistory>} - Success response
41
+ * @param {LeadApplicationValidator.CreateHistoryParam} arg - Arg object.
42
+ * @param {import("../ApplicationAPIClient").Options} - Options
43
+ * @returns {Promise<LeadApplicationModel.TicketHistory>} - Success response
44
+ * @name createHistory
45
45
  * @summary: Create history for specific Ticket
46
- * @description: Create history for specific Ticket, this history is seen on ticket detail page, this can be comment, log or rating.
46
+ * @description: Create history for specific Ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createHistory/).
47
47
  */
48
- async createHistory({ id, body } = {}) {
49
- const { error } = LeadValidator.createHistory().validate(
48
+ async createHistory({ id, body } = {}, { headers } = { headers: false }) {
49
+ const { error } = LeadApplicationValidator.createHistory().validate(
50
50
  { id, body },
51
51
  { abortEarly: false, allowUnknown: true }
52
52
  );
@@ -55,16 +55,17 @@ class Lead {
55
55
  }
56
56
 
57
57
  // Showing warrnings if extra unknown parameters are found
58
- const { error: warrning } = LeadValidator.createHistory().validate(
58
+ const {
59
+ error: warrning,
60
+ } = LeadApplicationValidator.createHistory().validate(
59
61
  { id, body },
60
62
  { abortEarly: false, allowUnknown: false }
61
63
  );
62
64
  if (warrning) {
63
65
  Logger({
64
66
  level: "WARN",
65
- message: "Parameter Validation warrnings for createHistory",
67
+ message: `Parameter Validation warrnings for application > Lead > createHistory \n ${warrning}`,
66
68
  });
67
- Logger({ level: "WARN", message: warrning });
68
69
  }
69
70
 
70
71
  const query_params = {};
@@ -80,10 +81,18 @@ class Lead {
80
81
  }),
81
82
  query_params,
82
83
  body,
83
- xHeaders
84
+ xHeaders,
85
+ { headers }
84
86
  );
85
87
 
86
- const { error: res_error } = LeadModel.TicketHistory().validate(response, {
88
+ let responseData = response;
89
+ if (headers) {
90
+ responseData = response[0];
91
+ }
92
+
93
+ const {
94
+ error: res_error,
95
+ } = LeadApplicationModel.TicketHistory().validate(responseData, {
87
96
  abortEarly: false,
88
97
  allowUnknown: false,
89
98
  });
@@ -91,23 +100,23 @@ class Lead {
91
100
  if (res_error) {
92
101
  Logger({
93
102
  level: "WARN",
94
- message: "Response Validation Warnnings for createHistory",
103
+ message: `Response Validation Warnnings for application > Lead > createHistory \n ${res_error}`,
95
104
  });
96
- Logger({ level: "WARN", message: res_error });
97
105
  }
98
106
 
99
107
  return response;
100
108
  }
101
109
 
102
110
  /**
103
- * @param {Object} arg - Arg object.
104
- * @param {AddTicketPayload} arg.body
105
- * @returns {Promise<Ticket>} - Success response
111
+ * @param {LeadApplicationValidator.CreateTicketParam} arg - Arg object.
112
+ * @param {import("../ApplicationAPIClient").Options} - Options
113
+ * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
114
+ * @name createTicket
106
115
  * @summary: Create Ticket
107
- * @description: This is used to Create Ticket.
116
+ * @description: This is used to Create Ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createTicket/).
108
117
  */
109
- async createTicket({ body } = {}) {
110
- const { error } = LeadValidator.createTicket().validate(
118
+ async createTicket({ body } = {}, { headers } = { headers: false }) {
119
+ const { error } = LeadApplicationValidator.createTicket().validate(
111
120
  { body },
112
121
  { abortEarly: false, allowUnknown: true }
113
122
  );
@@ -116,16 +125,17 @@ class Lead {
116
125
  }
117
126
 
118
127
  // Showing warrnings if extra unknown parameters are found
119
- const { error: warrning } = LeadValidator.createTicket().validate(
128
+ const {
129
+ error: warrning,
130
+ } = LeadApplicationValidator.createTicket().validate(
120
131
  { body },
121
132
  { abortEarly: false, allowUnknown: false }
122
133
  );
123
134
  if (warrning) {
124
135
  Logger({
125
136
  level: "WARN",
126
- message: "Parameter Validation warrnings for createTicket",
137
+ message: `Parameter Validation warrnings for application > Lead > createTicket \n ${warrning}`,
127
138
  });
128
- Logger({ level: "WARN", message: warrning });
129
139
  }
130
140
 
131
141
  const query_params = {};
@@ -141,10 +151,18 @@ class Lead {
141
151
  }),
142
152
  query_params,
143
153
  body,
144
- xHeaders
154
+ xHeaders,
155
+ { headers }
145
156
  );
146
157
 
147
- const { error: res_error } = LeadModel.Ticket().validate(response, {
158
+ let responseData = response;
159
+ if (headers) {
160
+ responseData = response[0];
161
+ }
162
+
163
+ const {
164
+ error: res_error,
165
+ } = LeadApplicationModel.Ticket().validate(responseData, {
148
166
  abortEarly: false,
149
167
  allowUnknown: false,
150
168
  });
@@ -152,23 +170,23 @@ class Lead {
152
170
  if (res_error) {
153
171
  Logger({
154
172
  level: "WARN",
155
- message: "Response Validation Warnnings for createTicket",
173
+ message: `Response Validation Warnnings for application > Lead > createTicket \n ${res_error}`,
156
174
  });
157
- Logger({ level: "WARN", message: res_error });
158
175
  }
159
176
 
160
177
  return response;
161
178
  }
162
179
 
163
180
  /**
164
- * @param {Object} arg - Arg object.
165
- * @param {string} arg.slug - Slug of form whose response is getting submitted
166
- * @returns {Promise<CustomForm>} - Success response
181
+ * @param {LeadApplicationValidator.GetCustomFormParam} arg - Arg object.
182
+ * @param {import("../ApplicationAPIClient").Options} - Options
183
+ * @returns {Promise<LeadApplicationModel.CustomForm>} - Success response
184
+ * @name getCustomForm
167
185
  * @summary: Get specific Custom Form using it's slug
168
- * @description: Get specific Custom Form using it's slug, this is used to view the form.
186
+ * @description: Get specific Custom Form using it's slug, this is used to view the form. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
169
187
  */
170
- async getCustomForm({ slug } = {}) {
171
- const { error } = LeadValidator.getCustomForm().validate(
188
+ async getCustomForm({ slug } = {}, { headers } = { headers: false }) {
189
+ const { error } = LeadApplicationValidator.getCustomForm().validate(
172
190
  { slug },
173
191
  { abortEarly: false, allowUnknown: true }
174
192
  );
@@ -177,16 +195,17 @@ class Lead {
177
195
  }
178
196
 
179
197
  // Showing warrnings if extra unknown parameters are found
180
- const { error: warrning } = LeadValidator.getCustomForm().validate(
198
+ const {
199
+ error: warrning,
200
+ } = LeadApplicationValidator.getCustomForm().validate(
181
201
  { slug },
182
202
  { abortEarly: false, allowUnknown: false }
183
203
  );
184
204
  if (warrning) {
185
205
  Logger({
186
206
  level: "WARN",
187
- message: "Parameter Validation warrnings for getCustomForm",
207
+ message: `Parameter Validation warrnings for application > Lead > getCustomForm \n ${warrning}`,
188
208
  });
189
- Logger({ level: "WARN", message: warrning });
190
209
  }
191
210
 
192
211
  const query_params = {};
@@ -202,10 +221,18 @@ class Lead {
202
221
  }),
203
222
  query_params,
204
223
  undefined,
205
- xHeaders
224
+ xHeaders,
225
+ { headers }
206
226
  );
207
227
 
208
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
228
+ let responseData = response;
229
+ if (headers) {
230
+ responseData = response[0];
231
+ }
232
+
233
+ const {
234
+ error: res_error,
235
+ } = LeadApplicationModel.CustomForm().validate(responseData, {
209
236
  abortEarly: false,
210
237
  allowUnknown: false,
211
238
  });
@@ -213,23 +240,32 @@ class Lead {
213
240
  if (res_error) {
214
241
  Logger({
215
242
  level: "WARN",
216
- message: "Response Validation Warnnings for getCustomForm",
243
+ message: `Response Validation Warnnings for application > Lead > getCustomForm \n ${res_error}`,
217
244
  });
218
- Logger({ level: "WARN", message: res_error });
219
245
  }
220
246
 
221
247
  return response;
222
248
  }
223
249
 
224
250
  /**
225
- * @param {Object} arg - Arg object.
226
- * @param {string} arg.uniqueName - Unique name of Video Room
227
- * @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
251
+ * @param {LeadApplicationValidator.GetParticipantsInsideVideoRoomParam} arg
252
+ * - Arg object.
253
+ *
254
+ * @param {import("../ApplicationAPIClient").Options} - Options
255
+ * @returns {Promise<LeadApplicationModel.GetParticipantsInsideVideoRoomResponse>}
256
+ * - Success response
257
+ *
258
+ * @name getParticipantsInsideVideoRoom
228
259
  * @summary: Get participants of a specific Video Room using it's unique name
229
- * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
260
+ * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getParticipantsInsideVideoRoom/).
230
261
  */
231
- async getParticipantsInsideVideoRoom({ uniqueName } = {}) {
232
- const { error } = LeadValidator.getParticipantsInsideVideoRoom().validate(
262
+ async getParticipantsInsideVideoRoom(
263
+ { uniqueName } = {},
264
+ { headers } = { headers: false }
265
+ ) {
266
+ const {
267
+ error,
268
+ } = LeadApplicationValidator.getParticipantsInsideVideoRoom().validate(
233
269
  { uniqueName },
234
270
  { abortEarly: false, allowUnknown: true }
235
271
  );
@@ -240,17 +276,15 @@ class Lead {
240
276
  // Showing warrnings if extra unknown parameters are found
241
277
  const {
242
278
  error: warrning,
243
- } = LeadValidator.getParticipantsInsideVideoRoom().validate(
279
+ } = LeadApplicationValidator.getParticipantsInsideVideoRoom().validate(
244
280
  { uniqueName },
245
281
  { abortEarly: false, allowUnknown: false }
246
282
  );
247
283
  if (warrning) {
248
284
  Logger({
249
285
  level: "WARN",
250
- message:
251
- "Parameter Validation warrnings for getParticipantsInsideVideoRoom",
286
+ message: `Parameter Validation warrnings for application > Lead > getParticipantsInsideVideoRoom \n ${warrning}`,
252
287
  });
253
- Logger({ level: "WARN", message: warrning });
254
288
  }
255
289
 
256
290
  const query_params = {};
@@ -266,37 +300,42 @@ class Lead {
266
300
  }),
267
301
  query_params,
268
302
  undefined,
269
- xHeaders
303
+ xHeaders,
304
+ { headers }
270
305
  );
271
306
 
307
+ let responseData = response;
308
+ if (headers) {
309
+ responseData = response[0];
310
+ }
311
+
272
312
  const {
273
313
  error: res_error,
274
- } = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
275
- abortEarly: false,
276
- allowUnknown: false,
277
- });
314
+ } = LeadApplicationModel.GetParticipantsInsideVideoRoomResponse().validate(
315
+ responseData,
316
+ { abortEarly: false, allowUnknown: false }
317
+ );
278
318
 
279
319
  if (res_error) {
280
320
  Logger({
281
321
  level: "WARN",
282
- message:
283
- "Response Validation Warnnings for getParticipantsInsideVideoRoom",
322
+ message: `Response Validation Warnnings for application > Lead > getParticipantsInsideVideoRoom \n ${res_error}`,
284
323
  });
285
- Logger({ level: "WARN", message: res_error });
286
324
  }
287
325
 
288
326
  return response;
289
327
  }
290
328
 
291
329
  /**
292
- * @param {Object} arg - Arg object.
293
- * @param {string} arg.id - ID of ticket to be retrieved
294
- * @returns {Promise<Ticket>} - Success response
330
+ * @param {LeadApplicationValidator.GetTicketParam} arg - Arg object.
331
+ * @param {import("../ApplicationAPIClient").Options} - Options
332
+ * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
333
+ * @name getTicket
295
334
  * @summary: Get Ticket with the specific id
296
- * @description: Get Ticket with the specific id, this is used to view the ticket details
335
+ * @description: Get Ticket with the specific id, this is used to view the ticket details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
297
336
  */
298
- async getTicket({ id } = {}) {
299
- const { error } = LeadValidator.getTicket().validate(
337
+ async getTicket({ id } = {}, { headers } = { headers: false }) {
338
+ const { error } = LeadApplicationValidator.getTicket().validate(
300
339
  { id },
301
340
  { abortEarly: false, allowUnknown: true }
302
341
  );
@@ -305,16 +344,15 @@ class Lead {
305
344
  }
306
345
 
307
346
  // Showing warrnings if extra unknown parameters are found
308
- const { error: warrning } = LeadValidator.getTicket().validate(
347
+ const { error: warrning } = LeadApplicationValidator.getTicket().validate(
309
348
  { id },
310
349
  { abortEarly: false, allowUnknown: false }
311
350
  );
312
351
  if (warrning) {
313
352
  Logger({
314
353
  level: "WARN",
315
- message: "Parameter Validation warrnings for getTicket",
354
+ message: `Parameter Validation warrnings for application > Lead > getTicket \n ${warrning}`,
316
355
  });
317
- Logger({ level: "WARN", message: warrning });
318
356
  }
319
357
 
320
358
  const query_params = {};
@@ -330,10 +368,18 @@ class Lead {
330
368
  }),
331
369
  query_params,
332
370
  undefined,
333
- xHeaders
371
+ xHeaders,
372
+ { headers }
334
373
  );
335
374
 
336
- const { error: res_error } = LeadModel.Ticket().validate(response, {
375
+ let responseData = response;
376
+ if (headers) {
377
+ responseData = response[0];
378
+ }
379
+
380
+ const {
381
+ error: res_error,
382
+ } = LeadApplicationModel.Ticket().validate(responseData, {
337
383
  abortEarly: false,
338
384
  allowUnknown: false,
339
385
  });
@@ -341,23 +387,27 @@ class Lead {
341
387
  if (res_error) {
342
388
  Logger({
343
389
  level: "WARN",
344
- message: "Response Validation Warnnings for getTicket",
390
+ message: `Response Validation Warnnings for application > Lead > getTicket \n ${res_error}`,
345
391
  });
346
- Logger({ level: "WARN", message: res_error });
347
392
  }
348
393
 
349
394
  return response;
350
395
  }
351
396
 
352
397
  /**
353
- * @param {Object} arg - Arg object.
354
- * @param {string} arg.uniqueName - Unique name of Video Room
355
- * @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
398
+ * @param {LeadApplicationValidator.GetTokenForVideoRoomParam} arg - Arg object.
399
+ * @param {import("../ApplicationAPIClient").Options} - Options
400
+ * @returns {Promise<LeadApplicationModel.GetTokenForVideoRoomResponse>} -
401
+ * Success response
402
+ * @name getTokenForVideoRoom
356
403
  * @summary: Get Token to join a specific Video Room using it's unqiue name
357
- * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
404
+ * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTokenForVideoRoom/).
358
405
  */
359
- async getTokenForVideoRoom({ uniqueName } = {}) {
360
- const { error } = LeadValidator.getTokenForVideoRoom().validate(
406
+ async getTokenForVideoRoom(
407
+ { uniqueName } = {},
408
+ { headers } = { headers: false }
409
+ ) {
410
+ const { error } = LeadApplicationValidator.getTokenForVideoRoom().validate(
361
411
  { uniqueName },
362
412
  { abortEarly: false, allowUnknown: true }
363
413
  );
@@ -366,16 +416,17 @@ class Lead {
366
416
  }
367
417
 
368
418
  // Showing warrnings if extra unknown parameters are found
369
- const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
419
+ const {
420
+ error: warrning,
421
+ } = LeadApplicationValidator.getTokenForVideoRoom().validate(
370
422
  { uniqueName },
371
423
  { abortEarly: false, allowUnknown: false }
372
424
  );
373
425
  if (warrning) {
374
426
  Logger({
375
427
  level: "WARN",
376
- message: "Parameter Validation warrnings for getTokenForVideoRoom",
428
+ message: `Parameter Validation warrnings for application > Lead > getTokenForVideoRoom \n ${warrning}`,
377
429
  });
378
- Logger({ level: "WARN", message: warrning });
379
430
  }
380
431
 
381
432
  const query_params = {};
@@ -391,37 +442,46 @@ class Lead {
391
442
  }),
392
443
  query_params,
393
444
  undefined,
394
- xHeaders
445
+ xHeaders,
446
+ { headers }
395
447
  );
396
448
 
449
+ let responseData = response;
450
+ if (headers) {
451
+ responseData = response[0];
452
+ }
453
+
397
454
  const {
398
455
  error: res_error,
399
- } = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
400
- abortEarly: false,
401
- allowUnknown: false,
402
- });
456
+ } = LeadApplicationModel.GetTokenForVideoRoomResponse().validate(
457
+ responseData,
458
+ { abortEarly: false, allowUnknown: false }
459
+ );
403
460
 
404
461
  if (res_error) {
405
462
  Logger({
406
463
  level: "WARN",
407
- message: "Response Validation Warnnings for getTokenForVideoRoom",
464
+ message: `Response Validation Warnnings for application > Lead > getTokenForVideoRoom \n ${res_error}`,
408
465
  });
409
- Logger({ level: "WARN", message: res_error });
410
466
  }
411
467
 
412
468
  return response;
413
469
  }
414
470
 
415
471
  /**
416
- * @param {Object} arg - Arg object.
417
- * @param {string} arg.slug - Slug of form whose response is getting submitted
418
- * @param {CustomFormSubmissionPayload} arg.body
419
- * @returns {Promise<SubmitCustomFormResponse>} - Success response
472
+ * @param {LeadApplicationValidator.SubmitCustomFormParam} arg - Arg object.
473
+ * @param {import("../ApplicationAPIClient").Options} - Options
474
+ * @returns {Promise<LeadApplicationModel.SubmitCustomFormResponse>} -
475
+ * Success response
476
+ * @name submitCustomForm
420
477
  * @summary: Submit Response for a specific Custom Form using it's slug
421
- * @description: Submit Response for a specific Custom Form using it's slug, this response is then used to create a ticket on behalf of the user.
478
+ * @description: Submit Response for a specific Custom Form using it's slug, this response is then used to create a ticket on behalf of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/).
422
479
  */
423
- async submitCustomForm({ slug, body } = {}) {
424
- const { error } = LeadValidator.submitCustomForm().validate(
480
+ async submitCustomForm(
481
+ { slug, body } = {},
482
+ { headers } = { headers: false }
483
+ ) {
484
+ const { error } = LeadApplicationValidator.submitCustomForm().validate(
425
485
  { slug, body },
426
486
  { abortEarly: false, allowUnknown: true }
427
487
  );
@@ -430,16 +490,17 @@ class Lead {
430
490
  }
431
491
 
432
492
  // Showing warrnings if extra unknown parameters are found
433
- const { error: warrning } = LeadValidator.submitCustomForm().validate(
493
+ const {
494
+ error: warrning,
495
+ } = LeadApplicationValidator.submitCustomForm().validate(
434
496
  { slug, body },
435
497
  { abortEarly: false, allowUnknown: false }
436
498
  );
437
499
  if (warrning) {
438
500
  Logger({
439
501
  level: "WARN",
440
- message: "Parameter Validation warrnings for submitCustomForm",
502
+ message: `Parameter Validation warrnings for application > Lead > submitCustomForm \n ${warrning}`,
441
503
  });
442
- Logger({ level: "WARN", message: warrning });
443
504
  }
444
505
 
445
506
  const query_params = {};
@@ -455,12 +516,18 @@ class Lead {
455
516
  }),
456
517
  query_params,
457
518
  body,
458
- xHeaders
519
+ xHeaders,
520
+ { headers }
459
521
  );
460
522
 
523
+ let responseData = response;
524
+ if (headers) {
525
+ responseData = response[0];
526
+ }
527
+
461
528
  const {
462
529
  error: res_error,
463
- } = LeadModel.SubmitCustomFormResponse().validate(response, {
530
+ } = LeadApplicationModel.SubmitCustomFormResponse().validate(responseData, {
464
531
  abortEarly: false,
465
532
  allowUnknown: false,
466
533
  });
@@ -468,9 +535,8 @@ class Lead {
468
535
  if (res_error) {
469
536
  Logger({
470
537
  level: "WARN",
471
- message: "Response Validation Warnnings for submitCustomForm",
538
+ message: `Response Validation Warnnings for application > Lead > submitCustomForm \n ${res_error}`,
472
539
  });
473
- Logger({ level: "WARN", message: res_error });
474
540
  }
475
541
 
476
542
  return response;