@gofynd/fdk-client-javascript 1.0.2 → 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 (310) 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 +557 -1279
  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 +14453 -17192
  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 +3438 -4172
  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 +3400 -5361
  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/Cart/CartApplicationClient.d.ts +243 -243
  44. package/sdk/application/Cart/CartApplicationClient.js +567 -567
  45. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  46. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  47. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  48. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  49. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  50. package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
  51. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  52. package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
  53. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  54. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  55. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  56. package/sdk/application/Common/CommonApplicationClient.js +38 -38
  57. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  58. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  59. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  60. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  61. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  62. package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
  63. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  64. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  65. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  66. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  67. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
  69. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  71. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  73. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  74. package/sdk/application/Content/ContentApplicationClient.js +191 -191
  75. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  76. package/sdk/application/Content/ContentApplicationModel.js +467 -884
  77. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  78. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  79. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
  81. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  83. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  85. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  86. package/sdk/application/Lead/LeadApplicationClient.js +100 -100
  87. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  88. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  89. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  90. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  91. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  92. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
  93. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  94. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  95. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  96. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  97. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  98. package/sdk/application/Order/OrderApplicationClient.js +232 -232
  99. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  100. package/sdk/application/Order/OrderApplicationModel.js +352 -656
  101. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  102. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  103. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  104. package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
  105. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  106. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  107. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  108. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  109. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  110. package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
  111. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  112. package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
  113. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  114. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  115. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  116. package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
  117. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  118. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  119. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  120. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  121. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  122. package/sdk/application/Share/ShareApplicationClient.js +84 -84
  123. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  124. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  125. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  126. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  127. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  128. package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
  129. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  130. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  131. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  132. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  133. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  134. package/sdk/application/User/UserApplicationClient.js +581 -581
  135. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  136. package/sdk/application/User/UserApplicationModel.js +440 -689
  137. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  138. package/sdk/application/User/UserApplicationValidator.js +89 -89
  139. package/sdk/common/AxiosHelper.js +1 -1
  140. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  144. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  145. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  146. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  147. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
  148. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  152. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  153. package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
  154. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  155. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  156. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  157. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  158. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
  159. package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
  160. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  161. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  162. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  163. package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
  164. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  165. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
  166. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
  168. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
  169. package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
  170. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  171. package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
  172. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  173. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
  174. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  175. package/sdk/platform/Common/CommonPlatformClient.js +41 -41
  176. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  177. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  178. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  179. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  180. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  181. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
  182. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  184. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  185. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  186. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  187. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
  188. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  189. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  190. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  192. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  193. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
  194. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  195. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  196. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  197. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
  198. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  199. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  200. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  201. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  202. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
  203. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
  204. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
  205. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
  206. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  207. package/sdk/platform/Content/ContentPlatformModel.js +484 -907
  208. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  209. package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
  210. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  211. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  212. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  213. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  214. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
  215. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
  216. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  217. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  218. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
  219. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
  220. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  221. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  222. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  223. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  224. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  225. package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
  226. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  227. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  228. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  229. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  230. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  231. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
  232. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  233. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  234. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  235. package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
  236. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  237. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  238. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  239. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  240. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  241. package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
  242. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  243. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  244. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  245. package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
  246. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  247. package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
  248. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  249. package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
  250. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  251. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  252. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
  253. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
  254. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  255. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  256. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  257. package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
  258. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  259. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  260. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  261. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  262. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  263. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  264. package/sdk/platform/PlatformClient.d.ts +7965 -7885
  265. package/sdk/platform/PlatformClient.js +8672 -10105
  266. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  270. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  271. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  272. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  273. package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
  274. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  275. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  276. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  277. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  278. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  279. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
  280. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  281. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  282. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  283. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  284. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  285. package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
  286. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  287. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  288. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  289. package/sdk/platform/User/UserPlatformModel.js +440 -689
  290. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  291. package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
  292. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  293. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  294. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  295. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  296. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  297. package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
  298. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  299. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  300. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  301. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  302. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  303. package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
  304. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  305. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  306. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  307. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  308. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  309. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  310. package/tests/application/catalog.spec.js +7 -0
@@ -12,42 +12,17 @@ class Lead {
12
12
 
13
13
  /**
14
14
  * @param {Object} arg - Arg object.
15
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
16
- * list of tickets
17
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
18
- * the ticket filters
19
- * @param {string} [arg.q] - Search through ticket titles and description
20
- * @param {string} [arg.status] - Filter tickets on status
21
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
22
- * @param {string} [arg.category] - Filter tickets on category
23
- * @param {number} [arg.pageNo] - The page number to navigate through the
24
- * given set of results.
25
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
26
- * page. Default is 12.
27
- * @returns {Promise<TicketList>} - Success response
28
- * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
29
- * @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.
30
20
  */
31
- async getTickets({
32
- items,
33
- filters,
34
- q,
35
- status,
36
- priority,
37
- category,
38
- pageNo,
39
- pageSize,
40
- } = {}) {
41
- const { error } = LeadValidator.getTickets().validate(
21
+ async createHistory({ id, body } = {}) {
22
+ const { error } = LeadValidator.createHistory().validate(
42
23
  {
43
- items,
44
- filters,
45
- q,
46
- status,
47
- priority,
48
- category,
49
- pageNo,
50
- pageSize,
24
+ id,
25
+ body,
51
26
  },
52
27
  { abortEarly: false, allowUnknown: true }
53
28
  );
@@ -56,49 +31,35 @@ class Lead {
56
31
  }
57
32
 
58
33
  // Showing warrnings if extra unknown parameters are found
59
- const { error: warrning } = LeadValidator.getTickets().validate(
34
+ const { error: warrning } = LeadValidator.createHistory().validate(
60
35
  {
61
- items,
62
- filters,
63
- q,
64
- status,
65
- priority,
66
- category,
67
- pageNo,
68
- pageSize,
36
+ id,
37
+ body,
69
38
  },
70
39
  { abortEarly: false, allowUnknown: false }
71
40
  );
72
41
  if (warrning) {
73
42
  Logger({
74
43
  level: "WARN",
75
- message: "Parameter Validation warrnings for getTickets",
44
+ message: "Parameter Validation warrnings for createHistory",
76
45
  });
77
46
  Logger({ level: "WARN", message: warrning });
78
47
  }
79
48
 
80
49
  const query_params = {};
81
- query_params["items"] = items;
82
- query_params["filters"] = filters;
83
- query_params["q"] = q;
84
- query_params["status"] = status;
85
- query_params["priority"] = priority;
86
- query_params["category"] = category;
87
- query_params["page_no"] = pageNo;
88
- query_params["page_size"] = pageSize;
89
50
 
90
51
  const xHeaders = {};
91
52
 
92
53
  const response = await PlatformAPIClient.execute(
93
54
  this.config,
94
- "get",
95
- `/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`,
96
57
  query_params,
97
- undefined,
58
+ body,
98
59
  xHeaders
99
60
  );
100
61
 
101
- const { error: res_error } = LeadModel.TicketList().validate(response, {
62
+ const { error: res_error } = LeadModel.TicketHistory().validate(response, {
102
63
  abortEarly: false,
103
64
  allowUnknown: false,
104
65
  });
@@ -106,7 +67,7 @@ class Lead {
106
67
  if (res_error) {
107
68
  Logger({
108
69
  level: "WARN",
109
- message: "Response Validation Warnnings for getTickets",
70
+ message: "Response Validation Warnnings for createHistory",
110
71
  });
111
72
  Logger({ level: "WARN", message: res_error });
112
73
  }
@@ -114,55 +75,6 @@ class Lead {
114
75
  return response;
115
76
  }
116
77
 
117
- /**
118
- * @param {Object} arg - Arg object.
119
- * @param {boolean} [arg.items] - Decides that the reponse will contain the
120
- * list of tickets
121
- * @param {boolean} [arg.filters] - Decides that the reponse will contain
122
- * the ticket filters
123
- * @param {string} [arg.q] - Search through ticket titles and description
124
- * @param {string} [arg.status] - Filter tickets on status
125
- * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
126
- * @param {string} [arg.category] - Filter tickets on category
127
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
128
- * page. Default is 12.
129
- * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
130
- * @description: Gets the list of company level tickets and/or ticket filters
131
- */
132
- getTicketsPaginator({
133
- items,
134
- filters,
135
- q,
136
- status,
137
- priority,
138
- category,
139
- pageSize,
140
- } = {}) {
141
- const paginator = new Paginator();
142
- const callback = async () => {
143
- const pageId = paginator.nextId;
144
- const pageNo = paginator.pageNo;
145
- const pageType = "number";
146
- const data = await this.getTickets({
147
- items: items,
148
- filters: filters,
149
- q: q,
150
- status: status,
151
- priority: priority,
152
- category: category,
153
- pageNo: pageNo,
154
- pageSize: pageSize,
155
- });
156
- paginator.setPaginator({
157
- hasNext: data.page.has_next ? true : false,
158
- nextId: data.page.next_id,
159
- });
160
- return data;
161
- };
162
- paginator.setCallback(callback);
163
- return paginator;
164
- }
165
-
166
78
  /**
167
79
  * @param {Object} arg - Arg object.
168
80
  * @param {AddTicketPayload} arg.body
@@ -227,15 +139,17 @@ class Lead {
227
139
 
228
140
  /**
229
141
  * @param {Object} arg - Arg object.
230
- * @param {string} arg.id - Tiket ID of the ticket to be fetched
142
+ * @param {string} arg.id - Ticket ID of ticket to be edited
143
+ * @param {EditTicketPayload} arg.body
231
144
  * @returns {Promise<Ticket>} - Success response
232
- * @summary: Retreives ticket details of a company level ticket with ticket ID
233
- * @description: Retreives ticket details of a company level ticket
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
234
147
  */
235
- async getTicket({ id } = {}) {
236
- const { error } = LeadValidator.getTicket().validate(
148
+ async editTicket({ id, body } = {}) {
149
+ const { error } = LeadValidator.editTicket().validate(
237
150
  {
238
151
  id,
152
+ body,
239
153
  },
240
154
  { abortEarly: false, allowUnknown: true }
241
155
  );
@@ -244,16 +158,17 @@ class Lead {
244
158
  }
245
159
 
246
160
  // Showing warrnings if extra unknown parameters are found
247
- const { error: warrning } = LeadValidator.getTicket().validate(
161
+ const { error: warrning } = LeadValidator.editTicket().validate(
248
162
  {
249
163
  id,
164
+ body,
250
165
  },
251
166
  { abortEarly: false, allowUnknown: false }
252
167
  );
253
168
  if (warrning) {
254
169
  Logger({
255
170
  level: "WARN",
256
- message: "Parameter Validation warrnings for getTicket",
171
+ message: "Parameter Validation warrnings for editTicket",
257
172
  });
258
173
  Logger({ level: "WARN", message: warrning });
259
174
  }
@@ -264,10 +179,10 @@ class Lead {
264
179
 
265
180
  const response = await PlatformAPIClient.execute(
266
181
  this.config,
267
- "get",
182
+ "put",
268
183
  `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
269
184
  query_params,
270
- undefined,
185
+ body,
271
186
  xHeaders
272
187
  );
273
188
 
@@ -279,7 +194,7 @@ class Lead {
279
194
  if (res_error) {
280
195
  Logger({
281
196
  level: "WARN",
282
- message: "Response Validation Warnnings for getTicket",
197
+ message: "Response Validation Warnnings for editTicket",
283
198
  });
284
199
  Logger({ level: "WARN", message: res_error });
285
200
  }
@@ -289,17 +204,15 @@ class Lead {
289
204
 
290
205
  /**
291
206
  * @param {Object} arg - Arg object.
292
- * @param {string} arg.id - Ticket ID of ticket to be edited
293
- * @param {EditTicketPayload} arg.body
294
- * @returns {Promise<Ticket>} - Success response
295
- * @summary: Edits ticket details of a company level ticket
296
- * @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
297
211
  */
298
- async editTicket({ id, body } = {}) {
299
- const { error } = LeadValidator.editTicket().validate(
212
+ async getFeedbacks({ id } = {}) {
213
+ const { error } = LeadValidator.getFeedbacks().validate(
300
214
  {
301
215
  id,
302
- body,
303
216
  },
304
217
  { abortEarly: false, allowUnknown: true }
305
218
  );
@@ -308,17 +221,16 @@ class Lead {
308
221
  }
309
222
 
310
223
  // Showing warrnings if extra unknown parameters are found
311
- const { error: warrning } = LeadValidator.editTicket().validate(
224
+ const { error: warrning } = LeadValidator.getFeedbacks().validate(
312
225
  {
313
226
  id,
314
- body,
315
227
  },
316
228
  { abortEarly: false, allowUnknown: false }
317
229
  );
318
230
  if (warrning) {
319
231
  Logger({
320
232
  level: "WARN",
321
- message: "Parameter Validation warrnings for editTicket",
233
+ message: "Parameter Validation warrnings for getFeedbacks",
322
234
  });
323
235
  Logger({ level: "WARN", message: warrning });
324
236
  }
@@ -329,14 +241,16 @@ class Lead {
329
241
 
330
242
  const response = await PlatformAPIClient.execute(
331
243
  this.config,
332
- "put",
333
- `/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`,
334
246
  query_params,
335
- body,
247
+ undefined,
336
248
  xHeaders
337
249
  );
338
250
 
339
- const { error: res_error } = LeadModel.Ticket().validate(response, {
251
+ const {
252
+ error: res_error,
253
+ } = LeadModel.TicketFeedbackList().validate(response, {
340
254
  abortEarly: false,
341
255
  allowUnknown: false,
342
256
  });
@@ -344,7 +258,7 @@ class Lead {
344
258
  if (res_error) {
345
259
  Logger({
346
260
  level: "WARN",
347
- message: "Response Validation Warnnings for editTicket",
261
+ message: "Response Validation Warnnings for getFeedbacks",
348
262
  });
349
263
  Logger({ level: "WARN", message: res_error });
350
264
  }
@@ -354,18 +268,13 @@ class Lead {
354
268
 
355
269
  /**
356
270
  * @param {Object} arg - Arg object.
357
- * @param {string} arg.id - Ticket ID for which history is created
358
- * @param {TicketHistoryPayload} arg.body
359
- * @returns {Promise<TicketHistory>} - Success response
360
- * @summary: Create history for specific company level ticket
361
- * @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.
362
274
  */
363
- async createHistory({ id, body } = {}) {
364
- const { error } = LeadValidator.createHistory().validate(
365
- {
366
- id,
367
- body,
368
- },
275
+ async getGeneralConfig({} = {}) {
276
+ const { error } = LeadValidator.getGeneralConfig().validate(
277
+ {},
369
278
  { abortEarly: false, allowUnknown: true }
370
279
  );
371
280
  if (error) {
@@ -373,17 +282,14 @@ class Lead {
373
282
  }
374
283
 
375
284
  // Showing warrnings if extra unknown parameters are found
376
- const { error: warrning } = LeadValidator.createHistory().validate(
377
- {
378
- id,
379
- body,
380
- },
285
+ const { error: warrning } = LeadValidator.getGeneralConfig().validate(
286
+ {},
381
287
  { abortEarly: false, allowUnknown: false }
382
288
  );
383
289
  if (warrning) {
384
290
  Logger({
385
291
  level: "WARN",
386
- message: "Parameter Validation warrnings for createHistory",
292
+ message: "Parameter Validation warrnings for getGeneralConfig",
387
293
  });
388
294
  Logger({ level: "WARN", message: warrning });
389
295
  }
@@ -394,14 +300,16 @@ class Lead {
394
300
 
395
301
  const response = await PlatformAPIClient.execute(
396
302
  this.config,
397
- "post",
398
- `/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`,
399
305
  query_params,
400
- body,
306
+ undefined,
401
307
  xHeaders
402
308
  );
403
309
 
404
- const { error: res_error } = LeadModel.TicketHistory().validate(response, {
310
+ const {
311
+ error: res_error,
312
+ } = LeadModel.CloseVideoRoomResponse().validate(response, {
405
313
  abortEarly: false,
406
314
  allowUnknown: false,
407
315
  });
@@ -409,7 +317,7 @@ class Lead {
409
317
  if (res_error) {
410
318
  Logger({
411
319
  level: "WARN",
412
- message: "Response Validation Warnnings for createHistory",
320
+ message: "Response Validation Warnnings for getGeneralConfig",
413
321
  });
414
322
  Logger({ level: "WARN", message: res_error });
415
323
  }
@@ -419,13 +327,13 @@ class Lead {
419
327
 
420
328
  /**
421
329
  * @param {Object} arg - Arg object.
422
- * @param {string} arg.id - Ticket ID for which history is to be fetched
423
- * @returns {Promise<TicketHistoryList>} - Success response
424
- * @summary: Gets history list for specific company level ticket
425
- * @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
426
334
  */
427
- async getTicketHistory({ id } = {}) {
428
- const { error } = LeadValidator.getTicketHistory().validate(
335
+ async getTicket({ id } = {}) {
336
+ const { error } = LeadValidator.getTicket().validate(
429
337
  {
430
338
  id,
431
339
  },
@@ -436,7 +344,7 @@ class Lead {
436
344
  }
437
345
 
438
346
  // Showing warrnings if extra unknown parameters are found
439
- const { error: warrning } = LeadValidator.getTicketHistory().validate(
347
+ const { error: warrning } = LeadValidator.getTicket().validate(
440
348
  {
441
349
  id,
442
350
  },
@@ -445,7 +353,7 @@ class Lead {
445
353
  if (warrning) {
446
354
  Logger({
447
355
  level: "WARN",
448
- message: "Parameter Validation warrnings for getTicketHistory",
356
+ message: "Parameter Validation warrnings for getTicket",
449
357
  });
450
358
  Logger({ level: "WARN", message: warrning });
451
359
  }
@@ -457,15 +365,13 @@ class Lead {
457
365
  const response = await PlatformAPIClient.execute(
458
366
  this.config,
459
367
  "get",
460
- `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
368
+ `/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
461
369
  query_params,
462
370
  undefined,
463
371
  xHeaders
464
372
  );
465
373
 
466
- const {
467
- error: res_error,
468
- } = LeadModel.TicketHistoryList().validate(response, {
374
+ const { error: res_error } = LeadModel.Ticket().validate(response, {
469
375
  abortEarly: false,
470
376
  allowUnknown: false,
471
377
  });
@@ -473,7 +379,7 @@ class Lead {
473
379
  if (res_error) {
474
380
  Logger({
475
381
  level: "WARN",
476
- message: "Response Validation Warnnings for getTicketHistory",
382
+ message: "Response Validation Warnnings for getTicket",
477
383
  });
478
384
  Logger({ level: "WARN", message: res_error });
479
385
  }
@@ -483,13 +389,13 @@ class Lead {
483
389
 
484
390
  /**
485
391
  * @param {Object} arg - Arg object.
486
- * @param {string} arg.id - Ticket ID for which feedbacks are to be fetched
487
- * @returns {Promise<TicketFeedbackList>} - Success response
488
- * @summary: Gets a list of feedback submitted against that ticket
489
- * @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.
490
396
  */
491
- async getFeedbacks({ id } = {}) {
492
- const { error } = LeadValidator.getFeedbacks().validate(
397
+ async getTicketHistory({ id } = {}) {
398
+ const { error } = LeadValidator.getTicketHistory().validate(
493
399
  {
494
400
  id,
495
401
  },
@@ -500,7 +406,7 @@ class Lead {
500
406
  }
501
407
 
502
408
  // Showing warrnings if extra unknown parameters are found
503
- const { error: warrning } = LeadValidator.getFeedbacks().validate(
409
+ const { error: warrning } = LeadValidator.getTicketHistory().validate(
504
410
  {
505
411
  id,
506
412
  },
@@ -509,7 +415,7 @@ class Lead {
509
415
  if (warrning) {
510
416
  Logger({
511
417
  level: "WARN",
512
- message: "Parameter Validation warrnings for getFeedbacks",
418
+ message: "Parameter Validation warrnings for getTicketHistory",
513
419
  });
514
420
  Logger({ level: "WARN", message: warrning });
515
421
  }
@@ -521,7 +427,7 @@ class Lead {
521
427
  const response = await PlatformAPIClient.execute(
522
428
  this.config,
523
429
  "get",
524
- `/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`,
525
431
  query_params,
526
432
  undefined,
527
433
  xHeaders
@@ -529,7 +435,7 @@ class Lead {
529
435
 
530
436
  const {
531
437
  error: res_error,
532
- } = LeadModel.TicketFeedbackList().validate(response, {
438
+ } = LeadModel.TicketHistoryList().validate(response, {
533
439
  abortEarly: false,
534
440
  allowUnknown: false,
535
441
  });
@@ -537,7 +443,7 @@ class Lead {
537
443
  if (res_error) {
538
444
  Logger({
539
445
  level: "WARN",
540
- message: "Response Validation Warnnings for getFeedbacks",
446
+ message: "Response Validation Warnnings for getTicketHistory",
541
447
  });
542
448
  Logger({ level: "WARN", message: res_error });
543
449
  }
@@ -547,17 +453,42 @@ class Lead {
547
453
 
548
454
  /**
549
455
  * @param {Object} arg - Arg object.
550
- * @param {string} arg.id - Ticket ID for which feedback is to be submitted
551
- * @param {TicketFeedbackPayload} arg.body
552
- * @returns {Promise<TicketFeedback>} - Success response
553
- * @summary: Submit a response for feeback form against that ticket
554
- * @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
555
471
  */
556
- async submitFeedback({ id, body } = {}) {
557
- 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(
558
483
  {
559
- id,
560
- body,
484
+ items,
485
+ filters,
486
+ q,
487
+ status,
488
+ priority,
489
+ category,
490
+ pageNo,
491
+ pageSize,
561
492
  },
562
493
  { abortEarly: false, allowUnknown: true }
563
494
  );
@@ -566,35 +497,49 @@ class Lead {
566
497
  }
567
498
 
568
499
  // Showing warrnings if extra unknown parameters are found
569
- const { error: warrning } = LeadValidator.submitFeedback().validate(
500
+ const { error: warrning } = LeadValidator.getTickets().validate(
570
501
  {
571
- id,
572
- body,
502
+ items,
503
+ filters,
504
+ q,
505
+ status,
506
+ priority,
507
+ category,
508
+ pageNo,
509
+ pageSize,
573
510
  },
574
511
  { abortEarly: false, allowUnknown: false }
575
512
  );
576
513
  if (warrning) {
577
514
  Logger({
578
515
  level: "WARN",
579
- message: "Parameter Validation warrnings for submitFeedback",
516
+ message: "Parameter Validation warrnings for getTickets",
580
517
  });
581
518
  Logger({ level: "WARN", message: warrning });
582
519
  }
583
520
 
584
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;
585
530
 
586
531
  const xHeaders = {};
587
532
 
588
533
  const response = await PlatformAPIClient.execute(
589
534
  this.config,
590
- "post",
591
- `/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`,
592
537
  query_params,
593
- body,
538
+ undefined,
594
539
  xHeaders
595
540
  );
596
541
 
597
- const { error: res_error } = LeadModel.TicketFeedback().validate(response, {
542
+ const { error: res_error } = LeadModel.TicketList().validate(response, {
598
543
  abortEarly: false,
599
544
  allowUnknown: false,
600
545
  });
@@ -602,7 +547,7 @@ class Lead {
602
547
  if (res_error) {
603
548
  Logger({
604
549
  level: "WARN",
605
- message: "Response Validation Warnnings for submitFeedback",
550
+ message: "Response Validation Warnnings for getTickets",
606
551
  });
607
552
  Logger({ level: "WARN", message: res_error });
608
553
  }
@@ -610,6 +555,55 @@ class Lead {
610
555
  return response;
611
556
  }
612
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;
605
+ }
606
+
613
607
  /**
614
608
  * @param {Object} arg - Arg object.
615
609
  * @param {string} arg.uniqueName - Unique name of video room
@@ -740,13 +734,18 @@ class Lead {
740
734
 
741
735
  /**
742
736
  * @param {Object} arg - Arg object.
743
- * @returns {Promise<CloseVideoRoomResponse>} - Success response
744
- * @summary: Get general support configuration.
745
- * @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
746
742
  */
747
- async getGeneralConfig({} = {}) {
748
- const { error } = LeadValidator.getGeneralConfig().validate(
749
- {},
743
+ async submitFeedback({ id, body } = {}) {
744
+ const { error } = LeadValidator.submitFeedback().validate(
745
+ {
746
+ id,
747
+ body,
748
+ },
750
749
  { abortEarly: false, allowUnknown: true }
751
750
  );
752
751
  if (error) {
@@ -754,14 +753,17 @@ class Lead {
754
753
  }
755
754
 
756
755
  // Showing warrnings if extra unknown parameters are found
757
- const { error: warrning } = LeadValidator.getGeneralConfig().validate(
758
- {},
756
+ const { error: warrning } = LeadValidator.submitFeedback().validate(
757
+ {
758
+ id,
759
+ body,
760
+ },
759
761
  { abortEarly: false, allowUnknown: false }
760
762
  );
761
763
  if (warrning) {
762
764
  Logger({
763
765
  level: "WARN",
764
- message: "Parameter Validation warrnings for getGeneralConfig",
766
+ message: "Parameter Validation warrnings for submitFeedback",
765
767
  });
766
768
  Logger({ level: "WARN", message: warrning });
767
769
  }
@@ -772,16 +774,14 @@ class Lead {
772
774
 
773
775
  const response = await PlatformAPIClient.execute(
774
776
  this.config,
775
- "get",
776
- `/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`,
777
779
  query_params,
778
- undefined,
780
+ body,
779
781
  xHeaders
780
782
  );
781
783
 
782
- const {
783
- error: res_error,
784
- } = LeadModel.CloseVideoRoomResponse().validate(response, {
784
+ const { error: res_error } = LeadModel.TicketFeedback().validate(response, {
785
785
  abortEarly: false,
786
786
  allowUnknown: false,
787
787
  });
@@ -789,7 +789,7 @@ class Lead {
789
789
  if (res_error) {
790
790
  Logger({
791
791
  level: "WARN",
792
- message: "Response Validation Warnnings for getGeneralConfig",
792
+ message: "Response Validation Warnnings for submitFeedback",
793
793
  });
794
794
  Logger({ level: "WARN", message: res_error });
795
795
  }