@gofynd/fdk-client-javascript 1.0.1 → 1.0.3

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 (318) hide show
  1. package/documentation/application/CART.md +5934 -4502
  2. package/documentation/application/CATALOG.md +6338 -7245
  3. package/documentation/application/COMMON.md +95 -222
  4. package/documentation/application/COMMUNICATION.md +106 -186
  5. package/documentation/application/CONFIGURATION.md +903 -1597
  6. package/documentation/application/CONTENT.md +562 -1270
  7. package/documentation/application/FILESTORAGE.md +84 -220
  8. package/documentation/application/LEAD.md +314 -660
  9. package/documentation/application/LOGISTIC.md +229 -305
  10. package/documentation/application/ORDER.md +642 -1137
  11. package/documentation/application/PAYMENT.md +2285 -3031
  12. package/documentation/application/POSCART.md +6079 -4642
  13. package/documentation/application/REWARDS.md +94 -248
  14. package/documentation/application/SHARE.md +152 -250
  15. package/documentation/application/THEME.md +952 -1235
  16. package/documentation/application/USER.md +1228 -1765
  17. package/documentation/platform/ANALYTICS.md +207 -349
  18. package/documentation/platform/AUDITTRAIL.md +121 -204
  19. package/documentation/platform/BILLING.md +865 -1376
  20. package/documentation/platform/CART.md +2814 -3662
  21. package/documentation/platform/CATALOG.md +15266 -17619
  22. package/documentation/platform/COMMON.md +95 -222
  23. package/documentation/platform/COMMUNICATION.md +1632 -2380
  24. package/documentation/platform/COMPANYPROFILE.md +572 -957
  25. package/documentation/platform/CONFIGURATION.md +3050 -4073
  26. package/documentation/platform/CONTENT.md +3509 -4121
  27. package/documentation/platform/DISCOUNT.md +140 -236
  28. package/documentation/platform/FILESTORAGE.md +187 -323
  29. package/documentation/platform/INVENTORY.md +268 -911
  30. package/documentation/platform/LEAD.md +2195 -2541
  31. package/documentation/platform/ORDER.md +3750 -5636
  32. package/documentation/platform/PARTNER.md +9 -36
  33. package/documentation/platform/PAYMENT.md +903 -1213
  34. package/documentation/platform/REWARDS.md +183 -347
  35. package/documentation/platform/SHARE.md +120 -213
  36. package/documentation/platform/THEME.md +12956 -13239
  37. package/documentation/platform/USER.md +975 -1120
  38. package/documentation/platform/WEBHOOK.md +78 -184
  39. package/documentation/public/CONFIGURATION.md +95 -222
  40. package/documentation/public/INVENTORY.md +100 -282
  41. package/documentation/public/WEBHOOK.md +27 -133
  42. package/package.json +1 -1
  43. package/sdk/application/ApplicationConfig.js +1 -1
  44. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  45. package/sdk/application/Cart/CartApplicationClient.js +1058 -547
  46. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  47. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  48. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  49. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  50. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  51. package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
  52. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  53. package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
  54. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  55. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  56. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  57. package/sdk/application/Common/CommonApplicationClient.js +76 -36
  58. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  59. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  60. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  61. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  62. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  63. package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
  64. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  65. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  66. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  67. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  69. package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  71. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  73. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  74. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  75. package/sdk/application/Content/ContentApplicationClient.js +581 -213
  76. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
  77. package/sdk/application/Content/ContentApplicationModel.js +468 -875
  78. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  79. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  81. package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  83. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  85. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  86. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  87. package/sdk/application/Lead/LeadApplicationClient.js +230 -96
  88. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  89. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  90. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  91. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  92. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  93. package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
  94. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  95. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  96. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  97. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  98. package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
  99. package/sdk/application/Order/OrderApplicationClient.js +448 -215
  100. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  101. package/sdk/application/Order/OrderApplicationModel.js +357 -661
  102. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  103. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  104. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  105. package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
  106. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  107. package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
  108. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  109. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  110. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  111. package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
  112. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
  113. package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
  114. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  115. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  116. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  117. package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
  118. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  119. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  120. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  121. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  122. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  123. package/sdk/application/Share/ShareApplicationClient.js +221 -96
  124. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  125. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  126. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  127. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  128. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  129. package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
  130. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  131. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  132. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  133. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  134. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  135. package/sdk/application/User/UserApplicationClient.js +1201 -543
  136. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  137. package/sdk/application/User/UserApplicationModel.js +440 -689
  138. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  139. package/sdk/application/User/UserApplicationValidator.js +89 -89
  140. package/sdk/common/AxiosHelper.js +1 -1
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  144. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  145. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
  146. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
  147. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  148. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  152. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  153. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  154. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  155. package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
  156. package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
  157. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  158. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  159. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  160. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  161. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
  162. package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
  163. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  164. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  165. package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
  166. package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
  168. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
  169. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  170. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  171. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
  172. package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
  173. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
  174. package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
  175. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
  176. package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
  177. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
  178. package/sdk/platform/Common/CommonPlatformClient.js +80 -37
  179. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  180. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  181. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  182. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
  184. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
  185. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  186. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  187. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  188. package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
  189. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  190. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
  192. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
  193. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
  194. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
  195. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  196. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  197. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
  198. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
  199. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  200. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  201. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
  202. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
  203. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  204. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  205. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  206. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  207. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
  208. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
  209. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
  210. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
  211. package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
  212. package/sdk/platform/Content/ContentPlatformModel.js +486 -867
  213. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
  214. package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
  215. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  216. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  217. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  218. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  219. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
  220. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
  221. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  222. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  223. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
  224. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
  225. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  226. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  227. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  228. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  229. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
  230. package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
  231. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  232. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  233. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  234. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  235. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
  236. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
  237. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  238. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  239. package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
  240. package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
  241. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  242. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  243. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  244. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  245. package/sdk/platform/OAuthClient.js +8 -8
  246. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
  247. package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
  248. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  249. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  250. package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
  251. package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
  252. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
  253. package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
  254. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  255. package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
  256. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
  257. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
  258. package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
  259. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
  260. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
  261. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  262. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  263. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
  264. package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
  265. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  266. package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
  267. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  268. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  269. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
  270. package/sdk/platform/PlatformApplicationClient.js +1584 -13691
  271. package/sdk/platform/PlatformClient.d.ts +7918 -7666
  272. package/sdk/platform/PlatformClient.js +8701 -9926
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  279. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
  280. package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
  281. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  282. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  283. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  284. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  285. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
  286. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
  287. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  288. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  289. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  290. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  291. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
  292. package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
  293. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  294. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  295. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  296. package/sdk/platform/User/UserPlatformModel.js +440 -689
  297. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
  298. package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
  299. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  300. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  301. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  302. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  303. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  304. package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
  305. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  306. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  307. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  308. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  309. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  310. package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
  311. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  312. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  313. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  314. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  315. package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
  316. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  317. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  318. package/tests/application/catalog.spec.js +7 -0
@@ -2,6 +2,9 @@ const Paginator = require("../../common/Paginator");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const PlatformAPIClient = require("../PlatformAPIClient");
4
4
  const LeadValidator = require("./LeadPlatformValidator");
5
+ const LeadModel = require("./LeadPlatformModel");
6
+ const { Logger } = require("./../../common/Logger");
7
+
5
8
  class Lead {
6
9
  constructor(config) {
7
10
  this.config = config;
@@ -9,41 +12,17 @@ class Lead {
9
12
 
10
13
  /**
11
14
  * @param {Object} arg - Arg object.
12
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
13
- * list of tickets
14
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
15
- * the ticket filters
16
- * @param {string} [arg.q] - Search through ticket titles and description
17
- * @param {string} [arg.status] - Filter tickets on status
18
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
19
- * @param {string} [arg.category] - Filter tickets on category
20
- * @param {number} [arg.pageNo] - The page number to navigate through the
21
- * given set of results.
22
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
23
- * page. Default is 12.
24
- * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
25
- * @description: Gets the list of company level tickets and/or ticket filters
15
+ * @param {string} arg.id - Ticket ID for which history is created
16
+ * @param {TicketHistoryPayload} arg.body
17
+ * @returns {Promise<TicketHistory>} - Success response
18
+ * @summary: Create history for specific company level ticket
19
+ * @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
26
20
  */
27
- getTickets({
28
- items,
29
- filters,
30
- q,
31
- status,
32
- priority,
33
- category,
34
- pageNo,
35
- pageSize,
36
- } = {}) {
37
- const { error } = LeadValidator.getTickets().validate(
21
+ async createHistory({ id, body } = {}) {
22
+ const { error } = LeadValidator.createHistory().validate(
38
23
  {
39
- items,
40
- filters,
41
- q,
42
- status,
43
- priority,
44
- category,
45
- pageNo,
46
- pageSize,
24
+ id,
25
+ body,
47
26
  },
48
27
  { abortEarly: false, allowUnknown: true }
49
28
  );
@@ -52,102 +31,58 @@ class Lead {
52
31
  }
53
32
 
54
33
  // Showing warrnings if extra unknown parameters are found
55
- const { error: warrning } = LeadValidator.getTickets().validate(
34
+ const { error: warrning } = LeadValidator.createHistory().validate(
56
35
  {
57
- items,
58
- filters,
59
- q,
60
- status,
61
- priority,
62
- category,
63
- pageNo,
64
- pageSize,
36
+ id,
37
+ body,
65
38
  },
66
39
  { abortEarly: false, allowUnknown: false }
67
40
  );
68
41
  if (warrning) {
69
- console.log("Parameter Validation warrnings for getTickets");
70
- console.log(warrning);
42
+ Logger({
43
+ level: "WARN",
44
+ message: "Parameter Validation warrnings for createHistory",
45
+ });
46
+ Logger({ level: "WARN", message: warrning });
71
47
  }
72
48
 
73
49
  const query_params = {};
74
- query_params["items"] = items;
75
- query_params["filters"] = filters;
76
- query_params["q"] = q;
77
- query_params["status"] = status;
78
- query_params["priority"] = priority;
79
- query_params["category"] = category;
80
- query_params["page_no"] = pageNo;
81
- query_params["page_size"] = pageSize;
82
50
 
83
51
  const xHeaders = {};
84
52
 
85
- return PlatformAPIClient.execute(
53
+ const response = await PlatformAPIClient.execute(
86
54
  this.config,
87
- "get",
88
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
55
+ "post",
56
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
89
57
  query_params,
90
- undefined,
58
+ body,
91
59
  xHeaders
92
60
  );
93
- }
94
61
 
95
- /**
96
- * @param {Object} arg - Arg object.
97
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
98
- * list of tickets
99
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
100
- * the ticket filters
101
- * @param {string} [arg.q] - Search through ticket titles and description
102
- * @param {string} [arg.status] - Filter tickets on status
103
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
104
- * @param {string} [arg.category] - Filter tickets on category
105
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
106
- * page. Default is 12.
107
- * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
108
- * @description: Gets the list of company level tickets and/or ticket filters
109
- */
110
- getTicketsPaginator({
111
- items,
112
- filters,
113
- q,
114
- status,
115
- priority,
116
- category,
117
- pageSize,
118
- } = {}) {
119
- const paginator = new Paginator();
120
- const callback = async () => {
121
- const pageId = paginator.nextId;
122
- const pageNo = paginator.pageNo;
123
- const pageType = "number";
124
- const data = await this.getTickets({
125
- items: items,
126
- filters: filters,
127
- q: q,
128
- status: status,
129
- priority: priority,
130
- category: category,
131
- pageNo: pageNo,
132
- pageSize: pageSize,
133
- });
134
- paginator.setPaginator({
135
- hasNext: data.page.has_next ? true : false,
136
- nextId: data.page.next_id,
62
+ const { error: res_error } = LeadModel.TicketHistory().validate(response, {
63
+ abortEarly: false,
64
+ allowUnknown: false,
65
+ });
66
+
67
+ if (res_error) {
68
+ Logger({
69
+ level: "WARN",
70
+ message: "Response Validation Warnnings for createHistory",
137
71
  });
138
- return data;
139
- };
140
- paginator.setCallback(callback);
141
- return paginator;
72
+ Logger({ level: "WARN", message: res_error });
73
+ }
74
+
75
+ return response;
142
76
  }
143
77
 
144
78
  /**
145
79
  * @param {Object} arg - Arg object.
146
80
  * @param {AddTicketPayload} arg.body
81
+ * @returns {Promise<Ticket>} - Success response
147
82
  * @summary: Creates a company level ticket
148
83
  * @description: Creates a company level ticket
149
84
  */
150
- createTicket({ body } = {}) {
85
+ async createTicket({ body } = {}) {
151
86
  const { error } = LeadValidator.createTicket().validate(
152
87
  {
153
88
  body,
@@ -166,15 +101,18 @@ class Lead {
166
101
  { abortEarly: false, allowUnknown: false }
167
102
  );
168
103
  if (warrning) {
169
- console.log("Parameter Validation warrnings for createTicket");
170
- console.log(warrning);
104
+ Logger({
105
+ level: "WARN",
106
+ message: "Parameter Validation warrnings for createTicket",
107
+ });
108
+ Logger({ level: "WARN", message: warrning });
171
109
  }
172
110
 
173
111
  const query_params = {};
174
112
 
175
113
  const xHeaders = {};
176
114
 
177
- return PlatformAPIClient.execute(
115
+ const response = await PlatformAPIClient.execute(
178
116
  this.config,
179
117
  "post",
180
118
  `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
@@ -182,18 +120,36 @@ class Lead {
182
120
  body,
183
121
  xHeaders
184
122
  );
123
+
124
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
125
+ abortEarly: false,
126
+ allowUnknown: false,
127
+ });
128
+
129
+ if (res_error) {
130
+ Logger({
131
+ level: "WARN",
132
+ message: "Response Validation Warnnings for createTicket",
133
+ });
134
+ Logger({ level: "WARN", message: res_error });
135
+ }
136
+
137
+ return response;
185
138
  }
186
139
 
187
140
  /**
188
141
  * @param {Object} arg - Arg object.
189
- * @param {string} arg.id - Tiket ID of the ticket to be fetched
190
- * @summary: Retreives ticket details of a company level ticket with ticket ID
191
- * @description: Retreives ticket details of a company level ticket
142
+ * @param {string} arg.id - Ticket ID of ticket to be edited
143
+ * @param {EditTicketPayload} arg.body
144
+ * @returns {Promise<Ticket>} - Success response
145
+ * @summary: Edits ticket details of a company level ticket
146
+ * @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
192
147
  */
193
- getTicket({ id } = {}) {
194
- const { error } = LeadValidator.getTicket().validate(
148
+ async editTicket({ id, body } = {}) {
149
+ const { error } = LeadValidator.editTicket().validate(
195
150
  {
196
151
  id,
152
+ body,
197
153
  },
198
154
  { abortEarly: false, allowUnknown: true }
199
155
  );
@@ -202,43 +158,61 @@ class Lead {
202
158
  }
203
159
 
204
160
  // Showing warrnings if extra unknown parameters are found
205
- const { error: warrning } = LeadValidator.getTicket().validate(
161
+ const { error: warrning } = LeadValidator.editTicket().validate(
206
162
  {
207
163
  id,
164
+ body,
208
165
  },
209
166
  { abortEarly: false, allowUnknown: false }
210
167
  );
211
168
  if (warrning) {
212
- console.log("Parameter Validation warrnings for getTicket");
213
- console.log(warrning);
169
+ Logger({
170
+ level: "WARN",
171
+ message: "Parameter Validation warrnings for editTicket",
172
+ });
173
+ Logger({ level: "WARN", message: warrning });
214
174
  }
215
175
 
216
176
  const query_params = {};
217
177
 
218
178
  const xHeaders = {};
219
179
 
220
- return PlatformAPIClient.execute(
180
+ const response = await PlatformAPIClient.execute(
221
181
  this.config,
222
- "get",
182
+ "put",
223
183
  `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
224
184
  query_params,
225
- undefined,
185
+ body,
226
186
  xHeaders
227
187
  );
188
+
189
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
190
+ abortEarly: false,
191
+ allowUnknown: false,
192
+ });
193
+
194
+ if (res_error) {
195
+ Logger({
196
+ level: "WARN",
197
+ message: "Response Validation Warnnings for editTicket",
198
+ });
199
+ Logger({ level: "WARN", message: res_error });
200
+ }
201
+
202
+ return response;
228
203
  }
229
204
 
230
205
  /**
231
206
  * @param {Object} arg - Arg object.
232
- * @param {string} arg.id - Ticket ID of ticket to be edited
233
- * @param {EditTicketPayload} arg.body
234
- * @summary: Edits ticket details of a company level ticket
235
- * @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
207
+ * @param {string} arg.id - Ticket ID for which feedbacks are to be fetched
208
+ * @returns {Promise<TicketFeedbackList>} - Success response
209
+ * @summary: Gets a list of feedback submitted against that ticket
210
+ * @description: Gets a list of feedback submitted against that ticket
236
211
  */
237
- editTicket({ id, body } = {}) {
238
- const { error } = LeadValidator.editTicket().validate(
212
+ async getFeedbacks({ id } = {}) {
213
+ const { error } = LeadValidator.getFeedbacks().validate(
239
214
  {
240
215
  id,
241
- body,
242
216
  },
243
217
  { abortEarly: false, allowUnknown: true }
244
218
  );
@@ -247,45 +221,60 @@ class Lead {
247
221
  }
248
222
 
249
223
  // Showing warrnings if extra unknown parameters are found
250
- const { error: warrning } = LeadValidator.editTicket().validate(
224
+ const { error: warrning } = LeadValidator.getFeedbacks().validate(
251
225
  {
252
226
  id,
253
- body,
254
227
  },
255
228
  { abortEarly: false, allowUnknown: false }
256
229
  );
257
230
  if (warrning) {
258
- console.log("Parameter Validation warrnings for editTicket");
259
- console.log(warrning);
231
+ Logger({
232
+ level: "WARN",
233
+ message: "Parameter Validation warrnings for getFeedbacks",
234
+ });
235
+ Logger({ level: "WARN", message: warrning });
260
236
  }
261
237
 
262
238
  const query_params = {};
263
239
 
264
240
  const xHeaders = {};
265
241
 
266
- return PlatformAPIClient.execute(
242
+ const response = await PlatformAPIClient.execute(
267
243
  this.config,
268
- "put",
269
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
244
+ "get",
245
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
270
246
  query_params,
271
- body,
247
+ undefined,
272
248
  xHeaders
273
249
  );
250
+
251
+ const {
252
+ error: res_error,
253
+ } = LeadModel.TicketFeedbackList().validate(response, {
254
+ abortEarly: false,
255
+ allowUnknown: false,
256
+ });
257
+
258
+ if (res_error) {
259
+ Logger({
260
+ level: "WARN",
261
+ message: "Response Validation Warnnings for getFeedbacks",
262
+ });
263
+ Logger({ level: "WARN", message: res_error });
264
+ }
265
+
266
+ return response;
274
267
  }
275
268
 
276
269
  /**
277
270
  * @param {Object} arg - Arg object.
278
- * @param {string} arg.id - Ticket ID for which history is created
279
- * @param {TicketHistoryPayload} arg.body
280
- * @summary: Create history for specific company level ticket
281
- * @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
271
+ * @returns {Promise<CloseVideoRoomResponse>} - Success response
272
+ * @summary: Get general support configuration.
273
+ * @description: Get general support configuration.
282
274
  */
283
- createHistory({ id, body } = {}) {
284
- const { error } = LeadValidator.createHistory().validate(
285
- {
286
- id,
287
- body,
288
- },
275
+ async getGeneralConfig({} = {}) {
276
+ const { error } = LeadValidator.getGeneralConfig().validate(
277
+ {},
289
278
  { abortEarly: false, allowUnknown: true }
290
279
  );
291
280
  if (error) {
@@ -293,40 +282,58 @@ class Lead {
293
282
  }
294
283
 
295
284
  // Showing warrnings if extra unknown parameters are found
296
- const { error: warrning } = LeadValidator.createHistory().validate(
297
- {
298
- id,
299
- body,
300
- },
285
+ const { error: warrning } = LeadValidator.getGeneralConfig().validate(
286
+ {},
301
287
  { abortEarly: false, allowUnknown: false }
302
288
  );
303
289
  if (warrning) {
304
- console.log("Parameter Validation warrnings for createHistory");
305
- console.log(warrning);
290
+ Logger({
291
+ level: "WARN",
292
+ message: "Parameter Validation warrnings for getGeneralConfig",
293
+ });
294
+ Logger({ level: "WARN", message: warrning });
306
295
  }
307
296
 
308
297
  const query_params = {};
309
298
 
310
299
  const xHeaders = {};
311
300
 
312
- return PlatformAPIClient.execute(
301
+ const response = await PlatformAPIClient.execute(
313
302
  this.config,
314
- "post",
315
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
303
+ "get",
304
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/general-config`,
316
305
  query_params,
317
- body,
306
+ undefined,
318
307
  xHeaders
319
308
  );
309
+
310
+ const {
311
+ error: res_error,
312
+ } = LeadModel.CloseVideoRoomResponse().validate(response, {
313
+ abortEarly: false,
314
+ allowUnknown: false,
315
+ });
316
+
317
+ if (res_error) {
318
+ Logger({
319
+ level: "WARN",
320
+ message: "Response Validation Warnnings for getGeneralConfig",
321
+ });
322
+ Logger({ level: "WARN", message: res_error });
323
+ }
324
+
325
+ return response;
320
326
  }
321
327
 
322
328
  /**
323
329
  * @param {Object} arg - Arg object.
324
- * @param {string} arg.id - Ticket ID for which history is to be fetched
325
- * @summary: Gets history list for specific company level ticket
326
- * @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
330
+ * @param {string} arg.id - Tiket ID of the ticket to be fetched
331
+ * @returns {Promise<Ticket>} - Success response
332
+ * @summary: Retreives ticket details of a company level ticket with ticket ID
333
+ * @description: Retreives ticket details of a company level ticket
327
334
  */
328
- getTicketHistory({ id } = {}) {
329
- const { error } = LeadValidator.getTicketHistory().validate(
335
+ async getTicket({ id } = {}) {
336
+ const { error } = LeadValidator.getTicket().validate(
330
337
  {
331
338
  id,
332
339
  },
@@ -337,39 +344,58 @@ class Lead {
337
344
  }
338
345
 
339
346
  // Showing warrnings if extra unknown parameters are found
340
- const { error: warrning } = LeadValidator.getTicketHistory().validate(
347
+ const { error: warrning } = LeadValidator.getTicket().validate(
341
348
  {
342
349
  id,
343
350
  },
344
351
  { abortEarly: false, allowUnknown: false }
345
352
  );
346
353
  if (warrning) {
347
- console.log("Parameter Validation warrnings for getTicketHistory");
348
- console.log(warrning);
354
+ Logger({
355
+ level: "WARN",
356
+ message: "Parameter Validation warrnings for getTicket",
357
+ });
358
+ Logger({ level: "WARN", message: warrning });
349
359
  }
350
360
 
351
361
  const query_params = {};
352
362
 
353
363
  const xHeaders = {};
354
364
 
355
- return PlatformAPIClient.execute(
365
+ const response = await PlatformAPIClient.execute(
356
366
  this.config,
357
367
  "get",
358
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
368
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
359
369
  query_params,
360
370
  undefined,
361
371
  xHeaders
362
372
  );
373
+
374
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
375
+ abortEarly: false,
376
+ allowUnknown: false,
377
+ });
378
+
379
+ if (res_error) {
380
+ Logger({
381
+ level: "WARN",
382
+ message: "Response Validation Warnnings for getTicket",
383
+ });
384
+ Logger({ level: "WARN", message: res_error });
385
+ }
386
+
387
+ return response;
363
388
  }
364
389
 
365
390
  /**
366
391
  * @param {Object} arg - Arg object.
367
- * @param {string} arg.id - Ticket ID for which feedbacks are to be fetched
368
- * @summary: Gets a list of feedback submitted against that ticket
369
- * @description: Gets a list of feedback submitted against that ticket
392
+ * @param {string} arg.id - Ticket ID for which history is to be fetched
393
+ * @returns {Promise<TicketHistoryList>} - Success response
394
+ * @summary: Gets history list for specific company level ticket
395
+ * @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
370
396
  */
371
- getFeedbacks({ id } = {}) {
372
- const { error } = LeadValidator.getFeedbacks().validate(
397
+ async getTicketHistory({ id } = {}) {
398
+ const { error } = LeadValidator.getTicketHistory().validate(
373
399
  {
374
400
  id,
375
401
  },
@@ -380,43 +406,89 @@ class Lead {
380
406
  }
381
407
 
382
408
  // Showing warrnings if extra unknown parameters are found
383
- const { error: warrning } = LeadValidator.getFeedbacks().validate(
409
+ const { error: warrning } = LeadValidator.getTicketHistory().validate(
384
410
  {
385
411
  id,
386
412
  },
387
413
  { abortEarly: false, allowUnknown: false }
388
414
  );
389
415
  if (warrning) {
390
- console.log("Parameter Validation warrnings for getFeedbacks");
391
- console.log(warrning);
416
+ Logger({
417
+ level: "WARN",
418
+ message: "Parameter Validation warrnings for getTicketHistory",
419
+ });
420
+ Logger({ level: "WARN", message: warrning });
392
421
  }
393
422
 
394
423
  const query_params = {};
395
424
 
396
425
  const xHeaders = {};
397
426
 
398
- return PlatformAPIClient.execute(
427
+ const response = await PlatformAPIClient.execute(
399
428
  this.config,
400
429
  "get",
401
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
430
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
402
431
  query_params,
403
432
  undefined,
404
433
  xHeaders
405
434
  );
435
+
436
+ const {
437
+ error: res_error,
438
+ } = LeadModel.TicketHistoryList().validate(response, {
439
+ abortEarly: false,
440
+ allowUnknown: false,
441
+ });
442
+
443
+ if (res_error) {
444
+ Logger({
445
+ level: "WARN",
446
+ message: "Response Validation Warnnings for getTicketHistory",
447
+ });
448
+ Logger({ level: "WARN", message: res_error });
449
+ }
450
+
451
+ return response;
406
452
  }
407
453
 
408
454
  /**
409
455
  * @param {Object} arg - Arg object.
410
- * @param {string} arg.id - Ticket ID for which feedback is to be submitted
411
- * @param {TicketFeedbackPayload} arg.body
412
- * @summary: Submit a response for feeback form against that ticket
413
- * @description: Submit a response for feeback form against that ticket
456
+ * @param {boolean} [arg.items] - Decides that the reponse will contain the
457
+ * list of tickets
458
+ * @param {boolean} [arg.filters] - Decides that the reponse will contain
459
+ * the ticket filters
460
+ * @param {string} [arg.q] - Search through ticket titles and description
461
+ * @param {string} [arg.status] - Filter tickets on status
462
+ * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
463
+ * @param {string} [arg.category] - Filter tickets on category
464
+ * @param {number} [arg.pageNo] - The page number to navigate through the
465
+ * given set of results.
466
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
467
+ * page. Default is 12.
468
+ * @returns {Promise<TicketList>} - Success response
469
+ * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
470
+ * @description: Gets the list of company level tickets and/or ticket filters
414
471
  */
415
- submitFeedback({ id, body } = {}) {
416
- const { error } = LeadValidator.submitFeedback().validate(
472
+ async getTickets({
473
+ items,
474
+ filters,
475
+ q,
476
+ status,
477
+ priority,
478
+ category,
479
+ pageNo,
480
+ pageSize,
481
+ } = {}) {
482
+ const { error } = LeadValidator.getTickets().validate(
417
483
  {
418
- id,
419
- body,
484
+ items,
485
+ filters,
486
+ q,
487
+ status,
488
+ priority,
489
+ category,
490
+ pageNo,
491
+ pageSize,
420
492
  },
421
493
  { abortEarly: false, allowUnknown: true }
422
494
  );
@@ -425,39 +497,121 @@ class Lead {
425
497
  }
426
498
 
427
499
  // Showing warrnings if extra unknown parameters are found
428
- const { error: warrning } = LeadValidator.submitFeedback().validate(
500
+ const { error: warrning } = LeadValidator.getTickets().validate(
429
501
  {
430
- id,
431
- body,
502
+ items,
503
+ filters,
504
+ q,
505
+ status,
506
+ priority,
507
+ category,
508
+ pageNo,
509
+ pageSize,
432
510
  },
433
511
  { abortEarly: false, allowUnknown: false }
434
512
  );
435
513
  if (warrning) {
436
- console.log("Parameter Validation warrnings for submitFeedback");
437
- console.log(warrning);
514
+ Logger({
515
+ level: "WARN",
516
+ message: "Parameter Validation warrnings for getTickets",
517
+ });
518
+ Logger({ level: "WARN", message: warrning });
438
519
  }
439
520
 
440
521
  const query_params = {};
522
+ query_params["items"] = items;
523
+ query_params["filters"] = filters;
524
+ query_params["q"] = q;
525
+ query_params["status"] = status;
526
+ query_params["priority"] = priority;
527
+ query_params["category"] = category;
528
+ query_params["page_no"] = pageNo;
529
+ query_params["page_size"] = pageSize;
441
530
 
442
531
  const xHeaders = {};
443
532
 
444
- return PlatformAPIClient.execute(
533
+ const response = await PlatformAPIClient.execute(
445
534
  this.config,
446
- "post",
447
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
535
+ "get",
536
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
448
537
  query_params,
449
- body,
538
+ undefined,
450
539
  xHeaders
451
540
  );
541
+
542
+ const { error: res_error } = LeadModel.TicketList().validate(response, {
543
+ abortEarly: false,
544
+ allowUnknown: false,
545
+ });
546
+
547
+ if (res_error) {
548
+ Logger({
549
+ level: "WARN",
550
+ message: "Response Validation Warnnings for getTickets",
551
+ });
552
+ Logger({ level: "WARN", message: res_error });
553
+ }
554
+
555
+ return response;
556
+ }
557
+
558
+ /**
559
+ * @param {Object} arg - Arg object.
560
+ * @param {boolean} [arg.items] - Decides that the reponse will contain the
561
+ * list of tickets
562
+ * @param {boolean} [arg.filters] - Decides that the reponse will contain
563
+ * the ticket filters
564
+ * @param {string} [arg.q] - Search through ticket titles and description
565
+ * @param {string} [arg.status] - Filter tickets on status
566
+ * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
567
+ * @param {string} [arg.category] - Filter tickets on category
568
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
569
+ * page. Default is 12.
570
+ * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
571
+ * @description: Gets the list of company level tickets and/or ticket filters
572
+ */
573
+ getTicketsPaginator({
574
+ items,
575
+ filters,
576
+ q,
577
+ status,
578
+ priority,
579
+ category,
580
+ pageSize,
581
+ } = {}) {
582
+ const paginator = new Paginator();
583
+ const callback = async () => {
584
+ const pageId = paginator.nextId;
585
+ const pageNo = paginator.pageNo;
586
+ const pageType = "number";
587
+ const data = await this.getTickets({
588
+ items: items,
589
+ filters: filters,
590
+ q: q,
591
+ status: status,
592
+ priority: priority,
593
+ category: category,
594
+ pageNo: pageNo,
595
+ pageSize: pageSize,
596
+ });
597
+ paginator.setPaginator({
598
+ hasNext: data.page.has_next ? true : false,
599
+ nextId: data.page.next_id,
600
+ });
601
+ return data;
602
+ };
603
+ paginator.setCallback(callback);
604
+ return paginator;
452
605
  }
453
606
 
454
607
  /**
455
608
  * @param {Object} arg - Arg object.
456
609
  * @param {string} arg.uniqueName - Unique name of video room
610
+ * @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
457
611
  * @summary: Get Token to join a specific Video Room using it's unqiue name
458
612
  * @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.
459
613
  */
460
- getTokenForVideoRoom({ uniqueName } = {}) {
614
+ async getTokenForVideoRoom({ uniqueName } = {}) {
461
615
  const { error } = LeadValidator.getTokenForVideoRoom().validate(
462
616
  {
463
617
  uniqueName,
@@ -476,15 +630,18 @@ class Lead {
476
630
  { abortEarly: false, allowUnknown: false }
477
631
  );
478
632
  if (warrning) {
479
- console.log("Parameter Validation warrnings for getTokenForVideoRoom");
480
- console.log(warrning);
633
+ Logger({
634
+ level: "WARN",
635
+ message: "Parameter Validation warrnings for getTokenForVideoRoom",
636
+ });
637
+ Logger({ level: "WARN", message: warrning });
481
638
  }
482
639
 
483
640
  const query_params = {};
484
641
 
485
642
  const xHeaders = {};
486
643
 
487
- return PlatformAPIClient.execute(
644
+ const response = await PlatformAPIClient.execute(
488
645
  this.config,
489
646
  "get",
490
647
  `/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/token`,
@@ -492,15 +649,33 @@ class Lead {
492
649
  undefined,
493
650
  xHeaders
494
651
  );
652
+
653
+ const {
654
+ error: res_error,
655
+ } = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
656
+ abortEarly: false,
657
+ allowUnknown: false,
658
+ });
659
+
660
+ if (res_error) {
661
+ Logger({
662
+ level: "WARN",
663
+ message: "Response Validation Warnnings for getTokenForVideoRoom",
664
+ });
665
+ Logger({ level: "WARN", message: res_error });
666
+ }
667
+
668
+ return response;
495
669
  }
496
670
 
497
671
  /**
498
672
  * @param {Object} arg - Arg object.
499
673
  * @param {string} arg.uniqueName - Unique name of Video Room
674
+ * @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
500
675
  * @summary: Get participants of a specific Video Room using it's unique name
501
676
  * @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.
502
677
  */
503
- getVideoParticipants({ uniqueName } = {}) {
678
+ async getVideoParticipants({ uniqueName } = {}) {
504
679
  const { error } = LeadValidator.getVideoParticipants().validate(
505
680
  {
506
681
  uniqueName,
@@ -519,15 +694,18 @@ class Lead {
519
694
  { abortEarly: false, allowUnknown: false }
520
695
  );
521
696
  if (warrning) {
522
- console.log("Parameter Validation warrnings for getVideoParticipants");
523
- console.log(warrning);
697
+ Logger({
698
+ level: "WARN",
699
+ message: "Parameter Validation warrnings for getVideoParticipants",
700
+ });
701
+ Logger({ level: "WARN", message: warrning });
524
702
  }
525
703
 
526
704
  const query_params = {};
527
705
 
528
706
  const xHeaders = {};
529
707
 
530
- return PlatformAPIClient.execute(
708
+ const response = await PlatformAPIClient.execute(
531
709
  this.config,
532
710
  "get",
533
711
  `/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/participants`,
@@ -535,16 +713,39 @@ class Lead {
535
713
  undefined,
536
714
  xHeaders
537
715
  );
716
+
717
+ const {
718
+ error: res_error,
719
+ } = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
720
+ abortEarly: false,
721
+ allowUnknown: false,
722
+ });
723
+
724
+ if (res_error) {
725
+ Logger({
726
+ level: "WARN",
727
+ message: "Response Validation Warnnings for getVideoParticipants",
728
+ });
729
+ Logger({ level: "WARN", message: res_error });
730
+ }
731
+
732
+ return response;
538
733
  }
539
734
 
540
735
  /**
541
736
  * @param {Object} arg - Arg object.
542
- * @summary: Get general support configuration.
543
- * @description: Get general support configuration.
737
+ * @param {string} arg.id - Ticket ID for which feedback is to be submitted
738
+ * @param {TicketFeedbackPayload} arg.body
739
+ * @returns {Promise<TicketFeedback>} - Success response
740
+ * @summary: Submit a response for feeback form against that ticket
741
+ * @description: Submit a response for feeback form against that ticket
544
742
  */
545
- getGeneralConfig({} = {}) {
546
- const { error } = LeadValidator.getGeneralConfig().validate(
547
- {},
743
+ async submitFeedback({ id, body } = {}) {
744
+ const { error } = LeadValidator.submitFeedback().validate(
745
+ {
746
+ id,
747
+ body,
748
+ },
548
749
  { abortEarly: false, allowUnknown: true }
549
750
  );
550
751
  if (error) {
@@ -552,27 +753,48 @@ class Lead {
552
753
  }
553
754
 
554
755
  // Showing warrnings if extra unknown parameters are found
555
- const { error: warrning } = LeadValidator.getGeneralConfig().validate(
556
- {},
756
+ const { error: warrning } = LeadValidator.submitFeedback().validate(
757
+ {
758
+ id,
759
+ body,
760
+ },
557
761
  { abortEarly: false, allowUnknown: false }
558
762
  );
559
763
  if (warrning) {
560
- console.log("Parameter Validation warrnings for getGeneralConfig");
561
- console.log(warrning);
764
+ Logger({
765
+ level: "WARN",
766
+ message: "Parameter Validation warrnings for submitFeedback",
767
+ });
768
+ Logger({ level: "WARN", message: warrning });
562
769
  }
563
770
 
564
771
  const query_params = {};
565
772
 
566
773
  const xHeaders = {};
567
774
 
568
- return PlatformAPIClient.execute(
775
+ const response = await PlatformAPIClient.execute(
569
776
  this.config,
570
- "get",
571
- `/service/platform/lead/v1.0/company/${this.config.companyId}/general-config`,
777
+ "post",
778
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
572
779
  query_params,
573
- undefined,
780
+ body,
574
781
  xHeaders
575
782
  );
783
+
784
+ const { error: res_error } = LeadModel.TicketFeedback().validate(response, {
785
+ abortEarly: false,
786
+ allowUnknown: false,
787
+ });
788
+
789
+ if (res_error) {
790
+ Logger({
791
+ level: "WARN",
792
+ message: "Response Validation Warnnings for submitFeedback",
793
+ });
794
+ Logger({ level: "WARN", message: res_error });
795
+ }
796
+
797
+ return response;
576
798
  }
577
799
  }
578
800