@gofynd/fdk-client-javascript 1.1.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -1,32 +1,485 @@
1
1
  const Joi = require("joi");
2
2
 
3
- class LeadModel {
3
+ /**
4
+ * @typedef AddTicketPayload
5
+ * @property {Object} [_custom_json] - Optional custom data that needs to be sent
6
+ * @property {string} category - Category of the ticket
7
+ * @property {TicketContent} content - Content for the ticket
8
+ * @property {Object} [created_by] - Creator of the ticket
9
+ * @property {PriorityEnum} [priority] - Priority of the ticket
10
+ * @property {string} [status] - Status of the ticket
11
+ * @property {string[]} [subscribers]
12
+ */
13
+
14
+ /**
15
+ * @typedef AgentChangePayload
16
+ * @property {string} agent_id - Agent's unique ID
17
+ */
18
+
19
+ /**
20
+ * @typedef CategoryData
21
+ * @property {TicketCategory} [list]
22
+ */
23
+
24
+ /**
25
+ * @typedef CloseVideoRoomResponse
26
+ * @property {boolean} success - Denotes if operation was successfully
27
+ */
28
+
29
+ /**
30
+ * @typedef CommunicationDetails
31
+ * @property {string} [description] - Short description for the communication method
32
+ * @property {boolean} [enabled] - Denotes if this communication method has to be shown
33
+ * @property {string} [title] - Title for the communication method
34
+ * @property {string} [type] - Enum type for the communication method
35
+ * @property {string} [value] - Value for the communication method
36
+ */
37
+
38
+ /**
39
+ * @typedef CreateCustomFormPayload
40
+ * @property {string} [description] - Description of the form
41
+ * @property {string} [header_image] - Header image that is to be shown for the form
42
+ * @property {Object[]} inputs - List of all the form components
43
+ * @property {PollForAssignment} [poll_for_assignment] - Describes how polling
44
+ * will be done for the tickets createds
45
+ * @property {PriorityEnum} priority - Describes the priority of the tickets
46
+ * created by the form
47
+ * @property {boolean} [should_notify] - Indicates if staff should be notified
48
+ * when a response is received
49
+ * @property {string} slug - Slug for the form
50
+ * @property {string} [success_message] - Success message that will be shown on submission
51
+ * @property {string} title - Title for the form
52
+ */
53
+
54
+ /**
55
+ * @typedef CreatedOn
56
+ * @property {string} user_agent - Useragent details
57
+ */
58
+
59
+ /**
60
+ * @typedef CreateVideoRoomPayload
61
+ * @property {NotifyUser[]} [notify] - List of people to be notified
62
+ * @property {string} unique_name - Ticket id
63
+ */
64
+
65
+ /**
66
+ * @typedef CreateVideoRoomResponse
67
+ * @property {string} unique_name - Video Room's unique name
68
+ */
69
+
70
+ /**
71
+ * @typedef CustomForm
72
+ * @property {string} _id - Unique identifier for the form
73
+ * @property {string} application_id - Application ID for form
74
+ * @property {CreatedOn} [created_on] - Gives details of when the form was created
75
+ * @property {string} [description] - Form description that will be shown to the user
76
+ * @property {string} [header_image] - Form header image that will be shown to the user
77
+ * @property {Object[]} inputs - List of all the form fields
78
+ * @property {boolean} login_required - Denotes if login is required to make a
79
+ * form response submission
80
+ * @property {PollForAssignment} [poll_for_assignment] - Details of how polling
81
+ * should be done for support
82
+ * @property {Priority} priority - Sets priority of tickets created by form response
83
+ * @property {boolean} should_notify - Denotes if new response submission for
84
+ * the form should be notified to the assignees
85
+ * @property {string} slug - Slug for the form, which is to be used for accessing the form
86
+ * @property {SubmitButton} [submit_button] - Details for submit button
87
+ * @property {string} [success_message] - Message that is to be shown on
88
+ * succesfull form response submission
89
+ * @property {string} title - Form title that will be shown to the user
90
+ */
91
+
92
+ /**
93
+ * @typedef CustomFormList
94
+ * @property {CustomForm[]} [items] - List of forms
95
+ * @property {Page} [page] - Describes the pagination state
96
+ */
97
+
98
+ /**
99
+ * @typedef CustomFormSubmissionPayload
100
+ * @property {TicketAsset[]} [attachments] - List of all attachments related to the form
101
+ * @property {Object[]} response - Form response
102
+ */
103
+
104
+ /**
105
+ * @typedef Debug
106
+ * @property {string} [platform] - Platform of user
107
+ * @property {string} [source] - Source of user
108
+ */
109
+
110
+ /**
111
+ * @typedef EditCustomFormPayload
112
+ * @property {string} [description] - Description of the form
113
+ * @property {string} [header_image] - Header image that is to be shown for the form
114
+ * @property {Object[]} inputs - List of all the form components
115
+ * @property {boolean} [login_required] - Denotes if login is required to make a
116
+ * form response submission
117
+ * @property {PollForAssignment} [poll_for_assignment] - Describes how polling
118
+ * will be done for the tickets createds
119
+ * @property {PriorityEnum} priority - Describes the priority of the tickets
120
+ * created by the form
121
+ * @property {boolean} [should_notify] - Indicates if staff should be notified
122
+ * when a response is received
123
+ * @property {string} [success_message] - Success message that will be shown on submission
124
+ * @property {string} title - Title for the form
125
+ */
126
+
127
+ /**
128
+ * @typedef EditTicketPayload
129
+ * @property {AgentChangePayload} [assigned_to] - Details of support staff to
130
+ * whom ticket is assigned
131
+ * @property {string} [category] - Category assigned to the ticket
132
+ * @property {TicketContent} [content] - Ticket conetent details
133
+ * @property {PriorityEnum} [priority] - Denotes the priority of ticket
134
+ * @property {string} [source] - Denotes if the ticket was created at company or
135
+ * application level
136
+ * @property {string} [status] - Denotes in what state is the ticket
137
+ * @property {string} [sub_category] - Sub-category assigned to the ticket
138
+ * @property {string[]} [tags] - Tags relevant to ticket
139
+ */
140
+
141
+ /**
142
+ * @typedef Email
143
+ * @property {boolean} [active] - Denotes if the email is active
144
+ * @property {string} [email] - Email Address
145
+ * @property {boolean} [primary] - Denotes it's the primary email for the account
146
+ * @property {boolean} [verified] - Denotes it's a verified email
147
+ */
148
+
149
+ /**
150
+ * @typedef FeedbackForm
151
+ * @property {Object} [inputs] - Input details for the feed back form
152
+ * @property {Object} [timestamps] - Gives details of category releted data
153
+ * @property {string} [title] - Title for the feed back form
154
+ */
155
+
156
+ /**
157
+ * @typedef FeedbackResponseItem
158
+ * @property {string} display - Question/Title of the form field
159
+ * @property {string} key - Key of the form field
160
+ * @property {string} value - User response value for the form field
161
+ */
162
+
163
+ /**
164
+ * @typedef Filter
165
+ * @property {Object[]} assignees - List of support staff availble for tickets assignment
166
+ * @property {TicketCategory[]} [categories] - List of possible categories for tickets
167
+ * @property {Priority[]} priorities - List of possible priorities for tickets
168
+ * @property {Status[]} statuses - List of possible statuses for tickets
169
+ */
170
+
171
+ /**
172
+ * @typedef GetParticipantsInsideVideoRoomResponse
173
+ * @property {Participant[]} participants - List of participants of the video room
174
+ */
175
+
176
+ /**
177
+ * @typedef GetTokenForVideoRoomResponse
178
+ * @property {string} access_token - Access token to be used for video room
179
+ */
180
+
181
+ /**
182
+ * @typedef IntegrationConfig
183
+ * @property {string} [_id] - Unique id
184
+ * @property {boolean} allow_ticket_creation - Denotes ticket creation enable or
185
+ * disable on platform
186
+ * @property {string} [base_url] - Integration base url for validate and create ticket
187
+ * @property {CategoryData} [category_data] - Support category array list details
188
+ * @property {string} [category_sync_apikey] - Integration apikey to sync
189
+ * category of selected type
190
+ * @property {boolean} [config_completed] - Denotes the current intergration is
191
+ * completed or partially done
192
+ * @property {string} [create_ticket_apikey] - Integration apikey to validate
193
+ * and create ticket
194
+ * @property {string} integration_type - Enum string values for integration
195
+ * @property {boolean} show_listing - Denotes ticket listing enable or disable on platform
196
+ * @property {string} [update_ticket_apikey] - Integration apikey to update ticket
197
+ * @property {string} [webhook_apikey] - Integration webhook apikey to got
198
+ * callbacks from integration type dashboard like freshdesk, etc
199
+ */
200
+
201
+ /**
202
+ * @typedef NotifyUser
203
+ * @property {string} country_code - Country code
204
+ * @property {string} phone_number - Phone number
205
+ */
206
+
207
+ /**
208
+ * @typedef Page
209
+ * @property {number} [current]
210
+ * @property {boolean} [has_next]
211
+ * @property {boolean} [has_previous]
212
+ * @property {number} [item_total]
213
+ * @property {string} [next_id]
214
+ * @property {number} [size]
215
+ * @property {string} type
216
+ */
217
+
218
+ /**
219
+ * @typedef Participant
220
+ * @property {string} [identity] - Unique identifier of participant
221
+ * @property {string} [status] - Status of participant
222
+ * @property {UserSchema} [user] - Details of participant
223
+ */
224
+
225
+ /**
226
+ * @typedef PhoneNumber
227
+ * @property {boolean} [active] - Denotes if the phone number is active
228
+ * @property {number} [country_code] - Country code
229
+ * @property {string} [phone] - Phone number
230
+ * @property {boolean} [primary] - Denotes it's the primary phone number for the account
231
+ * @property {boolean} [verified] - Denotes it's a verified phone number
232
+ */
233
+
234
+ /**
235
+ * @typedef PollForAssignment
236
+ * @property {number} duration - Duration for polling of staff
237
+ * @property {string} failure_message - Message if polling failed
238
+ * @property {string} message - Message for polling
239
+ * @property {string} success_message - Message for successful polling
240
+ */
241
+
242
+ /**
243
+ * @typedef Priority
244
+ * @property {string} color - Color for priority
245
+ * @property {string} display - Display text for priority
246
+ * @property {PriorityEnum} key - Key for priority
247
+ */
248
+
249
+ /**
250
+ * @typedef Status
251
+ * @property {string} color - Color for status
252
+ * @property {string} display - Display text for status
253
+ * @property {string} key - Key for status
254
+ */
255
+
256
+ /**
257
+ * @typedef SubmitButton
258
+ * @property {string} background_color - Color for submit button
259
+ * @property {string} title - Title for submit button
260
+ * @property {string} title_color - Title color submit button
261
+ */
262
+
263
+ /**
264
+ * @typedef SubmitCustomFormResponse
265
+ * @property {string} message - Success message for form submission
266
+ * @property {Ticket} [ticket] - Ticket created on form submission
267
+ */
268
+
269
+ /**
270
+ * @typedef SupportGeneralConfig
271
+ * @property {string} [_id] - Unique id
272
+ * @property {Object} [integration] - Contains integrations basic information
273
+ * @property {boolean} [show_communication_info] - Denotes if support
274
+ * communication info should be shown
275
+ * @property {boolean} [show_support_dris] - Denotes if support DRIS info should be shown
276
+ * @property {CommunicationDetails} [support_communication] - Support
277
+ * communication array list details
278
+ * @property {CommunicationDetails} [support_email] - Support e-mail details
279
+ * @property {CommunicationDetails} [support_faq] - Support FAQ details
280
+ * @property {CommunicationDetails} [support_phone] - Support Phone number details
281
+ * @property {string} [type] - The enity/platform for which the config is stored
282
+ */
283
+
284
+ /**
285
+ * @typedef Ticket
286
+ * @property {Object} [_custom_json] - Custom json relevant to the ticket
287
+ * @property {string} _id - Unique identifier for the ticket
288
+ * @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
289
+ * @property {TicketCategory} category - Category assigned to the ticket
290
+ * @property {TicketContent} [content] - Ticket conetent details
291
+ * @property {TicketContext} [context] - Details of company and application
292
+ * realated to the ticket
293
+ * @property {string} [created_at] - Time when the ticket was created
294
+ * @property {Object} [created_by] - User details of ticket creator
295
+ * @property {CreatedOn} [created_on] - Details of company and application
296
+ * realated to the ticket
297
+ * @property {Object} [integration] - Integration type and its details of the ticket
298
+ * @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
299
+ * pending for the ticket
300
+ * @property {Priority} priority - Denotes the priority of ticket
301
+ * @property {string} [response_id] - Details of company and application
302
+ * realated to the ticket
303
+ * @property {TicketSourceEnum} source - Denotes if the ticket was created at
304
+ * company or application level
305
+ * @property {Status} status - Denotes in what state is the ticket
306
+ * @property {string} [sub_category] - Sub-category assigned to the ticket
307
+ * @property {string[]} [tags] - Tags relevant to ticket
308
+ * @property {string} [updated_at] - Time when the ticket was last updated
309
+ */
310
+
311
+ /**
312
+ * @typedef TicketAsset
313
+ * @property {string} [display] - Display text for asset
314
+ * @property {TicketAssetTypeEnum} type - Type of asset
315
+ * @property {string} value - To be used for details
316
+ */
317
+
318
+ /**
319
+ * @typedef TicketCategory
320
+ * @property {string} display - Category display value identifier
321
+ * @property {FeedbackForm} [feedback_form] - Support category array list details
322
+ * @property {number} [group_id] - Group id of category releted data
323
+ * @property {string} key - Category key value identifier
324
+ * @property {TicketCategory} [sub_categories] - Support category array list details
325
+ */
326
+
327
+ /**
328
+ * @typedef TicketContent
329
+ * @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket
330
+ * @property {string} [description] - Long description of issue
331
+ * @property {string} title - Title for ticket
332
+ */
333
+
334
+ /**
335
+ * @typedef TicketContext
336
+ * @property {string} [application_id] - Application ID related to the ticket
337
+ * @property {string} company_id - Company ID related to the ticket
338
+ */
339
+
340
+ /**
341
+ * @typedef TicketFeedback
342
+ * @property {string} _id - Unique identifier for the feedback
343
+ * @property {string} [category] - Category of the ticket
344
+ * @property {string} company_id - Company id for which ticket was raised
345
+ * @property {string} [created_at] - Time when the feedback was created
346
+ * @property {FeedbackResponseItem[]} response
347
+ * @property {string} ticket_id - Readable ticket number
348
+ * @property {string} [updated_at] - Time when the feedback was last updated
349
+ * @property {Object} [user] - User who submitted the feedback
350
+ */
351
+
352
+ /**
353
+ * @typedef TicketFeedbackForm
354
+ * @property {Object[]} [display] - List of all the form fields
355
+ * @property {string} title - Feedback form title that will be shown to the user
356
+ */
357
+
358
+ /**
359
+ * @typedef TicketFeedbackList
360
+ * @property {TicketFeedback[]} [items] - List of all ticket feedback for the ticket
361
+ */
362
+
363
+ /**
364
+ * @typedef TicketFeedbackPayload
365
+ * @property {Object} [form_response] - Key-value pairs of all the form fields
366
+ * and their response
367
+ */
368
+
369
+ /**
370
+ * @typedef TicketHistory
371
+ * @property {string} _id - Unique identifier of the history event
372
+ * @property {string} [created_at] - Time of creation of the history event
373
+ * @property {Object} [created_by] - User who created the history event
374
+ * @property {CreatedOn} [created_on] - Time of creation of the history event
375
+ * @property {string} ticket_id - Readable ticket number
376
+ * @property {string} type - Type of the history event
377
+ * @property {string} [updated_at] - Time of last update of the history event
378
+ * @property {Object} value - Data of the history event
379
+ */
380
+
381
+ /**
382
+ * @typedef TicketHistoryList
383
+ * @property {TicketHistory[]} [items] - List of ticket history
384
+ * @property {Page} [page] - Describes the pagination state
385
+ */
386
+
387
+ /**
388
+ * @typedef TicketHistoryPayload
389
+ * @property {HistoryTypeEnum} type - Type of history event
390
+ * @property {Object} value - Details of history event
391
+ */
392
+
393
+ /**
394
+ * @typedef TicketList
395
+ * @property {Filter} [filters] - All the filters available for tickets
396
+ * @property {Ticket[]} [items] - List of tickets
397
+ * @property {Page} [page] - Describes the pagination state
398
+ */
399
+
400
+ /**
401
+ * @typedef TicketSubCategory
402
+ * @property {string} display - Display text for sub-category
403
+ * @property {string} key - Key for sub-category
404
+ * @property {TicketSubCategory} [sub_categories]
405
+ */
406
+
407
+ /**
408
+ * @typedef UserSchema
409
+ * @property {string} [_id]
410
+ * @property {string} [account_type]
411
+ * @property {boolean} [active]
412
+ * @property {string} [application_id]
413
+ * @property {string} [created_at]
414
+ * @property {string} [dob]
415
+ * @property {Email[]} [emails]
416
+ * @property {string} [first_name]
417
+ * @property {string} [gender]
418
+ * @property {string} [last_name]
419
+ * @property {Object} [meta]
420
+ * @property {PhoneNumber[]} [phone_numbers]
421
+ * @property {string} [profile_pic_url]
422
+ * @property {string} [updated_at]
423
+ * @property {string} [user_id]
424
+ * @property {string} [username]
425
+ */
426
+
427
+ /** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */
428
+
429
+ /** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
430
+
431
+ /**
432
+ * @typedef {| "image"
433
+ * | "video"
434
+ * | "file"
435
+ * | "youtube"
436
+ * | "product"
437
+ * | "collection"
438
+ * | "brand"
439
+ * | "shipment"
440
+ * | "order"} TicketAssetTypeEnum
441
+ */
442
+
443
+ /** @typedef {"default" | "freshdesk" | "kapture"} TicketIntegrationDetails */
444
+
445
+ /** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */
446
+
447
+ class LeadApplicationModel {
448
+ /** @returns {AddTicketPayload} */
4
449
  static AddTicketPayload() {
5
450
  return Joi.object({
6
451
  _custom_json: Joi.any(),
7
452
  category: Joi.string().allow("").required(),
8
- content: LeadModel.TicketContent().required(),
453
+ content: LeadApplicationModel.TicketContent().required(),
9
454
  created_by: Joi.any(),
10
- priority: LeadModel.PriorityEnum(),
455
+ priority: LeadApplicationModel.PriorityEnum(),
11
456
  status: Joi.string().allow(""),
12
457
  subscribers: Joi.array().items(Joi.string().allow("")),
13
458
  });
14
459
  }
460
+
461
+ /** @returns {AgentChangePayload} */
15
462
  static AgentChangePayload() {
16
463
  return Joi.object({
17
464
  agent_id: Joi.string().allow("").required(),
18
465
  });
19
466
  }
467
+
468
+ /** @returns {CategoryData} */
20
469
  static CategoryData() {
21
470
  return Joi.object({
22
- list: LeadModel.TicketCategory(),
471
+ list: LeadApplicationModel.TicketCategory(),
23
472
  });
24
473
  }
474
+
475
+ /** @returns {CloseVideoRoomResponse} */
25
476
  static CloseVideoRoomResponse() {
26
477
  return Joi.object({
27
478
  success: Joi.boolean().required(),
28
479
  });
29
480
  }
481
+
482
+ /** @returns {CommunicationDetails} */
30
483
  static CommunicationDetails() {
31
484
  return Joi.object({
32
485
  description: Joi.string().allow(""),
@@ -36,96 +489,118 @@ class LeadModel {
36
489
  value: Joi.string().allow(""),
37
490
  });
38
491
  }
492
+
493
+ /** @returns {CreateCustomFormPayload} */
39
494
  static CreateCustomFormPayload() {
40
495
  return Joi.object({
41
496
  description: Joi.string().allow(""),
42
497
  header_image: Joi.string().allow(""),
43
498
  inputs: Joi.array().items(Joi.any()).required(),
44
- poll_for_assignment: LeadModel.PollForAssignment(),
45
- priority: LeadModel.PriorityEnum().required(),
499
+ poll_for_assignment: LeadApplicationModel.PollForAssignment(),
500
+ priority: LeadApplicationModel.PriorityEnum().required(),
46
501
  should_notify: Joi.boolean(),
47
502
  slug: Joi.string().allow("").required(),
48
503
  success_message: Joi.string().allow(""),
49
504
  title: Joi.string().allow("").required(),
50
505
  });
51
506
  }
507
+
508
+ /** @returns {CreatedOn} */
52
509
  static CreatedOn() {
53
510
  return Joi.object({
54
511
  user_agent: Joi.string().allow("").required(),
55
512
  });
56
513
  }
514
+
515
+ /** @returns {CreateVideoRoomPayload} */
57
516
  static CreateVideoRoomPayload() {
58
517
  return Joi.object({
59
- notify: Joi.array().items(LeadModel.NotifyUser()),
518
+ notify: Joi.array().items(LeadApplicationModel.NotifyUser()),
60
519
  unique_name: Joi.string().allow("").required(),
61
520
  });
62
521
  }
522
+
523
+ /** @returns {CreateVideoRoomResponse} */
63
524
  static CreateVideoRoomResponse() {
64
525
  return Joi.object({
65
526
  unique_name: Joi.string().allow("").required(),
66
527
  });
67
528
  }
529
+
530
+ /** @returns {CustomForm} */
68
531
  static CustomForm() {
69
532
  return Joi.object({
70
533
  _id: Joi.string().allow("").required(),
71
534
  application_id: Joi.string().allow("").required(),
72
- created_on: LeadModel.CreatedOn(),
535
+ created_on: LeadApplicationModel.CreatedOn(),
73
536
  description: Joi.string().allow(""),
74
537
  header_image: Joi.string().allow(""),
75
538
  inputs: Joi.array().items(Joi.any()).required(),
76
539
  login_required: Joi.boolean().required(),
77
- poll_for_assignment: LeadModel.PollForAssignment(),
78
- priority: LeadModel.Priority().required(),
540
+ poll_for_assignment: LeadApplicationModel.PollForAssignment(),
541
+ priority: LeadApplicationModel.Priority().required(),
79
542
  should_notify: Joi.boolean().required(),
80
543
  slug: Joi.string().allow("").required(),
81
- submit_button: LeadModel.SubmitButton(),
544
+ submit_button: LeadApplicationModel.SubmitButton(),
82
545
  success_message: Joi.string().allow(""),
83
546
  title: Joi.string().allow("").required(),
84
547
  });
85
548
  }
549
+
550
+ /** @returns {CustomFormList} */
86
551
  static CustomFormList() {
87
552
  return Joi.object({
88
- items: Joi.array().items(LeadModel.CustomForm()),
89
- page: LeadModel.Page(),
553
+ items: Joi.array().items(LeadApplicationModel.CustomForm()),
554
+ page: LeadApplicationModel.Page(),
90
555
  });
91
556
  }
557
+
558
+ /** @returns {CustomFormSubmissionPayload} */
92
559
  static CustomFormSubmissionPayload() {
93
560
  return Joi.object({
94
- attachments: Joi.array().items(LeadModel.TicketAsset()),
561
+ attachments: Joi.array().items(LeadApplicationModel.TicketAsset()),
95
562
  response: Joi.array().items(Joi.any()).required(),
96
563
  });
97
564
  }
565
+
566
+ /** @returns {Debug} */
98
567
  static Debug() {
99
568
  return Joi.object({
100
569
  platform: Joi.string().allow(""),
101
570
  source: Joi.string().allow(""),
102
571
  });
103
572
  }
573
+
574
+ /** @returns {EditCustomFormPayload} */
104
575
  static EditCustomFormPayload() {
105
576
  return Joi.object({
106
577
  description: Joi.string().allow(""),
107
578
  header_image: Joi.string().allow(""),
108
579
  inputs: Joi.array().items(Joi.any()).required(),
109
580
  login_required: Joi.boolean(),
110
- poll_for_assignment: LeadModel.PollForAssignment(),
111
- priority: LeadModel.PriorityEnum().required(),
581
+ poll_for_assignment: LeadApplicationModel.PollForAssignment(),
582
+ priority: LeadApplicationModel.PriorityEnum().required(),
112
583
  should_notify: Joi.boolean(),
113
584
  success_message: Joi.string().allow(""),
114
585
  title: Joi.string().allow("").required(),
115
586
  });
116
587
  }
588
+
589
+ /** @returns {EditTicketPayload} */
117
590
  static EditTicketPayload() {
118
591
  return Joi.object({
119
- assigned_to: LeadModel.AgentChangePayload(),
592
+ assigned_to: LeadApplicationModel.AgentChangePayload(),
120
593
  category: Joi.string().allow(""),
121
- content: LeadModel.TicketContent(),
122
- priority: LeadModel.PriorityEnum(),
594
+ content: LeadApplicationModel.TicketContent(),
595
+ priority: LeadApplicationModel.PriorityEnum(),
123
596
  source: Joi.string().allow(""),
124
597
  status: Joi.string().allow(""),
125
598
  sub_category: Joi.string().allow(""),
126
599
  tags: Joi.array().items(Joi.string().allow("")),
127
600
  });
128
601
  }
602
+
603
+ /** @returns {Email} */
129
604
  static Email() {
130
605
  return Joi.object({
131
606
  active: Joi.boolean(),
@@ -134,6 +609,8 @@ class LeadModel {
134
609
  verified: Joi.boolean(),
135
610
  });
136
611
  }
612
+
613
+ /** @returns {FeedbackForm} */
137
614
  static FeedbackForm() {
138
615
  return Joi.object({
139
616
  inputs: Joi.any(),
@@ -141,6 +618,8 @@ class LeadModel {
141
618
  title: Joi.string().allow(""),
142
619
  });
143
620
  }
621
+
622
+ /** @returns {FeedbackResponseItem} */
144
623
  static FeedbackResponseItem() {
145
624
  return Joi.object({
146
625
  display: Joi.string().allow("").required(),
@@ -148,30 +627,40 @@ class LeadModel {
148
627
  value: Joi.string().allow("").required(),
149
628
  });
150
629
  }
630
+
631
+ /** @returns {Filter} */
151
632
  static Filter() {
152
633
  return Joi.object({
153
634
  assignees: Joi.array().items(Joi.any()).required(),
154
- categories: Joi.array().items(LeadModel.TicketCategory()),
155
- priorities: Joi.array().items(LeadModel.Priority()).required(),
156
- statuses: Joi.array().items(LeadModel.Status()).required(),
635
+ categories: Joi.array().items(LeadApplicationModel.TicketCategory()),
636
+ priorities: Joi.array().items(LeadApplicationModel.Priority()).required(),
637
+ statuses: Joi.array().items(LeadApplicationModel.Status()).required(),
157
638
  });
158
639
  }
640
+
641
+ /** @returns {GetParticipantsInsideVideoRoomResponse} */
159
642
  static GetParticipantsInsideVideoRoomResponse() {
160
643
  return Joi.object({
161
- participants: Joi.array().items(LeadModel.Participant()).required(),
644
+ participants: Joi.array()
645
+ .items(LeadApplicationModel.Participant())
646
+ .required(),
162
647
  });
163
648
  }
649
+
650
+ /** @returns {GetTokenForVideoRoomResponse} */
164
651
  static GetTokenForVideoRoomResponse() {
165
652
  return Joi.object({
166
653
  access_token: Joi.string().allow("").required(),
167
654
  });
168
655
  }
656
+
657
+ /** @returns {IntegrationConfig} */
169
658
  static IntegrationConfig() {
170
659
  return Joi.object({
171
660
  _id: Joi.string().allow(""),
172
661
  allow_ticket_creation: Joi.boolean().required(),
173
662
  base_url: Joi.string().allow(""),
174
- category_data: LeadModel.CategoryData(),
663
+ category_data: LeadApplicationModel.CategoryData(),
175
664
  category_sync_apikey: Joi.string().allow(""),
176
665
  config_completed: Joi.boolean(),
177
666
  create_ticket_apikey: Joi.string().allow(""),
@@ -181,12 +670,16 @@ class LeadModel {
181
670
  webhook_apikey: Joi.string().allow(""),
182
671
  });
183
672
  }
673
+
674
+ /** @returns {NotifyUser} */
184
675
  static NotifyUser() {
185
676
  return Joi.object({
186
677
  country_code: Joi.string().allow("").required(),
187
678
  phone_number: Joi.string().allow("").required(),
188
679
  });
189
680
  }
681
+
682
+ /** @returns {Page} */
190
683
  static Page() {
191
684
  return Joi.object({
192
685
  current: Joi.number(),
@@ -198,13 +691,17 @@ class LeadModel {
198
691
  type: Joi.string().allow("").required(),
199
692
  });
200
693
  }
694
+
695
+ /** @returns {Participant} */
201
696
  static Participant() {
202
697
  return Joi.object({
203
698
  identity: Joi.string().allow(""),
204
699
  status: Joi.string().allow(""),
205
- user: LeadModel.UserSchema(),
700
+ user: LeadApplicationModel.UserSchema(),
206
701
  });
207
702
  }
703
+
704
+ /** @returns {PhoneNumber} */
208
705
  static PhoneNumber() {
209
706
  return Joi.object({
210
707
  active: Joi.boolean(),
@@ -214,6 +711,8 @@ class LeadModel {
214
711
  verified: Joi.boolean(),
215
712
  });
216
713
  }
714
+
715
+ /** @returns {PollForAssignment} */
217
716
  static PollForAssignment() {
218
717
  return Joi.object({
219
718
  duration: Joi.number().required(),
@@ -222,13 +721,17 @@ class LeadModel {
222
721
  success_message: Joi.string().allow("").required(),
223
722
  });
224
723
  }
724
+
725
+ /** @returns {Priority} */
225
726
  static Priority() {
226
727
  return Joi.object({
227
728
  color: Joi.string().allow("").required(),
228
729
  display: Joi.string().allow("").required(),
229
- key: LeadModel.PriorityEnum().required(),
730
+ key: LeadApplicationModel.PriorityEnum().required(),
230
731
  });
231
732
  }
733
+
734
+ /** @returns {Status} */
232
735
  static Status() {
233
736
  return Joi.object({
234
737
  color: Joi.string().allow("").required(),
@@ -236,6 +739,8 @@ class LeadModel {
236
739
  key: Joi.string().allow("").required(),
237
740
  });
238
741
  }
742
+
743
+ /** @returns {SubmitButton} */
239
744
  static SubmitButton() {
240
745
  return Joi.object({
241
746
  background_color: Joi.string().allow("").required(),
@@ -243,135 +748,169 @@ class LeadModel {
243
748
  title_color: Joi.string().allow("").required(),
244
749
  });
245
750
  }
751
+
752
+ /** @returns {SubmitCustomFormResponse} */
246
753
  static SubmitCustomFormResponse() {
247
754
  return Joi.object({
248
755
  message: Joi.string().allow("").required(),
249
- ticket: LeadModel.Ticket(),
756
+ ticket: LeadApplicationModel.Ticket(),
250
757
  });
251
758
  }
759
+
760
+ /** @returns {SupportGeneralConfig} */
252
761
  static SupportGeneralConfig() {
253
762
  return Joi.object({
254
763
  _id: Joi.string().allow(""),
255
764
  integration: Joi.any(),
256
765
  show_communication_info: Joi.boolean(),
257
766
  show_support_dris: Joi.boolean(),
258
- support_communication: LeadModel.CommunicationDetails(),
259
- support_email: LeadModel.CommunicationDetails(),
260
- support_faq: LeadModel.CommunicationDetails(),
261
- support_phone: LeadModel.CommunicationDetails(),
767
+ support_communication: LeadApplicationModel.CommunicationDetails(),
768
+ support_email: LeadApplicationModel.CommunicationDetails(),
769
+ support_faq: LeadApplicationModel.CommunicationDetails(),
770
+ support_phone: LeadApplicationModel.CommunicationDetails(),
262
771
  type: Joi.string().allow(""),
263
772
  });
264
773
  }
774
+
775
+ /** @returns {Ticket} */
265
776
  static Ticket() {
266
777
  return Joi.object({
267
778
  _custom_json: Joi.any(),
268
779
  _id: Joi.string().allow("").required(),
269
780
  assigned_to: Joi.any(),
270
- category: LeadModel.TicketCategory().required(),
271
- content: LeadModel.TicketContent(),
272
- context: LeadModel.TicketContext(),
781
+ category: LeadApplicationModel.TicketCategory().required(),
782
+ content: LeadApplicationModel.TicketContent(),
783
+ context: LeadApplicationModel.TicketContext(),
273
784
  created_at: Joi.string().allow(""),
274
785
  created_by: Joi.any(),
275
- created_on: LeadModel.CreatedOn(),
786
+ created_on: LeadApplicationModel.CreatedOn(),
276
787
  integration: Joi.any(),
277
788
  is_feedback_pending: Joi.boolean(),
278
- priority: LeadModel.Priority().required(),
789
+ priority: LeadApplicationModel.Priority().required(),
279
790
  response_id: Joi.string().allow(""),
280
- source: LeadModel.TicketSourceEnum().required(),
281
- status: LeadModel.Status().required(),
791
+ source: LeadApplicationModel.TicketSourceEnum().required(),
792
+ status: LeadApplicationModel.Status().required(),
282
793
  sub_category: Joi.string().allow(""),
283
794
  tags: Joi.array().items(Joi.string().allow("")),
284
795
  updated_at: Joi.string().allow(""),
285
796
  });
286
797
  }
798
+
799
+ /** @returns {TicketAsset} */
287
800
  static TicketAsset() {
288
801
  return Joi.object({
289
802
  display: Joi.string().allow(""),
290
- type: LeadModel.TicketAssetTypeEnum().required(),
803
+ type: LeadApplicationModel.TicketAssetTypeEnum().required(),
291
804
  value: Joi.string().allow("").required(),
292
805
  });
293
806
  }
807
+
808
+ /** @returns {TicketCategory} */
294
809
  static TicketCategory() {
295
810
  return Joi.object({
296
811
  display: Joi.string().allow("").required(),
297
- feedback_form: LeadModel.FeedbackForm(),
812
+ feedback_form: LeadApplicationModel.FeedbackForm(),
298
813
  group_id: Joi.number(),
299
814
  key: Joi.string().allow("").required(),
300
815
  sub_categories: Joi.link("#TicketCategory"),
301
816
  }).id("TicketCategory");
302
817
  }
818
+
819
+ /** @returns {TicketContent} */
303
820
  static TicketContent() {
304
821
  return Joi.object({
305
- attachments: Joi.array().items(LeadModel.TicketAsset()),
822
+ attachments: Joi.array().items(LeadApplicationModel.TicketAsset()),
306
823
  description: Joi.string().allow(""),
307
824
  title: Joi.string().allow("").required(),
308
825
  });
309
826
  }
827
+
828
+ /** @returns {TicketContext} */
310
829
  static TicketContext() {
311
830
  return Joi.object({
312
831
  application_id: Joi.string().allow(""),
313
832
  company_id: Joi.string().allow("").required(),
314
833
  });
315
834
  }
835
+
836
+ /** @returns {TicketFeedback} */
316
837
  static TicketFeedback() {
317
838
  return Joi.object({
318
839
  _id: Joi.string().allow("").required(),
319
840
  category: Joi.string().allow(""),
320
841
  company_id: Joi.string().allow("").required(),
321
842
  created_at: Joi.string().allow(""),
322
- response: Joi.array().items(LeadModel.FeedbackResponseItem()).required(),
843
+ response: Joi.array()
844
+ .items(LeadApplicationModel.FeedbackResponseItem())
845
+ .required(),
323
846
  ticket_id: Joi.string().allow("").required(),
324
847
  updated_at: Joi.string().allow(""),
325
848
  user: Joi.any(),
326
849
  });
327
850
  }
851
+
852
+ /** @returns {TicketFeedbackForm} */
328
853
  static TicketFeedbackForm() {
329
854
  return Joi.object({
330
855
  display: Joi.array().items(Joi.any()),
331
856
  title: Joi.string().allow("").required(),
332
857
  });
333
858
  }
859
+
860
+ /** @returns {TicketFeedbackList} */
334
861
  static TicketFeedbackList() {
335
862
  return Joi.object({
336
- items: Joi.array().items(LeadModel.TicketFeedback()),
863
+ items: Joi.array().items(LeadApplicationModel.TicketFeedback()),
337
864
  });
338
865
  }
866
+
867
+ /** @returns {TicketFeedbackPayload} */
339
868
  static TicketFeedbackPayload() {
340
869
  return Joi.object({
341
870
  form_response: Joi.any(),
342
871
  });
343
872
  }
873
+
874
+ /** @returns {TicketHistory} */
344
875
  static TicketHistory() {
345
876
  return Joi.object({
346
877
  _id: Joi.string().allow("").required(),
347
878
  created_at: Joi.string().allow(""),
348
879
  created_by: Joi.any(),
349
- created_on: LeadModel.CreatedOn(),
880
+ created_on: LeadApplicationModel.CreatedOn(),
350
881
  ticket_id: Joi.string().allow("").required(),
351
882
  type: Joi.string().allow("").required(),
352
883
  updated_at: Joi.string().allow(""),
353
884
  value: Joi.any().required(),
354
885
  });
355
886
  }
887
+
888
+ /** @returns {TicketHistoryList} */
356
889
  static TicketHistoryList() {
357
890
  return Joi.object({
358
- items: Joi.array().items(LeadModel.TicketHistory()),
359
- page: LeadModel.Page(),
891
+ items: Joi.array().items(LeadApplicationModel.TicketHistory()),
892
+ page: LeadApplicationModel.Page(),
360
893
  });
361
894
  }
895
+
896
+ /** @returns {TicketHistoryPayload} */
362
897
  static TicketHistoryPayload() {
363
898
  return Joi.object({
364
- type: LeadModel.HistoryTypeEnum().required(),
899
+ type: LeadApplicationModel.HistoryTypeEnum().required(),
365
900
  value: Joi.any().required(),
366
901
  });
367
902
  }
903
+
904
+ /** @returns {TicketList} */
368
905
  static TicketList() {
369
906
  return Joi.object({
370
- filters: LeadModel.Filter(),
371
- items: Joi.array().items(LeadModel.Ticket()),
372
- page: LeadModel.Page(),
907
+ filters: LeadApplicationModel.Filter(),
908
+ items: Joi.array().items(LeadApplicationModel.Ticket()),
909
+ page: LeadApplicationModel.Page(),
373
910
  });
374
911
  }
912
+
913
+ /** @returns {TicketSubCategory} */
375
914
  static TicketSubCategory() {
376
915
  return Joi.object({
377
916
  display: Joi.string().allow("").required(),
@@ -379,6 +918,8 @@ class LeadModel {
379
918
  sub_categories: Joi.link("#TicketSubCategory"),
380
919
  }).id("TicketSubCategory");
381
920
  }
921
+
922
+ /** @returns {UserSchema} */
382
923
  static UserSchema() {
383
924
  return Joi.object({
384
925
  _id: Joi.string().allow(""),
@@ -387,12 +928,12 @@ class LeadModel {
387
928
  application_id: Joi.string().allow(""),
388
929
  created_at: Joi.string().allow(""),
389
930
  dob: Joi.string().allow(""),
390
- emails: Joi.array().items(LeadModel.Email()),
931
+ emails: Joi.array().items(LeadApplicationModel.Email()),
391
932
  first_name: Joi.string().allow(""),
392
933
  gender: Joi.string().allow(""),
393
934
  last_name: Joi.string().allow(""),
394
935
  meta: Joi.any(),
395
- phone_numbers: Joi.array().items(LeadModel.PhoneNumber()),
936
+ phone_numbers: Joi.array().items(LeadApplicationModel.PhoneNumber()),
396
937
  profile_pic_url: Joi.string().allow(""),
397
938
  updated_at: Joi.string().allow(""),
398
939
  user_id: Joi.string().allow(""),
@@ -400,10 +941,11 @@ class LeadModel {
400
941
  });
401
942
  }
402
943
 
403
- /*
404
- Enum: HistoryTypeEnum
405
- Used By: Lead
406
- */
944
+ /**
945
+ * Enum: HistoryTypeEnum Used By: Lead
946
+ *
947
+ * @returns {HistoryTypeEnum}
948
+ */
407
949
  static HistoryTypeEnum() {
408
950
  return Joi.string().valid(
409
951
  "rating",
@@ -416,10 +958,11 @@ class LeadModel {
416
958
  );
417
959
  }
418
960
 
419
- /*
420
- Enum: PriorityEnum
421
- Used By: Lead
422
- */
961
+ /**
962
+ * Enum: PriorityEnum Used By: Lead
963
+ *
964
+ * @returns {PriorityEnum}
965
+ */
423
966
  static PriorityEnum() {
424
967
  return Joi.string().valid(
425
968
  "low",
@@ -432,10 +975,11 @@ class LeadModel {
432
975
  );
433
976
  }
434
977
 
435
- /*
436
- Enum: TicketAssetTypeEnum
437
- Used By: Lead
438
- */
978
+ /**
979
+ * Enum: TicketAssetTypeEnum Used By: Lead
980
+ *
981
+ * @returns {TicketAssetTypeEnum}
982
+ */
439
983
  static TicketAssetTypeEnum() {
440
984
  return Joi.string().valid(
441
985
  "image",
@@ -458,10 +1002,11 @@ class LeadModel {
458
1002
  );
459
1003
  }
460
1004
 
461
- /*
462
- Enum: TicketIntegrationDetails
463
- Used By: Lead
464
- */
1005
+ /**
1006
+ * Enum: TicketIntegrationDetails Used By: Lead
1007
+ *
1008
+ * @returns {TicketIntegrationDetails}
1009
+ */
465
1010
  static TicketIntegrationDetails() {
466
1011
  return Joi.string().valid(
467
1012
  "default",
@@ -472,10 +1017,11 @@ class LeadModel {
472
1017
  );
473
1018
  }
474
1019
 
475
- /*
476
- Enum: TicketSourceEnum
477
- Used By: Lead
478
- */
1020
+ /**
1021
+ * Enum: TicketSourceEnum Used By: Lead
1022
+ *
1023
+ * @returns {TicketSourceEnum}
1024
+ */
479
1025
  static TicketSourceEnum() {
480
1026
  return Joi.string().valid(
481
1027
  "platform_panel",
@@ -484,4 +1030,4 @@ class LeadModel {
484
1030
  );
485
1031
  }
486
1032
  }
487
- module.exports = LeadModel;
1033
+ module.exports = LeadApplicationModel;