@gofynd/fdk-client-javascript 1.4.1 → 1.4.2-beta.10

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 (265) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/sdk/application/ApplicationClient.js +20 -0
  4. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  5. package/sdk/application/Cart/CartApplicationClient.js +3 -5
  6. package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
  7. package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
  8. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
  9. package/sdk/application/Cart/CartApplicationValidator.js +0 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
  12. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  13. package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
  14. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
  16. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  17. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  18. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  19. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
  22. package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
  23. package/sdk/application/Content/ContentApplicationClient.js +0 -246
  24. package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
  25. package/sdk/application/Content/ContentApplicationModel.js +565 -817
  26. package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
  27. package/sdk/application/Content/ContentApplicationValidator.js +0 -41
  28. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  29. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  30. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  31. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  32. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
  33. package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
  34. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
  35. package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
  36. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
  37. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
  38. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  39. package/sdk/application/Order/OrderApplicationClient.js +8 -32
  40. package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
  41. package/sdk/application/Order/OrderApplicationModel.js +816 -824
  42. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
  43. package/sdk/application/Order/OrderApplicationValidator.js +0 -8
  44. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
  45. package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
  46. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
  47. package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
  48. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
  49. package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
  50. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
  51. package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
  52. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  53. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  54. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  55. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  56. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  57. package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
  58. package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
  59. package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
  60. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
  62. package/sdk/application/User/UserApplicationClient.d.ts +0 -33
  63. package/sdk/application/User/UserApplicationClient.js +0 -239
  64. package/sdk/application/User/UserApplicationModel.d.ts +753 -768
  65. package/sdk/application/User/UserApplicationModel.js +731 -755
  66. package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
  67. package/sdk/application/User/UserApplicationValidator.js +0 -36
  68. package/sdk/common/Clickstream.d.ts +1 -0
  69. package/sdk/common/Clickstream.js +254 -0
  70. package/sdk/common/Utility.js +1 -4
  71. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
  72. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
  73. package/sdk/partner/PartnerClient.d.ts +0 -6
  74. package/sdk/partner/PartnerClient.js +0 -9
  75. package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
  76. package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
  77. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
  78. package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
  79. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
  80. package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
  81. package/sdk/partner/index.d.ts +0 -3
  82. package/sdk/partner/index.js +0 -6
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
  87. package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
  89. package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
  97. package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
  108. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  109. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
  112. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
  114. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
  115. package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  124. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
  125. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
  126. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  127. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  128. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
  129. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
  130. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
  131. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
  133. package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
  145. package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
  147. package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
  150. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  151. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
  157. package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
  163. package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
  165. package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
  167. package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
  168. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  169. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
  174. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  175. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  176. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
  177. package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
  178. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  179. package/sdk/platform/PlatformApplicationClient.js +4 -4
  180. package/sdk/platform/PlatformClient.d.ts +2 -4
  181. package/sdk/platform/PlatformClient.js +4 -8
  182. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  183. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +990 -1589
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +986 -1702
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  195. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  196. package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
  197. package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
  198. package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
  199. package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
  200. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
  201. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
  206. package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
  207. package/sdk/platform/User/UserPlatformModel.js +428 -679
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  214. package/sdk/platform/index.d.ts +1 -1
  215. package/sdk/platform/index.js +2 -2
  216. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  217. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  218. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  219. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  220. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  221. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  222. package/sdk/public/PublicClient.d.ts +0 -4
  223. package/sdk/public/PublicClient.js +0 -8
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
  225. package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
  227. package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
  230. package/sdk/public/index.d.ts +0 -2
  231. package/sdk/public/index.js +0 -4
  232. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
  233. package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
  234. package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
  235. package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
  236. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
  237. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
  238. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
  239. package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
  240. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
  241. package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
  242. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
  243. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
  244. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
  245. package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
  246. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
  247. package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
  248. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
  249. package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
  250. package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
  251. package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
  252. package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
  253. package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
  254. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
  255. package/sdk/public/Billing/BillingPublicClient.js +0 -116
  256. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
  257. package/sdk/public/Billing/BillingPublicModel.js +0 -96
  258. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
  259. package/sdk/public/Billing/BillingPublicValidator.js +0 -19
  260. package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
  261. package/sdk/public/Content/ContentPublicClient.js +0 -114
  262. package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
  263. package/sdk/public/Content/ContentPublicModel.js +0 -60
  264. package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
  265. package/sdk/public/Content/ContentPublicValidator.js +0 -19
@@ -2,28 +2,27 @@ const Joi = require("joi");
2
2
 
3
3
  /**
4
4
  * @typedef AppProvider
5
- * @property {number} [__v]
5
+ * @property {AppProviderRes} [email]
6
+ * @property {AppProviderRes} [sms]
7
+ * @property {AppProviderResVoice} [voice]
6
8
  * @property {string} [_id]
7
9
  * @property {string} [application]
8
10
  * @property {string} [created_at]
9
- * @property {AppProviderRes} [email]
10
- * @property {AppProviderRes} [sms]
11
11
  * @property {string} [updated_at]
12
- * @property {AppProviderResVoice} [voice]
12
+ * @property {number} [__v]
13
13
  */
14
14
 
15
15
  /**
16
- * @typedef AppProviderReq
17
- * @property {AppProviderRes} [email]
18
- * @property {AppProviderRes} [sms]
19
- * @property {AppProviderResVoice} [voice]
16
+ * @typedef AppProviderRes
17
+ * @property {AppProviderResObj} [transaction]
18
+ * @property {AppProviderResObj} [promotional]
19
+ * @property {AppProviderResObj} [otp]
20
20
  */
21
21
 
22
22
  /**
23
- * @typedef AppProviderRes
24
- * @property {AppProviderResObj} [otp]
25
- * @property {AppProviderResObj} [promotional]
23
+ * @typedef AppProviderResVoice
26
24
  * @property {AppProviderResObj} [transaction]
25
+ * @property {AppProviderResObj} [otp]
27
26
  */
28
27
 
29
28
  /**
@@ -32,74 +31,78 @@ const Joi = require("joi");
32
31
  */
33
32
 
34
33
  /**
35
- * @typedef AppProviderResVoice
36
- * @property {AppProviderResObj} [otp]
37
- * @property {AppProviderResObj} [transaction]
34
+ * @typedef GlobalProviders
35
+ * @property {GlobalProvidersResObj[]} [email]
36
+ * @property {GlobalProvidersResObj[]} [sms]
37
+ * @property {GlobalProvidersResObj[]} [voice]
38
38
  */
39
39
 
40
40
  /**
41
- * @typedef Audience
42
- * @property {number} [__v]
41
+ * @typedef GlobalProvidersResObj
43
42
  * @property {string} [_id]
44
- * @property {string} [application]
45
- * @property {string} [created_at]
46
- * @property {string} [description]
47
- * @property {string} [file_url]
48
- * @property {string[]} [headers]
49
- * @property {boolean} [is_active]
50
43
  * @property {string} [name]
51
- * @property {number} [records_count]
52
- * @property {string} [slug]
53
- * @property {string[]} [tags]
54
- * @property {string} [type]
55
- * @property {string} [updated_at]
56
44
  */
57
45
 
58
46
  /**
59
- * @typedef AudienceReq
60
- * @property {string} [description]
61
- * @property {string} [file_url]
62
- * @property {string[]} [headers]
63
- * @property {string} [name]
64
- * @property {number} [records_count]
65
- * @property {string[]} [tags]
66
- * @property {string} [type]
47
+ * @typedef AppProviderReq
48
+ * @property {AppProviderRes} [email]
49
+ * @property {AppProviderRes} [sms]
50
+ * @property {AppProviderResVoice} [voice]
67
51
  */
68
52
 
69
53
  /**
70
- * @typedef Audiences
71
- * @property {Audience[]} [items]
72
- * @property {Page} [page]
54
+ * @typedef StatsImported
55
+ * @property {number} [count]
73
56
  */
74
57
 
75
58
  /**
76
- * @typedef BadRequestSchema
77
- * @property {string} [message] - Failure message.
78
- * @property {string} [status] - Response status.
59
+ * @typedef StatsProcessedEmail
60
+ * @property {number} [success]
61
+ * @property {number} [failed]
62
+ * @property {number} [suppressed]
79
63
  */
80
64
 
81
65
  /**
82
- * @typedef Campaign
83
- * @property {number} [__v]
66
+ * @typedef StatsProcessedSms
67
+ * @property {number} [success]
68
+ * @property {number} [failed]
69
+ * @property {number} [suppressed]
70
+ */
71
+
72
+ /**
73
+ * @typedef StatsProcessed
74
+ * @property {StatsProcessedEmail} [email]
75
+ * @property {StatsProcessedSms} [sms]
76
+ */
77
+
78
+ /**
79
+ * @typedef Stats
84
80
  * @property {string} [_id]
85
- * @property {string} [application]
86
- * @property {string} [created_at]
87
- * @property {string} [datasource]
81
+ * @property {Object} [imported]
82
+ * @property {Object} [processed]
83
+ */
84
+
85
+ /**
86
+ * @typedef GetStats
87
+ * @property {Stats[]} [items]
88
+ */
89
+
90
+ /**
91
+ * @typedef CampaignReq
88
92
  * @property {string} [description]
89
- * @property {CampaignEmail} [email]
93
+ * @property {string[]} [tags]
94
+ * @property {string[]} [headers]
90
95
  * @property {boolean} [is_active]
91
96
  * @property {string} [name]
92
- * @property {RecipientHeaders} [recipient_headers]
93
- * @property {string} [slug]
94
- * @property {Object[]} [tags]
97
+ * @property {string} [file_url]
95
98
  * @property {string} [type]
96
- * @property {string} [updated_at]
99
+ * @property {number} [records_count]
100
+ * @property {string} [application]
97
101
  */
98
102
 
99
103
  /**
100
- * @typedef CampaignEmail
101
- * @property {CampignEmailProvider} [provider]
102
- * @property {CampaignEmailTemplate} [template]
104
+ * @typedef RecipientHeaders
105
+ * @property {string} [email]
103
106
  */
104
107
 
105
108
  /**
@@ -109,16 +112,34 @@ const Joi = require("joi");
109
112
  */
110
113
 
111
114
  /**
112
- * @typedef CampaignReq
113
- * @property {string} [application]
115
+ * @typedef CampignEmailProvider
116
+ * @property {string} [_id]
117
+ * @property {string} [from_name]
118
+ * @property {string} [from_email]
119
+ */
120
+
121
+ /**
122
+ * @typedef CampaignEmail
123
+ * @property {CampaignEmailTemplate} [template]
124
+ * @property {CampignEmailProvider} [provider]
125
+ */
126
+
127
+ /**
128
+ * @typedef Campaign
129
+ * @property {RecipientHeaders} [recipient_headers]
130
+ * @property {CampaignEmail} [email]
114
131
  * @property {string} [description]
115
- * @property {string} [file_url]
116
- * @property {string[]} [headers]
132
+ * @property {Object[]} [tags]
117
133
  * @property {boolean} [is_active]
118
- * @property {string} [name]
119
- * @property {number} [records_count]
120
- * @property {string[]} [tags]
134
+ * @property {string} [_id]
135
+ * @property {string} [datasource]
121
136
  * @property {string} [type]
137
+ * @property {string} [name]
138
+ * @property {string} [application]
139
+ * @property {string} [created_at]
140
+ * @property {string} [updated_at]
141
+ * @property {string} [slug]
142
+ * @property {number} [__v]
122
143
  */
123
144
 
124
145
  /**
@@ -128,40 +149,70 @@ const Joi = require("joi");
128
149
  */
129
150
 
130
151
  /**
131
- * @typedef CampignEmailProvider
132
- * @property {string} [_id]
133
- * @property {string} [from_email]
134
- * @property {string} [from_name]
152
+ * @typedef BadRequestSchema
153
+ * @property {string} [status] - Response status.
154
+ * @property {string} [message] - Failure message.
135
155
  */
136
156
 
137
157
  /**
138
- * @typedef CommunicationTemplate
139
- * @property {boolean} [subscribed] - Whether the user is subscribed or not
140
- * @property {string} [template] - Template ID
158
+ * @typedef NotFound
159
+ * @property {string} [message] - Failure message.
141
160
  */
142
161
 
143
162
  /**
144
- * @typedef CreateJobsReq
145
- * @property {string} [campaign]
163
+ * @typedef AudienceReq
164
+ * @property {string} [name]
165
+ * @property {string} [description]
166
+ * @property {string[]} [tags]
167
+ * @property {string} [file_url]
168
+ * @property {string} [type]
169
+ * @property {number} [records_count]
170
+ * @property {string[]} [headers]
146
171
  */
147
172
 
148
173
  /**
149
- * @typedef CreateJobsRes
150
- * @property {number} [__v]
174
+ * @typedef Audience
151
175
  * @property {string} [_id]
152
176
  * @property {string} [application]
153
- * @property {string} [campaign]
154
- * @property {boolean} [completed]
155
- * @property {string} [created_at]
177
+ * @property {string} [name]
178
+ * @property {string} [description]
179
+ * @property {number} [records_count]
180
+ * @property {string} [type]
181
+ * @property {string[]} [tags]
182
+ * @property {string[]} [headers]
183
+ * @property {string} [file_url]
156
184
  * @property {boolean} [is_active]
185
+ * @property {string} [created_at]
157
186
  * @property {string} [updated_at]
187
+ * @property {string} [slug]
188
+ * @property {number} [__v]
158
189
  */
159
190
 
160
191
  /**
161
- * @typedef DefaultSmsProviders
162
- * @property {string} [_id]
163
- * @property {boolean} [is_default]
164
- * @property {string} [name]
192
+ * @typedef Audiences
193
+ * @property {Audience[]} [items]
194
+ * @property {Page} [page]
195
+ */
196
+
197
+ /**
198
+ * @typedef GetNRecordsCsvReq
199
+ * @property {string} [url]
200
+ * @property {boolean} [header]
201
+ * @property {number} [count]
202
+ */
203
+
204
+ /**
205
+ * @typedef GetNRecordsCsvResItems
206
+ * @property {string} [phone_number]
207
+ * @property {string} [email]
208
+ * @property {string} [firstname]
209
+ * @property {string} [lastname]
210
+ * @property {string} [orderid]
211
+ */
212
+
213
+ /**
214
+ * @typedef GetNRecordsCsvRes
215
+ * @property {GetNRecordsCsvResItems[]} [items]
165
216
  */
166
217
 
167
218
  /**
@@ -172,8 +223,8 @@ const Joi = require("joi");
172
223
 
173
224
  /**
174
225
  * @typedef DummyDatasourcesMeta
175
- * @property {DummyDatasourcesMetaObj} [data]
176
226
  * @property {number} [id]
227
+ * @property {DummyDatasourcesMetaObj} [data]
177
228
  */
178
229
 
179
230
  /**
@@ -182,36 +233,36 @@ const Joi = require("joi");
182
233
  */
183
234
 
184
235
  /**
185
- * @typedef EmailProvider
186
- * @property {number} [__v]
187
- * @property {string} [_id]
188
- * @property {string} [api_key]
189
- * @property {string} [application]
190
- * @property {string} [created_at]
191
- * @property {string} [description]
192
- * @property {EmailProviderReqFrom[]} [from_address]
236
+ * @typedef EmailProviderReqFrom
193
237
  * @property {string} [name]
194
- * @property {string} [provider]
195
- * @property {string} [slug]
196
- * @property {string} [type]
197
- * @property {string} [updated_at]
238
+ * @property {string} [email]
239
+ * @property {boolean} [is_default]
198
240
  */
199
241
 
200
242
  /**
201
243
  * @typedef EmailProviderReq
202
- * @property {string} [api_key]
203
- * @property {string} [description]
204
- * @property {EmailProviderReqFrom[]} [from_address]
205
244
  * @property {string} [name]
206
- * @property {string} [provider]
245
+ * @property {string} [description]
246
+ * @property {string} [api_key]
207
247
  * @property {string} [type]
248
+ * @property {string} [provider]
249
+ * @property {EmailProviderReqFrom[]} [from_address]
208
250
  */
209
251
 
210
252
  /**
211
- * @typedef EmailProviderReqFrom
212
- * @property {string} [email]
213
- * @property {boolean} [is_default]
253
+ * @typedef EmailProvider
254
+ * @property {string} [type]
255
+ * @property {string} [provider]
256
+ * @property {EmailProviderReqFrom[]} [from_address]
257
+ * @property {string} [_id]
214
258
  * @property {string} [name]
259
+ * @property {string} [description]
260
+ * @property {string} [api_key]
261
+ * @property {string} [application]
262
+ * @property {string} [created_at]
263
+ * @property {string} [updated_at]
264
+ * @property {string} [slug]
265
+ * @property {number} [__v]
215
266
  */
216
267
 
217
268
  /**
@@ -221,35 +272,10 @@ const Joi = require("joi");
221
272
  */
222
273
 
223
274
  /**
224
- * @typedef EmailTemplate
225
- * @property {number} [__v]
226
- * @property {string} [_id]
227
- * @property {string} [application]
228
- * @property {number[]} [attachments]
229
- * @property {string} [category]
230
- * @property {string} [created_at]
231
- * @property {string} [description]
232
- * @property {string} [editor_meta]
233
- * @property {string} [editor_type]
234
- * @property {string} [from_name]
235
- * @property {EmailTemplateHeaders[]} [headers]
236
- * @property {TemplateAndType} [html]
237
- * @property {boolean} [is_internal]
238
- * @property {boolean} [is_system]
239
- * @property {string} [name]
240
- * @property {string} [priority]
241
- * @property {boolean} [published]
242
- * @property {string} [reply_to]
243
- * @property {string} [slug]
244
- * @property {string[]} [static_bcc]
245
- * @property {string[]} [static_cc]
246
- * @property {string[]} [static_to]
247
- * @property {TemplateAndType} [subject]
248
- * @property {string[]} [tags]
249
- * @property {Object} [template_variables]
250
- * @property {TemplateAndType} [text]
251
- * @property {string} [updated_at]
252
- * @property {EnabledObj} [url_shorten]
275
+ * @typedef EmailTemplateKeys
276
+ * @property {string} [to]
277
+ * @property {string} [cc]
278
+ * @property {string} [bcc]
253
279
  */
254
280
 
255
281
  /**
@@ -259,32 +285,90 @@ const Joi = require("joi");
259
285
  */
260
286
 
261
287
  /**
262
- * @typedef EmailTemplateKeys
263
- * @property {string} [bcc]
264
- * @property {string} [cc]
265
- * @property {string} [to]
288
+ * @typedef EmailTemplateReq
289
+ * @property {string} name
290
+ * @property {string} [description]
291
+ * @property {string} [from_name]
292
+ * @property {string[]} [static_to]
293
+ * @property {string[]} [static_cc]
294
+ * @property {string[]} [static_bcc]
295
+ * @property {string} [reply_to]
296
+ * @property {string} [priority]
297
+ * @property {string[]} [tags]
298
+ * @property {Object} [template_variables]
299
+ * @property {boolean} [published]
300
+ * @property {TemplateAndType} [subject]
301
+ * @property {TemplateAndType} [html]
302
+ * @property {string} [editor_type]
303
+ * @property {string} [editor_meta]
304
+ * @property {number[]} [attachments]
305
+ * @property {EmailTemplateHeaders[]} [headers]
306
+ * @property {EmailTemplateKeys} [keys]
307
+ * @property {TemplateAndType} [text]
266
308
  */
267
309
 
268
310
  /**
269
- * @typedef EmailTemplateReq
270
- * @property {number[]} [attachments]
311
+ * @typedef TemplateAndType
312
+ * @property {string} [template_type]
313
+ * @property {string} [template]
314
+ */
315
+
316
+ /**
317
+ * @typedef EmailTemplate
318
+ * @property {string} [application]
319
+ * @property {boolean} [is_system]
320
+ * @property {boolean} [is_internal]
321
+ * @property {string} [name]
271
322
  * @property {string} [description]
272
- * @property {string} [editor_meta]
273
323
  * @property {string} [editor_type]
274
- * @property {string} [from_name]
275
- * @property {EmailTemplateHeaders[]} [headers]
324
+ * @property {string} [editor_meta]
325
+ * @property {string[]} [static_to]
326
+ * @property {string[]} [static_cc]
327
+ * @property {string[]} [static_bcc]
328
+ * @property {string} [reply_to]
329
+ * @property {string[]} [tags]
330
+ * @property {TemplateAndType} [subject]
276
331
  * @property {TemplateAndType} [html]
277
- * @property {EmailTemplateKeys} [keys]
278
- * @property {string} name
332
+ * @property {EnabledObj} [url_shorten]
279
333
  * @property {string} [priority]
334
+ * @property {Object} [template_variables]
280
335
  * @property {boolean} [published]
281
- * @property {string} [reply_to]
282
- * @property {string[]} [static_bcc]
283
- * @property {string[]} [static_cc]
336
+ * @property {string} [category]
337
+ * @property {string} [_id]
338
+ * @property {EmailTemplateHeaders[]} [headers]
339
+ * @property {number[]} [attachments]
340
+ * @property {string} [created_at]
341
+ * @property {string} [updated_at]
342
+ * @property {string} [slug]
343
+ * @property {number} [__v]
344
+ * @property {string} [from_name]
345
+ * @property {TemplateAndType} [text]
346
+ */
347
+
348
+ /**
349
+ * @typedef SystemEmailTemplate
350
+ * @property {boolean} [is_system]
351
+ * @property {boolean} [is_internal]
352
+ * @property {string} [name]
353
+ * @property {string} [description]
284
354
  * @property {string[]} [static_to]
285
- * @property {TemplateAndType} [subject]
355
+ * @property {string[]} [static_cc]
356
+ * @property {string[]} [static_bcc]
286
357
  * @property {string[]} [tags]
358
+ * @property {TemplateAndType} [subject]
359
+ * @property {TemplateAndType} [html]
360
+ * @property {EnabledObj} [url_shorten]
361
+ * @property {string} [priority]
287
362
  * @property {Object} [template_variables]
363
+ * @property {boolean} [published]
364
+ * @property {string} [category]
365
+ * @property {string} [_id]
366
+ * @property {EmailTemplateHeaders[]} [headers]
367
+ * @property {number[]} [attachments]
368
+ * @property {string} [created_at]
369
+ * @property {string} [updated_at]
370
+ * @property {string} [slug]
371
+ * @property {number} [__v]
288
372
  * @property {TemplateAndType} [text]
289
373
  */
290
374
 
@@ -295,142 +379,131 @@ const Joi = require("joi");
295
379
  */
296
380
 
297
381
  /**
298
- * @typedef EnabledObj
299
- * @property {boolean} [enabled]
382
+ * @typedef SystemEmailTemplates
383
+ * @property {SystemEmailTemplate[]} [items]
300
384
  */
301
385
 
302
386
  /**
303
- * @typedef EngineRequest
304
- * @property {MetaStructure} [meta]
305
- * @property {PayloadStructure} [payload]
387
+ * @typedef PayloadEmailTemplateStructure
388
+ * @property {string} [key]
389
+ * @property {Object} [value]
306
390
  */
307
391
 
308
392
  /**
309
- * @typedef EngineResponse
310
- * @property {boolean} [success]
393
+ * @typedef PayloadEmailProviderStructure
394
+ * @property {string} [_id]
311
395
  */
312
396
 
313
397
  /**
314
- * @typedef EventSubscription
315
- * @property {number} [__v]
316
- * @property {string} [_id]
317
- * @property {string} [application]
318
- * @property {string} [created_at]
319
- * @property {string} [event]
320
- * @property {boolean} [is_default]
321
- * @property {string} [slug]
322
- * @property {EventSubscriptionTemplate} [template]
323
- * @property {string} [updated_at]
398
+ * @typedef PayloadEmailStructure
399
+ * @property {PayloadEmailTemplateStructure} [template]
400
+ * @property {PayloadEmailProviderStructure} [provider]
324
401
  */
325
402
 
326
403
  /**
327
- * @typedef EventSubscriptions
328
- * @property {EventSubscription[]} [items]
329
- * @property {Page} [page]
404
+ * @typedef PayloadSmsTemplateStructure
405
+ * @property {string} [key]
406
+ * @property {Object} [value]
330
407
  */
331
408
 
332
409
  /**
333
- * @typedef EventSubscriptionsBulkUpdateRequest
334
- * @property {SubscriptionsObject[]} [subscriptions]
410
+ * @typedef PayloadSmsProviderStructure
411
+ * @property {string} [_id]
335
412
  */
336
413
 
337
414
  /**
338
- * @typedef EventSubscriptionsBulkUpdateResponse
339
- * @property {number} [__v]
340
- * @property {string} [_id]
341
- * @property {string} [application]
342
- * @property {string} [category]
343
- * @property {string} [created_at]
344
- * @property {string} [event]
345
- * @property {string} [slug]
346
- * @property {EventSubscriptionTemplate} [template]
347
- * @property {string} [updated_at]
415
+ * @typedef PayloadSmsStructure
416
+ * @property {PayloadSmsTemplateStructure} [template]
417
+ * @property {PayloadSmsProviderStructure} [provider]
348
418
  */
349
419
 
350
420
  /**
351
- * @typedef EventSubscriptionTemplate
352
- * @property {EventSubscriptionTemplateEmail} [email]
353
- * @property {EventSubscriptionTemplateSms} [sms]
421
+ * @typedef PayloadStructure
422
+ * @property {Object[]} [data]
423
+ * @property {PayloadEmailStructure} [email]
424
+ * @property {PayloadSmsStructure} [sms]
425
+ * @property {string} [application]
354
426
  */
355
427
 
356
428
  /**
357
- * @typedef EventSubscriptionTemplateEmail
358
- * @property {boolean} [subscribed]
359
- * @property {string} [template]
429
+ * @typedef MetaStructure
430
+ * @property {string} [job_type]
431
+ * @property {string} [action]
432
+ * @property {string} [trace]
433
+ * @property {string} [timestamp]
360
434
  */
361
435
 
362
436
  /**
363
- * @typedef EventSubscriptionTemplateSms
364
- * @property {boolean} [subscribed]
365
- * @property {string} [template]
437
+ * @typedef EngineRequest
438
+ * @property {PayloadStructure} [payload]
439
+ * @property {MetaStructure} [meta]
366
440
  */
367
441
 
368
442
  /**
369
- * @typedef GenericDelete
370
- * @property {boolean} [acknowledged]
371
- * @property {number} [affected]
372
- * @property {string} [message]
373
- * @property {string} [operation]
443
+ * @typedef EngineResponse
444
+ * @property {boolean} [success]
374
445
  */
375
446
 
376
447
  /**
377
- * @typedef GenericError
378
- * @property {Message} [message]
379
- * @property {string} [sentry]
448
+ * @typedef EventSubscriptionTemplateSms
449
+ * @property {boolean} [subscribed]
450
+ * @property {string} [template]
380
451
  */
381
452
 
382
453
  /**
383
- * @typedef GetNRecordsCsvReq
384
- * @property {number} [count]
385
- * @property {boolean} [header]
386
- * @property {string} [url]
454
+ * @typedef EventSubscriptionTemplateEmail
455
+ * @property {boolean} [subscribed]
456
+ * @property {string} [template]
387
457
  */
388
458
 
389
459
  /**
390
- * @typedef GetNRecordsCsvRes
391
- * @property {GetNRecordsCsvResItems[]} [items]
460
+ * @typedef EventSubscriptionTemplate
461
+ * @property {EventSubscriptionTemplateSms} [sms]
462
+ * @property {EventSubscriptionTemplateEmail} [email]
392
463
  */
393
464
 
394
465
  /**
395
- * @typedef GetNRecordsCsvResItems
396
- * @property {string} [email]
397
- * @property {string} [firstname]
398
- * @property {string} [lastname]
399
- * @property {string} [orderid]
400
- * @property {string} [phone_number]
466
+ * @typedef EventSubscription
467
+ * @property {EventSubscriptionTemplate} [template]
468
+ * @property {boolean} [is_default]
469
+ * @property {string} [_id]
470
+ * @property {string} [application]
471
+ * @property {string} [event]
472
+ * @property {string} [slug]
473
+ * @property {string} [created_at]
474
+ * @property {string} [updated_at]
475
+ * @property {number} [__v]
401
476
  */
402
477
 
403
478
  /**
404
- * @typedef GetStats
405
- * @property {Stats[]} [items]
479
+ * @typedef EventSubscriptions
480
+ * @property {EventSubscription[]} [items]
481
+ * @property {Page} [page]
406
482
  */
407
483
 
408
484
  /**
409
- * @typedef GlobalProviders
410
- * @property {GlobalProvidersResObj[]} [email]
411
- * @property {GlobalProvidersResObj[]} [sms]
412
- * @property {GlobalProvidersResObj[]} [voice]
485
+ * @typedef TriggerJobResponse
486
+ * @property {number} [status]
413
487
  */
414
488
 
415
489
  /**
416
- * @typedef GlobalProvidersResObj
417
- * @property {string} [_id]
418
- * @property {string} [name]
490
+ * @typedef TriggerJobRequest
491
+ * @property {string} [job_id]
419
492
  */
420
493
 
421
494
  /**
422
495
  * @typedef GlobalVariablesGetResponse
423
- * @property {Object} [editable]
424
496
  * @property {Object} [read_only]
497
+ * @property {Object} [editable]
425
498
  */
426
499
 
427
500
  /**
428
501
  * @typedef GlobalVariablesPostResponse
429
502
  * @property {string} [_id]
430
- * @property {string} [application]
431
503
  * @property {string} [category]
432
- * @property {string} [created_at]
504
+ * @property {string} [application]
433
505
  * @property {Object} [global_variables]
506
+ * @property {string} [created_at]
434
507
  */
435
508
 
436
509
  /**
@@ -440,26 +513,32 @@ const Joi = require("joi");
440
513
 
441
514
  /**
442
515
  * @typedef Job
443
- * @property {number} [__v]
516
+ * @property {boolean} [completed]
517
+ * @property {boolean} [is_active]
444
518
  * @property {string} [_id]
445
- * @property {string} [application]
446
519
  * @property {string} [campaign]
447
- * @property {boolean} [completed]
520
+ * @property {string} [application]
448
521
  * @property {string} [created_at]
449
- * @property {boolean} [is_active]
450
522
  * @property {string} [updated_at]
523
+ * @property {number} [__v]
524
+ */
525
+
526
+ /**
527
+ * @typedef Jobs
528
+ * @property {Job[]} [items]
529
+ * @property {Page} [page]
451
530
  */
452
531
 
453
532
  /**
454
533
  * @typedef JobLog
455
- * @property {number} [__v]
534
+ * @property {Object} [imported]
535
+ * @property {Object} [processed]
456
536
  * @property {string} [_id]
537
+ * @property {string} [job]
457
538
  * @property {string} [campaign]
458
539
  * @property {string} [created_at]
459
- * @property {Object} [imported]
460
- * @property {string} [job]
461
- * @property {Object} [processed]
462
540
  * @property {string} [updated_at]
541
+ * @property {number} [__v]
463
542
  */
464
543
 
465
544
  /**
@@ -469,44 +548,38 @@ const Joi = require("joi");
469
548
  */
470
549
 
471
550
  /**
472
- * @typedef Jobs
473
- * @property {Job[]} [items]
474
- * @property {Page} [page]
475
- */
476
-
477
- /**
478
- * @typedef Log
479
- * @property {string} [_id]
480
- * @property {string} [application]
481
- * @property {string} [created_at]
482
- * @property {Object} [data]
483
- * @property {LogEmail} [email]
484
- * @property {string} [expire_at]
485
- * @property {LogMeta} [meta]
486
- * @property {LogPushnotification} [pushnotification]
487
- * @property {string} [service]
488
- * @property {string} [status]
489
- * @property {string} [step]
551
+ * @typedef LogEmail
552
+ * @property {string} [template]
490
553
  */
491
554
 
492
555
  /**
493
- * @typedef LogEmail
494
- * @property {string} [template]
556
+ * @typedef LogPushnotification
557
+ * @property {string[]} [pushtokens]
495
558
  */
496
559
 
497
560
  /**
498
561
  * @typedef LogMeta
562
+ * @property {string} [type]
499
563
  * @property {string} [identifier]
500
564
  * @property {string} [key]
501
565
  * @property {string} [offset]
502
566
  * @property {string} [partition]
503
567
  * @property {string} [topic]
504
- * @property {string} [type]
505
568
  */
506
569
 
507
570
  /**
508
- * @typedef LogPushnotification
509
- * @property {string[]} [pushtokens]
571
+ * @typedef Log
572
+ * @property {LogEmail} [email]
573
+ * @property {LogPushnotification} [pushnotification]
574
+ * @property {LogMeta} [meta]
575
+ * @property {string} [_id]
576
+ * @property {string} [application]
577
+ * @property {string} [service]
578
+ * @property {string} [step]
579
+ * @property {string} [status]
580
+ * @property {Object} [data]
581
+ * @property {string} [expire_at]
582
+ * @property {string} [created_at]
510
583
  */
511
584
 
512
585
  /**
@@ -516,381 +589,242 @@ const Joi = require("joi");
516
589
  */
517
590
 
518
591
  /**
519
- * @typedef Message
520
- * @property {string} [info]
521
- * @property {string} [message]
522
- * @property {string} [operation]
523
- * @property {boolean} [success]
524
- */
525
-
526
- /**
527
- * @typedef metaObj
528
- * @property {boolean} [is_system]
529
- * @property {string} [template]
530
- * @property {string} [type]
531
- */
532
-
533
- /**
534
- * @typedef MetaStructure
535
- * @property {string} [action]
536
- * @property {string} [job_type]
537
- * @property {string} [timestamp]
538
- * @property {string} [trace]
539
- */
540
-
541
- /**
542
- * @typedef NotFound
543
- * @property {string} [message] - Failure message.
544
- */
545
-
546
- /**
547
- * @typedef Notification
548
- * @property {string} [body]
549
- * @property {string} [click_action]
550
- * @property {string} [deeplink]
551
- * @property {string} [icon]
552
- * @property {string} [subtitle]
553
- * @property {string} [title]
554
- */
555
-
556
- /**
557
- * @typedef OtpConfiguration
558
- * @property {string} [application_id]
559
- * @property {string} [company_id]
560
- * @property {OtpConfigurationExpiry} expiry
561
- * @property {number} otp_length
562
- * @property {string} type
563
- */
564
-
565
- /**
566
- * @typedef OtpConfigurationExpiry
567
- * @property {OtpConfigurationExpiryDuration} duration
568
- * @property {string} type
569
- */
570
-
571
- /**
572
- * @typedef OtpConfigurationExpiryDuration
573
- * @property {string} denomination
574
- * @property {number} time
575
- */
576
-
577
- /**
578
- * @typedef Page
579
- * @property {number} [current]
580
- * @property {boolean} [has_next]
581
- * @property {boolean} [has_previous]
582
- * @property {number} [item_total]
583
- * @property {string} [next_id]
584
- * @property {number} [size]
585
- * @property {string} type
586
- */
587
-
588
- /**
589
- * @typedef PayloadEmailProviderStructure
590
- * @property {string} [_id]
591
- */
592
-
593
- /**
594
- * @typedef PayloadEmailStructure
595
- * @property {PayloadEmailProviderStructure} [provider]
596
- * @property {PayloadEmailTemplateStructure} [template]
597
- */
598
-
599
- /**
600
- * @typedef PayloadEmailTemplateStructure
592
+ * @typedef SendOtpSmsCommsTemplate
601
593
  * @property {string} [key]
602
594
  * @property {Object} [value]
603
595
  */
604
596
 
605
597
  /**
606
- * @typedef PayloadSmsProviderStructure
598
+ * @typedef SendOtpSmsCommsProvider
599
+ * @property {string} [slug]
607
600
  * @property {string} [_id]
608
601
  */
609
602
 
610
603
  /**
611
- * @typedef PayloadSmsStructure
612
- * @property {PayloadSmsProviderStructure} [provider]
613
- * @property {PayloadSmsTemplateStructure} [template]
604
+ * @typedef SendOtpEmailCommsProvider
605
+ * @property {string} [slug]
606
+ * @property {string} [_id]
614
607
  */
615
608
 
616
609
  /**
617
- * @typedef PayloadSmsTemplateStructure
610
+ * @typedef SendOtpEmailCommsTemplate
618
611
  * @property {string} [key]
619
612
  * @property {Object} [value]
620
613
  */
621
614
 
622
615
  /**
623
- * @typedef PayloadStructure
624
- * @property {string} [application]
625
- * @property {Object[]} [data]
626
- * @property {PayloadEmailStructure} [email]
627
- * @property {PayloadSmsStructure} [sms]
616
+ * @typedef SendOtpCommsReqData
617
+ * @property {boolean} [send_same_otp_to_channel]
618
+ * @property {string} [mobile]
619
+ * @property {string} [country_code]
620
+ * @property {string} [to]
628
621
  */
629
622
 
630
623
  /**
631
- * @typedef RecipientHeaders
632
- * @property {string} [email]
624
+ * @typedef SendOtpCommsReqSms
625
+ * @property {number} [otp_length]
626
+ * @property {number} [expiry]
627
+ * @property {SendOtpSmsCommsTemplate} [template]
628
+ * @property {SendOtpSmsCommsProvider} [provider]
633
629
  */
634
630
 
635
631
  /**
636
- * @typedef SendOtpCommsReq
637
- * @property {SendOtpCommsReqData} [data]
638
- * @property {SendOtpCommsReqEmail} [email]
639
- * @property {SendOtpCommsReqSms} [sms]
632
+ * @typedef SendOtpCommsReqEmail
633
+ * @property {number} [otp_length]
634
+ * @property {number} [expiry]
635
+ * @property {SendOtpEmailCommsTemplate} [template]
636
+ * @property {SendOtpEmailCommsProvider} [provider]
640
637
  */
641
638
 
642
639
  /**
643
- * @typedef SendOtpCommsReqData
644
- * @property {string} [country_code]
640
+ * @typedef SendOtpCommsResSms
641
+ * @property {boolean} [success]
642
+ * @property {string} [request_id]
643
+ * @property {string} [message]
645
644
  * @property {string} [mobile]
646
- * @property {boolean} [send_same_otp_to_channel]
647
- * @property {string} [to]
645
+ * @property {string} [country_code]
646
+ * @property {number} [resend_timer]
648
647
  */
649
648
 
650
649
  /**
651
- * @typedef SendOtpCommsReqEmail
652
- * @property {number} [expiry]
653
- * @property {number} [otp_length]
654
- * @property {SendOtpEmailCommsProvider} [provider]
655
- * @property {SendOtpEmailCommsTemplate} [template]
650
+ * @typedef SendOtpCommsResEmail
651
+ * @property {boolean} [success]
652
+ * @property {string} [request_id]
653
+ * @property {string} [message]
654
+ * @property {string} [to]
655
+ * @property {number} [resend_timer]
656
656
  */
657
657
 
658
658
  /**
659
- * @typedef SendOtpCommsReqSms
660
- * @property {number} [expiry]
661
- * @property {number} [otp_length]
662
- * @property {SendOtpSmsCommsProvider} [provider]
663
- * @property {SendOtpSmsCommsTemplate} [template]
659
+ * @typedef SendOtpCommsReq
660
+ * @property {SendOtpCommsReqData} [data]
661
+ * @property {SendOtpCommsReqSms} [sms]
662
+ * @property {SendOtpCommsReqEmail} [email]
664
663
  */
665
664
 
666
665
  /**
667
666
  * @typedef SendOtpCommsRes
668
- * @property {SendOtpCommsResEmail} [email]
669
667
  * @property {SendOtpCommsResSms} [sms]
668
+ * @property {SendOtpCommsResEmail} [email]
670
669
  */
671
670
 
672
671
  /**
673
- * @typedef SendOtpCommsResEmail
674
- * @property {string} [message]
672
+ * @typedef VerifyOtpCommsReq
675
673
  * @property {string} [request_id]
676
- * @property {number} [resend_timer]
677
- * @property {boolean} [success]
678
- * @property {string} [to]
674
+ * @property {string} [otp]
679
675
  */
680
676
 
681
677
  /**
682
- * @typedef SendOtpCommsResSms
678
+ * @typedef VerifyOtpCommsSuccessRes
679
+ * @property {boolean} [success]
680
+ * @property {string} [mobile]
683
681
  * @property {string} [country_code]
684
682
  * @property {string} [message]
685
- * @property {string} [mobile]
686
- * @property {string} [request_id]
687
- * @property {number} [resend_timer]
688
- * @property {boolean} [success]
689
683
  */
690
684
 
691
685
  /**
692
- * @typedef SendOtpEmailCommsProvider
693
- * @property {string} [_id]
694
- * @property {string} [slug]
686
+ * @typedef VerifyOtpCommsErrorRes
687
+ * @property {boolean} [success]
688
+ * @property {string} [message]
695
689
  */
696
690
 
697
691
  /**
698
- * @typedef SendOtpEmailCommsTemplate
699
- * @property {string} [key]
700
- * @property {Object} [value]
692
+ * @typedef SmsProviderReq
693
+ * @property {string} [name]
694
+ * @property {string} [description]
695
+ * @property {string} [sender]
696
+ * @property {string} [username]
697
+ * @property {string} [authkey]
698
+ * @property {string} [type]
699
+ * @property {string} [provider]
700
+ * @property {string} [password] - The password for the test.
701
+ * @property {string} [senderid] - The sender ID for the test.
702
+ * @property {string} [feedid] - The feed ID for the test.
703
+ * @property {string} [entityid] - The entity ID for the test.
704
+ * @property {boolean} [override_dnd] - Whether to override Do Not Disturb.
705
+ * @property {string} [host] - The host for the test.
706
+ * @property {number} [port] - The port for the test.
707
+ * @property {string} [entity_id] - The entity ID for the test.
708
+ * @property {string} [apikey] - The apikey for the test.
709
+ * @property {number} [version_id] - The version ID for the test.
710
+ * @property {string} [sender_id] - The sender ID for the test.
711
+ * @property {string} [api_key] - The api_key for the test.
701
712
  */
702
713
 
703
714
  /**
704
- * @typedef SendOtpSmsCommsProvider
715
+ * @typedef SmsProvider
716
+ * @property {number} [rpt]
717
+ * @property {string} [type]
718
+ * @property {string} [provider]
705
719
  * @property {string} [_id]
720
+ * @property {string} [name]
721
+ * @property {string} [description]
722
+ * @property {string} [sender]
723
+ * @property {string} [username]
724
+ * @property {string} [authkey]
725
+ * @property {string} [application]
726
+ * @property {string} [created_at]
727
+ * @property {string} [updated_at]
706
728
  * @property {string} [slug]
729
+ * @property {number} [__v]
707
730
  */
708
731
 
709
732
  /**
710
- * @typedef SendOtpSmsCommsTemplate
711
- * @property {string} [key]
712
- * @property {Object} [value]
733
+ * @typedef SmsProviders
734
+ * @property {SmsProvider[]} [items]
735
+ * @property {Page} [page]
713
736
  */
714
737
 
715
738
  /**
716
- * @typedef SmsProvider
717
- * @property {number} [__v]
739
+ * @typedef DefaultSmsProviders
718
740
  * @property {string} [_id]
719
- * @property {string} [application]
720
- * @property {string} [authkey]
721
- * @property {string} [created_at]
722
- * @property {string} [description]
723
741
  * @property {string} [name]
724
- * @property {string} [provider]
725
- * @property {number} [rpt]
726
- * @property {string} [sender]
727
- * @property {string} [slug]
728
- * @property {string} [type]
729
- * @property {string} [updated_at]
730
- * @property {string} [username]
742
+ * @property {boolean} [is_default]
731
743
  */
732
744
 
733
745
  /**
734
- * @typedef SmsProviderReq
735
- * @property {string} [api_key] - The api_key for the test.
736
- * @property {string} [apikey] - The apikey for the test.
737
- * @property {string} [authkey]
738
- * @property {string} [description]
739
- * @property {string} [entity_id] - The entity ID for the test.
740
- * @property {string} [entityid] - The entity ID for the test.
741
- * @property {string} [feedid] - The feed ID for the test.
742
- * @property {string} [host] - The host for the test.
743
- * @property {string} [name]
744
- * @property {boolean} [override_dnd] - Whether to override Do Not Disturb.
745
- * @property {string} [password] - The password for the test.
746
- * @property {number} [port] - The port for the test.
747
- * @property {string} [provider]
748
- * @property {string} [sender]
749
- * @property {string} [sender_id] - The sender ID for the test.
750
- * @property {string} [senderid] - The sender ID for the test.
751
- * @property {string} [type]
752
- * @property {string} [username]
753
- * @property {number} [version_id] - The version ID for the test.
746
+ * @typedef SmsTemplateMessage
747
+ * @property {string} [template_type]
748
+ * @property {string} [template]
754
749
  */
755
750
 
756
751
  /**
757
- * @typedef SmsProviders
758
- * @property {SmsProvider[]} [items]
752
+ * @typedef SmsTemplates
753
+ * @property {SmsTemplate[]} [items]
759
754
  * @property {Page} [page]
760
755
  */
761
756
 
762
757
  /**
763
758
  * @typedef SmsTemplate
764
- * @property {number} [__v]
759
+ * @property {EnabledObj} [url_shorten]
765
760
  * @property {string} [_id]
766
761
  * @property {string} [application]
767
- * @property {string} [category]
768
- * @property {string} [created_at]
769
- * @property {string} [description]
770
- * @property {boolean} [is_internal]
771
762
  * @property {boolean} [is_system]
772
- * @property {SmsTemplateMessage} [message]
763
+ * @property {boolean} [is_internal]
773
764
  * @property {metaObj} [meta]
774
765
  * @property {string} [name]
775
- * @property {string} [priority]
776
- * @property {boolean} [published]
777
- * @property {string} [slug]
778
- * @property {string[]} [tags]
779
- * @property {string} [template_id]
780
- * @property {Object} [template_variables]
781
- * @property {string} [updated_at]
782
- * @property {EnabledObj} [url_shorten]
783
- */
784
-
785
- /**
786
- * @typedef SmsTemplateMessage
787
- * @property {string} [template]
788
- * @property {string} [template_type]
789
- */
790
-
791
- /**
792
- * @typedef SmsTemplateReq
793
766
  * @property {string} [description]
794
767
  * @property {SmsTemplateMessage} [message]
795
- * @property {metaObj} [meta]
796
- * @property {string} name
797
768
  * @property {string} [priority]
798
- * @property {boolean} [published]
799
- * @property {string} [template_id]
769
+ * @property {string[]} [tags]
800
770
  * @property {Object} [template_variables]
771
+ * @property {string} [template_id]
772
+ * @property {boolean} [published]
773
+ * @property {string} [category]
774
+ * @property {string} [created_at]
775
+ * @property {string} [updated_at]
776
+ * @property {string} [slug]
777
+ * @property {number} [__v]
801
778
  */
802
779
 
803
780
  /**
804
- * @typedef SmsTemplates
805
- * @property {SmsTemplate[]} [items]
806
- * @property {Page} [page]
807
- */
808
-
809
- /**
810
- * @typedef Stats
811
- * @property {string} [_id]
812
- * @property {Object} [imported]
813
- * @property {Object} [processed]
814
- */
815
-
816
- /**
817
- * @typedef StatsImported
818
- * @property {number} [count]
819
- */
820
-
821
- /**
822
- * @typedef StatsProcessed
823
- * @property {StatsProcessedEmail} [email]
824
- * @property {StatsProcessedSms} [sms]
825
- */
826
-
827
- /**
828
- * @typedef StatsProcessedEmail
829
- * @property {number} [failed]
830
- * @property {number} [success]
831
- * @property {number} [suppressed]
832
- */
833
-
834
- /**
835
- * @typedef StatsProcessedSms
836
- * @property {number} [failed]
837
- * @property {number} [success]
838
- * @property {number} [suppressed]
839
- */
840
-
841
- /**
842
- * @typedef SubscriptionsObject
843
- * @property {string} [_id] - Subscription ID
844
- * @property {TemplateObject} [template]
845
- */
846
-
847
- /**
848
- * @typedef SystemEmailTemplate
849
- * @property {number} [__v]
781
+ * @typedef SystemSmsTemplates
782
+ * @property {EnabledObj} [url_shorten]
850
783
  * @property {string} [_id]
851
- * @property {number[]} [attachments]
852
- * @property {string} [category]
853
- * @property {string} [created_at]
854
- * @property {string} [description]
855
- * @property {EmailTemplateHeaders[]} [headers]
856
- * @property {TemplateAndType} [html]
857
- * @property {boolean} [is_internal]
858
784
  * @property {boolean} [is_system]
785
+ * @property {boolean} [is_internal]
859
786
  * @property {string} [name]
787
+ * @property {string} [description]
788
+ * @property {SmsTemplateMessage} [message]
860
789
  * @property {string} [priority]
861
- * @property {boolean} [published]
862
- * @property {string} [slug]
863
- * @property {string[]} [static_bcc]
864
- * @property {string[]} [static_cc]
865
- * @property {string[]} [static_to]
866
- * @property {TemplateAndType} [subject]
867
790
  * @property {string[]} [tags]
868
791
  * @property {Object} [template_variables]
869
- * @property {TemplateAndType} [text]
792
+ * @property {string} [template_id]
793
+ * @property {boolean} [published]
794
+ * @property {string} [category]
795
+ * @property {string} [created_at]
870
796
  * @property {string} [updated_at]
871
- * @property {EnabledObj} [url_shorten]
797
+ * @property {string} [slug]
798
+ * @property {number} [__v]
872
799
  */
873
800
 
874
801
  /**
875
- * @typedef SystemEmailTemplates
876
- * @property {SystemEmailTemplate[]} [items]
802
+ * @typedef metaObj
803
+ * @property {string} [type]
804
+ * @property {boolean} [is_system]
805
+ * @property {string} [template]
877
806
  */
878
807
 
879
808
  /**
880
- * @typedef SystemNotification
881
- * @property {string} [_id]
882
- * @property {string} [created_at]
883
- * @property {string} [group]
884
- * @property {Notification} [notification]
885
- * @property {SystemNotificationUser} [settings]
886
- * @property {SystemNotificationUser} [user]
809
+ * @typedef SmsTemplateReq
810
+ * @property {string} name
811
+ * @property {string} [description]
812
+ * @property {string} [priority]
813
+ * @property {string} [template_id]
814
+ * @property {metaObj} [meta]
815
+ * @property {Object} [template_variables]
816
+ * @property {boolean} [published]
817
+ * @property {SmsTemplateMessage} [message]
887
818
  */
888
819
 
889
820
  /**
890
- * @typedef SystemNotifications
891
- * @property {SystemNotification[]} [items]
892
- * @property {number} [last_read_anchor]
893
- * @property {Page} [page]
821
+ * @typedef Notification
822
+ * @property {string} [title]
823
+ * @property {string} [body]
824
+ * @property {string} [subtitle]
825
+ * @property {string} [icon]
826
+ * @property {string} [deeplink]
827
+ * @property {string} [click_action]
894
828
  */
895
829
 
896
830
  /**
@@ -900,99 +834,89 @@ const Joi = require("joi");
900
834
  */
901
835
 
902
836
  /**
903
- * @typedef SystemSmsTemplates
904
- * @property {number} [__v]
837
+ * @typedef SystemNotification
838
+ * @property {Notification} [notification]
839
+ * @property {SystemNotificationUser} [user]
840
+ * @property {SystemNotificationUser} [settings]
905
841
  * @property {string} [_id]
906
- * @property {string} [category]
842
+ * @property {string} [group]
907
843
  * @property {string} [created_at]
908
- * @property {string} [description]
909
- * @property {boolean} [is_internal]
910
- * @property {boolean} [is_system]
911
- * @property {SmsTemplateMessage} [message]
912
- * @property {string} [name]
913
- * @property {string} [priority]
914
- * @property {boolean} [published]
915
- * @property {string} [slug]
916
- * @property {string[]} [tags]
917
- * @property {string} [template_id]
918
- * @property {Object} [template_variables]
919
- * @property {string} [updated_at]
920
- * @property {EnabledObj} [url_shorten]
921
844
  */
922
845
 
923
846
  /**
924
- * @typedef TemplateAndType
925
- * @property {string} [template]
926
- * @property {string} [template_type]
847
+ * @typedef SystemNotifications
848
+ * @property {SystemNotification[]} [items]
849
+ * @property {number} [last_read_anchor]
850
+ * @property {Page} [page]
927
851
  */
928
852
 
929
853
  /**
930
- * @typedef TemplateObject
931
- * @property {CommunicationTemplate} [email]
932
- * @property {CommunicationTemplate} [pushnotification]
933
- * @property {CommunicationTemplate} [sms]
854
+ * @typedef Page
855
+ * @property {number} [item_total]
856
+ * @property {string} [next_id]
857
+ * @property {boolean} [has_previous]
858
+ * @property {boolean} [has_next]
859
+ * @property {number} [current]
860
+ * @property {string} type
861
+ * @property {number} [size]
934
862
  */
935
863
 
936
864
  /**
937
- * @typedef TriggerJobRequest
938
- * @property {string} [job_id]
865
+ * @typedef GenericError
866
+ * @property {Message} [message]
867
+ * @property {string} [sentry]
939
868
  */
940
869
 
941
870
  /**
942
- * @typedef TriggerJobResponse
943
- * @property {number} [status]
871
+ * @typedef GenericDelete
872
+ * @property {string} [message]
873
+ * @property {boolean} [acknowledged]
874
+ * @property {number} [affected]
875
+ * @property {string} [operation]
944
876
  */
945
877
 
946
878
  /**
947
- * @typedef VerifyOtpCommsErrorRes
879
+ * @typedef Message
948
880
  * @property {string} [message]
949
881
  * @property {boolean} [success]
882
+ * @property {string} [info]
883
+ * @property {string} [operation]
950
884
  */
951
885
 
952
886
  /**
953
- * @typedef VerifyOtpCommsReq
954
- * @property {string} [otp]
955
- * @property {string} [request_id]
956
- */
957
-
958
- /**
959
- * @typedef VerifyOtpCommsSuccessRes
960
- * @property {string} [country_code]
961
- * @property {string} [message]
962
- * @property {string} [mobile]
963
- * @property {boolean} [success]
887
+ * @typedef EnabledObj
888
+ * @property {boolean} [enabled]
964
889
  */
965
890
 
966
891
  class CommunicationPlatformModel {
967
892
  /** @returns {AppProvider} */
968
893
  static AppProvider() {
969
894
  return Joi.object({
970
- __v: Joi.number(),
895
+ email: CommunicationPlatformModel.AppProviderRes(),
896
+ sms: CommunicationPlatformModel.AppProviderRes(),
897
+ voice: CommunicationPlatformModel.AppProviderResVoice(),
971
898
  _id: Joi.string().allow(""),
972
899
  application: Joi.string().allow(""),
973
900
  created_at: Joi.string().allow(""),
974
- email: CommunicationPlatformModel.AppProviderRes(),
975
- sms: CommunicationPlatformModel.AppProviderRes(),
976
901
  updated_at: Joi.string().allow(""),
977
- voice: CommunicationPlatformModel.AppProviderResVoice(),
902
+ __v: Joi.number(),
978
903
  });
979
904
  }
980
905
 
981
- /** @returns {AppProviderReq} */
982
- static AppProviderReq() {
906
+ /** @returns {AppProviderRes} */
907
+ static AppProviderRes() {
983
908
  return Joi.object({
984
- email: CommunicationPlatformModel.AppProviderRes(),
985
- sms: CommunicationPlatformModel.AppProviderRes(),
986
- voice: CommunicationPlatformModel.AppProviderResVoice(),
909
+ transaction: CommunicationPlatformModel.AppProviderResObj(),
910
+ promotional: CommunicationPlatformModel.AppProviderResObj(),
911
+ otp: CommunicationPlatformModel.AppProviderResObj(),
987
912
  });
988
913
  }
989
914
 
990
- /** @returns {AppProviderRes} */
991
- static AppProviderRes() {
915
+ /** @returns {AppProviderResVoice} */
916
+ static AppProviderResVoice() {
992
917
  return Joi.object({
993
- otp: CommunicationPlatformModel.AppProviderResObj(),
994
- promotional: CommunicationPlatformModel.AppProviderResObj(),
995
918
  transaction: CommunicationPlatformModel.AppProviderResObj(),
919
+ otp: CommunicationPlatformModel.AppProviderResObj(),
996
920
  });
997
921
  }
998
922
 
@@ -1003,88 +927,106 @@ class CommunicationPlatformModel {
1003
927
  });
1004
928
  }
1005
929
 
1006
- /** @returns {AppProviderResVoice} */
1007
- static AppProviderResVoice() {
930
+ /** @returns {GlobalProviders} */
931
+ static GlobalProviders() {
1008
932
  return Joi.object({
1009
- otp: CommunicationPlatformModel.AppProviderResObj(),
1010
- transaction: CommunicationPlatformModel.AppProviderResObj(),
933
+ email: Joi.array().items(
934
+ CommunicationPlatformModel.GlobalProvidersResObj()
935
+ ),
936
+ sms: Joi.array().items(
937
+ CommunicationPlatformModel.GlobalProvidersResObj()
938
+ ),
939
+ voice: Joi.array().items(
940
+ CommunicationPlatformModel.GlobalProvidersResObj()
941
+ ),
1011
942
  });
1012
943
  }
1013
944
 
1014
- /** @returns {Audience} */
1015
- static Audience() {
945
+ /** @returns {GlobalProvidersResObj} */
946
+ static GlobalProvidersResObj() {
1016
947
  return Joi.object({
1017
- __v: Joi.number(),
1018
948
  _id: Joi.string().allow(""),
1019
- application: Joi.string().allow(""),
1020
- created_at: Joi.string().allow(""),
1021
- description: Joi.string().allow(""),
1022
- file_url: Joi.string().allow(""),
1023
- headers: Joi.array().items(Joi.string().allow("")),
1024
- is_active: Joi.boolean(),
1025
949
  name: Joi.string().allow(""),
1026
- records_count: Joi.number(),
1027
- slug: Joi.string().allow(""),
1028
- tags: Joi.array().items(Joi.string().allow("")),
1029
- type: Joi.string().allow(""),
1030
- updated_at: Joi.string().allow(""),
1031
950
  });
1032
951
  }
1033
952
 
1034
- /** @returns {AudienceReq} */
1035
- static AudienceReq() {
953
+ /** @returns {AppProviderReq} */
954
+ static AppProviderReq() {
1036
955
  return Joi.object({
1037
- description: Joi.string().allow(""),
1038
- file_url: Joi.string().allow(""),
1039
- headers: Joi.array().items(Joi.string().allow("")),
1040
- name: Joi.string().allow(""),
1041
- records_count: Joi.number(),
1042
- tags: Joi.array().items(Joi.string().allow("")),
1043
- type: Joi.string().allow(""),
956
+ email: CommunicationPlatformModel.AppProviderRes(),
957
+ sms: CommunicationPlatformModel.AppProviderRes(),
958
+ voice: CommunicationPlatformModel.AppProviderResVoice(),
1044
959
  });
1045
960
  }
1046
961
 
1047
- /** @returns {Audiences} */
1048
- static Audiences() {
962
+ /** @returns {StatsImported} */
963
+ static StatsImported() {
1049
964
  return Joi.object({
1050
- items: Joi.array().items(CommunicationPlatformModel.Audience()),
1051
- page: CommunicationPlatformModel.Page(),
965
+ count: Joi.number(),
1052
966
  });
1053
967
  }
1054
968
 
1055
- /** @returns {BadRequestSchema} */
1056
- static BadRequestSchema() {
969
+ /** @returns {StatsProcessedEmail} */
970
+ static StatsProcessedEmail() {
1057
971
  return Joi.object({
1058
- message: Joi.string().allow(""),
1059
- status: Joi.string().allow(""),
972
+ success: Joi.number(),
973
+ failed: Joi.number(),
974
+ suppressed: Joi.number(),
1060
975
  });
1061
976
  }
1062
977
 
1063
- /** @returns {Campaign} */
1064
- static Campaign() {
978
+ /** @returns {StatsProcessedSms} */
979
+ static StatsProcessedSms() {
980
+ return Joi.object({
981
+ success: Joi.number(),
982
+ failed: Joi.number(),
983
+ suppressed: Joi.number(),
984
+ });
985
+ }
986
+
987
+ /** @returns {StatsProcessed} */
988
+ static StatsProcessed() {
989
+ return Joi.object({
990
+ email: CommunicationPlatformModel.StatsProcessedEmail(),
991
+ sms: CommunicationPlatformModel.StatsProcessedSms(),
992
+ });
993
+ }
994
+
995
+ /** @returns {Stats} */
996
+ static Stats() {
1065
997
  return Joi.object({
1066
- __v: Joi.number(),
1067
998
  _id: Joi.string().allow(""),
1068
- application: Joi.string().allow(""),
1069
- created_at: Joi.string().allow(""),
1070
- datasource: Joi.string().allow(""),
999
+ imported: Joi.any(),
1000
+ processed: Joi.any(),
1001
+ });
1002
+ }
1003
+
1004
+ /** @returns {GetStats} */
1005
+ static GetStats() {
1006
+ return Joi.object({
1007
+ items: Joi.array().items(CommunicationPlatformModel.Stats()),
1008
+ });
1009
+ }
1010
+
1011
+ /** @returns {CampaignReq} */
1012
+ static CampaignReq() {
1013
+ return Joi.object({
1071
1014
  description: Joi.string().allow(""),
1072
- email: CommunicationPlatformModel.CampaignEmail(),
1015
+ tags: Joi.array().items(Joi.string().allow("")),
1016
+ headers: Joi.array().items(Joi.string().allow("")),
1073
1017
  is_active: Joi.boolean(),
1074
1018
  name: Joi.string().allow(""),
1075
- recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
1076
- slug: Joi.string().allow(""),
1077
- tags: Joi.array().items(Joi.any()),
1019
+ file_url: Joi.string().allow(""),
1078
1020
  type: Joi.string().allow(""),
1079
- updated_at: Joi.string().allow(""),
1021
+ records_count: Joi.number(),
1022
+ application: Joi.string().allow(""),
1080
1023
  });
1081
1024
  }
1082
1025
 
1083
- /** @returns {CampaignEmail} */
1084
- static CampaignEmail() {
1026
+ /** @returns {RecipientHeaders} */
1027
+ static RecipientHeaders() {
1085
1028
  return Joi.object({
1086
- provider: CommunicationPlatformModel.CampignEmailProvider(),
1087
- template: CommunicationPlatformModel.CampaignEmailTemplate(),
1029
+ email: Joi.string().allow(""),
1088
1030
  });
1089
1031
  }
1090
1032
 
@@ -1096,18 +1038,40 @@ class CommunicationPlatformModel {
1096
1038
  });
1097
1039
  }
1098
1040
 
1099
- /** @returns {CampaignReq} */
1100
- static CampaignReq() {
1041
+ /** @returns {CampignEmailProvider} */
1042
+ static CampignEmailProvider() {
1101
1043
  return Joi.object({
1102
- application: Joi.string().allow(""),
1044
+ _id: Joi.string().allow(""),
1045
+ from_name: Joi.string().allow(""),
1046
+ from_email: Joi.string().allow(""),
1047
+ });
1048
+ }
1049
+
1050
+ /** @returns {CampaignEmail} */
1051
+ static CampaignEmail() {
1052
+ return Joi.object({
1053
+ template: CommunicationPlatformModel.CampaignEmailTemplate(),
1054
+ provider: CommunicationPlatformModel.CampignEmailProvider(),
1055
+ });
1056
+ }
1057
+
1058
+ /** @returns {Campaign} */
1059
+ static Campaign() {
1060
+ return Joi.object({
1061
+ recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
1062
+ email: CommunicationPlatformModel.CampaignEmail(),
1103
1063
  description: Joi.string().allow(""),
1104
- file_url: Joi.string().allow(""),
1105
- headers: Joi.array().items(Joi.string().allow("")),
1064
+ tags: Joi.array().items(Joi.any()),
1106
1065
  is_active: Joi.boolean(),
1107
- name: Joi.string().allow(""),
1108
- records_count: Joi.number(),
1109
- tags: Joi.array().items(Joi.string().allow("")),
1066
+ _id: Joi.string().allow(""),
1067
+ datasource: Joi.string().allow(""),
1110
1068
  type: Joi.string().allow(""),
1069
+ name: Joi.string().allow(""),
1070
+ application: Joi.string().allow(""),
1071
+ created_at: Joi.string().allow(""),
1072
+ updated_at: Joi.string().allow(""),
1073
+ slug: Joi.string().allow(""),
1074
+ __v: Joi.number(),
1111
1075
  });
1112
1076
  }
1113
1077
 
@@ -1119,50 +1083,88 @@ class CommunicationPlatformModel {
1119
1083
  });
1120
1084
  }
1121
1085
 
1122
- /** @returns {CampignEmailProvider} */
1123
- static CampignEmailProvider() {
1086
+ /** @returns {BadRequestSchema} */
1087
+ static BadRequestSchema() {
1124
1088
  return Joi.object({
1125
- _id: Joi.string().allow(""),
1126
- from_email: Joi.string().allow(""),
1127
- from_name: Joi.string().allow(""),
1089
+ status: Joi.string().allow(""),
1090
+ message: Joi.string().allow(""),
1128
1091
  });
1129
1092
  }
1130
1093
 
1131
- /** @returns {CommunicationTemplate} */
1132
- static CommunicationTemplate() {
1094
+ /** @returns {NotFound} */
1095
+ static NotFound() {
1133
1096
  return Joi.object({
1134
- subscribed: Joi.boolean(),
1135
- template: Joi.string().allow(""),
1097
+ message: Joi.string().allow(""),
1136
1098
  });
1137
1099
  }
1138
1100
 
1139
- /** @returns {CreateJobsReq} */
1140
- static CreateJobsReq() {
1101
+ /** @returns {AudienceReq} */
1102
+ static AudienceReq() {
1141
1103
  return Joi.object({
1142
- campaign: Joi.string().allow(""),
1104
+ name: Joi.string().allow(""),
1105
+ description: Joi.string().allow(""),
1106
+ tags: Joi.array().items(Joi.string().allow("")),
1107
+ file_url: Joi.string().allow(""),
1108
+ type: Joi.string().allow(""),
1109
+ records_count: Joi.number(),
1110
+ headers: Joi.array().items(Joi.string().allow("")),
1143
1111
  });
1144
1112
  }
1145
1113
 
1146
- /** @returns {CreateJobsRes} */
1147
- static CreateJobsRes() {
1114
+ /** @returns {Audience} */
1115
+ static Audience() {
1148
1116
  return Joi.object({
1149
- __v: Joi.number(),
1150
1117
  _id: Joi.string().allow(""),
1151
1118
  application: Joi.string().allow(""),
1152
- campaign: Joi.string().allow(""),
1153
- completed: Joi.boolean(),
1154
- created_at: Joi.string().allow(""),
1119
+ name: Joi.string().allow(""),
1120
+ description: Joi.string().allow(""),
1121
+ records_count: Joi.number(),
1122
+ type: Joi.string().allow(""),
1123
+ tags: Joi.array().items(Joi.string().allow("")),
1124
+ headers: Joi.array().items(Joi.string().allow("")),
1125
+ file_url: Joi.string().allow(""),
1155
1126
  is_active: Joi.boolean(),
1127
+ created_at: Joi.string().allow(""),
1156
1128
  updated_at: Joi.string().allow(""),
1129
+ slug: Joi.string().allow(""),
1130
+ __v: Joi.number(),
1157
1131
  });
1158
1132
  }
1159
1133
 
1160
- /** @returns {DefaultSmsProviders} */
1161
- static DefaultSmsProviders() {
1134
+ /** @returns {Audiences} */
1135
+ static Audiences() {
1162
1136
  return Joi.object({
1163
- _id: Joi.string().allow(""),
1164
- is_default: Joi.boolean(),
1165
- name: Joi.string().allow(""),
1137
+ items: Joi.array().items(CommunicationPlatformModel.Audience()),
1138
+ page: CommunicationPlatformModel.Page(),
1139
+ });
1140
+ }
1141
+
1142
+ /** @returns {GetNRecordsCsvReq} */
1143
+ static GetNRecordsCsvReq() {
1144
+ return Joi.object({
1145
+ url: Joi.string().allow(""),
1146
+ header: Joi.boolean(),
1147
+ count: Joi.number(),
1148
+ });
1149
+ }
1150
+
1151
+ /** @returns {GetNRecordsCsvResItems} */
1152
+ static GetNRecordsCsvResItems() {
1153
+ return Joi.object({
1154
+ phone_number: Joi.string().allow(""),
1155
+ email: Joi.string().allow(""),
1156
+ firstname: Joi.string().allow(""),
1157
+ lastname: Joi.string().allow(""),
1158
+ orderid: Joi.string().allow(""),
1159
+ });
1160
+ }
1161
+
1162
+ /** @returns {GetNRecordsCsvRes} */
1163
+ static GetNRecordsCsvRes() {
1164
+ return Joi.object({
1165
+ items: Joi.array().items(
1166
+ CommunicationPlatformModel.GetNRecordsCsvResItems()
1167
+ ),
1166
1168
  });
1167
1169
  }
1168
1170
 
@@ -1177,8 +1179,8 @@ class CommunicationPlatformModel {
1177
1179
  /** @returns {DummyDatasourcesMeta} */
1178
1180
  static DummyDatasourcesMeta() {
1179
1181
  return Joi.object({
1180
- data: CommunicationPlatformModel.DummyDatasourcesMetaObj(),
1181
1182
  id: Joi.number(),
1183
+ data: CommunicationPlatformModel.DummyDatasourcesMetaObj(),
1182
1184
  });
1183
1185
  }
1184
1186
 
@@ -1189,46 +1191,46 @@ class CommunicationPlatformModel {
1189
1191
  });
1190
1192
  }
1191
1193
 
1192
- /** @returns {EmailProvider} */
1193
- static EmailProvider() {
1194
+ /** @returns {EmailProviderReqFrom} */
1195
+ static EmailProviderReqFrom() {
1194
1196
  return Joi.object({
1195
- __v: Joi.number(),
1196
- _id: Joi.string().allow(""),
1197
- api_key: Joi.string().allow(""),
1198
- application: Joi.string().allow(""),
1199
- created_at: Joi.string().allow(""),
1200
- description: Joi.string().allow(""),
1201
- from_address: Joi.array().items(
1202
- CommunicationPlatformModel.EmailProviderReqFrom()
1203
- ),
1204
1197
  name: Joi.string().allow(""),
1205
- provider: Joi.string().allow(""),
1206
- slug: Joi.string().allow(""),
1207
- type: Joi.string().allow(""),
1208
- updated_at: Joi.string().allow(""),
1198
+ email: Joi.string().allow(""),
1199
+ is_default: Joi.boolean(),
1209
1200
  });
1210
1201
  }
1211
1202
 
1212
1203
  /** @returns {EmailProviderReq} */
1213
1204
  static EmailProviderReq() {
1214
1205
  return Joi.object({
1215
- api_key: Joi.string().allow(""),
1206
+ name: Joi.string().allow(""),
1216
1207
  description: Joi.string().allow(""),
1208
+ api_key: Joi.string().allow(""),
1209
+ type: Joi.string().allow(""),
1210
+ provider: Joi.string().allow(""),
1217
1211
  from_address: Joi.array().items(
1218
1212
  CommunicationPlatformModel.EmailProviderReqFrom()
1219
1213
  ),
1220
- name: Joi.string().allow(""),
1221
- provider: Joi.string().allow(""),
1222
- type: Joi.string().allow(""),
1223
1214
  });
1224
1215
  }
1225
1216
 
1226
- /** @returns {EmailProviderReqFrom} */
1227
- static EmailProviderReqFrom() {
1217
+ /** @returns {EmailProvider} */
1218
+ static EmailProvider() {
1228
1219
  return Joi.object({
1229
- email: Joi.string().allow(""),
1230
- is_default: Joi.boolean(),
1220
+ type: Joi.string().allow(""),
1221
+ provider: Joi.string().allow(""),
1222
+ from_address: Joi.array().items(
1223
+ CommunicationPlatformModel.EmailProviderReqFrom()
1224
+ ),
1225
+ _id: Joi.string().allow(""),
1231
1226
  name: Joi.string().allow(""),
1227
+ description: Joi.string().allow(""),
1228
+ api_key: Joi.string().allow(""),
1229
+ application: Joi.string().allow(""),
1230
+ created_at: Joi.string().allow(""),
1231
+ updated_at: Joi.string().allow(""),
1232
+ slug: Joi.string().allow(""),
1233
+ __v: Joi.number(),
1232
1234
  });
1233
1235
  }
1234
1236
 
@@ -1240,39 +1242,12 @@ class CommunicationPlatformModel {
1240
1242
  });
1241
1243
  }
1242
1244
 
1243
- /** @returns {EmailTemplate} */
1244
- static EmailTemplate() {
1245
+ /** @returns {EmailTemplateKeys} */
1246
+ static EmailTemplateKeys() {
1245
1247
  return Joi.object({
1246
- __v: Joi.number(),
1247
- _id: Joi.string().allow(""),
1248
- application: Joi.string().allow(""),
1249
- attachments: Joi.array().items(Joi.number()),
1250
- category: Joi.string().allow(""),
1251
- created_at: Joi.string().allow(""),
1252
- description: Joi.string().allow(""),
1253
- editor_meta: Joi.string().allow(""),
1254
- editor_type: Joi.string().allow(""),
1255
- from_name: Joi.string().allow(""),
1256
- headers: Joi.array().items(
1257
- CommunicationPlatformModel.EmailTemplateHeaders()
1258
- ),
1259
- html: CommunicationPlatformModel.TemplateAndType(),
1260
- is_internal: Joi.boolean(),
1261
- is_system: Joi.boolean(),
1262
- name: Joi.string().allow(""),
1263
- priority: Joi.string().allow(""),
1264
- published: Joi.boolean(),
1265
- reply_to: Joi.string().allow(""),
1266
- slug: Joi.string().allow(""),
1267
- static_bcc: Joi.array().items(Joi.string().allow("")),
1268
- static_cc: Joi.array().items(Joi.string().allow("")),
1269
- static_to: Joi.array().items(Joi.string().allow("")),
1270
- subject: CommunicationPlatformModel.TemplateAndType(),
1271
- tags: Joi.array().items(Joi.string().allow("")),
1272
- template_variables: Joi.any(),
1273
- text: CommunicationPlatformModel.TemplateAndType(),
1274
- updated_at: Joi.string().allow(""),
1275
- url_shorten: CommunicationPlatformModel.EnabledObj(),
1248
+ to: Joi.string().allow(""),
1249
+ cc: Joi.string().allow(""),
1250
+ bcc: Joi.string().allow(""),
1276
1251
  });
1277
1252
  }
1278
1253
 
@@ -1284,636 +1259,558 @@ class CommunicationPlatformModel {
1284
1259
  });
1285
1260
  }
1286
1261
 
1287
- /** @returns {EmailTemplateKeys} */
1288
- static EmailTemplateKeys() {
1289
- return Joi.object({
1290
- bcc: Joi.string().allow(""),
1291
- cc: Joi.string().allow(""),
1292
- to: Joi.string().allow(""),
1293
- });
1294
- }
1295
-
1296
1262
  /** @returns {EmailTemplateReq} */
1297
1263
  static EmailTemplateReq() {
1298
1264
  return Joi.object({
1299
- attachments: Joi.array().items(Joi.number()),
1265
+ name: Joi.string().allow("").required(),
1300
1266
  description: Joi.string().allow(""),
1301
- editor_meta: Joi.string().allow(""),
1302
- editor_type: Joi.string().allow(""),
1303
1267
  from_name: Joi.string().allow(""),
1268
+ static_to: Joi.array().items(Joi.string().allow("")),
1269
+ static_cc: Joi.array().items(Joi.string().allow("")),
1270
+ static_bcc: Joi.array().items(Joi.string().allow("")),
1271
+ reply_to: Joi.string().allow(""),
1272
+ priority: Joi.string().allow(""),
1273
+ tags: Joi.array().items(Joi.string().allow("")),
1274
+ template_variables: Joi.any(),
1275
+ published: Joi.boolean(),
1276
+ subject: CommunicationPlatformModel.TemplateAndType(),
1277
+ html: CommunicationPlatformModel.TemplateAndType(),
1278
+ editor_type: Joi.string().allow(""),
1279
+ editor_meta: Joi.string().allow(""),
1280
+ attachments: Joi.array().items(Joi.number()),
1304
1281
  headers: Joi.array().items(
1305
1282
  CommunicationPlatformModel.EmailTemplateHeaders()
1306
1283
  ),
1307
- html: CommunicationPlatformModel.TemplateAndType(),
1308
1284
  keys: CommunicationPlatformModel.EmailTemplateKeys(),
1309
- name: Joi.string().allow("").required(),
1310
- priority: Joi.string().allow(""),
1311
- published: Joi.boolean(),
1312
- reply_to: Joi.string().allow(""),
1313
- static_bcc: Joi.array().items(Joi.string().allow("")),
1314
- static_cc: Joi.array().items(Joi.string().allow("")),
1315
- static_to: Joi.array().items(Joi.string().allow("")),
1316
- subject: CommunicationPlatformModel.TemplateAndType(),
1317
- tags: Joi.array().items(Joi.string().allow("")),
1318
- template_variables: Joi.any(),
1319
1285
  text: CommunicationPlatformModel.TemplateAndType(),
1320
1286
  });
1321
1287
  }
1322
1288
 
1323
- /** @returns {EmailTemplates} */
1324
- static EmailTemplates() {
1325
- return Joi.object({
1326
- items: Joi.array().items(CommunicationPlatformModel.EmailTemplate()),
1327
- page: CommunicationPlatformModel.Page(),
1328
- });
1329
- }
1330
-
1331
- /** @returns {EnabledObj} */
1332
- static EnabledObj() {
1333
- return Joi.object({
1334
- enabled: Joi.boolean(),
1335
- });
1336
- }
1337
-
1338
- /** @returns {EngineRequest} */
1339
- static EngineRequest() {
1340
- return Joi.object({
1341
- meta: CommunicationPlatformModel.MetaStructure(),
1342
- payload: CommunicationPlatformModel.PayloadStructure(),
1343
- });
1344
- }
1345
-
1346
- /** @returns {EngineResponse} */
1347
- static EngineResponse() {
1348
- return Joi.object({
1349
- success: Joi.boolean(),
1350
- });
1351
- }
1352
-
1353
- /** @returns {EventSubscription} */
1354
- static EventSubscription() {
1355
- return Joi.object({
1356
- __v: Joi.number(),
1357
- _id: Joi.string().allow(""),
1358
- application: Joi.string().allow(""),
1359
- created_at: Joi.string().allow(""),
1360
- event: Joi.string().allow(""),
1361
- is_default: Joi.boolean(),
1362
- slug: Joi.string().allow(""),
1363
- template: CommunicationPlatformModel.EventSubscriptionTemplate(),
1364
- updated_at: Joi.string().allow(""),
1365
- });
1366
- }
1367
-
1368
- /** @returns {EventSubscriptions} */
1369
- static EventSubscriptions() {
1370
- return Joi.object({
1371
- items: Joi.array().items(CommunicationPlatformModel.EventSubscription()),
1372
- page: CommunicationPlatformModel.Page(),
1373
- });
1374
- }
1375
-
1376
- /** @returns {EventSubscriptionsBulkUpdateRequest} */
1377
- static EventSubscriptionsBulkUpdateRequest() {
1289
+ /** @returns {TemplateAndType} */
1290
+ static TemplateAndType() {
1378
1291
  return Joi.object({
1379
- subscriptions: Joi.array().items(
1380
- CommunicationPlatformModel.SubscriptionsObject()
1381
- ),
1292
+ template_type: Joi.string().allow(""),
1293
+ template: Joi.string().allow(""),
1382
1294
  });
1383
1295
  }
1384
1296
 
1385
- /** @returns {EventSubscriptionsBulkUpdateResponse} */
1386
- static EventSubscriptionsBulkUpdateResponse() {
1297
+ /** @returns {EmailTemplate} */
1298
+ static EmailTemplate() {
1387
1299
  return Joi.object({
1388
- __v: Joi.number(),
1389
- _id: Joi.string().allow(""),
1390
1300
  application: Joi.string().allow(""),
1301
+ is_system: Joi.boolean(),
1302
+ is_internal: Joi.boolean(),
1303
+ name: Joi.string().allow(""),
1304
+ description: Joi.string().allow(""),
1305
+ editor_type: Joi.string().allow(""),
1306
+ editor_meta: Joi.string().allow(""),
1307
+ static_to: Joi.array().items(Joi.string().allow("")),
1308
+ static_cc: Joi.array().items(Joi.string().allow("")),
1309
+ static_bcc: Joi.array().items(Joi.string().allow("")),
1310
+ reply_to: Joi.string().allow(""),
1311
+ tags: Joi.array().items(Joi.string().allow("")),
1312
+ subject: CommunicationPlatformModel.TemplateAndType(),
1313
+ html: CommunicationPlatformModel.TemplateAndType(),
1314
+ url_shorten: CommunicationPlatformModel.EnabledObj(),
1315
+ priority: Joi.string().allow(""),
1316
+ template_variables: Joi.any(),
1317
+ published: Joi.boolean(),
1391
1318
  category: Joi.string().allow(""),
1319
+ _id: Joi.string().allow(""),
1320
+ headers: Joi.array().items(
1321
+ CommunicationPlatformModel.EmailTemplateHeaders()
1322
+ ),
1323
+ attachments: Joi.array().items(Joi.number()),
1392
1324
  created_at: Joi.string().allow(""),
1393
- event: Joi.string().allow(""),
1394
- slug: Joi.string().allow(""),
1395
- template: CommunicationPlatformModel.EventSubscriptionTemplate(),
1396
1325
  updated_at: Joi.string().allow(""),
1326
+ slug: Joi.string().allow(""),
1327
+ __v: Joi.number(),
1328
+ from_name: Joi.string().allow(""),
1329
+ text: CommunicationPlatformModel.TemplateAndType(),
1397
1330
  });
1398
1331
  }
1399
1332
 
1400
- /** @returns {EventSubscriptionTemplate} */
1401
- static EventSubscriptionTemplate() {
1402
- return Joi.object({
1403
- email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
1404
- sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
1405
- });
1406
- }
1407
-
1408
- /** @returns {EventSubscriptionTemplateEmail} */
1409
- static EventSubscriptionTemplateEmail() {
1410
- return Joi.object({
1411
- subscribed: Joi.boolean(),
1412
- template: Joi.string().allow(""),
1413
- });
1414
- }
1415
-
1416
- /** @returns {EventSubscriptionTemplateSms} */
1417
- static EventSubscriptionTemplateSms() {
1418
- return Joi.object({
1419
- subscribed: Joi.boolean(),
1420
- template: Joi.string().allow(""),
1421
- });
1422
- }
1423
-
1424
- /** @returns {GenericDelete} */
1425
- static GenericDelete() {
1426
- return Joi.object({
1427
- acknowledged: Joi.boolean(),
1428
- affected: Joi.number(),
1429
- message: Joi.string().allow(""),
1430
- operation: Joi.string().allow(""),
1431
- });
1432
- }
1433
-
1434
- /** @returns {GenericError} */
1435
- static GenericError() {
1436
- return Joi.object({
1437
- message: CommunicationPlatformModel.Message(),
1438
- sentry: Joi.string().allow(""),
1439
- });
1440
- }
1441
-
1442
- /** @returns {GetNRecordsCsvReq} */
1443
- static GetNRecordsCsvReq() {
1333
+ /** @returns {SystemEmailTemplate} */
1334
+ static SystemEmailTemplate() {
1444
1335
  return Joi.object({
1445
- count: Joi.number(),
1446
- header: Joi.boolean(),
1447
- url: Joi.string().allow(""),
1336
+ is_system: Joi.boolean(),
1337
+ is_internal: Joi.boolean(),
1338
+ name: Joi.string().allow(""),
1339
+ description: Joi.string().allow(""),
1340
+ static_to: Joi.array().items(Joi.string().allow("")),
1341
+ static_cc: Joi.array().items(Joi.string().allow("")),
1342
+ static_bcc: Joi.array().items(Joi.string().allow("")),
1343
+ tags: Joi.array().items(Joi.string().allow("")),
1344
+ subject: CommunicationPlatformModel.TemplateAndType(),
1345
+ html: CommunicationPlatformModel.TemplateAndType(),
1346
+ url_shorten: CommunicationPlatformModel.EnabledObj(),
1347
+ priority: Joi.string().allow(""),
1348
+ template_variables: Joi.any(),
1349
+ published: Joi.boolean(),
1350
+ category: Joi.string().allow(""),
1351
+ _id: Joi.string().allow(""),
1352
+ headers: Joi.array().items(
1353
+ CommunicationPlatformModel.EmailTemplateHeaders()
1354
+ ),
1355
+ attachments: Joi.array().items(Joi.number()),
1356
+ created_at: Joi.string().allow(""),
1357
+ updated_at: Joi.string().allow(""),
1358
+ slug: Joi.string().allow(""),
1359
+ __v: Joi.number(),
1360
+ text: CommunicationPlatformModel.TemplateAndType(),
1448
1361
  });
1449
1362
  }
1450
1363
 
1451
- /** @returns {GetNRecordsCsvRes} */
1452
- static GetNRecordsCsvRes() {
1364
+ /** @returns {EmailTemplates} */
1365
+ static EmailTemplates() {
1453
1366
  return Joi.object({
1454
- items: Joi.array().items(
1455
- CommunicationPlatformModel.GetNRecordsCsvResItems()
1456
- ),
1367
+ items: Joi.array().items(CommunicationPlatformModel.EmailTemplate()),
1368
+ page: CommunicationPlatformModel.Page(),
1457
1369
  });
1458
1370
  }
1459
1371
 
1460
- /** @returns {GetNRecordsCsvResItems} */
1461
- static GetNRecordsCsvResItems() {
1372
+ /** @returns {SystemEmailTemplates} */
1373
+ static SystemEmailTemplates() {
1462
1374
  return Joi.object({
1463
- email: Joi.string().allow(""),
1464
- firstname: Joi.string().allow(""),
1465
- lastname: Joi.string().allow(""),
1466
- orderid: Joi.string().allow(""),
1467
- phone_number: Joi.string().allow(""),
1375
+ items: Joi.array().items(
1376
+ CommunicationPlatformModel.SystemEmailTemplate()
1377
+ ),
1468
1378
  });
1469
1379
  }
1470
1380
 
1471
- /** @returns {GetStats} */
1472
- static GetStats() {
1381
+ /** @returns {PayloadEmailTemplateStructure} */
1382
+ static PayloadEmailTemplateStructure() {
1473
1383
  return Joi.object({
1474
- items: Joi.array().items(CommunicationPlatformModel.Stats()),
1384
+ key: Joi.string().allow(""),
1385
+ value: Joi.any(),
1475
1386
  });
1476
1387
  }
1477
1388
 
1478
- /** @returns {GlobalProviders} */
1479
- static GlobalProviders() {
1389
+ /** @returns {PayloadEmailProviderStructure} */
1390
+ static PayloadEmailProviderStructure() {
1480
1391
  return Joi.object({
1481
- email: Joi.array().items(
1482
- CommunicationPlatformModel.GlobalProvidersResObj()
1483
- ),
1484
- sms: Joi.array().items(
1485
- CommunicationPlatformModel.GlobalProvidersResObj()
1486
- ),
1487
- voice: Joi.array().items(
1488
- CommunicationPlatformModel.GlobalProvidersResObj()
1489
- ),
1392
+ _id: Joi.string().allow(""),
1490
1393
  });
1491
1394
  }
1492
1395
 
1493
- /** @returns {GlobalProvidersResObj} */
1494
- static GlobalProvidersResObj() {
1396
+ /** @returns {PayloadEmailStructure} */
1397
+ static PayloadEmailStructure() {
1495
1398
  return Joi.object({
1496
- _id: Joi.string().allow(""),
1497
- name: Joi.string().allow(""),
1399
+ template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
1400
+ provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
1498
1401
  });
1499
1402
  }
1500
1403
 
1501
- /** @returns {GlobalVariablesGetResponse} */
1502
- static GlobalVariablesGetResponse() {
1404
+ /** @returns {PayloadSmsTemplateStructure} */
1405
+ static PayloadSmsTemplateStructure() {
1503
1406
  return Joi.object({
1504
- editable: Joi.any(),
1505
- read_only: Joi.any(),
1407
+ key: Joi.string().allow(""),
1408
+ value: Joi.any(),
1506
1409
  });
1507
1410
  }
1508
1411
 
1509
- /** @returns {GlobalVariablesPostResponse} */
1510
- static GlobalVariablesPostResponse() {
1412
+ /** @returns {PayloadSmsProviderStructure} */
1413
+ static PayloadSmsProviderStructure() {
1511
1414
  return Joi.object({
1512
1415
  _id: Joi.string().allow(""),
1513
- application: Joi.string().allow(""),
1514
- category: Joi.string().allow(""),
1515
- created_at: Joi.string().allow(""),
1516
- global_variables: Joi.any(),
1517
1416
  });
1518
1417
  }
1519
1418
 
1520
- /** @returns {GlobalVariablesReq} */
1521
- static GlobalVariablesReq() {
1419
+ /** @returns {PayloadSmsStructure} */
1420
+ static PayloadSmsStructure() {
1522
1421
  return Joi.object({
1523
- global_variables: Joi.any(),
1422
+ template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
1423
+ provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
1524
1424
  });
1525
1425
  }
1526
1426
 
1527
- /** @returns {Job} */
1528
- static Job() {
1427
+ /** @returns {PayloadStructure} */
1428
+ static PayloadStructure() {
1529
1429
  return Joi.object({
1530
- __v: Joi.number(),
1531
- _id: Joi.string().allow(""),
1430
+ data: Joi.array().items(Joi.any()),
1431
+ email: CommunicationPlatformModel.PayloadEmailStructure(),
1432
+ sms: CommunicationPlatformModel.PayloadSmsStructure(),
1532
1433
  application: Joi.string().allow(""),
1533
- campaign: Joi.string().allow(""),
1534
- completed: Joi.boolean(),
1535
- created_at: Joi.string().allow(""),
1536
- is_active: Joi.boolean(),
1537
- updated_at: Joi.string().allow(""),
1538
1434
  });
1539
1435
  }
1540
1436
 
1541
- /** @returns {JobLog} */
1542
- static JobLog() {
1437
+ /** @returns {MetaStructure} */
1438
+ static MetaStructure() {
1543
1439
  return Joi.object({
1544
- __v: Joi.number(),
1545
- _id: Joi.string().allow(""),
1546
- campaign: Joi.string().allow(""),
1547
- created_at: Joi.string().allow(""),
1548
- imported: Joi.any(),
1549
- job: Joi.string().allow(""),
1550
- processed: Joi.any(),
1551
- updated_at: Joi.string().allow(""),
1440
+ job_type: Joi.string().allow(""),
1441
+ action: Joi.string().allow(""),
1442
+ trace: Joi.string().allow(""),
1443
+ timestamp: Joi.string().allow(""),
1552
1444
  });
1553
1445
  }
1554
1446
 
1555
- /** @returns {JobLogs} */
1556
- static JobLogs() {
1447
+ /** @returns {EngineRequest} */
1448
+ static EngineRequest() {
1557
1449
  return Joi.object({
1558
- items: Joi.array().items(CommunicationPlatformModel.JobLog()),
1559
- page: CommunicationPlatformModel.Page(),
1450
+ payload: CommunicationPlatformModel.PayloadStructure(),
1451
+ meta: CommunicationPlatformModel.MetaStructure(),
1560
1452
  });
1561
1453
  }
1562
1454
 
1563
- /** @returns {Jobs} */
1564
- static Jobs() {
1455
+ /** @returns {EngineResponse} */
1456
+ static EngineResponse() {
1565
1457
  return Joi.object({
1566
- items: Joi.array().items(CommunicationPlatformModel.Job()),
1567
- page: CommunicationPlatformModel.Page(),
1458
+ success: Joi.boolean(),
1568
1459
  });
1569
1460
  }
1570
1461
 
1571
- /** @returns {Log} */
1572
- static Log() {
1462
+ /** @returns {EventSubscriptionTemplateSms} */
1463
+ static EventSubscriptionTemplateSms() {
1573
1464
  return Joi.object({
1574
- _id: Joi.string().allow(""),
1575
- application: Joi.string().allow(""),
1576
- created_at: Joi.string().allow(""),
1577
- data: Joi.any(),
1578
- email: CommunicationPlatformModel.LogEmail(),
1579
- expire_at: Joi.string().allow(""),
1580
- meta: CommunicationPlatformModel.LogMeta(),
1581
- pushnotification: CommunicationPlatformModel.LogPushnotification(),
1582
- service: Joi.string().allow(""),
1583
- status: Joi.string().allow(""),
1584
- step: Joi.string().allow(""),
1465
+ subscribed: Joi.boolean(),
1466
+ template: Joi.string().allow(""),
1585
1467
  });
1586
1468
  }
1587
1469
 
1588
- /** @returns {LogEmail} */
1589
- static LogEmail() {
1470
+ /** @returns {EventSubscriptionTemplateEmail} */
1471
+ static EventSubscriptionTemplateEmail() {
1590
1472
  return Joi.object({
1473
+ subscribed: Joi.boolean(),
1591
1474
  template: Joi.string().allow(""),
1592
1475
  });
1593
1476
  }
1594
1477
 
1595
- /** @returns {LogMeta} */
1596
- static LogMeta() {
1478
+ /** @returns {EventSubscriptionTemplate} */
1479
+ static EventSubscriptionTemplate() {
1597
1480
  return Joi.object({
1598
- identifier: Joi.string().allow(""),
1599
- key: Joi.string().allow(""),
1600
- offset: Joi.string().allow(""),
1601
- partition: Joi.string().allow(""),
1602
- topic: Joi.string().allow(""),
1603
- type: Joi.string().allow(""),
1481
+ sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
1482
+ email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
1604
1483
  });
1605
1484
  }
1606
1485
 
1607
- /** @returns {LogPushnotification} */
1608
- static LogPushnotification() {
1486
+ /** @returns {EventSubscription} */
1487
+ static EventSubscription() {
1609
1488
  return Joi.object({
1610
- pushtokens: Joi.array().items(Joi.string().allow("")),
1489
+ template: CommunicationPlatformModel.EventSubscriptionTemplate(),
1490
+ is_default: Joi.boolean(),
1491
+ _id: Joi.string().allow(""),
1492
+ application: Joi.string().allow(""),
1493
+ event: Joi.string().allow(""),
1494
+ slug: Joi.string().allow(""),
1495
+ created_at: Joi.string().allow(""),
1496
+ updated_at: Joi.string().allow(""),
1497
+ __v: Joi.number(),
1611
1498
  });
1612
1499
  }
1613
1500
 
1614
- /** @returns {Logs} */
1615
- static Logs() {
1501
+ /** @returns {EventSubscriptions} */
1502
+ static EventSubscriptions() {
1616
1503
  return Joi.object({
1617
- items: Joi.array().items(CommunicationPlatformModel.Log()),
1504
+ items: Joi.array().items(CommunicationPlatformModel.EventSubscription()),
1618
1505
  page: CommunicationPlatformModel.Page(),
1619
1506
  });
1620
1507
  }
1621
1508
 
1622
- /** @returns {Message} */
1623
- static Message() {
1509
+ /** @returns {TriggerJobResponse} */
1510
+ static TriggerJobResponse() {
1624
1511
  return Joi.object({
1625
- info: Joi.string().allow(""),
1626
- message: Joi.string().allow(""),
1627
- operation: Joi.string().allow(""),
1628
- success: Joi.boolean(),
1512
+ status: Joi.number(),
1629
1513
  });
1630
1514
  }
1631
1515
 
1632
- /** @returns {metaObj} */
1633
- static metaObj() {
1516
+ /** @returns {TriggerJobRequest} */
1517
+ static TriggerJobRequest() {
1634
1518
  return Joi.object({
1635
- is_system: Joi.boolean(),
1636
- template: Joi.string().allow(""),
1637
- type: Joi.string().allow(""),
1519
+ job_id: Joi.string().allow(""),
1638
1520
  });
1639
1521
  }
1640
1522
 
1641
- /** @returns {MetaStructure} */
1642
- static MetaStructure() {
1523
+ /** @returns {GlobalVariablesGetResponse} */
1524
+ static GlobalVariablesGetResponse() {
1643
1525
  return Joi.object({
1644
- action: Joi.string().allow(""),
1645
- job_type: Joi.string().allow(""),
1646
- timestamp: Joi.string().allow(""),
1647
- trace: Joi.string().allow(""),
1526
+ read_only: Joi.any(),
1527
+ editable: Joi.any(),
1648
1528
  });
1649
1529
  }
1650
1530
 
1651
- /** @returns {NotFound} */
1652
- static NotFound() {
1531
+ /** @returns {GlobalVariablesPostResponse} */
1532
+ static GlobalVariablesPostResponse() {
1653
1533
  return Joi.object({
1654
- message: Joi.string().allow(""),
1534
+ _id: Joi.string().allow(""),
1535
+ category: Joi.string().allow(""),
1536
+ application: Joi.string().allow(""),
1537
+ global_variables: Joi.any(),
1538
+ created_at: Joi.string().allow(""),
1655
1539
  });
1656
1540
  }
1657
1541
 
1658
- /** @returns {Notification} */
1659
- static Notification() {
1542
+ /** @returns {GlobalVariablesReq} */
1543
+ static GlobalVariablesReq() {
1660
1544
  return Joi.object({
1661
- body: Joi.string().allow(""),
1662
- click_action: Joi.string().allow(""),
1663
- deeplink: Joi.string().allow(""),
1664
- icon: Joi.string().allow(""),
1665
- subtitle: Joi.string().allow(""),
1666
- title: Joi.string().allow(""),
1545
+ global_variables: Joi.any(),
1667
1546
  });
1668
1547
  }
1669
1548
 
1670
- /** @returns {OtpConfiguration} */
1671
- static OtpConfiguration() {
1549
+ /** @returns {Job} */
1550
+ static Job() {
1672
1551
  return Joi.object({
1673
- application_id: Joi.string().allow(""),
1674
- company_id: Joi.string().allow(""),
1675
- expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(),
1676
- otp_length: Joi.number().required(),
1677
- type: Joi.string().allow("").required(),
1552
+ completed: Joi.boolean(),
1553
+ is_active: Joi.boolean(),
1554
+ _id: Joi.string().allow(""),
1555
+ campaign: Joi.string().allow(""),
1556
+ application: Joi.string().allow(""),
1557
+ created_at: Joi.string().allow(""),
1558
+ updated_at: Joi.string().allow(""),
1559
+ __v: Joi.number(),
1678
1560
  });
1679
1561
  }
1680
1562
 
1681
- /** @returns {OtpConfigurationExpiry} */
1682
- static OtpConfigurationExpiry() {
1563
+ /** @returns {Jobs} */
1564
+ static Jobs() {
1683
1565
  return Joi.object({
1684
- duration: CommunicationPlatformModel.OtpConfigurationExpiryDuration().required(),
1685
- type: Joi.string().allow("").required(),
1566
+ items: Joi.array().items(CommunicationPlatformModel.Job()),
1567
+ page: CommunicationPlatformModel.Page(),
1686
1568
  });
1687
1569
  }
1688
1570
 
1689
- /** @returns {OtpConfigurationExpiryDuration} */
1690
- static OtpConfigurationExpiryDuration() {
1571
+ /** @returns {JobLog} */
1572
+ static JobLog() {
1691
1573
  return Joi.object({
1692
- denomination: Joi.string().allow("").required(),
1693
- time: Joi.number().required(),
1574
+ imported: Joi.any(),
1575
+ processed: Joi.any(),
1576
+ _id: Joi.string().allow(""),
1577
+ job: Joi.string().allow(""),
1578
+ campaign: Joi.string().allow(""),
1579
+ created_at: Joi.string().allow(""),
1580
+ updated_at: Joi.string().allow(""),
1581
+ __v: Joi.number(),
1694
1582
  });
1695
1583
  }
1696
1584
 
1697
- /** @returns {Page} */
1698
- static Page() {
1585
+ /** @returns {JobLogs} */
1586
+ static JobLogs() {
1699
1587
  return Joi.object({
1700
- current: Joi.number(),
1701
- has_next: Joi.boolean(),
1702
- has_previous: Joi.boolean(),
1703
- item_total: Joi.number(),
1704
- next_id: Joi.string().allow(""),
1705
- size: Joi.number(),
1706
- type: Joi.string().allow("").required(),
1588
+ items: Joi.array().items(CommunicationPlatformModel.JobLog()),
1589
+ page: CommunicationPlatformModel.Page(),
1707
1590
  });
1708
1591
  }
1709
1592
 
1710
- /** @returns {PayloadEmailProviderStructure} */
1711
- static PayloadEmailProviderStructure() {
1593
+ /** @returns {LogEmail} */
1594
+ static LogEmail() {
1712
1595
  return Joi.object({
1713
- _id: Joi.string().allow(""),
1596
+ template: Joi.string().allow(""),
1714
1597
  });
1715
1598
  }
1716
1599
 
1717
- /** @returns {PayloadEmailStructure} */
1718
- static PayloadEmailStructure() {
1600
+ /** @returns {LogPushnotification} */
1601
+ static LogPushnotification() {
1719
1602
  return Joi.object({
1720
- provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
1721
- template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
1603
+ pushtokens: Joi.array().items(Joi.string().allow("")),
1722
1604
  });
1723
1605
  }
1724
1606
 
1725
- /** @returns {PayloadEmailTemplateStructure} */
1726
- static PayloadEmailTemplateStructure() {
1607
+ /** @returns {LogMeta} */
1608
+ static LogMeta() {
1727
1609
  return Joi.object({
1610
+ type: Joi.string().allow(""),
1611
+ identifier: Joi.string().allow(""),
1728
1612
  key: Joi.string().allow(""),
1729
- value: Joi.any(),
1613
+ offset: Joi.string().allow(""),
1614
+ partition: Joi.string().allow(""),
1615
+ topic: Joi.string().allow(""),
1730
1616
  });
1731
1617
  }
1732
1618
 
1733
- /** @returns {PayloadSmsProviderStructure} */
1734
- static PayloadSmsProviderStructure() {
1619
+ /** @returns {Log} */
1620
+ static Log() {
1735
1621
  return Joi.object({
1622
+ email: CommunicationPlatformModel.LogEmail(),
1623
+ pushnotification: CommunicationPlatformModel.LogPushnotification(),
1624
+ meta: CommunicationPlatformModel.LogMeta(),
1736
1625
  _id: Joi.string().allow(""),
1626
+ application: Joi.string().allow(""),
1627
+ service: Joi.string().allow(""),
1628
+ step: Joi.string().allow(""),
1629
+ status: Joi.string().allow(""),
1630
+ data: Joi.any(),
1631
+ expire_at: Joi.string().allow(""),
1632
+ created_at: Joi.string().allow(""),
1737
1633
  });
1738
1634
  }
1739
1635
 
1740
- /** @returns {PayloadSmsStructure} */
1741
- static PayloadSmsStructure() {
1636
+ /** @returns {Logs} */
1637
+ static Logs() {
1742
1638
  return Joi.object({
1743
- provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
1744
- template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
1639
+ items: Joi.array().items(CommunicationPlatformModel.Log()),
1640
+ page: CommunicationPlatformModel.Page(),
1745
1641
  });
1746
1642
  }
1747
1643
 
1748
- /** @returns {PayloadSmsTemplateStructure} */
1749
- static PayloadSmsTemplateStructure() {
1644
+ /** @returns {SendOtpSmsCommsTemplate} */
1645
+ static SendOtpSmsCommsTemplate() {
1750
1646
  return Joi.object({
1751
1647
  key: Joi.string().allow(""),
1752
1648
  value: Joi.any(),
1753
1649
  });
1754
1650
  }
1755
1651
 
1756
- /** @returns {PayloadStructure} */
1757
- static PayloadStructure() {
1652
+ /** @returns {SendOtpSmsCommsProvider} */
1653
+ static SendOtpSmsCommsProvider() {
1758
1654
  return Joi.object({
1759
- application: Joi.string().allow(""),
1760
- data: Joi.array().items(Joi.any()),
1761
- email: CommunicationPlatformModel.PayloadEmailStructure(),
1762
- sms: CommunicationPlatformModel.PayloadSmsStructure(),
1655
+ slug: Joi.string().allow(""),
1656
+ _id: Joi.string().allow(""),
1763
1657
  });
1764
1658
  }
1765
1659
 
1766
- /** @returns {RecipientHeaders} */
1767
- static RecipientHeaders() {
1660
+ /** @returns {SendOtpEmailCommsProvider} */
1661
+ static SendOtpEmailCommsProvider() {
1768
1662
  return Joi.object({
1769
- email: Joi.string().allow(""),
1663
+ slug: Joi.string().allow(""),
1664
+ _id: Joi.string().allow(""),
1770
1665
  });
1771
1666
  }
1772
1667
 
1773
- /** @returns {SendOtpCommsReq} */
1774
- static SendOtpCommsReq() {
1668
+ /** @returns {SendOtpEmailCommsTemplate} */
1669
+ static SendOtpEmailCommsTemplate() {
1775
1670
  return Joi.object({
1776
- data: CommunicationPlatformModel.SendOtpCommsReqData(),
1777
- email: CommunicationPlatformModel.SendOtpCommsReqEmail(),
1778
- sms: CommunicationPlatformModel.SendOtpCommsReqSms(),
1671
+ key: Joi.string().allow(""),
1672
+ value: Joi.any(),
1779
1673
  });
1780
1674
  }
1781
1675
 
1782
1676
  /** @returns {SendOtpCommsReqData} */
1783
1677
  static SendOtpCommsReqData() {
1784
1678
  return Joi.object({
1785
- country_code: Joi.string().allow(""),
1786
- mobile: Joi.string().allow(""),
1787
1679
  send_same_otp_to_channel: Joi.boolean(),
1680
+ mobile: Joi.string().allow(""),
1681
+ country_code: Joi.string().allow(""),
1788
1682
  to: Joi.string().allow(""),
1789
1683
  });
1790
1684
  }
1791
1685
 
1792
- /** @returns {SendOtpCommsReqEmail} */
1793
- static SendOtpCommsReqEmail() {
1794
- return Joi.object({
1795
- expiry: Joi.number(),
1796
- otp_length: Joi.number(),
1797
- provider: CommunicationPlatformModel.SendOtpEmailCommsProvider(),
1798
- template: CommunicationPlatformModel.SendOtpEmailCommsTemplate(),
1799
- });
1800
- }
1801
-
1802
1686
  /** @returns {SendOtpCommsReqSms} */
1803
1687
  static SendOtpCommsReqSms() {
1804
1688
  return Joi.object({
1805
- expiry: Joi.number(),
1806
1689
  otp_length: Joi.number(),
1807
- provider: CommunicationPlatformModel.SendOtpSmsCommsProvider(),
1690
+ expiry: Joi.number(),
1808
1691
  template: CommunicationPlatformModel.SendOtpSmsCommsTemplate(),
1692
+ provider: CommunicationPlatformModel.SendOtpSmsCommsProvider(),
1809
1693
  });
1810
1694
  }
1811
1695
 
1812
- /** @returns {SendOtpCommsRes} */
1813
- static SendOtpCommsRes() {
1696
+ /** @returns {SendOtpCommsReqEmail} */
1697
+ static SendOtpCommsReqEmail() {
1814
1698
  return Joi.object({
1815
- email: CommunicationPlatformModel.SendOtpCommsResEmail(),
1816
- sms: CommunicationPlatformModel.SendOtpCommsResSms(),
1699
+ otp_length: Joi.number(),
1700
+ expiry: Joi.number(),
1701
+ template: CommunicationPlatformModel.SendOtpEmailCommsTemplate(),
1702
+ provider: CommunicationPlatformModel.SendOtpEmailCommsProvider(),
1817
1703
  });
1818
1704
  }
1819
1705
 
1820
- /** @returns {SendOtpCommsResEmail} */
1821
- static SendOtpCommsResEmail() {
1706
+ /** @returns {SendOtpCommsResSms} */
1707
+ static SendOtpCommsResSms() {
1822
1708
  return Joi.object({
1823
- message: Joi.string().allow(""),
1709
+ success: Joi.boolean(),
1824
1710
  request_id: Joi.string().allow(""),
1711
+ message: Joi.string().allow(""),
1712
+ mobile: Joi.string().allow(""),
1713
+ country_code: Joi.string().allow(""),
1825
1714
  resend_timer: Joi.number(),
1826
- success: Joi.boolean(),
1827
- to: Joi.string().allow(""),
1828
1715
  });
1829
1716
  }
1830
1717
 
1831
- /** @returns {SendOtpCommsResSms} */
1832
- static SendOtpCommsResSms() {
1718
+ /** @returns {SendOtpCommsResEmail} */
1719
+ static SendOtpCommsResEmail() {
1833
1720
  return Joi.object({
1834
- country_code: Joi.string().allow(""),
1835
- message: Joi.string().allow(""),
1836
- mobile: Joi.string().allow(""),
1721
+ success: Joi.boolean(),
1837
1722
  request_id: Joi.string().allow(""),
1723
+ message: Joi.string().allow(""),
1724
+ to: Joi.string().allow(""),
1838
1725
  resend_timer: Joi.number(),
1839
- success: Joi.boolean(),
1840
1726
  });
1841
1727
  }
1842
1728
 
1843
- /** @returns {SendOtpEmailCommsProvider} */
1844
- static SendOtpEmailCommsProvider() {
1729
+ /** @returns {SendOtpCommsReq} */
1730
+ static SendOtpCommsReq() {
1845
1731
  return Joi.object({
1846
- _id: Joi.string().allow(""),
1847
- slug: Joi.string().allow(""),
1732
+ data: CommunicationPlatformModel.SendOtpCommsReqData(),
1733
+ sms: CommunicationPlatformModel.SendOtpCommsReqSms(),
1734
+ email: CommunicationPlatformModel.SendOtpCommsReqEmail(),
1848
1735
  });
1849
1736
  }
1850
1737
 
1851
- /** @returns {SendOtpEmailCommsTemplate} */
1852
- static SendOtpEmailCommsTemplate() {
1738
+ /** @returns {SendOtpCommsRes} */
1739
+ static SendOtpCommsRes() {
1853
1740
  return Joi.object({
1854
- key: Joi.string().allow(""),
1855
- value: Joi.any(),
1741
+ sms: CommunicationPlatformModel.SendOtpCommsResSms(),
1742
+ email: CommunicationPlatformModel.SendOtpCommsResEmail(),
1856
1743
  });
1857
1744
  }
1858
1745
 
1859
- /** @returns {SendOtpSmsCommsProvider} */
1860
- static SendOtpSmsCommsProvider() {
1746
+ /** @returns {VerifyOtpCommsReq} */
1747
+ static VerifyOtpCommsReq() {
1861
1748
  return Joi.object({
1862
- _id: Joi.string().allow(""),
1863
- slug: Joi.string().allow(""),
1749
+ request_id: Joi.string().allow(""),
1750
+ otp: Joi.string().allow(""),
1864
1751
  });
1865
1752
  }
1866
1753
 
1867
- /** @returns {SendOtpSmsCommsTemplate} */
1868
- static SendOtpSmsCommsTemplate() {
1754
+ /** @returns {VerifyOtpCommsSuccessRes} */
1755
+ static VerifyOtpCommsSuccessRes() {
1869
1756
  return Joi.object({
1870
- key: Joi.string().allow(""),
1871
- value: Joi.any(),
1757
+ success: Joi.boolean(),
1758
+ mobile: Joi.string().allow(""),
1759
+ country_code: Joi.string().allow(""),
1760
+ message: Joi.string().allow(""),
1872
1761
  });
1873
1762
  }
1874
1763
 
1875
- /** @returns {SmsProvider} */
1876
- static SmsProvider() {
1764
+ /** @returns {VerifyOtpCommsErrorRes} */
1765
+ static VerifyOtpCommsErrorRes() {
1877
1766
  return Joi.object({
1878
- __v: Joi.number(),
1879
- _id: Joi.string().allow(""),
1880
- application: Joi.string().allow(""),
1881
- authkey: Joi.string().allow(""),
1882
- created_at: Joi.string().allow(""),
1883
- description: Joi.string().allow(""),
1884
- name: Joi.string().allow(""),
1885
- provider: Joi.string().allow(""),
1886
- rpt: Joi.number(),
1887
- sender: Joi.string().allow(""),
1888
- slug: Joi.string().allow(""),
1889
- type: Joi.string().allow(""),
1890
- updated_at: Joi.string().allow(""),
1891
- username: Joi.string().allow(""),
1767
+ success: Joi.boolean(),
1768
+ message: Joi.string().allow(""),
1892
1769
  });
1893
1770
  }
1894
1771
 
1895
1772
  /** @returns {SmsProviderReq} */
1896
1773
  static SmsProviderReq() {
1897
1774
  return Joi.object({
1898
- api_key: Joi.string().allow(""),
1899
- apikey: Joi.string().allow(""),
1900
- authkey: Joi.string().allow(""),
1775
+ name: Joi.string().allow(""),
1901
1776
  description: Joi.string().allow(""),
1902
- entity_id: Joi.string().allow(""),
1903
- entityid: Joi.string().allow(""),
1777
+ sender: Joi.string().allow(""),
1778
+ username: Joi.string().allow(""),
1779
+ authkey: Joi.string().allow(""),
1780
+ type: Joi.string().allow(""),
1781
+ provider: Joi.string().allow(""),
1782
+ password: Joi.string().allow(""),
1783
+ senderid: Joi.string().allow(""),
1904
1784
  feedid: Joi.string().allow(""),
1905
- host: Joi.string().allow(""),
1906
- name: Joi.string().allow(""),
1785
+ entityid: Joi.string().allow(""),
1907
1786
  override_dnd: Joi.boolean(),
1908
- password: Joi.string().allow(""),
1787
+ host: Joi.string().allow(""),
1909
1788
  port: Joi.number(),
1910
- provider: Joi.string().allow(""),
1911
- sender: Joi.string().allow(""),
1789
+ entity_id: Joi.string().allow(""),
1790
+ apikey: Joi.string().allow(""),
1791
+ version_id: Joi.number(),
1912
1792
  sender_id: Joi.string().allow(""),
1913
- senderid: Joi.string().allow(""),
1793
+ api_key: Joi.string().allow(""),
1794
+ });
1795
+ }
1796
+
1797
+ /** @returns {SmsProvider} */
1798
+ static SmsProvider() {
1799
+ return Joi.object({
1800
+ rpt: Joi.number(),
1914
1801
  type: Joi.string().allow(""),
1802
+ provider: Joi.string().allow(""),
1803
+ _id: Joi.string().allow(""),
1804
+ name: Joi.string().allow(""),
1805
+ description: Joi.string().allow(""),
1806
+ sender: Joi.string().allow(""),
1915
1807
  username: Joi.string().allow(""),
1916
- version_id: Joi.number(),
1808
+ authkey: Joi.string().allow(""),
1809
+ application: Joi.string().allow(""),
1810
+ created_at: Joi.string().allow(""),
1811
+ updated_at: Joi.string().allow(""),
1812
+ slug: Joi.string().allow(""),
1813
+ __v: Joi.number(),
1917
1814
  });
1918
1815
  }
1919
1816
 
@@ -1925,50 +1822,20 @@ class CommunicationPlatformModel {
1925
1822
  });
1926
1823
  }
1927
1824
 
1928
- /** @returns {SmsTemplate} */
1929
- static SmsTemplate() {
1825
+ /** @returns {DefaultSmsProviders} */
1826
+ static DefaultSmsProviders() {
1930
1827
  return Joi.object({
1931
- __v: Joi.number(),
1932
1828
  _id: Joi.string().allow(""),
1933
- application: Joi.string().allow(""),
1934
- category: Joi.string().allow(""),
1935
- created_at: Joi.string().allow(""),
1936
- description: Joi.string().allow(""),
1937
- is_internal: Joi.boolean(),
1938
- is_system: Joi.boolean(),
1939
- message: CommunicationPlatformModel.SmsTemplateMessage(),
1940
- meta: CommunicationPlatformModel.metaObj(),
1941
1829
  name: Joi.string().allow(""),
1942
- priority: Joi.string().allow(""),
1943
- published: Joi.boolean(),
1944
- slug: Joi.string().allow(""),
1945
- tags: Joi.array().items(Joi.string().allow("")),
1946
- template_id: Joi.string().allow(""),
1947
- template_variables: Joi.any(),
1948
- updated_at: Joi.string().allow(""),
1949
- url_shorten: CommunicationPlatformModel.EnabledObj(),
1830
+ is_default: Joi.boolean(),
1950
1831
  });
1951
1832
  }
1952
1833
 
1953
1834
  /** @returns {SmsTemplateMessage} */
1954
1835
  static SmsTemplateMessage() {
1955
1836
  return Joi.object({
1956
- template: Joi.string().allow(""),
1957
1837
  template_type: Joi.string().allow(""),
1958
- });
1959
- }
1960
-
1961
- /** @returns {SmsTemplateReq} */
1962
- static SmsTemplateReq() {
1963
- return Joi.object({
1964
- description: Joi.string().allow(""),
1965
- message: CommunicationPlatformModel.SmsTemplateMessage(),
1966
- meta: CommunicationPlatformModel.metaObj(),
1967
- name: Joi.string().allow("").required(),
1968
- priority: Joi.string().allow(""),
1969
- published: Joi.boolean(),
1970
- template_id: Joi.string().allow(""),
1971
- template_variables: Joi.any(),
1838
+ template: Joi.string().allow(""),
1972
1839
  });
1973
1840
  }
1974
1841
 
@@ -1980,114 +1847,86 @@ class CommunicationPlatformModel {
1980
1847
  });
1981
1848
  }
1982
1849
 
1983
- /** @returns {Stats} */
1984
- static Stats() {
1985
- return Joi.object({
1986
- _id: Joi.string().allow(""),
1987
- imported: Joi.any(),
1988
- processed: Joi.any(),
1989
- });
1990
- }
1991
-
1992
- /** @returns {StatsImported} */
1993
- static StatsImported() {
1994
- return Joi.object({
1995
- count: Joi.number(),
1996
- });
1997
- }
1998
-
1999
- /** @returns {StatsProcessed} */
2000
- static StatsProcessed() {
2001
- return Joi.object({
2002
- email: CommunicationPlatformModel.StatsProcessedEmail(),
2003
- sms: CommunicationPlatformModel.StatsProcessedSms(),
2004
- });
2005
- }
2006
-
2007
- /** @returns {StatsProcessedEmail} */
2008
- static StatsProcessedEmail() {
2009
- return Joi.object({
2010
- failed: Joi.number(),
2011
- success: Joi.number(),
2012
- suppressed: Joi.number(),
2013
- });
2014
- }
2015
-
2016
- /** @returns {StatsProcessedSms} */
2017
- static StatsProcessedSms() {
2018
- return Joi.object({
2019
- failed: Joi.number(),
2020
- success: Joi.number(),
2021
- suppressed: Joi.number(),
2022
- });
2023
- }
2024
-
2025
- /** @returns {SubscriptionsObject} */
2026
- static SubscriptionsObject() {
1850
+ /** @returns {SmsTemplate} */
1851
+ static SmsTemplate() {
2027
1852
  return Joi.object({
1853
+ url_shorten: CommunicationPlatformModel.EnabledObj(),
2028
1854
  _id: Joi.string().allow(""),
2029
- template: CommunicationPlatformModel.TemplateObject(),
1855
+ application: Joi.string().allow(""),
1856
+ is_system: Joi.boolean(),
1857
+ is_internal: Joi.boolean(),
1858
+ meta: CommunicationPlatformModel.metaObj(),
1859
+ name: Joi.string().allow(""),
1860
+ description: Joi.string().allow(""),
1861
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
1862
+ priority: Joi.string().allow(""),
1863
+ tags: Joi.array().items(Joi.string().allow("")),
1864
+ template_variables: Joi.any(),
1865
+ template_id: Joi.string().allow(""),
1866
+ published: Joi.boolean(),
1867
+ category: Joi.string().allow(""),
1868
+ created_at: Joi.string().allow(""),
1869
+ updated_at: Joi.string().allow(""),
1870
+ slug: Joi.string().allow(""),
1871
+ __v: Joi.number(),
2030
1872
  });
2031
1873
  }
2032
1874
 
2033
- /** @returns {SystemEmailTemplate} */
2034
- static SystemEmailTemplate() {
1875
+ /** @returns {SystemSmsTemplates} */
1876
+ static SystemSmsTemplates() {
2035
1877
  return Joi.object({
2036
- __v: Joi.number(),
1878
+ url_shorten: CommunicationPlatformModel.EnabledObj(),
2037
1879
  _id: Joi.string().allow(""),
2038
- attachments: Joi.array().items(Joi.number()),
2039
- category: Joi.string().allow(""),
2040
- created_at: Joi.string().allow(""),
2041
- description: Joi.string().allow(""),
2042
- headers: Joi.array().items(
2043
- CommunicationPlatformModel.EmailTemplateHeaders()
2044
- ),
2045
- html: CommunicationPlatformModel.TemplateAndType(),
2046
- is_internal: Joi.boolean(),
2047
1880
  is_system: Joi.boolean(),
1881
+ is_internal: Joi.boolean(),
2048
1882
  name: Joi.string().allow(""),
1883
+ description: Joi.string().allow(""),
1884
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
2049
1885
  priority: Joi.string().allow(""),
2050
- published: Joi.boolean(),
2051
- slug: Joi.string().allow(""),
2052
- static_bcc: Joi.array().items(Joi.string().allow("")),
2053
- static_cc: Joi.array().items(Joi.string().allow("")),
2054
- static_to: Joi.array().items(Joi.string().allow("")),
2055
- subject: CommunicationPlatformModel.TemplateAndType(),
2056
1886
  tags: Joi.array().items(Joi.string().allow("")),
2057
1887
  template_variables: Joi.any(),
2058
- text: CommunicationPlatformModel.TemplateAndType(),
1888
+ template_id: Joi.string().allow(""),
1889
+ published: Joi.boolean(),
1890
+ category: Joi.string().allow(""),
1891
+ created_at: Joi.string().allow(""),
2059
1892
  updated_at: Joi.string().allow(""),
2060
- url_shorten: CommunicationPlatformModel.EnabledObj(),
1893
+ slug: Joi.string().allow(""),
1894
+ __v: Joi.number(),
2061
1895
  });
2062
1896
  }
2063
1897
 
2064
- /** @returns {SystemEmailTemplates} */
2065
- static SystemEmailTemplates() {
1898
+ /** @returns {metaObj} */
1899
+ static metaObj() {
2066
1900
  return Joi.object({
2067
- items: Joi.array().items(
2068
- CommunicationPlatformModel.SystemEmailTemplate()
2069
- ),
1901
+ type: Joi.string().allow(""),
1902
+ is_system: Joi.boolean(),
1903
+ template: Joi.string().allow(""),
2070
1904
  });
2071
1905
  }
2072
1906
 
2073
- /** @returns {SystemNotification} */
2074
- static SystemNotification() {
1907
+ /** @returns {SmsTemplateReq} */
1908
+ static SmsTemplateReq() {
2075
1909
  return Joi.object({
2076
- _id: Joi.string().allow(""),
2077
- created_at: Joi.string().allow(""),
2078
- group: Joi.string().allow(""),
2079
- notification: CommunicationPlatformModel.Notification(),
2080
- settings: CommunicationPlatformModel.SystemNotificationUser(),
2081
- user: CommunicationPlatformModel.SystemNotificationUser(),
1910
+ name: Joi.string().allow("").required(),
1911
+ description: Joi.string().allow(""),
1912
+ priority: Joi.string().allow(""),
1913
+ template_id: Joi.string().allow(""),
1914
+ meta: CommunicationPlatformModel.metaObj(),
1915
+ template_variables: Joi.any(),
1916
+ published: Joi.boolean(),
1917
+ message: CommunicationPlatformModel.SmsTemplateMessage(),
2082
1918
  });
2083
1919
  }
2084
1920
 
2085
- /** @returns {SystemNotifications} */
2086
- static SystemNotifications() {
1921
+ /** @returns {Notification} */
1922
+ static Notification() {
2087
1923
  return Joi.object({
2088
- items: Joi.array().items(CommunicationPlatformModel.SystemNotification()),
2089
- last_read_anchor: Joi.number(),
2090
- page: CommunicationPlatformModel.Page(),
1924
+ title: Joi.string().allow(""),
1925
+ body: Joi.string().allow(""),
1926
+ subtitle: Joi.string().allow(""),
1927
+ icon: Joi.string().allow(""),
1928
+ deeplink: Joi.string().allow(""),
1929
+ click_action: Joi.string().allow(""),
2091
1930
  });
2092
1931
  }
2093
1932
 
@@ -2099,83 +1938,72 @@ class CommunicationPlatformModel {
2099
1938
  });
2100
1939
  }
2101
1940
 
2102
- /** @returns {SystemSmsTemplates} */
2103
- static SystemSmsTemplates() {
1941
+ /** @returns {SystemNotification} */
1942
+ static SystemNotification() {
2104
1943
  return Joi.object({
2105
- __v: Joi.number(),
1944
+ notification: CommunicationPlatformModel.Notification(),
1945
+ user: CommunicationPlatformModel.SystemNotificationUser(),
1946
+ settings: CommunicationPlatformModel.SystemNotificationUser(),
2106
1947
  _id: Joi.string().allow(""),
2107
- category: Joi.string().allow(""),
1948
+ group: Joi.string().allow(""),
2108
1949
  created_at: Joi.string().allow(""),
2109
- description: Joi.string().allow(""),
2110
- is_internal: Joi.boolean(),
2111
- is_system: Joi.boolean(),
2112
- message: CommunicationPlatformModel.SmsTemplateMessage(),
2113
- name: Joi.string().allow(""),
2114
- priority: Joi.string().allow(""),
2115
- published: Joi.boolean(),
2116
- slug: Joi.string().allow(""),
2117
- tags: Joi.array().items(Joi.string().allow("")),
2118
- template_id: Joi.string().allow(""),
2119
- template_variables: Joi.any(),
2120
- updated_at: Joi.string().allow(""),
2121
- url_shorten: CommunicationPlatformModel.EnabledObj(),
2122
1950
  });
2123
1951
  }
2124
1952
 
2125
- /** @returns {TemplateAndType} */
2126
- static TemplateAndType() {
1953
+ /** @returns {SystemNotifications} */
1954
+ static SystemNotifications() {
2127
1955
  return Joi.object({
2128
- template: Joi.string().allow(""),
2129
- template_type: Joi.string().allow(""),
1956
+ items: Joi.array().items(CommunicationPlatformModel.SystemNotification()),
1957
+ last_read_anchor: Joi.number(),
1958
+ page: CommunicationPlatformModel.Page(),
2130
1959
  });
2131
1960
  }
2132
1961
 
2133
- /** @returns {TemplateObject} */
2134
- static TemplateObject() {
1962
+ /** @returns {Page} */
1963
+ static Page() {
2135
1964
  return Joi.object({
2136
- email: CommunicationPlatformModel.CommunicationTemplate(),
2137
- pushnotification: CommunicationPlatformModel.CommunicationTemplate(),
2138
- sms: CommunicationPlatformModel.CommunicationTemplate(),
1965
+ item_total: Joi.number(),
1966
+ next_id: Joi.string().allow(""),
1967
+ has_previous: Joi.boolean(),
1968
+ has_next: Joi.boolean(),
1969
+ current: Joi.number(),
1970
+ type: Joi.string().allow("").required(),
1971
+ size: Joi.number(),
2139
1972
  });
2140
1973
  }
2141
1974
 
2142
- /** @returns {TriggerJobRequest} */
2143
- static TriggerJobRequest() {
1975
+ /** @returns {GenericError} */
1976
+ static GenericError() {
2144
1977
  return Joi.object({
2145
- job_id: Joi.string().allow(""),
1978
+ message: CommunicationPlatformModel.Message(),
1979
+ sentry: Joi.string().allow(""),
2146
1980
  });
2147
1981
  }
2148
1982
 
2149
- /** @returns {TriggerJobResponse} */
2150
- static TriggerJobResponse() {
1983
+ /** @returns {GenericDelete} */
1984
+ static GenericDelete() {
2151
1985
  return Joi.object({
2152
- status: Joi.number(),
1986
+ message: Joi.string().allow(""),
1987
+ acknowledged: Joi.boolean(),
1988
+ affected: Joi.number(),
1989
+ operation: Joi.string().allow(""),
2153
1990
  });
2154
1991
  }
2155
1992
 
2156
- /** @returns {VerifyOtpCommsErrorRes} */
2157
- static VerifyOtpCommsErrorRes() {
1993
+ /** @returns {Message} */
1994
+ static Message() {
2158
1995
  return Joi.object({
2159
1996
  message: Joi.string().allow(""),
2160
1997
  success: Joi.boolean(),
1998
+ info: Joi.string().allow(""),
1999
+ operation: Joi.string().allow(""),
2161
2000
  });
2162
2001
  }
2163
2002
 
2164
- /** @returns {VerifyOtpCommsReq} */
2165
- static VerifyOtpCommsReq() {
2166
- return Joi.object({
2167
- otp: Joi.string().allow(""),
2168
- request_id: Joi.string().allow(""),
2169
- });
2170
- }
2171
-
2172
- /** @returns {VerifyOtpCommsSuccessRes} */
2173
- static VerifyOtpCommsSuccessRes() {
2003
+ /** @returns {EnabledObj} */
2004
+ static EnabledObj() {
2174
2005
  return Joi.object({
2175
- country_code: Joi.string().allow(""),
2176
- message: Joi.string().allow(""),
2177
- mobile: Joi.string().allow(""),
2178
- success: Joi.boolean(),
2006
+ enabled: Joi.boolean(),
2179
2007
  });
2180
2008
  }
2181
2009
  }