@gofynd/fdk-client-javascript 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  12. package/sdk/application/Cart/CartApplicationClient.js +595 -594
  13. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  14. package/sdk/application/Cart/CartApplicationModel.js +490 -885
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  16. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  17. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  18. package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
  19. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  20. package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
  21. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  22. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  23. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  24. package/sdk/application/Common/CommonApplicationClient.js +43 -42
  25. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  26. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  27. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  28. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  29. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  30. package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
  31. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  32. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  33. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  34. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  41. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  42. package/sdk/application/Content/ContentApplicationClient.js +216 -215
  43. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  44. package/sdk/application/Content/ContentApplicationModel.js +468 -884
  45. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  46. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  53. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  54. package/sdk/application/Lead/LeadApplicationClient.js +109 -108
  55. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  56. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  57. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  58. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  59. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
  60. package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
  61. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  62. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  63. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  64. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
  65. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  66. package/sdk/application/Order/OrderApplicationClient.js +247 -246
  67. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  68. package/sdk/application/Order/OrderApplicationModel.js +361 -656
  69. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  70. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  71. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  72. package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
  73. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  74. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  75. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  76. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  77. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  78. package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
  79. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  80. package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
  81. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  82. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
  85. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  86. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  87. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  88. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  89. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  90. package/sdk/application/Share/ShareApplicationClient.js +94 -93
  91. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  92. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  93. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  94. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  95. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  96. package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  98. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  99. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  100. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  101. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  102. package/sdk/application/User/UserApplicationClient.js +619 -618
  103. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  104. package/sdk/application/User/UserApplicationModel.js +440 -689
  105. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  106. package/sdk/application/User/UserApplicationValidator.js +89 -89
  107. package/sdk/common/AxiosHelper.js +18 -7
  108. package/sdk/constructUrl.d.ts +5 -0
  109. package/sdk/constructUrl.js +13 -0
  110. package/sdk/index.d.ts +3 -0
  111. package/sdk/index.js +5 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  119. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
  126. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  127. package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
  128. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  129. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  130. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  131. package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  137. package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  142. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
  143. package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
  146. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  147. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
  148. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  149. package/sdk/platform/Common/CommonPlatformClient.js +40 -51
  150. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  151. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  152. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  153. package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
  158. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  183. package/sdk/platform/Content/ContentPlatformModel.js +485 -907
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
  200. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  201. package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
  202. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  203. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  204. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  205. package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
  206. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  207. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
  208. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  209. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
  210. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  211. package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
  212. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  213. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  214. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  215. package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
  216. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  217. package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
  218. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
  220. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  221. package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
  222. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  223. package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
  224. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  225. package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
  226. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  227. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  228. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  229. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  230. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
  231. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
  232. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  233. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
  234. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  235. package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
  236. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  237. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  238. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  239. package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
  240. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  241. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  242. package/sdk/platform/PlatformClient.d.ts +7972 -7888
  243. package/sdk/platform/PlatformClient.js +8678 -10107
  244. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
  245. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
  246. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  247. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
  248. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  249. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  250. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  251. package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
  252. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  253. package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  255. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  261. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
  266. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  267. package/sdk/platform/User/UserPlatformModel.js +440 -689
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
  274. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  275. package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
  276. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  277. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  278. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  279. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  280. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  281. package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
  282. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  283. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  284. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  285. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  286. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  287. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  288. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  289. package/.github/workflows/on_create_release.yml +0 -23
  290. package/.github/workflows/on_merge_main.yml +0 -38
  291. package/.github/workflows/on_pull_request.yml +0 -35
  292. package/.prettierrc +0 -5
  293. package/documentation/application/CART.md +0 -7339
  294. package/documentation/application/CATALOG.md +0 -9597
  295. package/documentation/application/COMMON.md +0 -452
  296. package/documentation/application/COMMUNICATION.md +0 -467
  297. package/documentation/application/CONFIGURATION.md +0 -2906
  298. package/documentation/application/CONTENT.md +0 -3351
  299. package/documentation/application/FILESTORAGE.md +0 -578
  300. package/documentation/application/LEAD.md +0 -1895
  301. package/documentation/application/LOGISTIC.md +0 -765
  302. package/documentation/application/ORDER.md +0 -3432
  303. package/documentation/application/PAYMENT.md +0 -5221
  304. package/documentation/application/POSCART.md +0 -7938
  305. package/documentation/application/README.md +0 -21
  306. package/documentation/application/REWARDS.md +0 -708
  307. package/documentation/application/SHARE.md +0 -733
  308. package/documentation/application/THEME.md +0 -5800
  309. package/documentation/application/USER.md +0 -4335
  310. package/documentation/platform/ANALYTICS.md +0 -1154
  311. package/documentation/platform/AUDITTRAIL.md +0 -576
  312. package/documentation/platform/BILLING.md +0 -2400
  313. package/documentation/platform/CART.md +0 -5559
  314. package/documentation/platform/CATALOG.md +0 -23261
  315. package/documentation/platform/COMMON.md +0 -452
  316. package/documentation/platform/COMMUNICATION.md +0 -5718
  317. package/documentation/platform/COMPANYPROFILE.md +0 -2031
  318. package/documentation/platform/CONFIGURATION.md +0 -7339
  319. package/documentation/platform/CONTENT.md +0 -9098
  320. package/documentation/platform/DISCOUNT.md +0 -863
  321. package/documentation/platform/FILESTORAGE.md +0 -1081
  322. package/documentation/platform/INVENTORY.md +0 -1779
  323. package/documentation/platform/LEAD.md +0 -4740
  324. package/documentation/platform/ORDER.md +0 -8486
  325. package/documentation/platform/PARTNER.md +0 -220
  326. package/documentation/platform/PAYMENT.md +0 -3448
  327. package/documentation/platform/README.md +0 -27
  328. package/documentation/platform/REWARDS.md +0 -1083
  329. package/documentation/platform/SHARE.md +0 -606
  330. package/documentation/platform/THEME.md +0 -35729
  331. package/documentation/platform/USER.md +0 -2319
  332. package/documentation/platform/WEBHOOK.md +0 -591
  333. package/documentation/public/CONFIGURATION.md +0 -452
  334. package/documentation/public/INVENTORY.md +0 -690
  335. package/documentation/public/WEBHOOK.md +0 -352
  336. package/jest.config.d.ts +0 -4
  337. package/jest.config.js +0 -6
  338. package/tests/application/catalog.spec.js +0 -47
  339. package/tests/common/action-url.spec.js +0 -35
  340. package/tests/common/schema/action-url.json +0 -178
  341. package/tests/common/schema/url-action.json +0 -683
  342. package/tests/common/url-action.spec.js +0 -48
  343. package/tests/helpers/cookie.helper.js +0 -31
  344. package/tests/helpers/oauth.helper.js +0 -43
  345. package/tests/platform/catalog.spec.js +0 -49
  346. package/tests/public/location.spec.js +0 -39
@@ -1,9 +1,10 @@
1
- const Paginator = require("../../common/Paginator");
2
1
  const PlatformAPIClient = require("../PlatformAPIClient");
3
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
+ const Paginator = require("../../common/Paginator");
4
4
  const LeadValidator = require("./LeadPlatformApplicationValidator");
5
5
  const LeadModel = require("./LeadPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
+ const Joi = require("joi");
7
8
 
8
9
  class Lead {
9
10
  constructor(config, applicationId) {
@@ -13,27 +14,15 @@ class Lead {
13
14
 
14
15
  /**
15
16
  * @param {Object} arg - Arg object.
16
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
17
- * list of tickets
18
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
19
- * the ticket filters
20
- * @param {string} [arg.q] - Search through ticket titles and description
21
- * @param {string} [arg.status] - Filter tickets on status
22
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
23
- * @param {string} [arg.category] - Filter tickets on category
24
- * @returns {Promise<TicketList>} - Success response
25
- * @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
26
- * @description: Gets the list of Application level Tickets and/or ticket filters
17
+ * @param {string} arg.uniqueName - Unique name of Video Room
18
+ * @returns {Promise<CloseVideoRoomResponse>} - Success response
19
+ * @summary: Close the video room and force all participants to leave.
20
+ * @description: Close the video room and force all participants to leave.
27
21
  */
28
- async getTickets({ items, filters, q, status, priority, category } = {}) {
29
- const { error } = LeadValidator.getTickets().validate(
22
+ async closeVideoRoom({ uniqueName } = {}) {
23
+ const { error } = LeadValidator.closeVideoRoom().validate(
30
24
  {
31
- items,
32
- filters,
33
- q,
34
- status,
35
- priority,
36
- category,
25
+ uniqueName,
37
26
  },
38
27
  { abortEarly: false, allowUnknown: true }
39
28
  );
@@ -42,42 +31,33 @@ class Lead {
42
31
  }
43
32
 
44
33
  // Showing warrnings if extra unknown parameters are found
45
- const { error: warrning } = LeadValidator.getTickets().validate(
34
+ const { error: warrning } = LeadValidator.closeVideoRoom().validate(
46
35
  {
47
- items,
48
- filters,
49
- q,
50
- status,
51
- priority,
52
- category,
36
+ uniqueName,
53
37
  },
54
38
  { abortEarly: false, allowUnknown: false }
55
39
  );
56
40
  if (warrning) {
57
41
  Logger({
58
42
  level: "WARN",
59
- message: "Parameter Validation warrnings for getTickets",
43
+ message: "Parameter Validation warrnings for closeVideoRoom",
60
44
  });
61
45
  Logger({ level: "WARN", message: warrning });
62
46
  }
63
47
 
64
48
  const query_params = {};
65
- query_params["items"] = items;
66
- query_params["filters"] = filters;
67
- query_params["q"] = q;
68
- query_params["status"] = status;
69
- query_params["priority"] = priority;
70
- query_params["category"] = category;
71
49
 
72
50
  const response = await PlatformAPIClient.execute(
73
51
  this.config,
74
- "get",
75
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
52
+ "delete",
53
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
76
54
  query_params,
77
55
  undefined
78
56
  );
79
57
 
80
- const { error: res_error } = LeadModel.TicketList().validate(response, {
58
+ const {
59
+ error: res_error,
60
+ } = LeadModel.CloseVideoRoomResponse().validate(response, {
81
61
  abortEarly: false,
82
62
  allowUnknown: false,
83
63
  });
@@ -85,7 +65,7 @@ class Lead {
85
65
  if (res_error) {
86
66
  Logger({
87
67
  level: "WARN",
88
- message: "Response Validation Warnnings for getTickets",
68
+ message: "Response Validation Warnnings for closeVideoRoom",
89
69
  });
90
70
  Logger({ level: "WARN", message: res_error });
91
71
  }
@@ -95,15 +75,15 @@ class Lead {
95
75
 
96
76
  /**
97
77
  * @param {Object} arg - Arg object.
98
- * @param {string} arg.id - Tiket ID of the ticket to be fetched
99
- * @returns {Promise<Ticket>} - Success response
100
- * @summary: Retreives ticket details of a application level ticket
101
- * @description: Retreives ticket details of a application level ticket with ticket ID
78
+ * @param {CreateCustomFormPayload} arg.body
79
+ * @returns {Promise<CustomForm>} - Success response
80
+ * @summary: Creates a new custom form
81
+ * @description: Creates a new custom form for given application
102
82
  */
103
- async getTicket({ id } = {}) {
104
- const { error } = LeadValidator.getTicket().validate(
83
+ async createCustomForm({ body } = {}) {
84
+ const { error } = LeadValidator.createCustomForm().validate(
105
85
  {
106
- id,
86
+ body,
107
87
  },
108
88
  { abortEarly: false, allowUnknown: true }
109
89
  );
@@ -112,16 +92,16 @@ class Lead {
112
92
  }
113
93
 
114
94
  // Showing warrnings if extra unknown parameters are found
115
- const { error: warrning } = LeadValidator.getTicket().validate(
95
+ const { error: warrning } = LeadValidator.createCustomForm().validate(
116
96
  {
117
- id,
97
+ body,
118
98
  },
119
99
  { abortEarly: false, allowUnknown: false }
120
100
  );
121
101
  if (warrning) {
122
102
  Logger({
123
103
  level: "WARN",
124
- message: "Parameter Validation warrnings for getTicket",
104
+ message: "Parameter Validation warrnings for createCustomForm",
125
105
  });
126
106
  Logger({ level: "WARN", message: warrning });
127
107
  }
@@ -130,13 +110,13 @@ class Lead {
130
110
 
131
111
  const response = await PlatformAPIClient.execute(
132
112
  this.config,
133
- "get",
134
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
113
+ "post",
114
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
135
115
  query_params,
136
- undefined
116
+ body
137
117
  );
138
118
 
139
- const { error: res_error } = LeadModel.Ticket().validate(response, {
119
+ const { error: res_error } = LeadModel.CustomForm().validate(response, {
140
120
  abortEarly: false,
141
121
  allowUnknown: false,
142
122
  });
@@ -144,7 +124,7 @@ class Lead {
144
124
  if (res_error) {
145
125
  Logger({
146
126
  level: "WARN",
147
- message: "Response Validation Warnnings for getTicket",
127
+ message: "Response Validation Warnnings for createCustomForm",
148
128
  });
149
129
  Logger({ level: "WARN", message: res_error });
150
130
  }
@@ -154,14 +134,14 @@ class Lead {
154
134
 
155
135
  /**
156
136
  * @param {Object} arg - Arg object.
157
- * @param {string} arg.id - Ticket ID of ticket to be edited
158
- * @param {EditTicketPayload} arg.body
159
- * @returns {Promise<Ticket>} - Success response
160
- * @summary: Edits ticket details of a application level ticket
161
- * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
137
+ * @param {string} arg.id - Ticket ID for which history is created
138
+ * @param {TicketHistoryPayload} arg.body
139
+ * @returns {Promise<TicketHistory>} - Success response
140
+ * @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.
162
142
  */
163
- async editTicket({ id, body } = {}) {
164
- const { error } = LeadValidator.editTicket().validate(
143
+ async createHistory({ id, body } = {}) {
144
+ const { error } = LeadValidator.createHistory().validate(
165
145
  {
166
146
  id,
167
147
  body,
@@ -173,7 +153,7 @@ class Lead {
173
153
  }
174
154
 
175
155
  // Showing warrnings if extra unknown parameters are found
176
- const { error: warrning } = LeadValidator.editTicket().validate(
156
+ const { error: warrning } = LeadValidator.createHistory().validate(
177
157
  {
178
158
  id,
179
159
  body,
@@ -183,7 +163,7 @@ class Lead {
183
163
  if (warrning) {
184
164
  Logger({
185
165
  level: "WARN",
186
- message: "Parameter Validation warrnings for editTicket",
166
+ message: "Parameter Validation warrnings for createHistory",
187
167
  });
188
168
  Logger({ level: "WARN", message: warrning });
189
169
  }
@@ -192,13 +172,13 @@ class Lead {
192
172
 
193
173
  const response = await PlatformAPIClient.execute(
194
174
  this.config,
195
- "put",
196
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
175
+ "post",
176
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
197
177
  query_params,
198
178
  body
199
179
  );
200
180
 
201
- const { error: res_error } = LeadModel.Ticket().validate(response, {
181
+ const { error: res_error } = LeadModel.TicketHistory().validate(response, {
202
182
  abortEarly: false,
203
183
  allowUnknown: false,
204
184
  });
@@ -206,7 +186,7 @@ class Lead {
206
186
  if (res_error) {
207
187
  Logger({
208
188
  level: "WARN",
209
- message: "Response Validation Warnnings for editTicket",
189
+ message: "Response Validation Warnnings for createHistory",
210
190
  });
211
191
  Logger({ level: "WARN", message: res_error });
212
192
  }
@@ -216,16 +196,16 @@ class Lead {
216
196
 
217
197
  /**
218
198
  * @param {Object} arg - Arg object.
219
- * @param {string} arg.id - Ticket ID for which history is created
220
- * @param {TicketHistoryPayload} arg.body
221
- * @returns {Promise<TicketHistory>} - Success response
222
- * @summary: Create history for specific application level ticket
223
- * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
199
+ * @param {string} arg.slug - Slug of form whose response is getting submitted
200
+ * @param {EditCustomFormPayload} arg.body
201
+ * @returns {Promise<CustomForm>} - Success response
202
+ * @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.
224
204
  */
225
- async createHistory({ id, body } = {}) {
226
- const { error } = LeadValidator.createHistory().validate(
205
+ async editCustomForm({ slug, body } = {}) {
206
+ const { error } = LeadValidator.editCustomForm().validate(
227
207
  {
228
- id,
208
+ slug,
229
209
  body,
230
210
  },
231
211
  { abortEarly: false, allowUnknown: true }
@@ -235,9 +215,9 @@ class Lead {
235
215
  }
236
216
 
237
217
  // Showing warrnings if extra unknown parameters are found
238
- const { error: warrning } = LeadValidator.createHistory().validate(
218
+ const { error: warrning } = LeadValidator.editCustomForm().validate(
239
219
  {
240
- id,
220
+ slug,
241
221
  body,
242
222
  },
243
223
  { abortEarly: false, allowUnknown: false }
@@ -245,7 +225,7 @@ class Lead {
245
225
  if (warrning) {
246
226
  Logger({
247
227
  level: "WARN",
248
- message: "Parameter Validation warrnings for createHistory",
228
+ message: "Parameter Validation warrnings for editCustomForm",
249
229
  });
250
230
  Logger({ level: "WARN", message: warrning });
251
231
  }
@@ -254,13 +234,13 @@ class Lead {
254
234
 
255
235
  const response = await PlatformAPIClient.execute(
256
236
  this.config,
257
- "post",
258
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
237
+ "put",
238
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
259
239
  query_params,
260
240
  body
261
241
  );
262
242
 
263
- const { error: res_error } = LeadModel.TicketHistory().validate(response, {
243
+ const { error: res_error } = LeadModel.CustomForm().validate(response, {
264
244
  abortEarly: false,
265
245
  allowUnknown: false,
266
246
  });
@@ -268,7 +248,7 @@ class Lead {
268
248
  if (res_error) {
269
249
  Logger({
270
250
  level: "WARN",
271
- message: "Response Validation Warnnings for createHistory",
251
+ message: "Response Validation Warnnings for editCustomForm",
272
252
  });
273
253
  Logger({ level: "WARN", message: res_error });
274
254
  }
@@ -278,15 +258,17 @@ class Lead {
278
258
 
279
259
  /**
280
260
  * @param {Object} arg - Arg object.
281
- * @param {string} arg.id - Ticket ID for which history is to be fetched
282
- * @returns {Promise<TicketHistoryList>} - Success response
283
- * @summary: Gets history list for specific application level ticket
284
- * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
261
+ * @param {string} arg.id - Ticket ID of ticket to be edited
262
+ * @param {EditTicketPayload} arg.body
263
+ * @returns {Promise<Ticket>} - Success response
264
+ * @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
285
266
  */
286
- async getTicketHistory({ id } = {}) {
287
- const { error } = LeadValidator.getTicketHistory().validate(
267
+ async editTicket({ id, body } = {}) {
268
+ const { error } = LeadValidator.editTicket().validate(
288
269
  {
289
270
  id,
271
+ body,
290
272
  },
291
273
  { abortEarly: false, allowUnknown: true }
292
274
  );
@@ -295,16 +277,17 @@ class Lead {
295
277
  }
296
278
 
297
279
  // Showing warrnings if extra unknown parameters are found
298
- const { error: warrning } = LeadValidator.getTicketHistory().validate(
280
+ const { error: warrning } = LeadValidator.editTicket().validate(
299
281
  {
300
282
  id,
283
+ body,
301
284
  },
302
285
  { abortEarly: false, allowUnknown: false }
303
286
  );
304
287
  if (warrning) {
305
288
  Logger({
306
289
  level: "WARN",
307
- message: "Parameter Validation warrnings for getTicketHistory",
290
+ message: "Parameter Validation warrnings for editTicket",
308
291
  });
309
292
  Logger({ level: "WARN", message: warrning });
310
293
  }
@@ -313,15 +296,13 @@ class Lead {
313
296
 
314
297
  const response = await PlatformAPIClient.execute(
315
298
  this.config,
316
- "get",
317
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
299
+ "put",
300
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
318
301
  query_params,
319
- undefined
302
+ body
320
303
  );
321
304
 
322
- const {
323
- error: res_error,
324
- } = LeadModel.TicketHistoryList().validate(response, {
305
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
325
306
  abortEarly: false,
326
307
  allowUnknown: false,
327
308
  });
@@ -329,7 +310,7 @@ class Lead {
329
310
  if (res_error) {
330
311
  Logger({
331
312
  level: "WARN",
332
- message: "Response Validation Warnnings for getTicketHistory",
313
+ message: "Response Validation Warnnings for editTicket",
333
314
  });
334
315
  Logger({ level: "WARN", message: res_error });
335
316
  }
@@ -398,18 +379,13 @@ class Lead {
398
379
 
399
380
  /**
400
381
  * @param {Object} arg - Arg object.
401
- * @param {string} arg.slug - Slug of form whose response is getting submitted
402
- * @param {EditCustomFormPayload} arg.body
403
- * @returns {Promise<CustomForm>} - Success response
404
- * @summary: Edit the given custom form
405
- * @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
382
+ * @returns {Promise<CustomFormList>} - Success response
383
+ * @summary: Get list of custom form
384
+ * @description: Get list of custom form for given application
406
385
  */
407
- async editCustomForm({ slug, body } = {}) {
408
- const { error } = LeadValidator.editCustomForm().validate(
409
- {
410
- slug,
411
- body,
412
- },
386
+ async getCustomForms({} = {}) {
387
+ const { error } = LeadValidator.getCustomForms().validate(
388
+ {},
413
389
  { abortEarly: false, allowUnknown: true }
414
390
  );
415
391
  if (error) {
@@ -417,17 +393,14 @@ class Lead {
417
393
  }
418
394
 
419
395
  // Showing warrnings if extra unknown parameters are found
420
- const { error: warrning } = LeadValidator.editCustomForm().validate(
421
- {
422
- slug,
423
- body,
424
- },
396
+ const { error: warrning } = LeadValidator.getCustomForms().validate(
397
+ {},
425
398
  { abortEarly: false, allowUnknown: false }
426
399
  );
427
400
  if (warrning) {
428
401
  Logger({
429
402
  level: "WARN",
430
- message: "Parameter Validation warrnings for editCustomForm",
403
+ message: "Parameter Validation warrnings for getCustomForms",
431
404
  });
432
405
  Logger({ level: "WARN", message: warrning });
433
406
  }
@@ -436,13 +409,13 @@ class Lead {
436
409
 
437
410
  const response = await PlatformAPIClient.execute(
438
411
  this.config,
439
- "put",
440
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
412
+ "get",
413
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
441
414
  query_params,
442
- body
415
+ undefined
443
416
  );
444
417
 
445
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
418
+ const { error: res_error } = LeadModel.CustomFormList().validate(response, {
446
419
  abortEarly: false,
447
420
  allowUnknown: false,
448
421
  });
@@ -450,7 +423,7 @@ class Lead {
450
423
  if (res_error) {
451
424
  Logger({
452
425
  level: "WARN",
453
- message: "Response Validation Warnnings for editCustomForm",
426
+ message: "Response Validation Warnnings for getCustomForms",
454
427
  });
455
428
  Logger({ level: "WARN", message: res_error });
456
429
  }
@@ -460,13 +433,16 @@ class Lead {
460
433
 
461
434
  /**
462
435
  * @param {Object} arg - Arg object.
463
- * @returns {Promise<CustomFormList>} - Success response
464
- * @summary: Get list of custom form
465
- * @description: Get list of custom form for given application
436
+ * @param {string} arg.id - Tiket ID of the ticket to be fetched
437
+ * @returns {Promise<Ticket>} - Success response
438
+ * @summary: Retreives ticket details of a application level ticket
439
+ * @description: Retreives ticket details of a application level ticket with ticket ID
466
440
  */
467
- async getCustomForms({} = {}) {
468
- const { error } = LeadValidator.getCustomForms().validate(
469
- {},
441
+ async getTicket({ id } = {}) {
442
+ const { error } = LeadValidator.getTicket().validate(
443
+ {
444
+ id,
445
+ },
470
446
  { abortEarly: false, allowUnknown: true }
471
447
  );
472
448
  if (error) {
@@ -474,14 +450,16 @@ class Lead {
474
450
  }
475
451
 
476
452
  // Showing warrnings if extra unknown parameters are found
477
- const { error: warrning } = LeadValidator.getCustomForms().validate(
478
- {},
453
+ const { error: warrning } = LeadValidator.getTicket().validate(
454
+ {
455
+ id,
456
+ },
479
457
  { abortEarly: false, allowUnknown: false }
480
458
  );
481
459
  if (warrning) {
482
460
  Logger({
483
461
  level: "WARN",
484
- message: "Parameter Validation warrnings for getCustomForms",
462
+ message: "Parameter Validation warrnings for getTicket",
485
463
  });
486
464
  Logger({ level: "WARN", message: warrning });
487
465
  }
@@ -491,12 +469,12 @@ class Lead {
491
469
  const response = await PlatformAPIClient.execute(
492
470
  this.config,
493
471
  "get",
494
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
472
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
495
473
  query_params,
496
474
  undefined
497
475
  );
498
476
 
499
- const { error: res_error } = LeadModel.CustomFormList().validate(response, {
477
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
500
478
  abortEarly: false,
501
479
  allowUnknown: false,
502
480
  });
@@ -504,7 +482,7 @@ class Lead {
504
482
  if (res_error) {
505
483
  Logger({
506
484
  level: "WARN",
507
- message: "Response Validation Warnnings for getCustomForms",
485
+ message: "Response Validation Warnnings for getTicket",
508
486
  });
509
487
  Logger({ level: "WARN", message: res_error });
510
488
  }
@@ -514,15 +492,15 @@ class Lead {
514
492
 
515
493
  /**
516
494
  * @param {Object} arg - Arg object.
517
- * @param {CreateCustomFormPayload} arg.body
518
- * @returns {Promise<CustomForm>} - Success response
519
- * @summary: Creates a new custom form
520
- * @description: Creates a new custom form for given application
495
+ * @param {string} arg.id - Ticket ID for which history is to be fetched
496
+ * @returns {Promise<TicketHistoryList>} - Success response
497
+ * @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.
521
499
  */
522
- async createCustomForm({ body } = {}) {
523
- const { error } = LeadValidator.createCustomForm().validate(
500
+ async getTicketHistory({ id } = {}) {
501
+ const { error } = LeadValidator.getTicketHistory().validate(
524
502
  {
525
- body,
503
+ id,
526
504
  },
527
505
  { abortEarly: false, allowUnknown: true }
528
506
  );
@@ -531,16 +509,16 @@ class Lead {
531
509
  }
532
510
 
533
511
  // Showing warrnings if extra unknown parameters are found
534
- const { error: warrning } = LeadValidator.createCustomForm().validate(
512
+ const { error: warrning } = LeadValidator.getTicketHistory().validate(
535
513
  {
536
- body,
514
+ id,
537
515
  },
538
516
  { abortEarly: false, allowUnknown: false }
539
517
  );
540
518
  if (warrning) {
541
519
  Logger({
542
520
  level: "WARN",
543
- message: "Parameter Validation warrnings for createCustomForm",
521
+ message: "Parameter Validation warrnings for getTicketHistory",
544
522
  });
545
523
  Logger({ level: "WARN", message: warrning });
546
524
  }
@@ -549,13 +527,15 @@ class Lead {
549
527
 
550
528
  const response = await PlatformAPIClient.execute(
551
529
  this.config,
552
- "post",
553
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
530
+ "get",
531
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
554
532
  query_params,
555
- body
533
+ undefined
556
534
  );
557
535
 
558
- const { error: res_error } = LeadModel.CustomForm().validate(response, {
536
+ const {
537
+ error: res_error,
538
+ } = LeadModel.TicketHistoryList().validate(response, {
559
539
  abortEarly: false,
560
540
  allowUnknown: false,
561
541
  });
@@ -563,7 +543,7 @@ class Lead {
563
543
  if (res_error) {
564
544
  Logger({
565
545
  level: "WARN",
566
- message: "Response Validation Warnnings for createCustomForm",
546
+ message: "Response Validation Warnnings for getTicketHistory",
567
547
  });
568
548
  Logger({ level: "WARN", message: res_error });
569
549
  }
@@ -573,15 +553,27 @@ class Lead {
573
553
 
574
554
  /**
575
555
  * @param {Object} arg - Arg object.
576
- * @param {string} arg.uniqueName - Unique name of video room
577
- * @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
578
- * @summary: Get Token to join a specific Video Room using it's unqiue name
579
- * @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.
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
565
+ * @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
580
567
  */
581
- async getTokenForVideoRoom({ uniqueName } = {}) {
582
- const { error } = LeadValidator.getTokenForVideoRoom().validate(
568
+ async getTickets({ items, filters, q, status, priority, category } = {}) {
569
+ const { error } = LeadValidator.getTickets().validate(
583
570
  {
584
- uniqueName,
571
+ items,
572
+ filters,
573
+ q,
574
+ status,
575
+ priority,
576
+ category,
585
577
  },
586
578
  { abortEarly: false, allowUnknown: true }
587
579
  );
@@ -590,33 +582,42 @@ class Lead {
590
582
  }
591
583
 
592
584
  // Showing warrnings if extra unknown parameters are found
593
- const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
585
+ const { error: warrning } = LeadValidator.getTickets().validate(
594
586
  {
595
- uniqueName,
587
+ items,
588
+ filters,
589
+ q,
590
+ status,
591
+ priority,
592
+ category,
596
593
  },
597
594
  { abortEarly: false, allowUnknown: false }
598
595
  );
599
596
  if (warrning) {
600
597
  Logger({
601
598
  level: "WARN",
602
- message: "Parameter Validation warrnings for getTokenForVideoRoom",
599
+ message: "Parameter Validation warrnings for getTickets",
603
600
  });
604
601
  Logger({ level: "WARN", message: warrning });
605
602
  }
606
603
 
607
604
  const query_params = {};
605
+ query_params["items"] = items;
606
+ query_params["filters"] = filters;
607
+ query_params["q"] = q;
608
+ query_params["status"] = status;
609
+ query_params["priority"] = priority;
610
+ query_params["category"] = category;
608
611
 
609
612
  const response = await PlatformAPIClient.execute(
610
613
  this.config,
611
614
  "get",
612
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
615
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
613
616
  query_params,
614
617
  undefined
615
618
  );
616
619
 
617
- const {
618
- error: res_error,
619
- } = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
620
+ const { error: res_error } = LeadModel.TicketList().validate(response, {
620
621
  abortEarly: false,
621
622
  allowUnknown: false,
622
623
  });
@@ -624,7 +625,7 @@ class Lead {
624
625
  if (res_error) {
625
626
  Logger({
626
627
  level: "WARN",
627
- message: "Response Validation Warnnings for getTokenForVideoRoom",
628
+ message: "Response Validation Warnnings for getTickets",
628
629
  });
629
630
  Logger({ level: "WARN", message: res_error });
630
631
  }
@@ -634,13 +635,13 @@ class Lead {
634
635
 
635
636
  /**
636
637
  * @param {Object} arg - Arg object.
637
- * @param {string} arg.uniqueName - Unique name of Video Room
638
- * @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
639
- * @summary: Get participants of a specific Video Room using it's unique name
640
- * @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.
638
+ * @param {string} arg.uniqueName - Unique name of video room
639
+ * @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
640
+ * @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.
641
642
  */
642
- async getVideoParticipants({ uniqueName } = {}) {
643
- const { error } = LeadValidator.getVideoParticipants().validate(
643
+ async getTokenForVideoRoom({ uniqueName } = {}) {
644
+ const { error } = LeadValidator.getTokenForVideoRoom().validate(
644
645
  {
645
646
  uniqueName,
646
647
  },
@@ -651,7 +652,7 @@ class Lead {
651
652
  }
652
653
 
653
654
  // Showing warrnings if extra unknown parameters are found
654
- const { error: warrning } = LeadValidator.getVideoParticipants().validate(
655
+ const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
655
656
  {
656
657
  uniqueName,
657
658
  },
@@ -660,7 +661,7 @@ class Lead {
660
661
  if (warrning) {
661
662
  Logger({
662
663
  level: "WARN",
663
- message: "Parameter Validation warrnings for getVideoParticipants",
664
+ message: "Parameter Validation warrnings for getTokenForVideoRoom",
664
665
  });
665
666
  Logger({ level: "WARN", message: warrning });
666
667
  }
@@ -670,14 +671,14 @@ class Lead {
670
671
  const response = await PlatformAPIClient.execute(
671
672
  this.config,
672
673
  "get",
673
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
674
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
674
675
  query_params,
675
676
  undefined
676
677
  );
677
678
 
678
679
  const {
679
680
  error: res_error,
680
- } = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
681
+ } = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
681
682
  abortEarly: false,
682
683
  allowUnknown: false,
683
684
  });
@@ -685,7 +686,7 @@ class Lead {
685
686
  if (res_error) {
686
687
  Logger({
687
688
  level: "WARN",
688
- message: "Response Validation Warnnings for getVideoParticipants",
689
+ message: "Response Validation Warnnings for getTokenForVideoRoom",
689
690
  });
690
691
  Logger({ level: "WARN", message: res_error });
691
692
  }
@@ -695,15 +696,15 @@ class Lead {
695
696
 
696
697
  /**
697
698
  * @param {Object} arg - Arg object.
698
- * @param {CreateVideoRoomPayload} arg.body
699
- * @returns {Promise<CreateVideoRoomResponse>} - Success response
700
- * @summary: Open a video room.
701
- * @description: Open a video room.
699
+ * @param {string} arg.uniqueName - Unique name of Video Room
700
+ * @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
701
+ * @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.
702
703
  */
703
- async openVideoRoom({ body } = {}) {
704
- const { error } = LeadValidator.openVideoRoom().validate(
704
+ async getVideoParticipants({ uniqueName } = {}) {
705
+ const { error } = LeadValidator.getVideoParticipants().validate(
705
706
  {
706
- body,
707
+ uniqueName,
707
708
  },
708
709
  { abortEarly: false, allowUnknown: true }
709
710
  );
@@ -712,16 +713,16 @@ class Lead {
712
713
  }
713
714
 
714
715
  // Showing warrnings if extra unknown parameters are found
715
- const { error: warrning } = LeadValidator.openVideoRoom().validate(
716
+ const { error: warrning } = LeadValidator.getVideoParticipants().validate(
716
717
  {
717
- body,
718
+ uniqueName,
718
719
  },
719
720
  { abortEarly: false, allowUnknown: false }
720
721
  );
721
722
  if (warrning) {
722
723
  Logger({
723
724
  level: "WARN",
724
- message: "Parameter Validation warrnings for openVideoRoom",
725
+ message: "Parameter Validation warrnings for getVideoParticipants",
725
726
  });
726
727
  Logger({ level: "WARN", message: warrning });
727
728
  }
@@ -730,15 +731,15 @@ class Lead {
730
731
 
731
732
  const response = await PlatformAPIClient.execute(
732
733
  this.config,
733
- "post",
734
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
734
+ "get",
735
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
735
736
  query_params,
736
- body
737
+ undefined
737
738
  );
738
739
 
739
740
  const {
740
741
  error: res_error,
741
- } = LeadModel.CreateVideoRoomResponse().validate(response, {
742
+ } = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
742
743
  abortEarly: false,
743
744
  allowUnknown: false,
744
745
  });
@@ -746,7 +747,7 @@ class Lead {
746
747
  if (res_error) {
747
748
  Logger({
748
749
  level: "WARN",
749
- message: "Response Validation Warnnings for openVideoRoom",
750
+ message: "Response Validation Warnnings for getVideoParticipants",
750
751
  });
751
752
  Logger({ level: "WARN", message: res_error });
752
753
  }
@@ -756,15 +757,15 @@ class Lead {
756
757
 
757
758
  /**
758
759
  * @param {Object} arg - Arg object.
759
- * @param {string} arg.uniqueName - Unique name of Video Room
760
- * @returns {Promise<CloseVideoRoomResponse>} - Success response
761
- * @summary: Close the video room and force all participants to leave.
762
- * @description: Close the video room and force all participants to leave.
760
+ * @param {CreateVideoRoomPayload} arg.body
761
+ * @returns {Promise<CreateVideoRoomResponse>} - Success response
762
+ * @summary: Open a video room.
763
+ * @description: Open a video room.
763
764
  */
764
- async closeVideoRoom({ uniqueName } = {}) {
765
- const { error } = LeadValidator.closeVideoRoom().validate(
765
+ async openVideoRoom({ body } = {}) {
766
+ const { error } = LeadValidator.openVideoRoom().validate(
766
767
  {
767
- uniqueName,
768
+ body,
768
769
  },
769
770
  { abortEarly: false, allowUnknown: true }
770
771
  );
@@ -773,16 +774,16 @@ class Lead {
773
774
  }
774
775
 
775
776
  // Showing warrnings if extra unknown parameters are found
776
- const { error: warrning } = LeadValidator.closeVideoRoom().validate(
777
+ const { error: warrning } = LeadValidator.openVideoRoom().validate(
777
778
  {
778
- uniqueName,
779
+ body,
779
780
  },
780
781
  { abortEarly: false, allowUnknown: false }
781
782
  );
782
783
  if (warrning) {
783
784
  Logger({
784
785
  level: "WARN",
785
- message: "Parameter Validation warrnings for closeVideoRoom",
786
+ message: "Parameter Validation warrnings for openVideoRoom",
786
787
  });
787
788
  Logger({ level: "WARN", message: warrning });
788
789
  }
@@ -791,15 +792,15 @@ class Lead {
791
792
 
792
793
  const response = await PlatformAPIClient.execute(
793
794
  this.config,
794
- "delete",
795
- `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
795
+ "post",
796
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
796
797
  query_params,
797
- undefined
798
+ body
798
799
  );
799
800
 
800
801
  const {
801
802
  error: res_error,
802
- } = LeadModel.CloseVideoRoomResponse().validate(response, {
803
+ } = LeadModel.CreateVideoRoomResponse().validate(response, {
803
804
  abortEarly: false,
804
805
  allowUnknown: false,
805
806
  });
@@ -807,7 +808,7 @@ class Lead {
807
808
  if (res_error) {
808
809
  Logger({
809
810
  level: "WARN",
810
- message: "Response Validation Warnnings for closeVideoRoom",
811
+ message: "Response Validation Warnnings for openVideoRoom",
811
812
  });
812
813
  Logger({ level: "WARN", message: res_error });
813
814
  }
@@ -815,4 +816,5 @@ class Lead {
815
816
  return response;
816
817
  }
817
818
  }
819
+
818
820
  module.exports = Lead;