@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,6 +1,865 @@
1
1
  const Joi = require("joi");
2
2
 
3
- class CommunicationModel {
3
+ /**
4
+ * @typedef Audience
5
+ * @property {number} [__v]
6
+ * @property {string} [_id]
7
+ * @property {string} [application]
8
+ * @property {string} [created_at]
9
+ * @property {string} [description]
10
+ * @property {string} [file_url]
11
+ * @property {string[]} [headers]
12
+ * @property {boolean} [is_active]
13
+ * @property {string} [name]
14
+ * @property {number} [records_count]
15
+ * @property {string} [slug]
16
+ * @property {string[]} [tags]
17
+ * @property {string} [type]
18
+ * @property {string} [updated_at]
19
+ */
20
+
21
+ /**
22
+ * @typedef AudienceReq
23
+ * @property {string} [application]
24
+ * @property {string} [description]
25
+ * @property {string} [file_url]
26
+ * @property {string[]} [headers]
27
+ * @property {boolean} [is_active]
28
+ * @property {string} [name]
29
+ * @property {number} [records_count]
30
+ * @property {string[]} [tags]
31
+ * @property {string} [type]
32
+ */
33
+
34
+ /**
35
+ * @typedef Audiences
36
+ * @property {Audience[]} [items]
37
+ * @property {Page} [page]
38
+ */
39
+
40
+ /**
41
+ * @typedef BadRequestSchema
42
+ * @property {string} [message] - Failure message.
43
+ * @property {string} [status] - Response status.
44
+ */
45
+
46
+ /**
47
+ * @typedef BigqueryHeadersReq
48
+ * @property {string} [query]
49
+ * @property {string} [type]
50
+ */
51
+
52
+ /**
53
+ * @typedef BigqueryHeadersRes
54
+ * @property {BigqueryHeadersResHeaders[]} [headers]
55
+ */
56
+
57
+ /**
58
+ * @typedef BigqueryHeadersResHeaders
59
+ * @property {string} [name]
60
+ * @property {string} [type]
61
+ */
62
+
63
+ /**
64
+ * @typedef Campaign
65
+ * @property {number} [__v]
66
+ * @property {string} [_id]
67
+ * @property {string} [application]
68
+ * @property {string} [created_at]
69
+ * @property {string} [datasource]
70
+ * @property {string} [description]
71
+ * @property {CampaignEmail} [email]
72
+ * @property {boolean} [is_active]
73
+ * @property {string} [name]
74
+ * @property {RecipientHeaders} [recipient_headers]
75
+ * @property {string} [slug]
76
+ * @property {Object[]} [tags]
77
+ * @property {string} [type]
78
+ * @property {string} [updated_at]
79
+ */
80
+
81
+ /**
82
+ * @typedef CampaignEmail
83
+ * @property {CampignEmailProvider} [provider]
84
+ * @property {CampaignEmailTemplate} [template]
85
+ */
86
+
87
+ /**
88
+ * @typedef CampaignEmailTemplate
89
+ * @property {string} [key]
90
+ * @property {string} [value]
91
+ */
92
+
93
+ /**
94
+ * @typedef CampaignReq
95
+ * @property {string} [application]
96
+ * @property {string} [description]
97
+ * @property {string} [file_url]
98
+ * @property {string[]} [headers]
99
+ * @property {boolean} [is_active]
100
+ * @property {string} [name]
101
+ * @property {number} [records_count]
102
+ * @property {string[]} [tags]
103
+ * @property {string} [type]
104
+ */
105
+
106
+ /**
107
+ * @typedef Campaigns
108
+ * @property {Campaign[]} [items]
109
+ * @property {Page} [page]
110
+ */
111
+
112
+ /**
113
+ * @typedef CampignEmailProvider
114
+ * @property {string} [_id]
115
+ * @property {string} [from_email]
116
+ * @property {string} [from_name]
117
+ */
118
+
119
+ /**
120
+ * @typedef EmailProvider
121
+ * @property {number} [__v]
122
+ * @property {string} [_id]
123
+ * @property {string} [api_key]
124
+ * @property {string} [application]
125
+ * @property {string} [created_at]
126
+ * @property {string} [description]
127
+ * @property {EmailProviderReqFrom[]} [from_address]
128
+ * @property {string} [name]
129
+ * @property {string} [provider]
130
+ * @property {string} [slug]
131
+ * @property {string} [type]
132
+ * @property {string} [updated_at]
133
+ */
134
+
135
+ /**
136
+ * @typedef EmailProviderReq
137
+ * @property {string} [api_key]
138
+ * @property {string} [description]
139
+ * @property {EmailProviderReqFrom[]} [from_address]
140
+ * @property {string} [name]
141
+ * @property {string} [provider]
142
+ * @property {string} [type]
143
+ */
144
+
145
+ /**
146
+ * @typedef EmailProviderReqFrom
147
+ * @property {string} [email]
148
+ * @property {boolean} [is_default]
149
+ * @property {string} [name]
150
+ */
151
+
152
+ /**
153
+ * @typedef EmailProviders
154
+ * @property {EmailProvider[]} [items]
155
+ * @property {Page} [page]
156
+ */
157
+
158
+ /**
159
+ * @typedef EmailTemplate
160
+ * @property {number} [__v]
161
+ * @property {string} [_id]
162
+ * @property {Object[]} [attachments]
163
+ * @property {string} [created_at]
164
+ * @property {string} [description]
165
+ * @property {string} [from_name]
166
+ * @property {Object[]} [headers]
167
+ * @property {TemplateAndType} [html]
168
+ * @property {boolean} [is_internal]
169
+ * @property {boolean} [is_system]
170
+ * @property {string} [name]
171
+ * @property {string} [priority]
172
+ * @property {boolean} [published]
173
+ * @property {string} [slug]
174
+ * @property {Object[]} [static_bcc]
175
+ * @property {Object[]} [static_cc]
176
+ * @property {Object[]} [static_to]
177
+ * @property {TemplateAndType} [subject]
178
+ * @property {Object[]} [tags]
179
+ * @property {TemplateAndType} [text]
180
+ * @property {string} [updated_at]
181
+ */
182
+
183
+ /**
184
+ * @typedef EmailTemplateDeleteFailureRes
185
+ * @property {string} [message]
186
+ * @property {boolean} [success]
187
+ */
188
+
189
+ /**
190
+ * @typedef EmailTemplateDeleteSuccessRes
191
+ * @property {string} [message]
192
+ * @property {boolean} [success]
193
+ */
194
+
195
+ /**
196
+ * @typedef EmailTemplateHeaders
197
+ * @property {string} [key]
198
+ * @property {string} [value]
199
+ */
200
+
201
+ /**
202
+ * @typedef EmailTemplateKeys
203
+ * @property {string} [bcc]
204
+ * @property {string} [cc]
205
+ * @property {string} [to]
206
+ */
207
+
208
+ /**
209
+ * @typedef EmailTemplateReq
210
+ * @property {Object[]} [attachments]
211
+ * @property {string} [description]
212
+ * @property {EmailTemplateHeaders[]} [headers]
213
+ * @property {TemplateAndType} [html]
214
+ * @property {EmailTemplateKeys} [keys]
215
+ * @property {string} [name]
216
+ * @property {string} [priority]
217
+ * @property {string} [reply_to]
218
+ * @property {string[]} [static_bcc]
219
+ * @property {string[]} [static_cc]
220
+ * @property {string[]} [static_to]
221
+ * @property {TemplateAndType} [subject]
222
+ * @property {TemplateAndType} [text]
223
+ */
224
+
225
+ /**
226
+ * @typedef EmailTemplateRes
227
+ * @property {number} [__v]
228
+ * @property {string} [_id]
229
+ * @property {Object[]} [attachments]
230
+ * @property {string} [created_at]
231
+ * @property {string} [description]
232
+ * @property {EmailTemplateHeaders[]} [headers]
233
+ * @property {TemplateAndType} [html]
234
+ * @property {boolean} [is_internal]
235
+ * @property {boolean} [is_system]
236
+ * @property {EmailTemplateKeys} [keys]
237
+ * @property {string} [name]
238
+ * @property {string} [priority]
239
+ * @property {boolean} [published]
240
+ * @property {string} [reply_to]
241
+ * @property {string} [slug]
242
+ * @property {string[]} [static_bcc]
243
+ * @property {string[]} [static_cc]
244
+ * @property {string[]} [static_to]
245
+ * @property {TemplateAndType} [subject]
246
+ * @property {Object[]} [tags]
247
+ * @property {TemplateAndType} [text]
248
+ * @property {string} [updated_at]
249
+ */
250
+
251
+ /**
252
+ * @typedef EmailTemplates
253
+ * @property {EmailTemplate[]} [items]
254
+ * @property {Page} [page]
255
+ */
256
+
257
+ /**
258
+ * @typedef EngineRequest
259
+ * @property {MetaStructure} [meta]
260
+ * @property {PayloadStructure} [payload]
261
+ */
262
+
263
+ /**
264
+ * @typedef EngineResponse
265
+ * @property {boolean} [success]
266
+ */
267
+
268
+ /**
269
+ * @typedef EventSubscription
270
+ * @property {number} [__v]
271
+ * @property {string} [_id]
272
+ * @property {string} [application]
273
+ * @property {string} [created_at]
274
+ * @property {string} [event]
275
+ * @property {boolean} [is_default]
276
+ * @property {string} [slug]
277
+ * @property {EventSubscriptionTemplate} [template]
278
+ * @property {string} [updated_at]
279
+ */
280
+
281
+ /**
282
+ * @typedef EventSubscriptions
283
+ * @property {EventSubscription[]} [items]
284
+ * @property {Page} [page]
285
+ */
286
+
287
+ /**
288
+ * @typedef EventSubscriptionTemplate
289
+ * @property {EventSubscriptionTemplateEmail} [email]
290
+ * @property {EventSubscriptionTemplateSms} [sms]
291
+ */
292
+
293
+ /**
294
+ * @typedef EventSubscriptionTemplateEmail
295
+ * @property {boolean} [subscribed]
296
+ * @property {string} [template]
297
+ */
298
+
299
+ /**
300
+ * @typedef EventSubscriptionTemplateSms
301
+ * @property {boolean} [subscribed]
302
+ * @property {string} [template]
303
+ */
304
+
305
+ /**
306
+ * @typedef GetNRecordsCsvReq
307
+ * @property {number} [count]
308
+ * @property {boolean} [header]
309
+ * @property {string} [url]
310
+ */
311
+
312
+ /**
313
+ * @typedef GetNRecordsCsvRes
314
+ * @property {GetNRecordsCsvResItems[]} [items]
315
+ */
316
+
317
+ /**
318
+ * @typedef GetNRecordsCsvResItems
319
+ * @property {string} [email]
320
+ * @property {string} [firstname]
321
+ * @property {string} [lastname]
322
+ * @property {string} [orderid]
323
+ * @property {string} [phone_number]
324
+ */
325
+
326
+ /**
327
+ * @typedef GetStats
328
+ * @property {Stats[]} [items]
329
+ */
330
+
331
+ /**
332
+ * @typedef Job
333
+ * @property {number} [__v]
334
+ * @property {string} [_id]
335
+ * @property {string} [application]
336
+ * @property {string} [campaign]
337
+ * @property {boolean} [completed]
338
+ * @property {string} [created_at]
339
+ * @property {boolean} [is_active]
340
+ * @property {string} [updated_at]
341
+ */
342
+
343
+ /**
344
+ * @typedef JobLog
345
+ * @property {number} [__v]
346
+ * @property {string} [_id]
347
+ * @property {string} [campaign]
348
+ * @property {string} [created_at]
349
+ * @property {Object} [imported]
350
+ * @property {string} [job]
351
+ * @property {Object} [processed]
352
+ * @property {string} [updated_at]
353
+ */
354
+
355
+ /**
356
+ * @typedef JobLogs
357
+ * @property {JobLog[]} [items]
358
+ * @property {Page} [page]
359
+ */
360
+
361
+ /**
362
+ * @typedef Jobs
363
+ * @property {Job[]} [items]
364
+ * @property {Page} [page]
365
+ */
366
+
367
+ /**
368
+ * @typedef Log
369
+ * @property {string} [_id]
370
+ * @property {string} [application]
371
+ * @property {string} [channel_type]
372
+ * @property {string} [created_at]
373
+ * @property {Object} [data]
374
+ * @property {LogEmail} [email]
375
+ * @property {string} [expire_at]
376
+ * @property {LogMeta} [meta]
377
+ * @property {LogPushnotification} [pushnotification]
378
+ * @property {string} [service]
379
+ * @property {string} [source]
380
+ * @property {string} [status]
381
+ * @property {string} [step]
382
+ */
383
+
384
+ /**
385
+ * @typedef LogEmail
386
+ * @property {string} [template]
387
+ */
388
+
389
+ /**
390
+ * @typedef LogMeta
391
+ * @property {string} [identifier]
392
+ * @property {string} [key]
393
+ * @property {string} [offset]
394
+ * @property {string} [partition]
395
+ * @property {string} [topic]
396
+ * @property {string} [type]
397
+ */
398
+
399
+ /**
400
+ * @typedef LogPushnotification
401
+ * @property {string[]} [pushtokens]
402
+ */
403
+
404
+ /**
405
+ * @typedef Logs
406
+ * @property {Log[]} [items]
407
+ * @property {Page} [page]
408
+ */
409
+
410
+ /**
411
+ * @typedef MetaStructure
412
+ * @property {string} [action]
413
+ * @property {string} [job_type]
414
+ * @property {string} [timestamp]
415
+ * @property {string} [trace]
416
+ */
417
+
418
+ /**
419
+ * @typedef NotFound
420
+ * @property {string} [message] - Failure message.
421
+ */
422
+
423
+ /**
424
+ * @typedef Notification
425
+ * @property {string} [body]
426
+ * @property {string} [click_action]
427
+ * @property {string} [deeplink]
428
+ * @property {string} [icon]
429
+ * @property {string} [subtitle]
430
+ * @property {string} [title]
431
+ */
432
+
433
+ /**
434
+ * @typedef Page
435
+ * @property {number} [current]
436
+ * @property {boolean} [has_next]
437
+ * @property {boolean} [has_previous]
438
+ * @property {number} [item_total]
439
+ * @property {string} [next_id]
440
+ * @property {number} [size]
441
+ * @property {string} type
442
+ */
443
+
444
+ /**
445
+ * @typedef PayloadEmailProviderStructure
446
+ * @property {string} [_id]
447
+ */
448
+
449
+ /**
450
+ * @typedef PayloadEmailStructure
451
+ * @property {PayloadEmailProviderStructure} [provider]
452
+ * @property {PayloadEmailTemplateStructure} [template]
453
+ */
454
+
455
+ /**
456
+ * @typedef PayloadEmailTemplateStructure
457
+ * @property {string} [key]
458
+ * @property {Object} [value]
459
+ */
460
+
461
+ /**
462
+ * @typedef PayloadSmsProviderStructure
463
+ * @property {string} [_id]
464
+ */
465
+
466
+ /**
467
+ * @typedef PayloadSmsStructure
468
+ * @property {PayloadSmsProviderStructure} [provider]
469
+ * @property {PayloadSmsTemplateStructure} [template]
470
+ */
471
+
472
+ /**
473
+ * @typedef PayloadSmsTemplateStructure
474
+ * @property {string} [key]
475
+ * @property {Object} [value]
476
+ */
477
+
478
+ /**
479
+ * @typedef PayloadStructure
480
+ * @property {string} [application]
481
+ * @property {Object[]} [data]
482
+ * @property {PayloadEmailStructure} [email]
483
+ * @property {PayloadSmsStructure} [sms]
484
+ */
485
+
486
+ /**
487
+ * @typedef PushtokenReq
488
+ * @property {string} [action]
489
+ * @property {string} [bundle_identifier]
490
+ * @property {string} [push_token]
491
+ * @property {string} [unique_device_id]
492
+ */
493
+
494
+ /**
495
+ * @typedef PushtokenRes
496
+ * @property {string} [_id]
497
+ * @property {string} [application_id]
498
+ * @property {string} [bundle_identifier]
499
+ * @property {string} [created_at]
500
+ * @property {string} [expired_at]
501
+ * @property {string} [platform]
502
+ * @property {string} [push_token]
503
+ * @property {string} [type]
504
+ * @property {string} [unique_device_id]
505
+ * @property {string} [updated_at]
506
+ * @property {string} [user_id]
507
+ */
508
+
509
+ /**
510
+ * @typedef RecipientHeaders
511
+ * @property {string} [email]
512
+ */
513
+
514
+ /**
515
+ * @typedef SendOtpCommsReq
516
+ * @property {SendOtpCommsReqData} [data]
517
+ * @property {SendOtpCommsReqEmail} [email]
518
+ * @property {SendOtpCommsReqSms} [sms]
519
+ */
520
+
521
+ /**
522
+ * @typedef SendOtpCommsReqData
523
+ * @property {string} [country_code]
524
+ * @property {string} [mobile]
525
+ * @property {boolean} [send_same_otp_to_channel]
526
+ * @property {string} [to]
527
+ */
528
+
529
+ /**
530
+ * @typedef SendOtpCommsReqEmail
531
+ * @property {number} [expiry]
532
+ * @property {number} [otp_length]
533
+ * @property {SendOtpEmailCommsProvider} [provider]
534
+ * @property {SendOtpEmailCommsTemplate} [template]
535
+ */
536
+
537
+ /**
538
+ * @typedef SendOtpCommsReqSms
539
+ * @property {number} [expiry]
540
+ * @property {number} [otp_length]
541
+ * @property {SendOtpSmsCommsProvider} [provider]
542
+ * @property {SendOtpSmsCommsTemplate} [template]
543
+ */
544
+
545
+ /**
546
+ * @typedef SendOtpCommsRes
547
+ * @property {SendOtpCommsResEmail} [email]
548
+ * @property {SendOtpCommsResSms} [sms]
549
+ */
550
+
551
+ /**
552
+ * @typedef SendOtpCommsResEmail
553
+ * @property {string} [message]
554
+ * @property {string} [request_id]
555
+ * @property {number} [resend_timer]
556
+ * @property {boolean} [success]
557
+ * @property {string} [to]
558
+ */
559
+
560
+ /**
561
+ * @typedef SendOtpCommsResSms
562
+ * @property {string} [country_code]
563
+ * @property {string} [message]
564
+ * @property {string} [mobile]
565
+ * @property {string} [request_id]
566
+ * @property {number} [resend_timer]
567
+ * @property {boolean} [success]
568
+ */
569
+
570
+ /**
571
+ * @typedef SendOtpEmailCommsProvider
572
+ * @property {string} [_id]
573
+ * @property {string} [slug]
574
+ */
575
+
576
+ /**
577
+ * @typedef SendOtpEmailCommsTemplate
578
+ * @property {string} [key]
579
+ * @property {Object} [value]
580
+ */
581
+
582
+ /**
583
+ * @typedef SendOtpSmsCommsProvider
584
+ * @property {string} [_id]
585
+ * @property {string} [slug]
586
+ */
587
+
588
+ /**
589
+ * @typedef SendOtpSmsCommsTemplate
590
+ * @property {string} [key]
591
+ * @property {Object} [value]
592
+ */
593
+
594
+ /**
595
+ * @typedef SmsProvider
596
+ * @property {number} [__v]
597
+ * @property {string} [_id]
598
+ * @property {string} [application]
599
+ * @property {string} [authkey]
600
+ * @property {string} [created_at]
601
+ * @property {string} [description]
602
+ * @property {string} [name]
603
+ * @property {string} [provider]
604
+ * @property {number} [rpt]
605
+ * @property {string} [sender]
606
+ * @property {string} [slug]
607
+ * @property {string} [type]
608
+ * @property {string} [updated_at]
609
+ * @property {string} [username]
610
+ */
611
+
612
+ /**
613
+ * @typedef SmsProviderReq
614
+ * @property {string} [authkey]
615
+ * @property {string} [description]
616
+ * @property {string} [name]
617
+ * @property {string} [provider]
618
+ * @property {string} [sender]
619
+ * @property {string} [type]
620
+ * @property {string} [username]
621
+ */
622
+
623
+ /**
624
+ * @typedef SmsProviders
625
+ * @property {SmsProvider[]} [items]
626
+ * @property {Page} [page]
627
+ */
628
+
629
+ /**
630
+ * @typedef SmsTemplate
631
+ * @property {number} [__v]
632
+ * @property {string} [_id]
633
+ * @property {string} [created_at]
634
+ * @property {string} [description]
635
+ * @property {boolean} [is_internal]
636
+ * @property {boolean} [is_system]
637
+ * @property {SmsTemplateMessage} [message]
638
+ * @property {string} [name]
639
+ * @property {string} [priority]
640
+ * @property {boolean} [published]
641
+ * @property {string} [slug]
642
+ * @property {Object[]} [tags]
643
+ * @property {Object} [template_variables]
644
+ * @property {string} [updated_at]
645
+ */
646
+
647
+ /**
648
+ * @typedef SmsTemplateDeleteFailureRes
649
+ * @property {string} [message]
650
+ * @property {boolean} [success]
651
+ */
652
+
653
+ /**
654
+ * @typedef SmsTemplateDeleteSuccessRes
655
+ * @property {string} [message]
656
+ * @property {boolean} [success]
657
+ */
658
+
659
+ /**
660
+ * @typedef SmsTemplateMessage
661
+ * @property {string} [template]
662
+ * @property {string} [template_type]
663
+ */
664
+
665
+ /**
666
+ * @typedef SmsTemplateReq
667
+ * @property {Object[]} [attachments]
668
+ * @property {string} [description]
669
+ * @property {SmsTemplateMessage} [message]
670
+ * @property {string} [name]
671
+ * @property {string} [priority]
672
+ * @property {Object} [template_variables]
673
+ */
674
+
675
+ /**
676
+ * @typedef SmsTemplateRes
677
+ * @property {number} [__v]
678
+ * @property {string} [_id]
679
+ * @property {string} [created_at]
680
+ * @property {string} [description]
681
+ * @property {boolean} [is_internal]
682
+ * @property {boolean} [is_system]
683
+ * @property {SmsTemplateMessage} [message]
684
+ * @property {string} [name]
685
+ * @property {string} [priority]
686
+ * @property {boolean} [published]
687
+ * @property {string} [slug]
688
+ * @property {Object[]} [tags]
689
+ * @property {Object} [template_variables]
690
+ * @property {string} [updated_at]
691
+ */
692
+
693
+ /**
694
+ * @typedef SmsTemplates
695
+ * @property {SmsTemplate[]} [items]
696
+ * @property {Page} [page]
697
+ */
698
+
699
+ /**
700
+ * @typedef Stats
701
+ * @property {string} [_id]
702
+ * @property {Object} [imported]
703
+ * @property {Object} [processed]
704
+ */
705
+
706
+ /**
707
+ * @typedef StatsImported
708
+ * @property {number} [count]
709
+ */
710
+
711
+ /**
712
+ * @typedef StatsProcessed
713
+ * @property {StatsProcessedEmail} [email]
714
+ * @property {StatsProcessedSms} [sms]
715
+ */
716
+
717
+ /**
718
+ * @typedef StatsProcessedEmail
719
+ * @property {number} [failed]
720
+ * @property {number} [success]
721
+ * @property {number} [suppressed]
722
+ */
723
+
724
+ /**
725
+ * @typedef StatsProcessedSms
726
+ * @property {number} [failed]
727
+ * @property {number} [success]
728
+ * @property {number} [suppressed]
729
+ */
730
+
731
+ /**
732
+ * @typedef SystemEmailTemplate
733
+ * @property {number} [__v]
734
+ * @property {string} [_id]
735
+ * @property {Object[]} [attachments]
736
+ * @property {string} [created_at]
737
+ * @property {string} [description]
738
+ * @property {string} [from_name]
739
+ * @property {Object[]} [headers]
740
+ * @property {TemplateAndType} [html]
741
+ * @property {boolean} [is_internal]
742
+ * @property {boolean} [is_system]
743
+ * @property {string} [name]
744
+ * @property {string} [priority]
745
+ * @property {boolean} [published]
746
+ * @property {string} [slug]
747
+ * @property {Object[]} [static_bcc]
748
+ * @property {Object[]} [static_cc]
749
+ * @property {Object[]} [static_to]
750
+ * @property {TemplateAndType} [subject]
751
+ * @property {Object[]} [tags]
752
+ * @property {TemplateAndType} [text]
753
+ * @property {string} [updated_at]
754
+ */
755
+
756
+ /**
757
+ * @typedef SystemEmailTemplates
758
+ * @property {SystemEmailTemplate[]} [items]
759
+ * @property {Page} [page]
760
+ */
761
+
762
+ /**
763
+ * @typedef SystemNotification
764
+ * @property {string} [_id]
765
+ * @property {string} [created_at]
766
+ * @property {string} [group]
767
+ * @property {Notification} [notification]
768
+ * @property {SystemNotificationUser} [settings]
769
+ * @property {SystemNotificationUser} [user]
770
+ */
771
+
772
+ /**
773
+ * @typedef SystemNotifications
774
+ * @property {SystemNotification[]} [items]
775
+ * @property {number} [last_read_anchor]
776
+ * @property {Page} [page]
777
+ */
778
+
779
+ /**
780
+ * @typedef SystemNotificationSettings
781
+ * @property {string} [priority]
782
+ * @property {boolean} [sound]
783
+ * @property {string} [time_to_live]
784
+ */
785
+
786
+ /**
787
+ * @typedef SystemNotificationsPage
788
+ * @property {number} [current]
789
+ * @property {boolean} [has_next]
790
+ * @property {number} [item_total]
791
+ * @property {number} [size]
792
+ * @property {string} [type]
793
+ */
794
+
795
+ /**
796
+ * @typedef SystemNotificationUser
797
+ * @property {string} [type]
798
+ * @property {string} [value]
799
+ */
800
+
801
+ /**
802
+ * @typedef SystemSmsTemplate
803
+ * @property {number} [__v]
804
+ * @property {string} [_id]
805
+ * @property {string} [created_at]
806
+ * @property {string} [description]
807
+ * @property {boolean} [is_internal]
808
+ * @property {boolean} [is_system]
809
+ * @property {SmsTemplateMessage} [message]
810
+ * @property {string} [name]
811
+ * @property {string} [priority]
812
+ * @property {boolean} [published]
813
+ * @property {string} [slug]
814
+ * @property {Object[]} [tags]
815
+ * @property {Object} [template_variables]
816
+ * @property {string} [updated_at]
817
+ */
818
+
819
+ /**
820
+ * @typedef SystemSmsTemplates
821
+ * @property {SystemSmsTemplate[]} [items]
822
+ * @property {Page} [page]
823
+ */
824
+
825
+ /**
826
+ * @typedef TemplateAndType
827
+ * @property {string} [template]
828
+ * @property {string} [template_type]
829
+ */
830
+
831
+ /**
832
+ * @typedef TriggerJobRequest
833
+ * @property {string} [job_id]
834
+ */
835
+
836
+ /**
837
+ * @typedef TriggerJobResponse
838
+ * @property {number} [status]
839
+ */
840
+
841
+ /**
842
+ * @typedef VerifyOtpCommsErrorRes
843
+ * @property {string} [message]
844
+ * @property {boolean} [success]
845
+ */
846
+
847
+ /**
848
+ * @typedef VerifyOtpCommsReq
849
+ * @property {string} [otp]
850
+ * @property {string} [request_id]
851
+ */
852
+
853
+ /**
854
+ * @typedef VerifyOtpCommsSuccessRes
855
+ * @property {string} [country_code]
856
+ * @property {string} [message]
857
+ * @property {string} [mobile]
858
+ * @property {boolean} [success]
859
+ */
860
+
861
+ class CommunicationPlatformModel {
862
+ /** @returns {Audience} */
4
863
  static Audience() {
5
864
  return Joi.object({
6
865
  __v: Joi.number(),
@@ -19,6 +878,8 @@ class CommunicationModel {
19
878
  updated_at: Joi.string().allow(""),
20
879
  });
21
880
  }
881
+
882
+ /** @returns {AudienceReq} */
22
883
  static AudienceReq() {
23
884
  return Joi.object({
24
885
  application: Joi.string().allow(""),
@@ -32,37 +893,49 @@ class CommunicationModel {
32
893
  type: Joi.string().allow(""),
33
894
  });
34
895
  }
896
+
897
+ /** @returns {Audiences} */
35
898
  static Audiences() {
36
899
  return Joi.object({
37
- items: Joi.array().items(CommunicationModel.Audience()),
38
- page: CommunicationModel.Page(),
900
+ items: Joi.array().items(CommunicationPlatformModel.Audience()),
901
+ page: CommunicationPlatformModel.Page(),
39
902
  });
40
903
  }
904
+
905
+ /** @returns {BadRequestSchema} */
41
906
  static BadRequestSchema() {
42
907
  return Joi.object({
43
908
  message: Joi.string().allow(""),
44
909
  status: Joi.string().allow(""),
45
910
  });
46
911
  }
912
+
913
+ /** @returns {BigqueryHeadersReq} */
47
914
  static BigqueryHeadersReq() {
48
915
  return Joi.object({
49
916
  query: Joi.string().allow(""),
50
917
  type: Joi.string().allow(""),
51
918
  });
52
919
  }
920
+
921
+ /** @returns {BigqueryHeadersRes} */
53
922
  static BigqueryHeadersRes() {
54
923
  return Joi.object({
55
924
  headers: Joi.array().items(
56
- CommunicationModel.BigqueryHeadersResHeaders()
925
+ CommunicationPlatformModel.BigqueryHeadersResHeaders()
57
926
  ),
58
927
  });
59
928
  }
929
+
930
+ /** @returns {BigqueryHeadersResHeaders} */
60
931
  static BigqueryHeadersResHeaders() {
61
932
  return Joi.object({
62
933
  name: Joi.string().allow(""),
63
934
  type: Joi.string().allow(""),
64
935
  });
65
936
  }
937
+
938
+ /** @returns {Campaign} */
66
939
  static Campaign() {
67
940
  return Joi.object({
68
941
  __v: Joi.number(),
@@ -71,28 +944,34 @@ class CommunicationModel {
71
944
  created_at: Joi.string().allow(""),
72
945
  datasource: Joi.string().allow(""),
73
946
  description: Joi.string().allow(""),
74
- email: CommunicationModel.CampaignEmail(),
947
+ email: CommunicationPlatformModel.CampaignEmail(),
75
948
  is_active: Joi.boolean(),
76
949
  name: Joi.string().allow(""),
77
- recipient_headers: CommunicationModel.RecipientHeaders(),
950
+ recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
78
951
  slug: Joi.string().allow(""),
79
952
  tags: Joi.array().items(Joi.any()),
80
953
  type: Joi.string().allow(""),
81
954
  updated_at: Joi.string().allow(""),
82
955
  });
83
956
  }
957
+
958
+ /** @returns {CampaignEmail} */
84
959
  static CampaignEmail() {
85
960
  return Joi.object({
86
- provider: CommunicationModel.CampignEmailProvider(),
87
- template: CommunicationModel.CampaignEmailTemplate(),
961
+ provider: CommunicationPlatformModel.CampignEmailProvider(),
962
+ template: CommunicationPlatformModel.CampaignEmailTemplate(),
88
963
  });
89
964
  }
965
+
966
+ /** @returns {CampaignEmailTemplate} */
90
967
  static CampaignEmailTemplate() {
91
968
  return Joi.object({
92
969
  key: Joi.string().allow(""),
93
970
  value: Joi.string().allow(""),
94
971
  });
95
972
  }
973
+
974
+ /** @returns {CampaignReq} */
96
975
  static CampaignReq() {
97
976
  return Joi.object({
98
977
  application: Joi.string().allow(""),
@@ -106,12 +985,16 @@ class CommunicationModel {
106
985
  type: Joi.string().allow(""),
107
986
  });
108
987
  }
988
+
989
+ /** @returns {Campaigns} */
109
990
  static Campaigns() {
110
991
  return Joi.object({
111
- items: Joi.array().items(CommunicationModel.Campaign()),
112
- page: CommunicationModel.Page(),
992
+ items: Joi.array().items(CommunicationPlatformModel.Campaign()),
993
+ page: CommunicationPlatformModel.Page(),
113
994
  });
114
995
  }
996
+
997
+ /** @returns {CampignEmailProvider} */
115
998
  static CampignEmailProvider() {
116
999
  return Joi.object({
117
1000
  _id: Joi.string().allow(""),
@@ -119,6 +1002,8 @@ class CommunicationModel {
119
1002
  from_name: Joi.string().allow(""),
120
1003
  });
121
1004
  }
1005
+
1006
+ /** @returns {EmailProvider} */
122
1007
  static EmailProvider() {
123
1008
  return Joi.object({
124
1009
  __v: Joi.number(),
@@ -128,7 +1013,7 @@ class CommunicationModel {
128
1013
  created_at: Joi.string().allow(""),
129
1014
  description: Joi.string().allow(""),
130
1015
  from_address: Joi.array().items(
131
- CommunicationModel.EmailProviderReqFrom()
1016
+ CommunicationPlatformModel.EmailProviderReqFrom()
132
1017
  ),
133
1018
  name: Joi.string().allow(""),
134
1019
  provider: Joi.string().allow(""),
@@ -137,18 +1022,22 @@ class CommunicationModel {
137
1022
  updated_at: Joi.string().allow(""),
138
1023
  });
139
1024
  }
1025
+
1026
+ /** @returns {EmailProviderReq} */
140
1027
  static EmailProviderReq() {
141
1028
  return Joi.object({
142
1029
  api_key: Joi.string().allow(""),
143
1030
  description: Joi.string().allow(""),
144
1031
  from_address: Joi.array().items(
145
- CommunicationModel.EmailProviderReqFrom()
1032
+ CommunicationPlatformModel.EmailProviderReqFrom()
146
1033
  ),
147
1034
  name: Joi.string().allow(""),
148
1035
  provider: Joi.string().allow(""),
149
1036
  type: Joi.string().allow(""),
150
1037
  });
151
1038
  }
1039
+
1040
+ /** @returns {EmailProviderReqFrom} */
152
1041
  static EmailProviderReqFrom() {
153
1042
  return Joi.object({
154
1043
  email: Joi.string().allow(""),
@@ -156,12 +1045,16 @@ class CommunicationModel {
156
1045
  name: Joi.string().allow(""),
157
1046
  });
158
1047
  }
1048
+
1049
+ /** @returns {EmailProviders} */
159
1050
  static EmailProviders() {
160
1051
  return Joi.object({
161
- items: Joi.array().items(CommunicationModel.EmailProvider()),
162
- page: CommunicationModel.Page(),
1052
+ items: Joi.array().items(CommunicationPlatformModel.EmailProvider()),
1053
+ page: CommunicationPlatformModel.Page(),
163
1054
  });
164
1055
  }
1056
+
1057
+ /** @returns {EmailTemplate} */
165
1058
  static EmailTemplate() {
166
1059
  return Joi.object({
167
1060
  __v: Joi.number(),
@@ -171,7 +1064,7 @@ class CommunicationModel {
171
1064
  description: Joi.string().allow(""),
172
1065
  from_name: Joi.string().allow(""),
173
1066
  headers: Joi.array().items(Joi.any()),
174
- html: CommunicationModel.TemplateAndType(),
1067
+ html: CommunicationPlatformModel.TemplateAndType(),
175
1068
  is_internal: Joi.boolean(),
176
1069
  is_system: Joi.boolean(),
177
1070
  name: Joi.string().allow(""),
@@ -181,30 +1074,38 @@ class CommunicationModel {
181
1074
  static_bcc: Joi.array().items(Joi.any()),
182
1075
  static_cc: Joi.array().items(Joi.any()),
183
1076
  static_to: Joi.array().items(Joi.any()),
184
- subject: CommunicationModel.TemplateAndType(),
1077
+ subject: CommunicationPlatformModel.TemplateAndType(),
185
1078
  tags: Joi.array().items(Joi.any()),
186
- text: CommunicationModel.TemplateAndType(),
1079
+ text: CommunicationPlatformModel.TemplateAndType(),
187
1080
  updated_at: Joi.string().allow(""),
188
1081
  });
189
1082
  }
1083
+
1084
+ /** @returns {EmailTemplateDeleteFailureRes} */
190
1085
  static EmailTemplateDeleteFailureRes() {
191
1086
  return Joi.object({
192
1087
  message: Joi.string().allow(""),
193
1088
  success: Joi.boolean(),
194
1089
  });
195
1090
  }
1091
+
1092
+ /** @returns {EmailTemplateDeleteSuccessRes} */
196
1093
  static EmailTemplateDeleteSuccessRes() {
197
1094
  return Joi.object({
198
1095
  message: Joi.string().allow(""),
199
1096
  success: Joi.boolean(),
200
1097
  });
201
1098
  }
1099
+
1100
+ /** @returns {EmailTemplateHeaders} */
202
1101
  static EmailTemplateHeaders() {
203
1102
  return Joi.object({
204
1103
  key: Joi.string().allow(""),
205
1104
  value: Joi.string().allow(""),
206
1105
  });
207
1106
  }
1107
+
1108
+ /** @returns {EmailTemplateKeys} */
208
1109
  static EmailTemplateKeys() {
209
1110
  return Joi.object({
210
1111
  bcc: Joi.string().allow(""),
@@ -212,23 +1113,29 @@ class CommunicationModel {
212
1113
  to: Joi.string().allow(""),
213
1114
  });
214
1115
  }
1116
+
1117
+ /** @returns {EmailTemplateReq} */
215
1118
  static EmailTemplateReq() {
216
1119
  return Joi.object({
217
1120
  attachments: Joi.array().items(Joi.any()),
218
1121
  description: Joi.string().allow(""),
219
- headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
220
- html: CommunicationModel.TemplateAndType(),
221
- keys: CommunicationModel.EmailTemplateKeys(),
1122
+ headers: Joi.array().items(
1123
+ CommunicationPlatformModel.EmailTemplateHeaders()
1124
+ ),
1125
+ html: CommunicationPlatformModel.TemplateAndType(),
1126
+ keys: CommunicationPlatformModel.EmailTemplateKeys(),
222
1127
  name: Joi.string().allow(""),
223
1128
  priority: Joi.string().allow(""),
224
1129
  reply_to: Joi.string().allow(""),
225
1130
  static_bcc: Joi.array().items(Joi.string().allow("")),
226
1131
  static_cc: Joi.array().items(Joi.string().allow("")),
227
1132
  static_to: Joi.array().items(Joi.string().allow("")),
228
- subject: CommunicationModel.TemplateAndType(),
229
- text: CommunicationModel.TemplateAndType(),
1133
+ subject: CommunicationPlatformModel.TemplateAndType(),
1134
+ text: CommunicationPlatformModel.TemplateAndType(),
230
1135
  });
231
1136
  }
1137
+
1138
+ /** @returns {EmailTemplateRes} */
232
1139
  static EmailTemplateRes() {
233
1140
  return Joi.object({
234
1141
  __v: Joi.number(),
@@ -236,11 +1143,13 @@ class CommunicationModel {
236
1143
  attachments: Joi.array().items(Joi.any()),
237
1144
  created_at: Joi.string().allow(""),
238
1145
  description: Joi.string().allow(""),
239
- headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
240
- html: CommunicationModel.TemplateAndType(),
1146
+ headers: Joi.array().items(
1147
+ CommunicationPlatformModel.EmailTemplateHeaders()
1148
+ ),
1149
+ html: CommunicationPlatformModel.TemplateAndType(),
241
1150
  is_internal: Joi.boolean(),
242
1151
  is_system: Joi.boolean(),
243
- keys: CommunicationModel.EmailTemplateKeys(),
1152
+ keys: CommunicationPlatformModel.EmailTemplateKeys(),
244
1153
  name: Joi.string().allow(""),
245
1154
  priority: Joi.string().allow(""),
246
1155
  published: Joi.boolean(),
@@ -249,29 +1158,37 @@ class CommunicationModel {
249
1158
  static_bcc: Joi.array().items(Joi.string().allow("")),
250
1159
  static_cc: Joi.array().items(Joi.string().allow("")),
251
1160
  static_to: Joi.array().items(Joi.string().allow("")),
252
- subject: CommunicationModel.TemplateAndType(),
1161
+ subject: CommunicationPlatformModel.TemplateAndType(),
253
1162
  tags: Joi.array().items(Joi.any()),
254
- text: CommunicationModel.TemplateAndType(),
1163
+ text: CommunicationPlatformModel.TemplateAndType(),
255
1164
  updated_at: Joi.string().allow(""),
256
1165
  });
257
1166
  }
1167
+
1168
+ /** @returns {EmailTemplates} */
258
1169
  static EmailTemplates() {
259
1170
  return Joi.object({
260
- items: Joi.array().items(CommunicationModel.EmailTemplate()),
261
- page: CommunicationModel.Page(),
1171
+ items: Joi.array().items(CommunicationPlatformModel.EmailTemplate()),
1172
+ page: CommunicationPlatformModel.Page(),
262
1173
  });
263
1174
  }
1175
+
1176
+ /** @returns {EngineRequest} */
264
1177
  static EngineRequest() {
265
1178
  return Joi.object({
266
- meta: CommunicationModel.MetaStructure(),
267
- payload: CommunicationModel.PayloadStructure(),
1179
+ meta: CommunicationPlatformModel.MetaStructure(),
1180
+ payload: CommunicationPlatformModel.PayloadStructure(),
268
1181
  });
269
1182
  }
1183
+
1184
+ /** @returns {EngineResponse} */
270
1185
  static EngineResponse() {
271
1186
  return Joi.object({
272
1187
  success: Joi.boolean(),
273
1188
  });
274
1189
  }
1190
+
1191
+ /** @returns {EventSubscription} */
275
1192
  static EventSubscription() {
276
1193
  return Joi.object({
277
1194
  __v: Joi.number(),
@@ -281,34 +1198,44 @@ class CommunicationModel {
281
1198
  event: Joi.string().allow(""),
282
1199
  is_default: Joi.boolean(),
283
1200
  slug: Joi.string().allow(""),
284
- template: CommunicationModel.EventSubscriptionTemplate(),
1201
+ template: CommunicationPlatformModel.EventSubscriptionTemplate(),
285
1202
  updated_at: Joi.string().allow(""),
286
1203
  });
287
1204
  }
1205
+
1206
+ /** @returns {EventSubscriptions} */
288
1207
  static EventSubscriptions() {
289
1208
  return Joi.object({
290
- items: Joi.array().items(CommunicationModel.EventSubscription()),
291
- page: CommunicationModel.Page(),
1209
+ items: Joi.array().items(CommunicationPlatformModel.EventSubscription()),
1210
+ page: CommunicationPlatformModel.Page(),
292
1211
  });
293
1212
  }
1213
+
1214
+ /** @returns {EventSubscriptionTemplate} */
294
1215
  static EventSubscriptionTemplate() {
295
1216
  return Joi.object({
296
- email: CommunicationModel.EventSubscriptionTemplateEmail(),
297
- sms: CommunicationModel.EventSubscriptionTemplateSms(),
1217
+ email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
1218
+ sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
298
1219
  });
299
1220
  }
1221
+
1222
+ /** @returns {EventSubscriptionTemplateEmail} */
300
1223
  static EventSubscriptionTemplateEmail() {
301
1224
  return Joi.object({
302
1225
  subscribed: Joi.boolean(),
303
1226
  template: Joi.string().allow(""),
304
1227
  });
305
1228
  }
1229
+
1230
+ /** @returns {EventSubscriptionTemplateSms} */
306
1231
  static EventSubscriptionTemplateSms() {
307
1232
  return Joi.object({
308
1233
  subscribed: Joi.boolean(),
309
1234
  template: Joi.string().allow(""),
310
1235
  });
311
1236
  }
1237
+
1238
+ /** @returns {GetNRecordsCsvReq} */
312
1239
  static GetNRecordsCsvReq() {
313
1240
  return Joi.object({
314
1241
  count: Joi.number(),
@@ -316,11 +1243,17 @@ class CommunicationModel {
316
1243
  url: Joi.string().allow(""),
317
1244
  });
318
1245
  }
1246
+
1247
+ /** @returns {GetNRecordsCsvRes} */
319
1248
  static GetNRecordsCsvRes() {
320
1249
  return Joi.object({
321
- items: Joi.array().items(CommunicationModel.GetNRecordsCsvResItems()),
1250
+ items: Joi.array().items(
1251
+ CommunicationPlatformModel.GetNRecordsCsvResItems()
1252
+ ),
322
1253
  });
323
1254
  }
1255
+
1256
+ /** @returns {GetNRecordsCsvResItems} */
324
1257
  static GetNRecordsCsvResItems() {
325
1258
  return Joi.object({
326
1259
  email: Joi.string().allow(""),
@@ -330,11 +1263,15 @@ class CommunicationModel {
330
1263
  phone_number: Joi.string().allow(""),
331
1264
  });
332
1265
  }
1266
+
1267
+ /** @returns {GetStats} */
333
1268
  static GetStats() {
334
1269
  return Joi.object({
335
- items: Joi.array().items(CommunicationModel.Stats()),
1270
+ items: Joi.array().items(CommunicationPlatformModel.Stats()),
336
1271
  });
337
1272
  }
1273
+
1274
+ /** @returns {Job} */
338
1275
  static Job() {
339
1276
  return Joi.object({
340
1277
  __v: Joi.number(),
@@ -347,6 +1284,8 @@ class CommunicationModel {
347
1284
  updated_at: Joi.string().allow(""),
348
1285
  });
349
1286
  }
1287
+
1288
+ /** @returns {JobLog} */
350
1289
  static JobLog() {
351
1290
  return Joi.object({
352
1291
  __v: Joi.number(),
@@ -359,18 +1298,24 @@ class CommunicationModel {
359
1298
  updated_at: Joi.string().allow(""),
360
1299
  });
361
1300
  }
1301
+
1302
+ /** @returns {JobLogs} */
362
1303
  static JobLogs() {
363
1304
  return Joi.object({
364
- items: Joi.array().items(CommunicationModel.JobLog()),
365
- page: CommunicationModel.Page(),
1305
+ items: Joi.array().items(CommunicationPlatformModel.JobLog()),
1306
+ page: CommunicationPlatformModel.Page(),
366
1307
  });
367
1308
  }
1309
+
1310
+ /** @returns {Jobs} */
368
1311
  static Jobs() {
369
1312
  return Joi.object({
370
- items: Joi.array().items(CommunicationModel.Job()),
371
- page: CommunicationModel.Page(),
1313
+ items: Joi.array().items(CommunicationPlatformModel.Job()),
1314
+ page: CommunicationPlatformModel.Page(),
372
1315
  });
373
1316
  }
1317
+
1318
+ /** @returns {Log} */
374
1319
  static Log() {
375
1320
  return Joi.object({
376
1321
  _id: Joi.string().allow(""),
@@ -378,21 +1323,25 @@ class CommunicationModel {
378
1323
  channel_type: Joi.string().allow(""),
379
1324
  created_at: Joi.string().allow(""),
380
1325
  data: Joi.any(),
381
- email: CommunicationModel.LogEmail(),
1326
+ email: CommunicationPlatformModel.LogEmail(),
382
1327
  expire_at: Joi.string().allow(""),
383
- meta: CommunicationModel.LogMeta(),
384
- pushnotification: CommunicationModel.LogPushnotification(),
1328
+ meta: CommunicationPlatformModel.LogMeta(),
1329
+ pushnotification: CommunicationPlatformModel.LogPushnotification(),
385
1330
  service: Joi.string().allow(""),
386
1331
  source: Joi.string().allow(""),
387
1332
  status: Joi.string().allow(""),
388
1333
  step: Joi.string().allow(""),
389
1334
  });
390
1335
  }
1336
+
1337
+ /** @returns {LogEmail} */
391
1338
  static LogEmail() {
392
1339
  return Joi.object({
393
1340
  template: Joi.string().allow(""),
394
1341
  });
395
1342
  }
1343
+
1344
+ /** @returns {LogMeta} */
396
1345
  static LogMeta() {
397
1346
  return Joi.object({
398
1347
  identifier: Joi.string().allow(""),
@@ -403,17 +1352,23 @@ class CommunicationModel {
403
1352
  type: Joi.string().allow(""),
404
1353
  });
405
1354
  }
1355
+
1356
+ /** @returns {LogPushnotification} */
406
1357
  static LogPushnotification() {
407
1358
  return Joi.object({
408
1359
  pushtokens: Joi.array().items(Joi.string().allow("")),
409
1360
  });
410
1361
  }
1362
+
1363
+ /** @returns {Logs} */
411
1364
  static Logs() {
412
1365
  return Joi.object({
413
- items: Joi.array().items(CommunicationModel.Log()),
414
- page: CommunicationModel.Page(),
1366
+ items: Joi.array().items(CommunicationPlatformModel.Log()),
1367
+ page: CommunicationPlatformModel.Page(),
415
1368
  });
416
1369
  }
1370
+
1371
+ /** @returns {MetaStructure} */
417
1372
  static MetaStructure() {
418
1373
  return Joi.object({
419
1374
  action: Joi.string().allow(""),
@@ -422,11 +1377,15 @@ class CommunicationModel {
422
1377
  trace: Joi.string().allow(""),
423
1378
  });
424
1379
  }
1380
+
1381
+ /** @returns {NotFound} */
425
1382
  static NotFound() {
426
1383
  return Joi.object({
427
1384
  message: Joi.string().allow(""),
428
1385
  });
429
1386
  }
1387
+
1388
+ /** @returns {Notification} */
430
1389
  static Notification() {
431
1390
  return Joi.object({
432
1391
  body: Joi.string().allow(""),
@@ -437,6 +1396,8 @@ class CommunicationModel {
437
1396
  title: Joi.string().allow(""),
438
1397
  });
439
1398
  }
1399
+
1400
+ /** @returns {Page} */
440
1401
  static Page() {
441
1402
  return Joi.object({
442
1403
  current: Joi.number(),
@@ -448,48 +1409,64 @@ class CommunicationModel {
448
1409
  type: Joi.string().allow("").required(),
449
1410
  });
450
1411
  }
1412
+
1413
+ /** @returns {PayloadEmailProviderStructure} */
451
1414
  static PayloadEmailProviderStructure() {
452
1415
  return Joi.object({
453
1416
  _id: Joi.string().allow(""),
454
1417
  });
455
1418
  }
1419
+
1420
+ /** @returns {PayloadEmailStructure} */
456
1421
  static PayloadEmailStructure() {
457
1422
  return Joi.object({
458
- provider: CommunicationModel.PayloadEmailProviderStructure(),
459
- template: CommunicationModel.PayloadEmailTemplateStructure(),
1423
+ provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
1424
+ template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
460
1425
  });
461
1426
  }
1427
+
1428
+ /** @returns {PayloadEmailTemplateStructure} */
462
1429
  static PayloadEmailTemplateStructure() {
463
1430
  return Joi.object({
464
1431
  key: Joi.string().allow(""),
465
1432
  value: Joi.any(),
466
1433
  });
467
1434
  }
1435
+
1436
+ /** @returns {PayloadSmsProviderStructure} */
468
1437
  static PayloadSmsProviderStructure() {
469
1438
  return Joi.object({
470
1439
  _id: Joi.string().allow(""),
471
1440
  });
472
1441
  }
1442
+
1443
+ /** @returns {PayloadSmsStructure} */
473
1444
  static PayloadSmsStructure() {
474
1445
  return Joi.object({
475
- provider: CommunicationModel.PayloadSmsProviderStructure(),
476
- template: CommunicationModel.PayloadSmsTemplateStructure(),
1446
+ provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
1447
+ template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
477
1448
  });
478
1449
  }
1450
+
1451
+ /** @returns {PayloadSmsTemplateStructure} */
479
1452
  static PayloadSmsTemplateStructure() {
480
1453
  return Joi.object({
481
1454
  key: Joi.string().allow(""),
482
1455
  value: Joi.any(),
483
1456
  });
484
1457
  }
1458
+
1459
+ /** @returns {PayloadStructure} */
485
1460
  static PayloadStructure() {
486
1461
  return Joi.object({
487
1462
  application: Joi.string().allow(""),
488
1463
  data: Joi.array().items(Joi.any()),
489
- email: CommunicationModel.PayloadEmailStructure(),
490
- sms: CommunicationModel.PayloadSmsStructure(),
1464
+ email: CommunicationPlatformModel.PayloadEmailStructure(),
1465
+ sms: CommunicationPlatformModel.PayloadSmsStructure(),
491
1466
  });
492
1467
  }
1468
+
1469
+ /** @returns {PushtokenReq} */
493
1470
  static PushtokenReq() {
494
1471
  return Joi.object({
495
1472
  action: Joi.string().allow(""),
@@ -498,6 +1475,8 @@ class CommunicationModel {
498
1475
  unique_device_id: Joi.string().allow(""),
499
1476
  });
500
1477
  }
1478
+
1479
+ /** @returns {PushtokenRes} */
501
1480
  static PushtokenRes() {
502
1481
  return Joi.object({
503
1482
  _id: Joi.string().allow(""),
@@ -513,18 +1492,24 @@ class CommunicationModel {
513
1492
  user_id: Joi.string().allow(""),
514
1493
  });
515
1494
  }
1495
+
1496
+ /** @returns {RecipientHeaders} */
516
1497
  static RecipientHeaders() {
517
1498
  return Joi.object({
518
1499
  email: Joi.string().allow(""),
519
1500
  });
520
1501
  }
1502
+
1503
+ /** @returns {SendOtpCommsReq} */
521
1504
  static SendOtpCommsReq() {
522
1505
  return Joi.object({
523
- data: CommunicationModel.SendOtpCommsReqData(),
524
- email: CommunicationModel.SendOtpCommsReqEmail(),
525
- sms: CommunicationModel.SendOtpCommsReqSms(),
1506
+ data: CommunicationPlatformModel.SendOtpCommsReqData(),
1507
+ email: CommunicationPlatformModel.SendOtpCommsReqEmail(),
1508
+ sms: CommunicationPlatformModel.SendOtpCommsReqSms(),
526
1509
  });
527
1510
  }
1511
+
1512
+ /** @returns {SendOtpCommsReqData} */
528
1513
  static SendOtpCommsReqData() {
529
1514
  return Joi.object({
530
1515
  country_code: Joi.string().allow(""),
@@ -533,28 +1518,36 @@ class CommunicationModel {
533
1518
  to: Joi.string().allow(""),
534
1519
  });
535
1520
  }
1521
+
1522
+ /** @returns {SendOtpCommsReqEmail} */
536
1523
  static SendOtpCommsReqEmail() {
537
1524
  return Joi.object({
538
1525
  expiry: Joi.number(),
539
1526
  otp_length: Joi.number(),
540
- provider: CommunicationModel.SendOtpEmailCommsProvider(),
541
- template: CommunicationModel.SendOtpEmailCommsTemplate(),
1527
+ provider: CommunicationPlatformModel.SendOtpEmailCommsProvider(),
1528
+ template: CommunicationPlatformModel.SendOtpEmailCommsTemplate(),
542
1529
  });
543
1530
  }
1531
+
1532
+ /** @returns {SendOtpCommsReqSms} */
544
1533
  static SendOtpCommsReqSms() {
545
1534
  return Joi.object({
546
1535
  expiry: Joi.number(),
547
1536
  otp_length: Joi.number(),
548
- provider: CommunicationModel.SendOtpSmsCommsProvider(),
549
- template: CommunicationModel.SendOtpSmsCommsTemplate(),
1537
+ provider: CommunicationPlatformModel.SendOtpSmsCommsProvider(),
1538
+ template: CommunicationPlatformModel.SendOtpSmsCommsTemplate(),
550
1539
  });
551
1540
  }
1541
+
1542
+ /** @returns {SendOtpCommsRes} */
552
1543
  static SendOtpCommsRes() {
553
1544
  return Joi.object({
554
- email: CommunicationModel.SendOtpCommsResEmail(),
555
- sms: CommunicationModel.SendOtpCommsResSms(),
1545
+ email: CommunicationPlatformModel.SendOtpCommsResEmail(),
1546
+ sms: CommunicationPlatformModel.SendOtpCommsResSms(),
556
1547
  });
557
1548
  }
1549
+
1550
+ /** @returns {SendOtpCommsResEmail} */
558
1551
  static SendOtpCommsResEmail() {
559
1552
  return Joi.object({
560
1553
  message: Joi.string().allow(""),
@@ -564,6 +1557,8 @@ class CommunicationModel {
564
1557
  to: Joi.string().allow(""),
565
1558
  });
566
1559
  }
1560
+
1561
+ /** @returns {SendOtpCommsResSms} */
567
1562
  static SendOtpCommsResSms() {
568
1563
  return Joi.object({
569
1564
  country_code: Joi.string().allow(""),
@@ -574,30 +1569,40 @@ class CommunicationModel {
574
1569
  success: Joi.boolean(),
575
1570
  });
576
1571
  }
1572
+
1573
+ /** @returns {SendOtpEmailCommsProvider} */
577
1574
  static SendOtpEmailCommsProvider() {
578
1575
  return Joi.object({
579
1576
  _id: Joi.string().allow(""),
580
1577
  slug: Joi.string().allow(""),
581
1578
  });
582
1579
  }
1580
+
1581
+ /** @returns {SendOtpEmailCommsTemplate} */
583
1582
  static SendOtpEmailCommsTemplate() {
584
1583
  return Joi.object({
585
1584
  key: Joi.string().allow(""),
586
1585
  value: Joi.any(),
587
1586
  });
588
1587
  }
1588
+
1589
+ /** @returns {SendOtpSmsCommsProvider} */
589
1590
  static SendOtpSmsCommsProvider() {
590
1591
  return Joi.object({
591
1592
  _id: Joi.string().allow(""),
592
1593
  slug: Joi.string().allow(""),
593
1594
  });
594
1595
  }
1596
+
1597
+ /** @returns {SendOtpSmsCommsTemplate} */
595
1598
  static SendOtpSmsCommsTemplate() {
596
1599
  return Joi.object({
597
1600
  key: Joi.string().allow(""),
598
1601
  value: Joi.any(),
599
1602
  });
600
1603
  }
1604
+
1605
+ /** @returns {SmsProvider} */
601
1606
  static SmsProvider() {
602
1607
  return Joi.object({
603
1608
  __v: Joi.number(),
@@ -616,6 +1621,8 @@ class CommunicationModel {
616
1621
  username: Joi.string().allow(""),
617
1622
  });
618
1623
  }
1624
+
1625
+ /** @returns {SmsProviderReq} */
619
1626
  static SmsProviderReq() {
620
1627
  return Joi.object({
621
1628
  authkey: Joi.string().allow(""),
@@ -627,12 +1634,16 @@ class CommunicationModel {
627
1634
  username: Joi.string().allow(""),
628
1635
  });
629
1636
  }
1637
+
1638
+ /** @returns {SmsProviders} */
630
1639
  static SmsProviders() {
631
1640
  return Joi.object({
632
- items: Joi.array().items(CommunicationModel.SmsProvider()),
633
- page: CommunicationModel.Page(),
1641
+ items: Joi.array().items(CommunicationPlatformModel.SmsProvider()),
1642
+ page: CommunicationPlatformModel.Page(),
634
1643
  });
635
1644
  }
1645
+
1646
+ /** @returns {SmsTemplate} */
636
1647
  static SmsTemplate() {
637
1648
  return Joi.object({
638
1649
  __v: Joi.number(),
@@ -641,7 +1652,7 @@ class CommunicationModel {
641
1652
  description: Joi.string().allow(""),
642
1653
  is_internal: Joi.boolean(),
643
1654
  is_system: Joi.boolean(),
644
- message: CommunicationModel.SmsTemplateMessage(),
1655
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
645
1656
  name: Joi.string().allow(""),
646
1657
  priority: Joi.string().allow(""),
647
1658
  published: Joi.boolean(),
@@ -651,34 +1662,44 @@ class CommunicationModel {
651
1662
  updated_at: Joi.string().allow(""),
652
1663
  });
653
1664
  }
1665
+
1666
+ /** @returns {SmsTemplateDeleteFailureRes} */
654
1667
  static SmsTemplateDeleteFailureRes() {
655
1668
  return Joi.object({
656
1669
  message: Joi.string().allow(""),
657
1670
  success: Joi.boolean(),
658
1671
  });
659
1672
  }
1673
+
1674
+ /** @returns {SmsTemplateDeleteSuccessRes} */
660
1675
  static SmsTemplateDeleteSuccessRes() {
661
1676
  return Joi.object({
662
1677
  message: Joi.string().allow(""),
663
1678
  success: Joi.boolean(),
664
1679
  });
665
1680
  }
1681
+
1682
+ /** @returns {SmsTemplateMessage} */
666
1683
  static SmsTemplateMessage() {
667
1684
  return Joi.object({
668
1685
  template: Joi.string().allow(""),
669
1686
  template_type: Joi.string().allow(""),
670
1687
  });
671
1688
  }
1689
+
1690
+ /** @returns {SmsTemplateReq} */
672
1691
  static SmsTemplateReq() {
673
1692
  return Joi.object({
674
1693
  attachments: Joi.array().items(Joi.any()),
675
1694
  description: Joi.string().allow(""),
676
- message: CommunicationModel.SmsTemplateMessage(),
1695
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
677
1696
  name: Joi.string().allow(""),
678
1697
  priority: Joi.string().allow(""),
679
1698
  template_variables: Joi.any(),
680
1699
  });
681
1700
  }
1701
+
1702
+ /** @returns {SmsTemplateRes} */
682
1703
  static SmsTemplateRes() {
683
1704
  return Joi.object({
684
1705
  __v: Joi.number(),
@@ -687,7 +1708,7 @@ class CommunicationModel {
687
1708
  description: Joi.string().allow(""),
688
1709
  is_internal: Joi.boolean(),
689
1710
  is_system: Joi.boolean(),
690
- message: CommunicationModel.SmsTemplateMessage(),
1711
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
691
1712
  name: Joi.string().allow(""),
692
1713
  priority: Joi.string().allow(""),
693
1714
  published: Joi.boolean(),
@@ -697,12 +1718,16 @@ class CommunicationModel {
697
1718
  updated_at: Joi.string().allow(""),
698
1719
  });
699
1720
  }
1721
+
1722
+ /** @returns {SmsTemplates} */
700
1723
  static SmsTemplates() {
701
1724
  return Joi.object({
702
- items: Joi.array().items(CommunicationModel.SmsTemplate()),
703
- page: CommunicationModel.Page(),
1725
+ items: Joi.array().items(CommunicationPlatformModel.SmsTemplate()),
1726
+ page: CommunicationPlatformModel.Page(),
704
1727
  });
705
1728
  }
1729
+
1730
+ /** @returns {Stats} */
706
1731
  static Stats() {
707
1732
  return Joi.object({
708
1733
  _id: Joi.string().allow(""),
@@ -710,17 +1735,23 @@ class CommunicationModel {
710
1735
  processed: Joi.any(),
711
1736
  });
712
1737
  }
1738
+
1739
+ /** @returns {StatsImported} */
713
1740
  static StatsImported() {
714
1741
  return Joi.object({
715
1742
  count: Joi.number(),
716
1743
  });
717
1744
  }
1745
+
1746
+ /** @returns {StatsProcessed} */
718
1747
  static StatsProcessed() {
719
1748
  return Joi.object({
720
- email: CommunicationModel.StatsProcessedEmail(),
721
- sms: CommunicationModel.StatsProcessedSms(),
1749
+ email: CommunicationPlatformModel.StatsProcessedEmail(),
1750
+ sms: CommunicationPlatformModel.StatsProcessedSms(),
722
1751
  });
723
1752
  }
1753
+
1754
+ /** @returns {StatsProcessedEmail} */
724
1755
  static StatsProcessedEmail() {
725
1756
  return Joi.object({
726
1757
  failed: Joi.number(),
@@ -728,6 +1759,8 @@ class CommunicationModel {
728
1759
  suppressed: Joi.number(),
729
1760
  });
730
1761
  }
1762
+
1763
+ /** @returns {StatsProcessedSms} */
731
1764
  static StatsProcessedSms() {
732
1765
  return Joi.object({
733
1766
  failed: Joi.number(),
@@ -735,6 +1768,8 @@ class CommunicationModel {
735
1768
  suppressed: Joi.number(),
736
1769
  });
737
1770
  }
1771
+
1772
+ /** @returns {SystemEmailTemplate} */
738
1773
  static SystemEmailTemplate() {
739
1774
  return Joi.object({
740
1775
  __v: Joi.number(),
@@ -744,7 +1779,7 @@ class CommunicationModel {
744
1779
  description: Joi.string().allow(""),
745
1780
  from_name: Joi.string().allow(""),
746
1781
  headers: Joi.array().items(Joi.any()),
747
- html: CommunicationModel.TemplateAndType(),
1782
+ html: CommunicationPlatformModel.TemplateAndType(),
748
1783
  is_internal: Joi.boolean(),
749
1784
  is_system: Joi.boolean(),
750
1785
  name: Joi.string().allow(""),
@@ -754,35 +1789,45 @@ class CommunicationModel {
754
1789
  static_bcc: Joi.array().items(Joi.any()),
755
1790
  static_cc: Joi.array().items(Joi.any()),
756
1791
  static_to: Joi.array().items(Joi.any()),
757
- subject: CommunicationModel.TemplateAndType(),
1792
+ subject: CommunicationPlatformModel.TemplateAndType(),
758
1793
  tags: Joi.array().items(Joi.any()),
759
- text: CommunicationModel.TemplateAndType(),
1794
+ text: CommunicationPlatformModel.TemplateAndType(),
760
1795
  updated_at: Joi.string().allow(""),
761
1796
  });
762
1797
  }
1798
+
1799
+ /** @returns {SystemEmailTemplates} */
763
1800
  static SystemEmailTemplates() {
764
1801
  return Joi.object({
765
- items: Joi.array().items(CommunicationModel.SystemEmailTemplate()),
766
- page: CommunicationModel.Page(),
1802
+ items: Joi.array().items(
1803
+ CommunicationPlatformModel.SystemEmailTemplate()
1804
+ ),
1805
+ page: CommunicationPlatformModel.Page(),
767
1806
  });
768
1807
  }
1808
+
1809
+ /** @returns {SystemNotification} */
769
1810
  static SystemNotification() {
770
1811
  return Joi.object({
771
1812
  _id: Joi.string().allow(""),
772
1813
  created_at: Joi.string().allow(""),
773
1814
  group: Joi.string().allow(""),
774
- notification: CommunicationModel.Notification(),
775
- settings: CommunicationModel.SystemNotificationUser(),
776
- user: CommunicationModel.SystemNotificationUser(),
1815
+ notification: CommunicationPlatformModel.Notification(),
1816
+ settings: CommunicationPlatformModel.SystemNotificationUser(),
1817
+ user: CommunicationPlatformModel.SystemNotificationUser(),
777
1818
  });
778
1819
  }
1820
+
1821
+ /** @returns {SystemNotifications} */
779
1822
  static SystemNotifications() {
780
1823
  return Joi.object({
781
- items: Joi.array().items(CommunicationModel.SystemNotification()),
1824
+ items: Joi.array().items(CommunicationPlatformModel.SystemNotification()),
782
1825
  last_read_anchor: Joi.number(),
783
- page: CommunicationModel.Page(),
1826
+ page: CommunicationPlatformModel.Page(),
784
1827
  });
785
1828
  }
1829
+
1830
+ /** @returns {SystemNotificationSettings} */
786
1831
  static SystemNotificationSettings() {
787
1832
  return Joi.object({
788
1833
  priority: Joi.string().allow(""),
@@ -790,6 +1835,8 @@ class CommunicationModel {
790
1835
  time_to_live: Joi.string().allow(""),
791
1836
  });
792
1837
  }
1838
+
1839
+ /** @returns {SystemNotificationsPage} */
793
1840
  static SystemNotificationsPage() {
794
1841
  return Joi.object({
795
1842
  current: Joi.number(),
@@ -799,12 +1846,16 @@ class CommunicationModel {
799
1846
  type: Joi.string().allow(""),
800
1847
  });
801
1848
  }
1849
+
1850
+ /** @returns {SystemNotificationUser} */
802
1851
  static SystemNotificationUser() {
803
1852
  return Joi.object({
804
1853
  type: Joi.string().allow(""),
805
1854
  value: Joi.string().allow(""),
806
1855
  });
807
1856
  }
1857
+
1858
+ /** @returns {SystemSmsTemplate} */
808
1859
  static SystemSmsTemplate() {
809
1860
  return Joi.object({
810
1861
  __v: Joi.number(),
@@ -813,7 +1864,7 @@ class CommunicationModel {
813
1864
  description: Joi.string().allow(""),
814
1865
  is_internal: Joi.boolean(),
815
1866
  is_system: Joi.boolean(),
816
- message: CommunicationModel.SmsTemplateMessage(),
1867
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
817
1868
  name: Joi.string().allow(""),
818
1869
  priority: Joi.string().allow(""),
819
1870
  published: Joi.boolean(),
@@ -823,40 +1874,54 @@ class CommunicationModel {
823
1874
  updated_at: Joi.string().allow(""),
824
1875
  });
825
1876
  }
1877
+
1878
+ /** @returns {SystemSmsTemplates} */
826
1879
  static SystemSmsTemplates() {
827
1880
  return Joi.object({
828
- items: Joi.array().items(CommunicationModel.SystemSmsTemplate()),
829
- page: CommunicationModel.Page(),
1881
+ items: Joi.array().items(CommunicationPlatformModel.SystemSmsTemplate()),
1882
+ page: CommunicationPlatformModel.Page(),
830
1883
  });
831
1884
  }
1885
+
1886
+ /** @returns {TemplateAndType} */
832
1887
  static TemplateAndType() {
833
1888
  return Joi.object({
834
1889
  template: Joi.string().allow(""),
835
1890
  template_type: Joi.string().allow(""),
836
1891
  });
837
1892
  }
1893
+
1894
+ /** @returns {TriggerJobRequest} */
838
1895
  static TriggerJobRequest() {
839
1896
  return Joi.object({
840
1897
  job_id: Joi.string().allow(""),
841
1898
  });
842
1899
  }
1900
+
1901
+ /** @returns {TriggerJobResponse} */
843
1902
  static TriggerJobResponse() {
844
1903
  return Joi.object({
845
1904
  status: Joi.number(),
846
1905
  });
847
1906
  }
1907
+
1908
+ /** @returns {VerifyOtpCommsErrorRes} */
848
1909
  static VerifyOtpCommsErrorRes() {
849
1910
  return Joi.object({
850
1911
  message: Joi.string().allow(""),
851
1912
  success: Joi.boolean(),
852
1913
  });
853
1914
  }
1915
+
1916
+ /** @returns {VerifyOtpCommsReq} */
854
1917
  static VerifyOtpCommsReq() {
855
1918
  return Joi.object({
856
1919
  otp: Joi.string().allow(""),
857
1920
  request_id: Joi.string().allow(""),
858
1921
  });
859
1922
  }
1923
+
1924
+ /** @returns {VerifyOtpCommsSuccessRes} */
860
1925
  static VerifyOtpCommsSuccessRes() {
861
1926
  return Joi.object({
862
1927
  country_code: Joi.string().allow(""),
@@ -866,4 +1931,4 @@ class CommunicationModel {
866
1931
  });
867
1932
  }
868
1933
  }
869
- module.exports = CommunicationModel;
1934
+ module.exports = CommunicationPlatformModel;