@gofynd/fdk-client-javascript 1.1.6 → 1.3.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 (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  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/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const LeadValidator = require("./LeadPlatformApplicationValidator");
5
- const LeadModel = require("./LeadPlatformModel");
4
+ const LeadPlatformApplicationValidator = require("./LeadPlatformApplicationValidator");
5
+ const LeadPlatformModel = require("./LeadPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -13,14 +13,21 @@ class Lead {
13
13
  }
14
14
 
15
15
  /**
16
- * @param {Object} arg - Arg object.
17
- * @param {string} arg.uniqueName - Unique name of Video Room
18
- * @returns {Promise<CloseVideoRoomResponse>} - Success response
16
+ * @param {LeadPlatformApplicationValidator.CloseVideoRoomParam} arg - Arg object
17
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
18
+ * @param {import("../PlatformAPIClient").Options} - Options
19
+ * @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
20
+ * @name closeVideoRoom
19
21
  * @summary: Close the video room and force all participants to leave.
20
- * @description: Close the video room and force all participants to leave.
22
+ * @description: Close the video room and force all participants to leave. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/closeVideoRoom/).
21
23
  */
22
- async closeVideoRoom({ uniqueName } = {}) {
23
- const { error } = LeadValidator.closeVideoRoom().validate(
24
+ async closeVideoRoom(
25
+ { uniqueName, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
27
+ ) {
28
+ const {
29
+ error,
30
+ } = LeadPlatformApplicationValidator.closeVideoRoom().validate(
24
31
  {
25
32
  uniqueName,
26
33
  },
@@ -31,7 +38,9 @@ class Lead {
31
38
  }
32
39
 
33
40
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = LeadValidator.closeVideoRoom().validate(
41
+ const {
42
+ error: warrning,
43
+ } = LeadPlatformApplicationValidator.closeVideoRoom().validate(
35
44
  {
36
45
  uniqueName,
37
46
  },
@@ -40,9 +49,8 @@ class Lead {
40
49
  if (warrning) {
41
50
  Logger({
42
51
  level: "WARN",
43
- message: "Parameter Validation warrnings for closeVideoRoom",
52
+ message: `Parameter Validation warrnings for platform > Lead > closeVideoRoom \n ${warrning}`,
44
53
  });
45
- Logger({ level: "WARN", message: warrning });
46
54
  }
47
55
 
48
56
  const query_params = {};
@@ -52,12 +60,19 @@ class Lead {
52
60
  "delete",
53
61
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
54
62
  query_params,
55
- undefined
63
+ undefined,
64
+ requestHeaders,
65
+ { responseHeaders }
56
66
  );
57
67
 
68
+ let responseData = response;
69
+ if (responseHeaders) {
70
+ responseData = response[0];
71
+ }
72
+
58
73
  const {
59
74
  error: res_error,
60
- } = LeadModel.CloseVideoRoomResponse().validate(response, {
75
+ } = LeadPlatformModel.CloseVideoRoomResponse().validate(responseData, {
61
76
  abortEarly: false,
62
77
  allowUnknown: false,
63
78
  });
@@ -65,23 +80,29 @@ class Lead {
65
80
  if (res_error) {
66
81
  Logger({
67
82
  level: "WARN",
68
- message: "Response Validation Warnnings for closeVideoRoom",
83
+ message: `Response Validation Warnnings for platform > Lead > closeVideoRoom \n ${res_error}`,
69
84
  });
70
- Logger({ level: "WARN", message: res_error });
71
85
  }
72
86
 
73
87
  return response;
74
88
  }
75
89
 
76
90
  /**
77
- * @param {Object} arg - Arg object.
78
- * @param {CreateCustomFormPayload} arg.body
79
- * @returns {Promise<CustomForm>} - Success response
91
+ * @param {LeadPlatformApplicationValidator.CreateCustomFormParam} arg - Arg object
92
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
93
+ * @param {import("../PlatformAPIClient").Options} - Options
94
+ * @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
95
+ * @name createCustomForm
80
96
  * @summary: Creates a new custom form
81
- * @description: Creates a new custom form for given application
97
+ * @description: Creates a new custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createCustomForm/).
82
98
  */
83
- async createCustomForm({ body } = {}) {
84
- const { error } = LeadValidator.createCustomForm().validate(
99
+ async createCustomForm(
100
+ { body, requestHeaders } = { requestHeaders: {} },
101
+ { responseHeaders } = { responseHeaders: false }
102
+ ) {
103
+ const {
104
+ error,
105
+ } = LeadPlatformApplicationValidator.createCustomForm().validate(
85
106
  {
86
107
  body,
87
108
  },
@@ -92,7 +113,9 @@ class Lead {
92
113
  }
93
114
 
94
115
  // Showing warrnings if extra unknown parameters are found
95
- const { error: warrning } = LeadValidator.createCustomForm().validate(
116
+ const {
117
+ error: warrning,
118
+ } = LeadPlatformApplicationValidator.createCustomForm().validate(
96
119
  {
97
120
  body,
98
121
  },
@@ -101,9 +124,8 @@ class Lead {
101
124
  if (warrning) {
102
125
  Logger({
103
126
  level: "WARN",
104
- message: "Parameter Validation warrnings for createCustomForm",
127
+ message: `Parameter Validation warrnings for platform > Lead > createCustomForm \n ${warrning}`,
105
128
  });
106
- Logger({ level: "WARN", message: warrning });
107
129
  }
108
130
 
109
131
  const query_params = {};
@@ -113,10 +135,19 @@ class Lead {
113
135
  "post",
114
136
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
115
137
  query_params,
116
- body
138
+ body,
139
+ requestHeaders,
140
+ { responseHeaders }
117
141
  );
118
142
 
119
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
143
+ let responseData = response;
144
+ if (responseHeaders) {
145
+ responseData = response[0];
146
+ }
147
+
148
+ const {
149
+ error: res_error,
150
+ } = LeadPlatformModel.CustomForm().validate(responseData, {
120
151
  abortEarly: false,
121
152
  allowUnknown: false,
122
153
  });
@@ -124,24 +155,27 @@ class Lead {
124
155
  if (res_error) {
125
156
  Logger({
126
157
  level: "WARN",
127
- message: "Response Validation Warnnings for createCustomForm",
158
+ message: `Response Validation Warnnings for platform > Lead > createCustomForm \n ${res_error}`,
128
159
  });
129
- Logger({ level: "WARN", message: res_error });
130
160
  }
131
161
 
132
162
  return response;
133
163
  }
134
164
 
135
165
  /**
136
- * @param {Object} arg - Arg object.
137
- * @param {string} arg.id - Ticket ID for which history is created
138
- * @param {TicketHistoryPayload} arg.body
139
- * @returns {Promise<TicketHistory>} - Success response
166
+ * @param {LeadPlatformApplicationValidator.CreateHistoryParam} arg - Arg object
167
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
168
+ * @param {import("../PlatformAPIClient").Options} - Options
169
+ * @returns {Promise<LeadPlatformModel.TicketHistory>} - Success response
170
+ * @name createHistory
140
171
  * @summary: Create history for specific application level ticket
141
- * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
172
+ * @description: Create history for specific application level 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/platform/lead/createHistory/).
142
173
  */
143
- async createHistory({ id, body } = {}) {
144
- const { error } = LeadValidator.createHistory().validate(
174
+ async createHistory(
175
+ { id, body, requestHeaders } = { requestHeaders: {} },
176
+ { responseHeaders } = { responseHeaders: false }
177
+ ) {
178
+ const { error } = LeadPlatformApplicationValidator.createHistory().validate(
145
179
  {
146
180
  id,
147
181
  body,
@@ -153,7 +187,9 @@ class Lead {
153
187
  }
154
188
 
155
189
  // Showing warrnings if extra unknown parameters are found
156
- const { error: warrning } = LeadValidator.createHistory().validate(
190
+ const {
191
+ error: warrning,
192
+ } = LeadPlatformApplicationValidator.createHistory().validate(
157
193
  {
158
194
  id,
159
195
  body,
@@ -163,9 +199,8 @@ class Lead {
163
199
  if (warrning) {
164
200
  Logger({
165
201
  level: "WARN",
166
- message: "Parameter Validation warrnings for createHistory",
202
+ message: `Parameter Validation warrnings for platform > Lead > createHistory \n ${warrning}`,
167
203
  });
168
- Logger({ level: "WARN", message: warrning });
169
204
  }
170
205
 
171
206
  const query_params = {};
@@ -175,10 +210,19 @@ class Lead {
175
210
  "post",
176
211
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
177
212
  query_params,
178
- body
213
+ body,
214
+ requestHeaders,
215
+ { responseHeaders }
179
216
  );
180
217
 
181
- const { error: res_error } = LeadModel.TicketHistory().validate(response, {
218
+ let responseData = response;
219
+ if (responseHeaders) {
220
+ responseData = response[0];
221
+ }
222
+
223
+ const {
224
+ error: res_error,
225
+ } = LeadPlatformModel.TicketHistory().validate(responseData, {
182
226
  abortEarly: false,
183
227
  allowUnknown: false,
184
228
  });
@@ -186,24 +230,29 @@ class Lead {
186
230
  if (res_error) {
187
231
  Logger({
188
232
  level: "WARN",
189
- message: "Response Validation Warnnings for createHistory",
233
+ message: `Response Validation Warnnings for platform > Lead > createHistory \n ${res_error}`,
190
234
  });
191
- Logger({ level: "WARN", message: res_error });
192
235
  }
193
236
 
194
237
  return response;
195
238
  }
196
239
 
197
240
  /**
198
- * @param {Object} arg - Arg object.
199
- * @param {string} arg.slug - Slug of form whose response is getting submitted
200
- * @param {EditCustomFormPayload} arg.body
201
- * @returns {Promise<CustomForm>} - Success response
241
+ * @param {LeadPlatformApplicationValidator.EditCustomFormParam} arg - Arg object
242
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
243
+ * @param {import("../PlatformAPIClient").Options} - Options
244
+ * @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
245
+ * @name editCustomForm
202
246
  * @summary: Edit the given custom form
203
- * @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
247
+ * @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editCustomForm/).
204
248
  */
205
- async editCustomForm({ slug, body } = {}) {
206
- const { error } = LeadValidator.editCustomForm().validate(
249
+ async editCustomForm(
250
+ { slug, body, requestHeaders } = { requestHeaders: {} },
251
+ { responseHeaders } = { responseHeaders: false }
252
+ ) {
253
+ const {
254
+ error,
255
+ } = LeadPlatformApplicationValidator.editCustomForm().validate(
207
256
  {
208
257
  slug,
209
258
  body,
@@ -215,7 +264,9 @@ class Lead {
215
264
  }
216
265
 
217
266
  // Showing warrnings if extra unknown parameters are found
218
- const { error: warrning } = LeadValidator.editCustomForm().validate(
267
+ const {
268
+ error: warrning,
269
+ } = LeadPlatformApplicationValidator.editCustomForm().validate(
219
270
  {
220
271
  slug,
221
272
  body,
@@ -225,9 +276,8 @@ class Lead {
225
276
  if (warrning) {
226
277
  Logger({
227
278
  level: "WARN",
228
- message: "Parameter Validation warrnings for editCustomForm",
279
+ message: `Parameter Validation warrnings for platform > Lead > editCustomForm \n ${warrning}`,
229
280
  });
230
- Logger({ level: "WARN", message: warrning });
231
281
  }
232
282
 
233
283
  const query_params = {};
@@ -237,10 +287,19 @@ class Lead {
237
287
  "put",
238
288
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
239
289
  query_params,
240
- body
290
+ body,
291
+ requestHeaders,
292
+ { responseHeaders }
241
293
  );
242
294
 
243
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
295
+ let responseData = response;
296
+ if (responseHeaders) {
297
+ responseData = response[0];
298
+ }
299
+
300
+ const {
301
+ error: res_error,
302
+ } = LeadPlatformModel.CustomForm().validate(responseData, {
244
303
  abortEarly: false,
245
304
  allowUnknown: false,
246
305
  });
@@ -248,24 +307,27 @@ class Lead {
248
307
  if (res_error) {
249
308
  Logger({
250
309
  level: "WARN",
251
- message: "Response Validation Warnnings for editCustomForm",
310
+ message: `Response Validation Warnnings for platform > Lead > editCustomForm \n ${res_error}`,
252
311
  });
253
- Logger({ level: "WARN", message: res_error });
254
312
  }
255
313
 
256
314
  return response;
257
315
  }
258
316
 
259
317
  /**
260
- * @param {Object} arg - Arg object.
261
- * @param {string} arg.id - Ticket ID of ticket to be edited
262
- * @param {EditTicketPayload} arg.body
263
- * @returns {Promise<Ticket>} - Success response
318
+ * @param {LeadPlatformApplicationValidator.EditTicketParam} arg - Arg object
319
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
320
+ * @param {import("../PlatformAPIClient").Options} - Options
321
+ * @returns {Promise<LeadPlatformModel.Ticket>} - Success response
322
+ * @name editTicket
264
323
  * @summary: Edits ticket details of a application level ticket
265
- * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
324
+ * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editTicket/).
266
325
  */
267
- async editTicket({ id, body } = {}) {
268
- const { error } = LeadValidator.editTicket().validate(
326
+ async editTicket(
327
+ { id, body, requestHeaders } = { requestHeaders: {} },
328
+ { responseHeaders } = { responseHeaders: false }
329
+ ) {
330
+ const { error } = LeadPlatformApplicationValidator.editTicket().validate(
269
331
  {
270
332
  id,
271
333
  body,
@@ -277,7 +339,9 @@ class Lead {
277
339
  }
278
340
 
279
341
  // Showing warrnings if extra unknown parameters are found
280
- const { error: warrning } = LeadValidator.editTicket().validate(
342
+ const {
343
+ error: warrning,
344
+ } = LeadPlatformApplicationValidator.editTicket().validate(
281
345
  {
282
346
  id,
283
347
  body,
@@ -287,9 +351,8 @@ class Lead {
287
351
  if (warrning) {
288
352
  Logger({
289
353
  level: "WARN",
290
- message: "Parameter Validation warrnings for editTicket",
354
+ message: `Parameter Validation warrnings for platform > Lead > editTicket \n ${warrning}`,
291
355
  });
292
- Logger({ level: "WARN", message: warrning });
293
356
  }
294
357
 
295
358
  const query_params = {};
@@ -299,10 +362,19 @@ class Lead {
299
362
  "put",
300
363
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
301
364
  query_params,
302
- body
365
+ body,
366
+ requestHeaders,
367
+ { responseHeaders }
303
368
  );
304
369
 
305
- const { error: res_error } = LeadModel.Ticket().validate(response, {
370
+ let responseData = response;
371
+ if (responseHeaders) {
372
+ responseData = response[0];
373
+ }
374
+
375
+ const {
376
+ error: res_error,
377
+ } = LeadPlatformModel.Ticket().validate(responseData, {
306
378
  abortEarly: false,
307
379
  allowUnknown: false,
308
380
  });
@@ -310,23 +382,27 @@ class Lead {
310
382
  if (res_error) {
311
383
  Logger({
312
384
  level: "WARN",
313
- message: "Response Validation Warnnings for editTicket",
385
+ message: `Response Validation Warnnings for platform > Lead > editTicket \n ${res_error}`,
314
386
  });
315
- Logger({ level: "WARN", message: res_error });
316
387
  }
317
388
 
318
389
  return response;
319
390
  }
320
391
 
321
392
  /**
322
- * @param {Object} arg - Arg object.
323
- * @param {string} arg.slug - Slug of form whose response is getting submitted
324
- * @returns {Promise<CustomForm>} - Success response
393
+ * @param {LeadPlatformApplicationValidator.GetCustomFormParam} arg - Arg object
394
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
395
+ * @param {import("../PlatformAPIClient").Options} - Options
396
+ * @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
397
+ * @name getCustomForm
325
398
  * @summary: Get specific custom form using it's slug
326
- * @description: Get specific custom form using it's slug, this is used to view the form.
399
+ * @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/platform/lead/getCustomForm/).
327
400
  */
328
- async getCustomForm({ slug } = {}) {
329
- const { error } = LeadValidator.getCustomForm().validate(
401
+ async getCustomForm(
402
+ { slug, requestHeaders } = { requestHeaders: {} },
403
+ { responseHeaders } = { responseHeaders: false }
404
+ ) {
405
+ const { error } = LeadPlatformApplicationValidator.getCustomForm().validate(
330
406
  {
331
407
  slug,
332
408
  },
@@ -337,7 +413,9 @@ class Lead {
337
413
  }
338
414
 
339
415
  // Showing warrnings if extra unknown parameters are found
340
- const { error: warrning } = LeadValidator.getCustomForm().validate(
416
+ const {
417
+ error: warrning,
418
+ } = LeadPlatformApplicationValidator.getCustomForm().validate(
341
419
  {
342
420
  slug,
343
421
  },
@@ -346,9 +424,8 @@ class Lead {
346
424
  if (warrning) {
347
425
  Logger({
348
426
  level: "WARN",
349
- message: "Parameter Validation warrnings for getCustomForm",
427
+ message: `Parameter Validation warrnings for platform > Lead > getCustomForm \n ${warrning}`,
350
428
  });
351
- Logger({ level: "WARN", message: warrning });
352
429
  }
353
430
 
354
431
  const query_params = {};
@@ -358,10 +435,19 @@ class Lead {
358
435
  "get",
359
436
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
360
437
  query_params,
361
- undefined
438
+ undefined,
439
+ requestHeaders,
440
+ { responseHeaders }
362
441
  );
363
442
 
364
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
443
+ let responseData = response;
444
+ if (responseHeaders) {
445
+ responseData = response[0];
446
+ }
447
+
448
+ const {
449
+ error: res_error,
450
+ } = LeadPlatformModel.CustomForm().validate(responseData, {
365
451
  abortEarly: false,
366
452
  allowUnknown: false,
367
453
  });
@@ -369,22 +455,29 @@ class Lead {
369
455
  if (res_error) {
370
456
  Logger({
371
457
  level: "WARN",
372
- message: "Response Validation Warnnings for getCustomForm",
458
+ message: `Response Validation Warnnings for platform > Lead > getCustomForm \n ${res_error}`,
373
459
  });
374
- Logger({ level: "WARN", message: res_error });
375
460
  }
376
461
 
377
462
  return response;
378
463
  }
379
464
 
380
465
  /**
381
- * @param {Object} arg - Arg object.
382
- * @returns {Promise<CustomFormList>} - Success response
466
+ * @param {LeadPlatformApplicationValidator.GetCustomFormsParam} arg - Arg object
467
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
468
+ * @param {import("../PlatformAPIClient").Options} - Options
469
+ * @returns {Promise<LeadPlatformModel.CustomFormList>} - Success response
470
+ * @name getCustomForms
383
471
  * @summary: Get list of custom form
384
- * @description: Get list of custom form for given application
472
+ * @description: Get list of custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getCustomForms/).
385
473
  */
386
- async getCustomForms({} = {}) {
387
- const { error } = LeadValidator.getCustomForms().validate(
474
+ async getCustomForms(
475
+ { requestHeaders } = { requestHeaders: {} },
476
+ { responseHeaders } = { responseHeaders: false }
477
+ ) {
478
+ const {
479
+ error,
480
+ } = LeadPlatformApplicationValidator.getCustomForms().validate(
388
481
  {},
389
482
  { abortEarly: false, allowUnknown: true }
390
483
  );
@@ -393,16 +486,17 @@ class Lead {
393
486
  }
394
487
 
395
488
  // Showing warrnings if extra unknown parameters are found
396
- const { error: warrning } = LeadValidator.getCustomForms().validate(
489
+ const {
490
+ error: warrning,
491
+ } = LeadPlatformApplicationValidator.getCustomForms().validate(
397
492
  {},
398
493
  { abortEarly: false, allowUnknown: false }
399
494
  );
400
495
  if (warrning) {
401
496
  Logger({
402
497
  level: "WARN",
403
- message: "Parameter Validation warrnings for getCustomForms",
498
+ message: `Parameter Validation warrnings for platform > Lead > getCustomForms \n ${warrning}`,
404
499
  });
405
- Logger({ level: "WARN", message: warrning });
406
500
  }
407
501
 
408
502
  const query_params = {};
@@ -412,10 +506,19 @@ class Lead {
412
506
  "get",
413
507
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
414
508
  query_params,
415
- undefined
509
+ undefined,
510
+ requestHeaders,
511
+ { responseHeaders }
416
512
  );
417
513
 
418
- const { error: res_error } = LeadModel.CustomFormList().validate(response, {
514
+ let responseData = response;
515
+ if (responseHeaders) {
516
+ responseData = response[0];
517
+ }
518
+
519
+ const {
520
+ error: res_error,
521
+ } = LeadPlatformModel.CustomFormList().validate(responseData, {
419
522
  abortEarly: false,
420
523
  allowUnknown: false,
421
524
  });
@@ -423,23 +526,27 @@ class Lead {
423
526
  if (res_error) {
424
527
  Logger({
425
528
  level: "WARN",
426
- message: "Response Validation Warnnings for getCustomForms",
529
+ message: `Response Validation Warnnings for platform > Lead > getCustomForms \n ${res_error}`,
427
530
  });
428
- Logger({ level: "WARN", message: res_error });
429
531
  }
430
532
 
431
533
  return response;
432
534
  }
433
535
 
434
536
  /**
435
- * @param {Object} arg - Arg object.
436
- * @param {string} arg.id - Tiket ID of the ticket to be fetched
437
- * @returns {Promise<Ticket>} - Success response
537
+ * @param {LeadPlatformApplicationValidator.GetTicketParam} arg - Arg object
538
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
539
+ * @param {import("../PlatformAPIClient").Options} - Options
540
+ * @returns {Promise<LeadPlatformModel.Ticket>} - Success response
541
+ * @name getTicket
438
542
  * @summary: Retreives ticket details of a application level ticket
439
- * @description: Retreives ticket details of a application level ticket with ticket ID
543
+ * @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicket/).
440
544
  */
441
- async getTicket({ id } = {}) {
442
- const { error } = LeadValidator.getTicket().validate(
545
+ async getTicket(
546
+ { id, requestHeaders } = { requestHeaders: {} },
547
+ { responseHeaders } = { responseHeaders: false }
548
+ ) {
549
+ const { error } = LeadPlatformApplicationValidator.getTicket().validate(
443
550
  {
444
551
  id,
445
552
  },
@@ -450,7 +557,9 @@ class Lead {
450
557
  }
451
558
 
452
559
  // Showing warrnings if extra unknown parameters are found
453
- const { error: warrning } = LeadValidator.getTicket().validate(
560
+ const {
561
+ error: warrning,
562
+ } = LeadPlatformApplicationValidator.getTicket().validate(
454
563
  {
455
564
  id,
456
565
  },
@@ -459,9 +568,8 @@ class Lead {
459
568
  if (warrning) {
460
569
  Logger({
461
570
  level: "WARN",
462
- message: "Parameter Validation warrnings for getTicket",
571
+ message: `Parameter Validation warrnings for platform > Lead > getTicket \n ${warrning}`,
463
572
  });
464
- Logger({ level: "WARN", message: warrning });
465
573
  }
466
574
 
467
575
  const query_params = {};
@@ -471,10 +579,19 @@ class Lead {
471
579
  "get",
472
580
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
473
581
  query_params,
474
- undefined
582
+ undefined,
583
+ requestHeaders,
584
+ { responseHeaders }
475
585
  );
476
586
 
477
- const { error: res_error } = LeadModel.Ticket().validate(response, {
587
+ let responseData = response;
588
+ if (responseHeaders) {
589
+ responseData = response[0];
590
+ }
591
+
592
+ const {
593
+ error: res_error,
594
+ } = LeadPlatformModel.Ticket().validate(responseData, {
478
595
  abortEarly: false,
479
596
  allowUnknown: false,
480
597
  });
@@ -482,23 +599,29 @@ class Lead {
482
599
  if (res_error) {
483
600
  Logger({
484
601
  level: "WARN",
485
- message: "Response Validation Warnnings for getTicket",
602
+ message: `Response Validation Warnnings for platform > Lead > getTicket \n ${res_error}`,
486
603
  });
487
- Logger({ level: "WARN", message: res_error });
488
604
  }
489
605
 
490
606
  return response;
491
607
  }
492
608
 
493
609
  /**
494
- * @param {Object} arg - Arg object.
495
- * @param {string} arg.id - Ticket ID for which history is to be fetched
496
- * @returns {Promise<TicketHistoryList>} - Success response
610
+ * @param {LeadPlatformApplicationValidator.GetTicketHistoryParam} arg - Arg object
611
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
612
+ * @param {import("../PlatformAPIClient").Options} - Options
613
+ * @returns {Promise<LeadPlatformModel.TicketHistoryList>} - Success response
614
+ * @name getTicketHistory
497
615
  * @summary: Gets history list for specific application level ticket
498
- * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
616
+ * @description: Gets history list for specific application level 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/platform/lead/getTicketHistory/).
499
617
  */
500
- async getTicketHistory({ id } = {}) {
501
- const { error } = LeadValidator.getTicketHistory().validate(
618
+ async getTicketHistory(
619
+ { id, requestHeaders } = { requestHeaders: {} },
620
+ { responseHeaders } = { responseHeaders: false }
621
+ ) {
622
+ const {
623
+ error,
624
+ } = LeadPlatformApplicationValidator.getTicketHistory().validate(
502
625
  {
503
626
  id,
504
627
  },
@@ -509,7 +632,9 @@ class Lead {
509
632
  }
510
633
 
511
634
  // Showing warrnings if extra unknown parameters are found
512
- const { error: warrning } = LeadValidator.getTicketHistory().validate(
635
+ const {
636
+ error: warrning,
637
+ } = LeadPlatformApplicationValidator.getTicketHistory().validate(
513
638
  {
514
639
  id,
515
640
  },
@@ -518,9 +643,8 @@ class Lead {
518
643
  if (warrning) {
519
644
  Logger({
520
645
  level: "WARN",
521
- message: "Parameter Validation warrnings for getTicketHistory",
646
+ message: `Parameter Validation warrnings for platform > Lead > getTicketHistory \n ${warrning}`,
522
647
  });
523
- Logger({ level: "WARN", message: warrning });
524
648
  }
525
649
 
526
650
  const query_params = {};
@@ -530,12 +654,19 @@ class Lead {
530
654
  "get",
531
655
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
532
656
  query_params,
533
- undefined
657
+ undefined,
658
+ requestHeaders,
659
+ { responseHeaders }
534
660
  );
535
661
 
662
+ let responseData = response;
663
+ if (responseHeaders) {
664
+ responseData = response[0];
665
+ }
666
+
536
667
  const {
537
668
  error: res_error,
538
- } = LeadModel.TicketHistoryList().validate(response, {
669
+ } = LeadPlatformModel.TicketHistoryList().validate(responseData, {
539
670
  abortEarly: false,
540
671
  allowUnknown: false,
541
672
  });
@@ -543,30 +674,29 @@ class Lead {
543
674
  if (res_error) {
544
675
  Logger({
545
676
  level: "WARN",
546
- message: "Response Validation Warnnings for getTicketHistory",
677
+ message: `Response Validation Warnnings for platform > Lead > getTicketHistory \n ${res_error}`,
547
678
  });
548
- Logger({ level: "WARN", message: res_error });
549
679
  }
550
680
 
551
681
  return response;
552
682
  }
553
683
 
554
684
  /**
555
- * @param {Object} arg - Arg object.
556
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
557
- * list of tickets
558
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
559
- * the ticket filters
560
- * @param {string} [arg.q] - Search through ticket titles and description
561
- * @param {string} [arg.status] - Filter tickets on status
562
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
563
- * @param {string} [arg.category] - Filter tickets on category
564
- * @returns {Promise<TicketList>} - Success response
685
+ * @param {LeadPlatformApplicationValidator.GetTicketsParam} arg - Arg object
686
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
687
+ * @param {import("../PlatformAPIClient").Options} - Options
688
+ * @returns {Promise<LeadPlatformModel.TicketList>} - Success response
689
+ * @name getTickets
565
690
  * @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
566
- * @description: Gets the list of Application level Tickets and/or ticket filters
691
+ * @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTickets/).
567
692
  */
568
- async getTickets({ items, filters, q, status, priority, category } = {}) {
569
- const { error } = LeadValidator.getTickets().validate(
693
+ async getTickets(
694
+ { items, filters, q, status, priority, category, requestHeaders } = {
695
+ requestHeaders: {},
696
+ },
697
+ { responseHeaders } = { responseHeaders: false }
698
+ ) {
699
+ const { error } = LeadPlatformApplicationValidator.getTickets().validate(
570
700
  {
571
701
  items,
572
702
  filters,
@@ -582,7 +712,9 @@ class Lead {
582
712
  }
583
713
 
584
714
  // Showing warrnings if extra unknown parameters are found
585
- const { error: warrning } = LeadValidator.getTickets().validate(
715
+ const {
716
+ error: warrning,
717
+ } = LeadPlatformApplicationValidator.getTickets().validate(
586
718
  {
587
719
  items,
588
720
  filters,
@@ -596,9 +728,8 @@ class Lead {
596
728
  if (warrning) {
597
729
  Logger({
598
730
  level: "WARN",
599
- message: "Parameter Validation warrnings for getTickets",
731
+ message: `Parameter Validation warrnings for platform > Lead > getTickets \n ${warrning}`,
600
732
  });
601
- Logger({ level: "WARN", message: warrning });
602
733
  }
603
734
 
604
735
  const query_params = {};
@@ -614,10 +745,19 @@ class Lead {
614
745
  "get",
615
746
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
616
747
  query_params,
617
- undefined
748
+ undefined,
749
+ requestHeaders,
750
+ { responseHeaders }
618
751
  );
619
752
 
620
- const { error: res_error } = LeadModel.TicketList().validate(response, {
753
+ let responseData = response;
754
+ if (responseHeaders) {
755
+ responseData = response[0];
756
+ }
757
+
758
+ const {
759
+ error: res_error,
760
+ } = LeadPlatformModel.TicketList().validate(responseData, {
621
761
  abortEarly: false,
622
762
  allowUnknown: false,
623
763
  });
@@ -625,23 +765,32 @@ class Lead {
625
765
  if (res_error) {
626
766
  Logger({
627
767
  level: "WARN",
628
- message: "Response Validation Warnnings for getTickets",
768
+ message: `Response Validation Warnnings for platform > Lead > getTickets \n ${res_error}`,
629
769
  });
630
- Logger({ level: "WARN", message: res_error });
631
770
  }
632
771
 
633
772
  return response;
634
773
  }
635
774
 
636
775
  /**
637
- * @param {Object} arg - Arg object.
638
- * @param {string} arg.uniqueName - Unique name of video room
639
- * @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
776
+ * @param {LeadPlatformApplicationValidator.GetTokenForVideoRoomParam} arg
777
+ * - Arg object
778
+ *
779
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
780
+ * @param {import("../PlatformAPIClient").Options} - Options
781
+ * @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
782
+ * Success response
783
+ * @name getTokenForVideoRoom
640
784
  * @summary: Get Token to join a specific Video Room using it's unqiue name
641
- * @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.
785
+ * @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/platform/lead/getTokenForVideoRoom/).
642
786
  */
643
- async getTokenForVideoRoom({ uniqueName } = {}) {
644
- const { error } = LeadValidator.getTokenForVideoRoom().validate(
787
+ async getTokenForVideoRoom(
788
+ { uniqueName, requestHeaders } = { requestHeaders: {} },
789
+ { responseHeaders } = { responseHeaders: false }
790
+ ) {
791
+ const {
792
+ error,
793
+ } = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
645
794
  {
646
795
  uniqueName,
647
796
  },
@@ -652,7 +801,9 @@ class Lead {
652
801
  }
653
802
 
654
803
  // Showing warrnings if extra unknown parameters are found
655
- const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
804
+ const {
805
+ error: warrning,
806
+ } = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
656
807
  {
657
808
  uniqueName,
658
809
  },
@@ -661,9 +812,8 @@ class Lead {
661
812
  if (warrning) {
662
813
  Logger({
663
814
  level: "WARN",
664
- message: "Parameter Validation warrnings for getTokenForVideoRoom",
815
+ message: `Parameter Validation warrnings for platform > Lead > getTokenForVideoRoom \n ${warrning}`,
665
816
  });
666
- Logger({ level: "WARN", message: warrning });
667
817
  }
668
818
 
669
819
  const query_params = {};
@@ -673,36 +823,53 @@ class Lead {
673
823
  "get",
674
824
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
675
825
  query_params,
676
- undefined
826
+ undefined,
827
+ requestHeaders,
828
+ { responseHeaders }
677
829
  );
678
830
 
831
+ let responseData = response;
832
+ if (responseHeaders) {
833
+ responseData = response[0];
834
+ }
835
+
679
836
  const {
680
837
  error: res_error,
681
- } = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
682
- abortEarly: false,
683
- allowUnknown: false,
684
- });
838
+ } = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
839
+ responseData,
840
+ { abortEarly: false, allowUnknown: false }
841
+ );
685
842
 
686
843
  if (res_error) {
687
844
  Logger({
688
845
  level: "WARN",
689
- message: "Response Validation Warnnings for getTokenForVideoRoom",
846
+ message: `Response Validation Warnnings for platform > Lead > getTokenForVideoRoom \n ${res_error}`,
690
847
  });
691
- Logger({ level: "WARN", message: res_error });
692
848
  }
693
849
 
694
850
  return response;
695
851
  }
696
852
 
697
853
  /**
698
- * @param {Object} arg - Arg object.
699
- * @param {string} arg.uniqueName - Unique name of Video Room
700
- * @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
854
+ * @param {LeadPlatformApplicationValidator.GetVideoParticipantsParam} arg
855
+ * - Arg object
856
+ *
857
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
858
+ * @param {import("../PlatformAPIClient").Options} - Options
859
+ * @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
860
+ * - Success response
861
+ *
862
+ * @name getVideoParticipants
701
863
  * @summary: Get participants of a specific Video Room using it's unique name
702
- * @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.
864
+ * @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/platform/lead/getVideoParticipants/).
703
865
  */
704
- async getVideoParticipants({ uniqueName } = {}) {
705
- const { error } = LeadValidator.getVideoParticipants().validate(
866
+ async getVideoParticipants(
867
+ { uniqueName, requestHeaders } = { requestHeaders: {} },
868
+ { responseHeaders } = { responseHeaders: false }
869
+ ) {
870
+ const {
871
+ error,
872
+ } = LeadPlatformApplicationValidator.getVideoParticipants().validate(
706
873
  {
707
874
  uniqueName,
708
875
  },
@@ -713,7 +880,9 @@ class Lead {
713
880
  }
714
881
 
715
882
  // Showing warrnings if extra unknown parameters are found
716
- const { error: warrning } = LeadValidator.getVideoParticipants().validate(
883
+ const {
884
+ error: warrning,
885
+ } = LeadPlatformApplicationValidator.getVideoParticipants().validate(
717
886
  {
718
887
  uniqueName,
719
888
  },
@@ -722,9 +891,8 @@ class Lead {
722
891
  if (warrning) {
723
892
  Logger({
724
893
  level: "WARN",
725
- message: "Parameter Validation warrnings for getVideoParticipants",
894
+ message: `Parameter Validation warrnings for platform > Lead > getVideoParticipants \n ${warrning}`,
726
895
  });
727
- Logger({ level: "WARN", message: warrning });
728
896
  }
729
897
 
730
898
  const query_params = {};
@@ -734,36 +902,47 @@ class Lead {
734
902
  "get",
735
903
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
736
904
  query_params,
737
- undefined
905
+ undefined,
906
+ requestHeaders,
907
+ { responseHeaders }
738
908
  );
739
909
 
910
+ let responseData = response;
911
+ if (responseHeaders) {
912
+ responseData = response[0];
913
+ }
914
+
740
915
  const {
741
916
  error: res_error,
742
- } = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
743
- abortEarly: false,
744
- allowUnknown: false,
745
- });
917
+ } = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
918
+ responseData,
919
+ { abortEarly: false, allowUnknown: false }
920
+ );
746
921
 
747
922
  if (res_error) {
748
923
  Logger({
749
924
  level: "WARN",
750
- message: "Response Validation Warnnings for getVideoParticipants",
925
+ message: `Response Validation Warnnings for platform > Lead > getVideoParticipants \n ${res_error}`,
751
926
  });
752
- Logger({ level: "WARN", message: res_error });
753
927
  }
754
928
 
755
929
  return response;
756
930
  }
757
931
 
758
932
  /**
759
- * @param {Object} arg - Arg object.
760
- * @param {CreateVideoRoomPayload} arg.body
761
- * @returns {Promise<CreateVideoRoomResponse>} - Success response
933
+ * @param {LeadPlatformApplicationValidator.OpenVideoRoomParam} arg - Arg object
934
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
935
+ * @param {import("../PlatformAPIClient").Options} - Options
936
+ * @returns {Promise<LeadPlatformModel.CreateVideoRoomResponse>} - Success response
937
+ * @name openVideoRoom
762
938
  * @summary: Open a video room.
763
- * @description: Open a video room.
939
+ * @description: Open a video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/openVideoRoom/).
764
940
  */
765
- async openVideoRoom({ body } = {}) {
766
- const { error } = LeadValidator.openVideoRoom().validate(
941
+ async openVideoRoom(
942
+ { body, requestHeaders } = { requestHeaders: {} },
943
+ { responseHeaders } = { responseHeaders: false }
944
+ ) {
945
+ const { error } = LeadPlatformApplicationValidator.openVideoRoom().validate(
767
946
  {
768
947
  body,
769
948
  },
@@ -774,7 +953,9 @@ class Lead {
774
953
  }
775
954
 
776
955
  // Showing warrnings if extra unknown parameters are found
777
- const { error: warrning } = LeadValidator.openVideoRoom().validate(
956
+ const {
957
+ error: warrning,
958
+ } = LeadPlatformApplicationValidator.openVideoRoom().validate(
778
959
  {
779
960
  body,
780
961
  },
@@ -783,9 +964,8 @@ class Lead {
783
964
  if (warrning) {
784
965
  Logger({
785
966
  level: "WARN",
786
- message: "Parameter Validation warrnings for openVideoRoom",
967
+ message: `Parameter Validation warrnings for platform > Lead > openVideoRoom \n ${warrning}`,
787
968
  });
788
- Logger({ level: "WARN", message: warrning });
789
969
  }
790
970
 
791
971
  const query_params = {};
@@ -795,12 +975,19 @@ class Lead {
795
975
  "post",
796
976
  `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
797
977
  query_params,
798
- body
978
+ body,
979
+ requestHeaders,
980
+ { responseHeaders }
799
981
  );
800
982
 
983
+ let responseData = response;
984
+ if (responseHeaders) {
985
+ responseData = response[0];
986
+ }
987
+
801
988
  const {
802
989
  error: res_error,
803
- } = LeadModel.CreateVideoRoomResponse().validate(response, {
990
+ } = LeadPlatformModel.CreateVideoRoomResponse().validate(responseData, {
804
991
  abortEarly: false,
805
992
  allowUnknown: false,
806
993
  });
@@ -808,9 +995,8 @@ class Lead {
808
995
  if (res_error) {
809
996
  Logger({
810
997
  level: "WARN",
811
- message: "Response Validation Warnnings for openVideoRoom",
998
+ message: `Response Validation Warnnings for platform > Lead > openVideoRoom \n ${res_error}`,
812
999
  });
813
- Logger({ level: "WARN", message: res_error });
814
1000
  }
815
1001
 
816
1002
  return response;