@gofynd/fdk-client-javascript 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/documentation/application/CART.md +5934 -4502
  2. package/documentation/application/CATALOG.md +6338 -7245
  3. package/documentation/application/COMMON.md +95 -222
  4. package/documentation/application/COMMUNICATION.md +106 -186
  5. package/documentation/application/CONFIGURATION.md +903 -1597
  6. package/documentation/application/CONTENT.md +562 -1270
  7. package/documentation/application/FILESTORAGE.md +84 -220
  8. package/documentation/application/LEAD.md +314 -660
  9. package/documentation/application/LOGISTIC.md +229 -305
  10. package/documentation/application/ORDER.md +642 -1137
  11. package/documentation/application/PAYMENT.md +2285 -3031
  12. package/documentation/application/POSCART.md +6079 -4642
  13. package/documentation/application/REWARDS.md +94 -248
  14. package/documentation/application/SHARE.md +152 -250
  15. package/documentation/application/THEME.md +952 -1235
  16. package/documentation/application/USER.md +1228 -1765
  17. package/documentation/platform/ANALYTICS.md +207 -349
  18. package/documentation/platform/AUDITTRAIL.md +121 -204
  19. package/documentation/platform/BILLING.md +865 -1376
  20. package/documentation/platform/CART.md +2814 -3662
  21. package/documentation/platform/CATALOG.md +15266 -17619
  22. package/documentation/platform/COMMON.md +95 -222
  23. package/documentation/platform/COMMUNICATION.md +1632 -2380
  24. package/documentation/platform/COMPANYPROFILE.md +572 -957
  25. package/documentation/platform/CONFIGURATION.md +3050 -4073
  26. package/documentation/platform/CONTENT.md +3509 -4121
  27. package/documentation/platform/DISCOUNT.md +140 -236
  28. package/documentation/platform/FILESTORAGE.md +187 -323
  29. package/documentation/platform/INVENTORY.md +268 -911
  30. package/documentation/platform/LEAD.md +2195 -2541
  31. package/documentation/platform/ORDER.md +3750 -5636
  32. package/documentation/platform/PARTNER.md +9 -36
  33. package/documentation/platform/PAYMENT.md +903 -1213
  34. package/documentation/platform/REWARDS.md +183 -347
  35. package/documentation/platform/SHARE.md +120 -213
  36. package/documentation/platform/THEME.md +12956 -13239
  37. package/documentation/platform/USER.md +975 -1120
  38. package/documentation/platform/WEBHOOK.md +78 -184
  39. package/documentation/public/CONFIGURATION.md +95 -222
  40. package/documentation/public/INVENTORY.md +100 -282
  41. package/documentation/public/WEBHOOK.md +27 -133
  42. package/package.json +1 -1
  43. package/sdk/application/ApplicationConfig.js +1 -1
  44. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  45. package/sdk/application/Cart/CartApplicationClient.js +1058 -547
  46. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  47. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  48. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  49. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  50. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  51. package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
  52. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  53. package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
  54. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  55. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  56. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  57. package/sdk/application/Common/CommonApplicationClient.js +76 -36
  58. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  59. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  60. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  61. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  62. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  63. package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
  64. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  65. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  66. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  67. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  69. package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  71. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  73. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  74. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  75. package/sdk/application/Content/ContentApplicationClient.js +581 -213
  76. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
  77. package/sdk/application/Content/ContentApplicationModel.js +468 -875
  78. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  79. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  81. package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  83. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  85. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  86. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  87. package/sdk/application/Lead/LeadApplicationClient.js +230 -96
  88. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  89. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  90. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  91. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  92. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  93. package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
  94. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  95. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  96. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  97. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  98. package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
  99. package/sdk/application/Order/OrderApplicationClient.js +448 -215
  100. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  101. package/sdk/application/Order/OrderApplicationModel.js +357 -661
  102. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  103. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  104. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  105. package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
  106. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  107. package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
  108. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  109. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  110. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  111. package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
  112. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
  113. package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
  114. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  115. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  116. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  117. package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
  118. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  119. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  120. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  121. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  122. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  123. package/sdk/application/Share/ShareApplicationClient.js +221 -96
  124. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  125. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  126. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  127. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  128. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  129. package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
  130. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  131. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  132. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  133. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  134. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  135. package/sdk/application/User/UserApplicationClient.js +1201 -543
  136. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  137. package/sdk/application/User/UserApplicationModel.js +440 -689
  138. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  139. package/sdk/application/User/UserApplicationValidator.js +89 -89
  140. package/sdk/common/AxiosHelper.js +1 -1
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  144. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  145. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
  146. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
  147. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  148. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  152. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  153. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  154. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  155. package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
  156. package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
  157. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  158. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  159. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  160. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  161. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
  162. package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
  163. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  164. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  165. package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
  166. package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
  168. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
  169. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  170. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  171. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
  172. package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
  173. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
  174. package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
  175. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
  176. package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
  177. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
  178. package/sdk/platform/Common/CommonPlatformClient.js +80 -37
  179. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  180. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  181. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  182. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
  184. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
  185. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  186. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  187. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  188. package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
  189. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  190. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
  192. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
  193. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
  194. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
  195. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  196. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  197. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
  198. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
  199. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  200. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  201. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
  202. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
  203. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  204. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  205. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  206. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  207. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
  208. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
  209. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
  210. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
  211. package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
  212. package/sdk/platform/Content/ContentPlatformModel.js +486 -867
  213. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
  214. package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
  215. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  216. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  217. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  218. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  219. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
  220. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
  221. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  222. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  223. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
  224. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
  225. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  226. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  227. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  228. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  229. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
  230. package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
  231. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  232. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  233. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  234. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  235. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
  236. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
  237. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  238. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  239. package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
  240. package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
  241. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  242. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  243. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  244. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  245. package/sdk/platform/OAuthClient.js +8 -8
  246. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
  247. package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
  248. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  249. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  250. package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
  251. package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
  252. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
  253. package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
  254. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  255. package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
  256. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
  257. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
  258. package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
  259. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
  260. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
  261. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  262. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  263. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
  264. package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
  265. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  266. package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
  267. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  268. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  269. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
  270. package/sdk/platform/PlatformApplicationClient.js +1584 -13691
  271. package/sdk/platform/PlatformClient.d.ts +7918 -7666
  272. package/sdk/platform/PlatformClient.js +8701 -9926
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  279. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
  280. package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
  281. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  282. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  283. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  284. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  285. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
  286. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
  287. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  288. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  289. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  290. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  291. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
  292. package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
  293. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  294. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  295. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  296. package/sdk/platform/User/UserPlatformModel.js +440 -689
  297. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
  298. package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
  299. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  300. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  301. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  302. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  303. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  304. package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
  305. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  306. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  307. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  308. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  309. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  310. package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
  311. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  312. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  313. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  314. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  315. package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
  316. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  317. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  318. package/tests/application/catalog.spec.js +7 -0
@@ -1,1311 +1,859 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  class CommunicationModel {
4
- static StatsImported() {
4
+ static Audience() {
5
5
  return Joi.object({
6
- count: Joi.number(),
6
+ __v: Joi.number(),
7
+ _id: Joi.string().allow(""),
8
+ application: Joi.string().allow(""),
9
+ created_at: Joi.string().allow(""),
10
+ description: Joi.string().allow(""),
11
+ file_url: Joi.string().allow(""),
12
+ headers: Joi.array().items(Joi.string().allow("")),
13
+ is_active: Joi.boolean(),
14
+ name: Joi.string().allow(""),
15
+ records_count: Joi.number(),
16
+ slug: Joi.string().allow(""),
17
+ tags: Joi.array().items(Joi.string().allow("")),
18
+ type: Joi.string().allow(""),
19
+ updated_at: Joi.string().allow(""),
7
20
  });
8
21
  }
9
-
10
- static StatsProcessedEmail() {
22
+ static AudienceReq() {
11
23
  return Joi.object({
12
- success: Joi.number(),
13
-
14
- failed: Joi.number(),
15
-
16
- suppressed: Joi.number(),
24
+ application: Joi.string().allow(""),
25
+ description: Joi.string().allow(""),
26
+ file_url: Joi.string().allow(""),
27
+ headers: Joi.array().items(Joi.string().allow("")),
28
+ is_active: Joi.boolean(),
29
+ name: Joi.string().allow(""),
30
+ records_count: Joi.number(),
31
+ tags: Joi.array().items(Joi.string().allow("")),
32
+ type: Joi.string().allow(""),
17
33
  });
18
34
  }
19
-
20
- static StatsProcessedSms() {
35
+ static Audiences() {
21
36
  return Joi.object({
22
- success: Joi.number(),
23
-
24
- failed: Joi.number(),
25
-
26
- suppressed: Joi.number(),
37
+ items: Joi.array().items(CommunicationModel.Audience()),
38
+ page: CommunicationModel.Page(),
27
39
  });
28
40
  }
29
-
30
- static StatsProcessed() {
41
+ static BadRequestSchema() {
31
42
  return Joi.object({
32
- email: CommunicationModel.StatsProcessedEmail(),
33
-
34
- sms: CommunicationModel.StatsProcessedSms(),
43
+ message: Joi.string().allow(""),
44
+ status: Joi.string().allow(""),
35
45
  });
36
46
  }
37
-
38
- static Stats() {
47
+ static BigqueryHeadersReq() {
39
48
  return Joi.object({
40
- _id: Joi.string().allow(""),
41
-
42
- imported: Joi.any(),
43
-
44
- processed: Joi.any(),
49
+ query: Joi.string().allow(""),
50
+ type: Joi.string().allow(""),
45
51
  });
46
52
  }
47
-
48
- static GetStats() {
53
+ static BigqueryHeadersRes() {
49
54
  return Joi.object({
50
- items: Joi.array().items(CommunicationModel.Stats()),
55
+ headers: Joi.array().items(
56
+ CommunicationModel.BigqueryHeadersResHeaders()
57
+ ),
51
58
  });
52
59
  }
53
-
54
- static CampaignReq() {
60
+ static BigqueryHeadersResHeaders() {
55
61
  return Joi.object({
62
+ name: Joi.string().allow(""),
63
+ type: Joi.string().allow(""),
64
+ });
65
+ }
66
+ static Campaign() {
67
+ return Joi.object({
68
+ __v: Joi.number(),
69
+ _id: Joi.string().allow(""),
70
+ application: Joi.string().allow(""),
71
+ created_at: Joi.string().allow(""),
72
+ datasource: Joi.string().allow(""),
56
73
  description: Joi.string().allow(""),
57
-
58
- tags: Joi.array().items(Joi.string().allow("")),
59
-
60
- headers: Joi.array().items(Joi.string().allow("")),
61
-
74
+ email: CommunicationModel.CampaignEmail(),
62
75
  is_active: Joi.boolean(),
63
-
64
76
  name: Joi.string().allow(""),
65
-
66
- file_url: Joi.string().allow(""),
67
-
77
+ recipient_headers: CommunicationModel.RecipientHeaders(),
78
+ slug: Joi.string().allow(""),
79
+ tags: Joi.array().items(Joi.any()),
68
80
  type: Joi.string().allow(""),
69
-
70
- records_count: Joi.number(),
71
-
72
- application: Joi.string().allow(""),
81
+ updated_at: Joi.string().allow(""),
73
82
  });
74
83
  }
75
-
76
- static RecipientHeaders() {
84
+ static CampaignEmail() {
77
85
  return Joi.object({
78
- email: Joi.string().allow(""),
86
+ provider: CommunicationModel.CampignEmailProvider(),
87
+ template: CommunicationModel.CampaignEmailTemplate(),
79
88
  });
80
89
  }
81
-
82
90
  static CampaignEmailTemplate() {
83
91
  return Joi.object({
84
92
  key: Joi.string().allow(""),
85
-
86
93
  value: Joi.string().allow(""),
87
94
  });
88
95
  }
89
-
96
+ static CampaignReq() {
97
+ return Joi.object({
98
+ application: Joi.string().allow(""),
99
+ description: Joi.string().allow(""),
100
+ file_url: Joi.string().allow(""),
101
+ headers: Joi.array().items(Joi.string().allow("")),
102
+ is_active: Joi.boolean(),
103
+ name: Joi.string().allow(""),
104
+ records_count: Joi.number(),
105
+ tags: Joi.array().items(Joi.string().allow("")),
106
+ type: Joi.string().allow(""),
107
+ });
108
+ }
109
+ static Campaigns() {
110
+ return Joi.object({
111
+ items: Joi.array().items(CommunicationModel.Campaign()),
112
+ page: CommunicationModel.Page(),
113
+ });
114
+ }
90
115
  static CampignEmailProvider() {
91
116
  return Joi.object({
92
117
  _id: Joi.string().allow(""),
93
-
94
- from_name: Joi.string().allow(""),
95
-
96
118
  from_email: Joi.string().allow(""),
119
+ from_name: Joi.string().allow(""),
97
120
  });
98
121
  }
99
-
100
- static CampaignEmail() {
122
+ static EmailProvider() {
101
123
  return Joi.object({
102
- template: CommunicationModel.CampaignEmailTemplate(),
103
-
104
- provider: CommunicationModel.CampignEmailProvider(),
124
+ __v: Joi.number(),
125
+ _id: Joi.string().allow(""),
126
+ api_key: Joi.string().allow(""),
127
+ application: Joi.string().allow(""),
128
+ created_at: Joi.string().allow(""),
129
+ description: Joi.string().allow(""),
130
+ from_address: Joi.array().items(
131
+ CommunicationModel.EmailProviderReqFrom()
132
+ ),
133
+ name: Joi.string().allow(""),
134
+ provider: Joi.string().allow(""),
135
+ slug: Joi.string().allow(""),
136
+ type: Joi.string().allow(""),
137
+ updated_at: Joi.string().allow(""),
105
138
  });
106
139
  }
107
-
108
- static Campaign() {
140
+ static EmailProviderReq() {
109
141
  return Joi.object({
110
- recipient_headers: CommunicationModel.RecipientHeaders(),
111
-
112
- email: CommunicationModel.CampaignEmail(),
113
-
142
+ api_key: Joi.string().allow(""),
114
143
  description: Joi.string().allow(""),
115
-
116
- tags: Joi.array().items(Joi.any()),
117
-
118
- is_active: Joi.boolean(),
119
-
120
- _id: Joi.string().allow(""),
121
-
122
- datasource: Joi.string().allow(""),
123
-
144
+ from_address: Joi.array().items(
145
+ CommunicationModel.EmailProviderReqFrom()
146
+ ),
147
+ name: Joi.string().allow(""),
148
+ provider: Joi.string().allow(""),
124
149
  type: Joi.string().allow(""),
125
-
150
+ });
151
+ }
152
+ static EmailProviderReqFrom() {
153
+ return Joi.object({
154
+ email: Joi.string().allow(""),
155
+ is_default: Joi.boolean(),
126
156
  name: Joi.string().allow(""),
127
-
128
- application: Joi.string().allow(""),
129
-
130
- created_at: Joi.string().allow(""),
131
-
132
- updated_at: Joi.string().allow(""),
133
-
134
- slug: Joi.string().allow(""),
135
-
136
- __v: Joi.number(),
137
157
  });
138
158
  }
139
-
140
- static Campaigns() {
159
+ static EmailProviders() {
141
160
  return Joi.object({
142
- items: Joi.array().items(CommunicationModel.Campaign()),
143
-
161
+ items: Joi.array().items(CommunicationModel.EmailProvider()),
144
162
  page: CommunicationModel.Page(),
145
163
  });
146
164
  }
147
-
148
- static BadRequestSchema() {
165
+ static EmailTemplate() {
149
166
  return Joi.object({
150
- status: Joi.string().allow(""),
151
-
152
- message: Joi.string().allow(""),
167
+ __v: Joi.number(),
168
+ _id: Joi.string().allow(""),
169
+ attachments: Joi.array().items(Joi.any()),
170
+ created_at: Joi.string().allow(""),
171
+ description: Joi.string().allow(""),
172
+ from_name: Joi.string().allow(""),
173
+ headers: Joi.array().items(Joi.any()),
174
+ html: CommunicationModel.TemplateAndType(),
175
+ is_internal: Joi.boolean(),
176
+ is_system: Joi.boolean(),
177
+ name: Joi.string().allow(""),
178
+ priority: Joi.string().allow(""),
179
+ published: Joi.boolean(),
180
+ slug: Joi.string().allow(""),
181
+ static_bcc: Joi.array().items(Joi.any()),
182
+ static_cc: Joi.array().items(Joi.any()),
183
+ static_to: Joi.array().items(Joi.any()),
184
+ subject: CommunicationModel.TemplateAndType(),
185
+ tags: Joi.array().items(Joi.any()),
186
+ text: CommunicationModel.TemplateAndType(),
187
+ updated_at: Joi.string().allow(""),
153
188
  });
154
189
  }
155
-
156
- static NotFound() {
190
+ static EmailTemplateDeleteFailureRes() {
157
191
  return Joi.object({
158
192
  message: Joi.string().allow(""),
193
+ success: Joi.boolean(),
159
194
  });
160
195
  }
161
-
162
- static BigqueryHeadersReq() {
196
+ static EmailTemplateDeleteSuccessRes() {
163
197
  return Joi.object({
164
- query: Joi.string().allow(""),
165
-
166
- type: Joi.string().allow(""),
198
+ message: Joi.string().allow(""),
199
+ success: Joi.boolean(),
167
200
  });
168
201
  }
169
-
170
- static BigqueryHeadersResHeaders() {
202
+ static EmailTemplateHeaders() {
171
203
  return Joi.object({
172
- name: Joi.string().allow(""),
173
-
174
- type: Joi.string().allow(""),
204
+ key: Joi.string().allow(""),
205
+ value: Joi.string().allow(""),
175
206
  });
176
207
  }
177
-
178
- static BigqueryHeadersRes() {
208
+ static EmailTemplateKeys() {
179
209
  return Joi.object({
180
- headers: Joi.array().items(
181
- CommunicationModel.BigqueryHeadersResHeaders()
182
- ),
210
+ bcc: Joi.string().allow(""),
211
+ cc: Joi.string().allow(""),
212
+ to: Joi.string().allow(""),
183
213
  });
184
214
  }
185
-
186
- static GetNRecordsCsvReq() {
187
- return Joi.object({
188
- url: Joi.string().allow(""),
189
-
190
- header: Joi.boolean(),
191
-
192
- count: Joi.number(),
193
- });
194
- }
195
-
196
- static GetNRecordsCsvResItems() {
197
- return Joi.object({
198
- phone_number: Joi.string().allow(""),
199
-
200
- email: Joi.string().allow(""),
201
-
202
- firstname: Joi.string().allow(""),
203
-
204
- lastname: Joi.string().allow(""),
205
-
206
- orderid: Joi.string().allow(""),
207
- });
208
- }
209
-
210
- static GetNRecordsCsvRes() {
211
- return Joi.object({
212
- items: Joi.array().items(CommunicationModel.GetNRecordsCsvResItems()),
213
- });
214
- }
215
-
216
- static AudienceReq() {
215
+ static EmailTemplateReq() {
217
216
  return Joi.object({
217
+ attachments: Joi.array().items(Joi.any()),
218
218
  description: Joi.string().allow(""),
219
-
220
- tags: Joi.array().items(Joi.string().allow("")),
221
-
222
- headers: Joi.array().items(Joi.string().allow("")),
223
-
224
- is_active: Joi.boolean(),
225
-
219
+ headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
220
+ html: CommunicationModel.TemplateAndType(),
221
+ keys: CommunicationModel.EmailTemplateKeys(),
226
222
  name: Joi.string().allow(""),
227
-
228
- file_url: Joi.string().allow(""),
229
-
230
- type: Joi.string().allow(""),
231
-
232
- records_count: Joi.number(),
233
-
234
- application: Joi.string().allow(""),
223
+ priority: Joi.string().allow(""),
224
+ reply_to: Joi.string().allow(""),
225
+ static_bcc: Joi.array().items(Joi.string().allow("")),
226
+ static_cc: Joi.array().items(Joi.string().allow("")),
227
+ static_to: Joi.array().items(Joi.string().allow("")),
228
+ subject: CommunicationModel.TemplateAndType(),
229
+ text: CommunicationModel.TemplateAndType(),
235
230
  });
236
231
  }
237
-
238
- static Audience() {
232
+ static EmailTemplateRes() {
239
233
  return Joi.object({
240
- description: Joi.string().allow(""),
241
-
242
- tags: Joi.array().items(Joi.string().allow("")),
243
-
244
- headers: Joi.array().items(Joi.string().allow("")),
245
-
246
- is_active: Joi.boolean(),
247
-
234
+ __v: Joi.number(),
248
235
  _id: Joi.string().allow(""),
249
-
250
- name: Joi.string().allow(""),
251
-
252
- file_url: Joi.string().allow(""),
253
-
254
- type: Joi.string().allow(""),
255
-
256
- records_count: Joi.number(),
257
-
258
- application: Joi.string().allow(""),
259
-
236
+ attachments: Joi.array().items(Joi.any()),
260
237
  created_at: Joi.string().allow(""),
261
-
262
- updated_at: Joi.string().allow(""),
263
-
238
+ description: Joi.string().allow(""),
239
+ headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
240
+ html: CommunicationModel.TemplateAndType(),
241
+ is_internal: Joi.boolean(),
242
+ is_system: Joi.boolean(),
243
+ keys: CommunicationModel.EmailTemplateKeys(),
244
+ name: Joi.string().allow(""),
245
+ priority: Joi.string().allow(""),
246
+ published: Joi.boolean(),
247
+ reply_to: Joi.string().allow(""),
264
248
  slug: Joi.string().allow(""),
265
-
266
- __v: Joi.number(),
249
+ static_bcc: Joi.array().items(Joi.string().allow("")),
250
+ static_cc: Joi.array().items(Joi.string().allow("")),
251
+ static_to: Joi.array().items(Joi.string().allow("")),
252
+ subject: CommunicationModel.TemplateAndType(),
253
+ tags: Joi.array().items(Joi.any()),
254
+ text: CommunicationModel.TemplateAndType(),
255
+ updated_at: Joi.string().allow(""),
267
256
  });
268
257
  }
269
-
270
- static Audiences() {
258
+ static EmailTemplates() {
271
259
  return Joi.object({
272
- items: Joi.array().items(CommunicationModel.Audience()),
273
-
260
+ items: Joi.array().items(CommunicationModel.EmailTemplate()),
274
261
  page: CommunicationModel.Page(),
275
262
  });
276
263
  }
277
-
278
- static EmailProviderReqFrom() {
264
+ static EngineRequest() {
279
265
  return Joi.object({
280
- name: Joi.string().allow(""),
281
-
282
- email: Joi.string().allow(""),
283
-
284
- is_default: Joi.boolean(),
266
+ meta: CommunicationModel.MetaStructure(),
267
+ payload: CommunicationModel.PayloadStructure(),
285
268
  });
286
269
  }
287
-
288
- static EmailProviderReq() {
270
+ static EngineResponse() {
289
271
  return Joi.object({
290
- name: Joi.string().allow(""),
291
-
292
- description: Joi.string().allow(""),
293
-
294
- api_key: Joi.string().allow(""),
295
-
296
- type: Joi.string().allow(""),
297
-
298
- provider: Joi.string().allow(""),
299
-
300
- from_address: Joi.array().items(
301
- CommunicationModel.EmailProviderReqFrom()
302
- ),
272
+ success: Joi.boolean(),
303
273
  });
304
274
  }
305
-
306
- static EmailProvider() {
275
+ static EventSubscription() {
307
276
  return Joi.object({
308
- type: Joi.string().allow(""),
309
-
310
- provider: Joi.string().allow(""),
311
-
312
- from_address: Joi.array().items(
313
- CommunicationModel.EmailProviderReqFrom()
314
- ),
315
-
277
+ __v: Joi.number(),
316
278
  _id: Joi.string().allow(""),
317
-
318
- name: Joi.string().allow(""),
319
-
320
- description: Joi.string().allow(""),
321
-
322
- api_key: Joi.string().allow(""),
323
-
324
279
  application: Joi.string().allow(""),
325
-
326
280
  created_at: Joi.string().allow(""),
327
-
328
- updated_at: Joi.string().allow(""),
329
-
281
+ event: Joi.string().allow(""),
282
+ is_default: Joi.boolean(),
330
283
  slug: Joi.string().allow(""),
331
-
332
- __v: Joi.number(),
284
+ template: CommunicationModel.EventSubscriptionTemplate(),
285
+ updated_at: Joi.string().allow(""),
333
286
  });
334
287
  }
335
-
336
- static EmailProviders() {
288
+ static EventSubscriptions() {
337
289
  return Joi.object({
338
- items: Joi.array().items(CommunicationModel.EmailProvider()),
339
-
290
+ items: Joi.array().items(CommunicationModel.EventSubscription()),
340
291
  page: CommunicationModel.Page(),
341
292
  });
342
293
  }
343
-
344
- static EmailTemplateDeleteSuccessRes() {
294
+ static EventSubscriptionTemplate() {
345
295
  return Joi.object({
346
- success: Joi.boolean(),
347
-
348
- message: Joi.string().allow(""),
296
+ email: CommunicationModel.EventSubscriptionTemplateEmail(),
297
+ sms: CommunicationModel.EventSubscriptionTemplateSms(),
349
298
  });
350
299
  }
351
-
352
- static EmailTemplateDeleteFailureRes() {
300
+ static EventSubscriptionTemplateEmail() {
353
301
  return Joi.object({
354
- success: Joi.boolean(),
355
-
356
- message: Joi.string().allow(""),
302
+ subscribed: Joi.boolean(),
303
+ template: Joi.string().allow(""),
357
304
  });
358
305
  }
359
-
360
- static EmailTemplateKeys() {
306
+ static EventSubscriptionTemplateSms() {
361
307
  return Joi.object({
362
- to: Joi.string().allow(""),
363
-
364
- cc: Joi.string().allow(""),
365
-
366
- bcc: Joi.string().allow(""),
308
+ subscribed: Joi.boolean(),
309
+ template: Joi.string().allow(""),
367
310
  });
368
311
  }
369
-
370
- static EmailTemplateHeaders() {
312
+ static GetNRecordsCsvReq() {
371
313
  return Joi.object({
372
- key: Joi.string().allow(""),
373
-
374
- value: Joi.string().allow(""),
314
+ count: Joi.number(),
315
+ header: Joi.boolean(),
316
+ url: Joi.string().allow(""),
375
317
  });
376
318
  }
377
-
378
- static EmailTemplateReq() {
319
+ static GetNRecordsCsvRes() {
379
320
  return Joi.object({
380
- name: Joi.string().allow(""),
381
-
382
- description: Joi.string().allow(""),
383
-
384
- keys: CommunicationModel.EmailTemplateKeys(),
385
-
386
- static_to: Joi.array().items(Joi.string().allow("")),
387
-
388
- static_cc: Joi.array().items(Joi.string().allow("")),
389
-
390
- static_bcc: Joi.array().items(Joi.string().allow("")),
391
-
392
- reply_to: Joi.string().allow(""),
393
-
394
- headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
395
-
396
- subject: CommunicationModel.TemplateAndType(),
397
-
398
- html: CommunicationModel.TemplateAndType(),
399
-
400
- text: CommunicationModel.TemplateAndType(),
401
-
402
- attachments: Joi.array().items(Joi.any()),
403
-
404
- priority: Joi.string().allow(""),
321
+ items: Joi.array().items(CommunicationModel.GetNRecordsCsvResItems()),
405
322
  });
406
323
  }
407
-
408
- static TemplateAndType() {
324
+ static GetNRecordsCsvResItems() {
409
325
  return Joi.object({
410
- template_type: Joi.string().allow(""),
411
-
412
- template: Joi.string().allow(""),
326
+ email: Joi.string().allow(""),
327
+ firstname: Joi.string().allow(""),
328
+ lastname: Joi.string().allow(""),
329
+ orderid: Joi.string().allow(""),
330
+ phone_number: Joi.string().allow(""),
413
331
  });
414
332
  }
415
-
416
- static EmailTemplateRes() {
333
+ static GetStats() {
417
334
  return Joi.object({
418
- is_system: Joi.boolean(),
419
-
420
- is_internal: Joi.boolean(),
421
-
422
- description: Joi.string().allow(""),
423
-
424
- static_to: Joi.array().items(Joi.string().allow("")),
425
-
426
- static_cc: Joi.array().items(Joi.string().allow("")),
427
-
428
- static_bcc: Joi.array().items(Joi.string().allow("")),
429
-
430
- tags: Joi.array().items(Joi.any()),
431
-
432
- priority: Joi.string().allow(""),
433
-
434
- published: Joi.boolean(),
435
-
436
- _id: Joi.string().allow(""),
437
-
438
- name: Joi.string().allow(""),
439
-
440
- keys: CommunicationModel.EmailTemplateKeys(),
441
-
442
- reply_to: Joi.string().allow(""),
443
-
444
- headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
445
-
446
- subject: CommunicationModel.TemplateAndType(),
447
-
448
- html: CommunicationModel.TemplateAndType(),
449
-
450
- text: CommunicationModel.TemplateAndType(),
451
-
452
- attachments: Joi.array().items(Joi.any()),
453
-
454
- created_at: Joi.string().allow(""),
455
-
456
- updated_at: Joi.string().allow(""),
457
-
458
- slug: Joi.string().allow(""),
459
-
460
- __v: Joi.number(),
335
+ items: Joi.array().items(CommunicationModel.Stats()),
461
336
  });
462
337
  }
463
-
464
- static EmailTemplate() {
338
+ static Job() {
465
339
  return Joi.object({
466
- is_system: Joi.boolean(),
467
-
468
- is_internal: Joi.boolean(),
469
-
470
- description: Joi.string().allow(""),
471
-
472
- static_to: Joi.array().items(Joi.any()),
473
-
474
- static_cc: Joi.array().items(Joi.any()),
475
-
476
- static_bcc: Joi.array().items(Joi.any()),
477
-
478
- tags: Joi.array().items(Joi.any()),
479
-
480
- priority: Joi.string().allow(""),
481
-
482
- published: Joi.boolean(),
483
-
340
+ __v: Joi.number(),
484
341
  _id: Joi.string().allow(""),
485
-
486
- slug: Joi.string().allow(""),
487
-
488
- name: Joi.string().allow(""),
489
-
490
- from_name: Joi.string().allow(""),
491
-
492
- subject: CommunicationModel.TemplateAndType(),
493
-
494
- html: CommunicationModel.TemplateAndType(),
495
-
496
- text: CommunicationModel.TemplateAndType(),
497
-
498
- headers: Joi.array().items(Joi.any()),
499
-
500
- attachments: Joi.array().items(Joi.any()),
501
-
342
+ application: Joi.string().allow(""),
343
+ campaign: Joi.string().allow(""),
344
+ completed: Joi.boolean(),
502
345
  created_at: Joi.string().allow(""),
503
-
346
+ is_active: Joi.boolean(),
504
347
  updated_at: Joi.string().allow(""),
505
-
506
- __v: Joi.number(),
507
348
  });
508
349
  }
509
-
510
- static SystemEmailTemplate() {
350
+ static JobLog() {
511
351
  return Joi.object({
512
- is_system: Joi.boolean(),
513
-
514
- is_internal: Joi.boolean(),
515
-
516
- description: Joi.string().allow(""),
517
-
518
- static_to: Joi.array().items(Joi.any()),
519
-
520
- static_cc: Joi.array().items(Joi.any()),
521
-
522
- static_bcc: Joi.array().items(Joi.any()),
523
-
524
- tags: Joi.array().items(Joi.any()),
525
-
526
- priority: Joi.string().allow(""),
527
-
528
- published: Joi.boolean(),
529
-
352
+ __v: Joi.number(),
530
353
  _id: Joi.string().allow(""),
531
-
532
- slug: Joi.string().allow(""),
533
-
534
- name: Joi.string().allow(""),
535
-
536
- from_name: Joi.string().allow(""),
537
-
538
- subject: CommunicationModel.TemplateAndType(),
539
-
540
- html: CommunicationModel.TemplateAndType(),
541
-
542
- text: CommunicationModel.TemplateAndType(),
543
-
544
- headers: Joi.array().items(Joi.any()),
545
-
546
- attachments: Joi.array().items(Joi.any()),
547
-
354
+ campaign: Joi.string().allow(""),
548
355
  created_at: Joi.string().allow(""),
549
-
356
+ imported: Joi.any(),
357
+ job: Joi.string().allow(""),
358
+ processed: Joi.any(),
550
359
  updated_at: Joi.string().allow(""),
551
-
552
- __v: Joi.number(),
553
360
  });
554
361
  }
555
-
556
- static EmailTemplates() {
362
+ static JobLogs() {
557
363
  return Joi.object({
558
- items: Joi.array().items(CommunicationModel.EmailTemplate()),
559
-
364
+ items: Joi.array().items(CommunicationModel.JobLog()),
560
365
  page: CommunicationModel.Page(),
561
366
  });
562
367
  }
563
-
564
- static SystemEmailTemplates() {
368
+ static Jobs() {
565
369
  return Joi.object({
566
- items: Joi.array().items(CommunicationModel.SystemEmailTemplate()),
567
-
370
+ items: Joi.array().items(CommunicationModel.Job()),
568
371
  page: CommunicationModel.Page(),
569
372
  });
570
373
  }
571
-
572
- static PayloadEmailTemplateStructure() {
374
+ static Log() {
375
+ return Joi.object({
376
+ _id: Joi.string().allow(""),
377
+ application: Joi.string().allow(""),
378
+ created_at: Joi.string().allow(""),
379
+ data: Joi.any(),
380
+ email: CommunicationModel.LogEmail(),
381
+ expire_at: Joi.string().allow(""),
382
+ meta: CommunicationModel.LogMeta(),
383
+ pushnotification: CommunicationModel.LogPushnotification(),
384
+ service: Joi.string().allow(""),
385
+ status: Joi.string().allow(""),
386
+ step: Joi.string().allow(""),
387
+ });
388
+ }
389
+ static LogEmail() {
390
+ return Joi.object({
391
+ template: Joi.string().allow(""),
392
+ });
393
+ }
394
+ static LogMeta() {
573
395
  return Joi.object({
396
+ identifier: Joi.string().allow(""),
574
397
  key: Joi.string().allow(""),
575
-
576
- value: Joi.any(),
398
+ offset: Joi.string().allow(""),
399
+ partition: Joi.string().allow(""),
400
+ topic: Joi.string().allow(""),
401
+ type: Joi.string().allow(""),
402
+ });
403
+ }
404
+ static LogPushnotification() {
405
+ return Joi.object({
406
+ pushtokens: Joi.array().items(Joi.string().allow("")),
407
+ });
408
+ }
409
+ static Logs() {
410
+ return Joi.object({
411
+ items: Joi.array().items(CommunicationModel.Log()),
412
+ page: CommunicationModel.Page(),
413
+ });
414
+ }
415
+ static MetaStructure() {
416
+ return Joi.object({
417
+ action: Joi.string().allow(""),
418
+ job_type: Joi.string().allow(""),
419
+ timestamp: Joi.string().allow(""),
420
+ trace: Joi.string().allow(""),
421
+ });
422
+ }
423
+ static NotFound() {
424
+ return Joi.object({
425
+ message: Joi.string().allow(""),
426
+ });
427
+ }
428
+ static Notification() {
429
+ return Joi.object({
430
+ body: Joi.string().allow(""),
431
+ click_action: Joi.string().allow(""),
432
+ deeplink: Joi.string().allow(""),
433
+ icon: Joi.string().allow(""),
434
+ subtitle: Joi.string().allow(""),
435
+ title: Joi.string().allow(""),
436
+ });
437
+ }
438
+ static Page() {
439
+ return Joi.object({
440
+ current: Joi.number(),
441
+ has_next: Joi.boolean(),
442
+ has_previous: Joi.boolean(),
443
+ item_total: Joi.number(),
444
+ next_id: Joi.string().allow(""),
445
+ size: Joi.number(),
446
+ type: Joi.string().allow("").required(),
577
447
  });
578
448
  }
579
-
580
449
  static PayloadEmailProviderStructure() {
581
450
  return Joi.object({
582
451
  _id: Joi.string().allow(""),
583
452
  });
584
453
  }
585
-
586
454
  static PayloadEmailStructure() {
587
455
  return Joi.object({
588
- template: CommunicationModel.PayloadEmailTemplateStructure(),
589
-
590
456
  provider: CommunicationModel.PayloadEmailProviderStructure(),
457
+ template: CommunicationModel.PayloadEmailTemplateStructure(),
591
458
  });
592
459
  }
593
-
594
- static PayloadSmsTemplateStructure() {
460
+ static PayloadEmailTemplateStructure() {
595
461
  return Joi.object({
596
462
  key: Joi.string().allow(""),
597
-
598
463
  value: Joi.any(),
599
464
  });
600
465
  }
601
-
602
466
  static PayloadSmsProviderStructure() {
603
467
  return Joi.object({
604
468
  _id: Joi.string().allow(""),
605
469
  });
606
470
  }
607
-
608
471
  static PayloadSmsStructure() {
609
472
  return Joi.object({
610
- template: CommunicationModel.PayloadSmsTemplateStructure(),
611
-
612
473
  provider: CommunicationModel.PayloadSmsProviderStructure(),
474
+ template: CommunicationModel.PayloadSmsTemplateStructure(),
475
+ });
476
+ }
477
+ static PayloadSmsTemplateStructure() {
478
+ return Joi.object({
479
+ key: Joi.string().allow(""),
480
+ value: Joi.any(),
613
481
  });
614
482
  }
615
-
616
483
  static PayloadStructure() {
617
484
  return Joi.object({
485
+ application: Joi.string().allow(""),
618
486
  data: Joi.array().items(Joi.any()),
619
-
620
487
  email: CommunicationModel.PayloadEmailStructure(),
621
-
622
488
  sms: CommunicationModel.PayloadSmsStructure(),
623
-
624
- application: Joi.string().allow(""),
625
489
  });
626
490
  }
627
-
628
- static MetaStructure() {
491
+ static PushtokenReq() {
629
492
  return Joi.object({
630
- job_type: Joi.string().allow(""),
631
-
632
493
  action: Joi.string().allow(""),
633
-
634
- trace: Joi.string().allow(""),
635
-
636
- timestamp: Joi.string().allow(""),
494
+ bundle_identifier: Joi.string().allow(""),
495
+ push_token: Joi.string().allow(""),
496
+ unique_device_id: Joi.string().allow(""),
637
497
  });
638
498
  }
639
-
640
- static EngineRequest() {
641
- return Joi.object({
642
- payload: CommunicationModel.PayloadStructure(),
643
-
644
- meta: CommunicationModel.MetaStructure(),
645
- });
646
- }
647
-
648
- static EngineResponse() {
649
- return Joi.object({
650
- success: Joi.boolean(),
651
- });
652
- }
653
-
654
- static EventSubscriptionTemplateSms() {
655
- return Joi.object({
656
- subscribed: Joi.boolean(),
657
-
658
- template: Joi.string().allow(""),
659
- });
660
- }
661
-
662
- static EventSubscriptionTemplateEmail() {
663
- return Joi.object({
664
- subscribed: Joi.boolean(),
665
-
666
- template: Joi.string().allow(""),
667
- });
668
- }
669
-
670
- static EventSubscriptionTemplate() {
671
- return Joi.object({
672
- sms: CommunicationModel.EventSubscriptionTemplateSms(),
673
-
674
- email: CommunicationModel.EventSubscriptionTemplateEmail(),
675
- });
676
- }
677
-
678
- static EventSubscription() {
499
+ static PushtokenRes() {
679
500
  return Joi.object({
680
- template: CommunicationModel.EventSubscriptionTemplate(),
681
-
682
- is_default: Joi.boolean(),
683
-
684
501
  _id: Joi.string().allow(""),
685
-
686
- application: Joi.string().allow(""),
687
-
688
- event: Joi.string().allow(""),
689
-
690
- slug: Joi.string().allow(""),
691
-
502
+ application_id: Joi.string().allow(""),
503
+ bundle_identifier: Joi.string().allow(""),
692
504
  created_at: Joi.string().allow(""),
693
-
505
+ expired_at: Joi.string().allow(""),
506
+ platform: Joi.string().allow(""),
507
+ push_token: Joi.string().allow(""),
508
+ type: Joi.string().allow(""),
509
+ unique_device_id: Joi.string().allow(""),
694
510
  updated_at: Joi.string().allow(""),
695
-
696
- __v: Joi.number(),
697
- });
698
- }
699
-
700
- static EventSubscriptions() {
701
- return Joi.object({
702
- items: Joi.array().items(CommunicationModel.EventSubscription()),
703
-
704
- page: CommunicationModel.Page(),
511
+ user_id: Joi.string().allow(""),
705
512
  });
706
513
  }
707
-
708
- static TriggerJobResponse() {
514
+ static RecipientHeaders() {
709
515
  return Joi.object({
710
- status: Joi.number(),
516
+ email: Joi.string().allow(""),
711
517
  });
712
518
  }
713
-
714
- static TriggerJobRequest() {
519
+ static SendOtpCommsReq() {
715
520
  return Joi.object({
716
- job_id: Joi.string().allow(""),
521
+ data: CommunicationModel.SendOtpCommsReqData(),
522
+ email: CommunicationModel.SendOtpCommsReqEmail(),
523
+ sms: CommunicationModel.SendOtpCommsReqSms(),
717
524
  });
718
525
  }
719
-
720
- static Job() {
526
+ static SendOtpCommsReqData() {
721
527
  return Joi.object({
722
- completed: Joi.boolean(),
723
-
724
- is_active: Joi.boolean(),
725
-
726
- _id: Joi.string().allow(""),
727
-
728
- campaign: Joi.string().allow(""),
729
-
730
- application: Joi.string().allow(""),
731
-
732
- created_at: Joi.string().allow(""),
733
-
734
- updated_at: Joi.string().allow(""),
735
-
736
- __v: Joi.number(),
528
+ country_code: Joi.string().allow(""),
529
+ mobile: Joi.string().allow(""),
530
+ send_same_otp_to_channel: Joi.boolean(),
531
+ to: Joi.string().allow(""),
737
532
  });
738
533
  }
739
-
740
- static Jobs() {
534
+ static SendOtpCommsReqEmail() {
741
535
  return Joi.object({
742
- items: Joi.array().items(CommunicationModel.Job()),
743
-
744
- page: CommunicationModel.Page(),
536
+ expiry: Joi.number(),
537
+ otp_length: Joi.number(),
538
+ template: CommunicationModel.SendOtpEmailCommsTemplate(),
745
539
  });
746
540
  }
747
-
748
- static JobLog() {
541
+ static SendOtpCommsReqSms() {
749
542
  return Joi.object({
750
- imported: Joi.any(),
751
-
752
- processed: Joi.any(),
753
-
754
- _id: Joi.string().allow(""),
755
-
756
- job: Joi.string().allow(""),
757
-
758
- campaign: Joi.string().allow(""),
759
-
760
- created_at: Joi.string().allow(""),
761
-
762
- updated_at: Joi.string().allow(""),
763
-
764
- __v: Joi.number(),
543
+ expiry: Joi.number(),
544
+ otp_length: Joi.number(),
545
+ provider: CommunicationModel.SendOtpSmsCommsProvider(),
546
+ template: CommunicationModel.SendOtpSmsCommsTemplate(),
765
547
  });
766
548
  }
767
-
768
- static JobLogs() {
549
+ static SendOtpCommsRes() {
769
550
  return Joi.object({
770
- items: Joi.array().items(CommunicationModel.JobLog()),
771
-
772
- page: CommunicationModel.Page(),
551
+ email: CommunicationModel.SendOtpCommsResEmail(),
552
+ sms: CommunicationModel.SendOtpCommsResSms(),
773
553
  });
774
554
  }
775
-
776
- static LogEmail() {
555
+ static SendOtpCommsResEmail() {
777
556
  return Joi.object({
778
- template: Joi.string().allow(""),
557
+ message: Joi.string().allow(""),
558
+ request_id: Joi.string().allow(""),
559
+ resend_timer: Joi.number(),
560
+ success: Joi.boolean(),
561
+ to: Joi.string().allow(""),
779
562
  });
780
563
  }
781
-
782
- static LogPushnotification() {
564
+ static SendOtpCommsResSms() {
783
565
  return Joi.object({
784
- pushtokens: Joi.array().items(Joi.string().allow("")),
566
+ country_code: Joi.string().allow(""),
567
+ message: Joi.string().allow(""),
568
+ mobile: Joi.string().allow(""),
569
+ request_id: Joi.string().allow(""),
570
+ resend_timer: Joi.number(),
571
+ success: Joi.boolean(),
785
572
  });
786
573
  }
787
-
788
- static LogMeta() {
574
+ static SendOtpEmailCommsTemplate() {
789
575
  return Joi.object({
790
- type: Joi.string().allow(""),
791
-
792
- identifier: Joi.string().allow(""),
793
-
794
576
  key: Joi.string().allow(""),
795
-
796
- offset: Joi.string().allow(""),
797
-
798
- partition: Joi.string().allow(""),
799
-
800
- topic: Joi.string().allow(""),
577
+ value: Joi.any(),
801
578
  });
802
579
  }
803
-
804
- static Log() {
580
+ static SendOtpSmsCommsProvider() {
805
581
  return Joi.object({
806
- email: CommunicationModel.LogEmail(),
807
-
808
- pushnotification: CommunicationModel.LogPushnotification(),
809
-
810
- meta: CommunicationModel.LogMeta(),
811
-
812
582
  _id: Joi.string().allow(""),
813
-
814
- application: Joi.string().allow(""),
815
-
816
- service: Joi.string().allow(""),
817
-
818
- step: Joi.string().allow(""),
819
-
820
- status: Joi.string().allow(""),
821
-
822
- data: Joi.any(),
823
-
824
- expire_at: Joi.string().allow(""),
825
-
826
- created_at: Joi.string().allow(""),
827
- });
828
- }
829
-
830
- static Logs() {
831
- return Joi.object({
832
- items: Joi.array().items(CommunicationModel.Log()),
833
-
834
- page: CommunicationModel.Page(),
583
+ slug: Joi.string().allow(""),
835
584
  });
836
585
  }
837
-
838
586
  static SendOtpSmsCommsTemplate() {
839
587
  return Joi.object({
840
588
  key: Joi.string().allow(""),
841
-
842
589
  value: Joi.any(),
843
590
  });
844
591
  }
845
-
846
- static SendOtpSmsCommsProvider() {
592
+ static SmsProvider() {
847
593
  return Joi.object({
848
- slug: Joi.string().allow(""),
849
-
594
+ __v: Joi.number(),
850
595
  _id: Joi.string().allow(""),
596
+ application: Joi.string().allow(""),
597
+ authkey: Joi.string().allow(""),
598
+ created_at: Joi.string().allow(""),
599
+ description: Joi.string().allow(""),
600
+ name: Joi.string().allow(""),
601
+ provider: Joi.string().allow(""),
602
+ rpt: Joi.number(),
603
+ sender: Joi.string().allow(""),
604
+ slug: Joi.string().allow(""),
605
+ type: Joi.string().allow(""),
606
+ updated_at: Joi.string().allow(""),
607
+ username: Joi.string().allow(""),
851
608
  });
852
609
  }
853
-
854
- static SendOtpEmailCommsTemplate() {
610
+ static SmsProviderReq() {
855
611
  return Joi.object({
856
- key: Joi.string().allow(""),
857
-
858
- value: Joi.any(),
612
+ authkey: Joi.string().allow(""),
613
+ description: Joi.string().allow(""),
614
+ name: Joi.string().allow(""),
615
+ provider: Joi.string().allow(""),
616
+ sender: Joi.string().allow(""),
617
+ type: Joi.string().allow(""),
618
+ username: Joi.string().allow(""),
859
619
  });
860
620
  }
861
-
862
- static SendOtpCommsReqData() {
621
+ static SmsProviders() {
863
622
  return Joi.object({
864
- send_same_otp_to_channel: Joi.boolean(),
865
-
866
- mobile: Joi.string().allow(""),
867
-
868
- country_code: Joi.string().allow(""),
869
-
870
- to: Joi.string().allow(""),
623
+ items: Joi.array().items(CommunicationModel.SmsProvider()),
624
+ page: CommunicationModel.Page(),
871
625
  });
872
626
  }
873
-
874
- static SendOtpCommsReqSms() {
627
+ static SmsTemplate() {
875
628
  return Joi.object({
876
- otp_length: Joi.number(),
877
-
878
- expiry: Joi.number(),
879
-
880
- template: CommunicationModel.SendOtpSmsCommsTemplate(),
881
-
882
- provider: CommunicationModel.SendOtpSmsCommsProvider(),
629
+ __v: Joi.number(),
630
+ _id: Joi.string().allow(""),
631
+ created_at: Joi.string().allow(""),
632
+ description: Joi.string().allow(""),
633
+ is_internal: Joi.boolean(),
634
+ is_system: Joi.boolean(),
635
+ message: CommunicationModel.SmsTemplateMessage(),
636
+ name: Joi.string().allow(""),
637
+ priority: Joi.string().allow(""),
638
+ published: Joi.boolean(),
639
+ slug: Joi.string().allow(""),
640
+ tags: Joi.array().items(Joi.any()),
641
+ template_variables: Joi.any(),
642
+ updated_at: Joi.string().allow(""),
883
643
  });
884
644
  }
885
-
886
- static SendOtpCommsReqEmail() {
645
+ static SmsTemplateDeleteFailureRes() {
887
646
  return Joi.object({
888
- otp_length: Joi.number(),
889
-
890
- expiry: Joi.number(),
891
-
892
- template: CommunicationModel.SendOtpEmailCommsTemplate(),
647
+ message: Joi.string().allow(""),
648
+ success: Joi.boolean(),
893
649
  });
894
650
  }
895
-
896
- static SendOtpCommsResSms() {
651
+ static SmsTemplateDeleteSuccessRes() {
897
652
  return Joi.object({
898
- success: Joi.boolean(),
899
-
900
- request_id: Joi.string().allow(""),
901
-
902
653
  message: Joi.string().allow(""),
903
-
904
- mobile: Joi.string().allow(""),
905
-
906
- country_code: Joi.string().allow(""),
907
-
908
- resend_timer: Joi.number(),
654
+ success: Joi.boolean(),
909
655
  });
910
656
  }
911
-
912
- static SendOtpCommsResEmail() {
657
+ static SmsTemplateMessage() {
913
658
  return Joi.object({
914
- success: Joi.boolean(),
915
-
916
- request_id: Joi.string().allow(""),
917
-
918
- message: Joi.string().allow(""),
919
-
920
- to: Joi.string().allow(""),
921
-
922
- resend_timer: Joi.number(),
659
+ template: Joi.string().allow(""),
660
+ template_type: Joi.string().allow(""),
923
661
  });
924
662
  }
925
-
926
- static SendOtpCommsReq() {
663
+ static SmsTemplateReq() {
927
664
  return Joi.object({
928
- data: CommunicationModel.SendOtpCommsReqData(),
929
-
930
- sms: CommunicationModel.SendOtpCommsReqSms(),
931
-
932
- email: CommunicationModel.SendOtpCommsReqEmail(),
665
+ attachments: Joi.array().items(Joi.any()),
666
+ description: Joi.string().allow(""),
667
+ message: CommunicationModel.SmsTemplateMessage(),
668
+ name: Joi.string().allow(""),
669
+ priority: Joi.string().allow(""),
670
+ template_variables: Joi.any(),
933
671
  });
934
672
  }
935
-
936
- static SendOtpCommsRes() {
673
+ static SmsTemplateRes() {
937
674
  return Joi.object({
938
- sms: CommunicationModel.SendOtpCommsResSms(),
939
-
940
- email: CommunicationModel.SendOtpCommsResEmail(),
675
+ __v: Joi.number(),
676
+ _id: Joi.string().allow(""),
677
+ created_at: Joi.string().allow(""),
678
+ description: Joi.string().allow(""),
679
+ is_internal: Joi.boolean(),
680
+ is_system: Joi.boolean(),
681
+ message: CommunicationModel.SmsTemplateMessage(),
682
+ name: Joi.string().allow(""),
683
+ priority: Joi.string().allow(""),
684
+ published: Joi.boolean(),
685
+ slug: Joi.string().allow(""),
686
+ tags: Joi.array().items(Joi.any()),
687
+ template_variables: Joi.any(),
688
+ updated_at: Joi.string().allow(""),
941
689
  });
942
690
  }
943
-
944
- static VerifyOtpCommsReq() {
691
+ static SmsTemplates() {
945
692
  return Joi.object({
946
- request_id: Joi.string().allow(""),
947
-
948
- otp: Joi.string().allow(""),
693
+ items: Joi.array().items(CommunicationModel.SmsTemplate()),
694
+ page: CommunicationModel.Page(),
949
695
  });
950
696
  }
951
-
952
- static VerifyOtpCommsSuccessRes() {
697
+ static Stats() {
953
698
  return Joi.object({
954
- success: Joi.boolean(),
955
-
956
- mobile: Joi.string().allow(""),
957
-
958
- country_code: Joi.string().allow(""),
959
-
960
- message: Joi.string().allow(""),
699
+ _id: Joi.string().allow(""),
700
+ imported: Joi.any(),
701
+ processed: Joi.any(),
961
702
  });
962
703
  }
963
-
964
- static VerifyOtpCommsErrorRes() {
704
+ static StatsImported() {
965
705
  return Joi.object({
966
- success: Joi.boolean(),
967
-
968
- message: Joi.string().allow(""),
706
+ count: Joi.number(),
969
707
  });
970
708
  }
971
-
972
- static PushtokenReq() {
709
+ static StatsProcessed() {
973
710
  return Joi.object({
974
- action: Joi.string().allow(""),
975
-
976
- bundle_identifier: Joi.string().allow(""),
977
-
978
- push_token: Joi.string().allow(""),
979
-
980
- unique_device_id: Joi.string().allow(""),
711
+ email: CommunicationModel.StatsProcessedEmail(),
712
+ sms: CommunicationModel.StatsProcessedSms(),
981
713
  });
982
714
  }
983
-
984
- static PushtokenRes() {
715
+ static StatsProcessedEmail() {
985
716
  return Joi.object({
986
- _id: Joi.string().allow(""),
987
-
988
- bundle_identifier: Joi.string().allow(""),
989
-
990
- push_token: Joi.string().allow(""),
991
-
992
- unique_device_id: Joi.string().allow(""),
993
-
994
- type: Joi.string().allow(""),
995
-
996
- platform: Joi.string().allow(""),
997
-
998
- application_id: Joi.string().allow(""),
999
-
1000
- user_id: Joi.string().allow(""),
1001
-
1002
- created_at: Joi.string().allow(""),
1003
-
1004
- updated_at: Joi.string().allow(""),
1005
-
1006
- expired_at: Joi.string().allow(""),
717
+ failed: Joi.number(),
718
+ success: Joi.number(),
719
+ suppressed: Joi.number(),
1007
720
  });
1008
721
  }
1009
-
1010
- static SmsProviderReq() {
722
+ static StatsProcessedSms() {
1011
723
  return Joi.object({
1012
- name: Joi.string().allow(""),
1013
-
1014
- description: Joi.string().allow(""),
1015
-
1016
- sender: Joi.string().allow(""),
1017
-
1018
- username: Joi.string().allow(""),
1019
-
1020
- authkey: Joi.string().allow(""),
1021
-
1022
- type: Joi.string().allow(""),
1023
-
1024
- provider: Joi.string().allow(""),
724
+ failed: Joi.number(),
725
+ success: Joi.number(),
726
+ suppressed: Joi.number(),
1025
727
  });
1026
728
  }
1027
-
1028
- static SmsProvider() {
729
+ static SystemEmailTemplate() {
1029
730
  return Joi.object({
1030
- rpt: Joi.number(),
1031
-
1032
- type: Joi.string().allow(""),
1033
-
1034
- provider: Joi.string().allow(""),
1035
-
731
+ __v: Joi.number(),
1036
732
  _id: Joi.string().allow(""),
1037
-
1038
- name: Joi.string().allow(""),
1039
-
1040
- description: Joi.string().allow(""),
1041
-
1042
- sender: Joi.string().allow(""),
1043
-
1044
- username: Joi.string().allow(""),
1045
-
1046
- authkey: Joi.string().allow(""),
1047
-
1048
- application: Joi.string().allow(""),
1049
-
733
+ attachments: Joi.array().items(Joi.any()),
1050
734
  created_at: Joi.string().allow(""),
1051
-
735
+ description: Joi.string().allow(""),
736
+ from_name: Joi.string().allow(""),
737
+ headers: Joi.array().items(Joi.any()),
738
+ html: CommunicationModel.TemplateAndType(),
739
+ is_internal: Joi.boolean(),
740
+ is_system: Joi.boolean(),
741
+ name: Joi.string().allow(""),
742
+ priority: Joi.string().allow(""),
743
+ published: Joi.boolean(),
744
+ slug: Joi.string().allow(""),
745
+ static_bcc: Joi.array().items(Joi.any()),
746
+ static_cc: Joi.array().items(Joi.any()),
747
+ static_to: Joi.array().items(Joi.any()),
748
+ subject: CommunicationModel.TemplateAndType(),
749
+ tags: Joi.array().items(Joi.any()),
750
+ text: CommunicationModel.TemplateAndType(),
1052
751
  updated_at: Joi.string().allow(""),
1053
-
1054
- slug: Joi.string().allow(""),
1055
-
1056
- __v: Joi.number(),
1057
752
  });
1058
753
  }
1059
-
1060
- static SmsProviders() {
754
+ static SystemEmailTemplates() {
1061
755
  return Joi.object({
1062
- items: Joi.array().items(CommunicationModel.SmsProvider()),
1063
-
756
+ items: Joi.array().items(CommunicationModel.SystemEmailTemplate()),
1064
757
  page: CommunicationModel.Page(),
1065
758
  });
1066
759
  }
1067
-
1068
- static SmsTemplateDeleteSuccessRes() {
1069
- return Joi.object({
1070
- success: Joi.boolean(),
1071
-
1072
- message: Joi.string().allow(""),
1073
- });
1074
- }
1075
-
1076
- static SmsTemplateDeleteFailureRes() {
760
+ static SystemNotification() {
1077
761
  return Joi.object({
1078
- success: Joi.boolean(),
1079
-
1080
- message: Joi.string().allow(""),
762
+ _id: Joi.string().allow(""),
763
+ created_at: Joi.string().allow(""),
764
+ group: Joi.string().allow(""),
765
+ notification: CommunicationModel.Notification(),
766
+ settings: CommunicationModel.SystemNotificationUser(),
767
+ user: CommunicationModel.SystemNotificationUser(),
1081
768
  });
1082
769
  }
1083
-
1084
- static SmsTemplateMessage() {
770
+ static SystemNotifications() {
1085
771
  return Joi.object({
1086
- template_type: Joi.string().allow(""),
1087
-
1088
- template: Joi.string().allow(""),
772
+ items: Joi.array().items(CommunicationModel.SystemNotification()),
773
+ last_read_anchor: Joi.number(),
774
+ page: CommunicationModel.Page(),
1089
775
  });
1090
776
  }
1091
-
1092
- static SmsTemplateReq() {
777
+ static SystemNotificationSettings() {
1093
778
  return Joi.object({
1094
- name: Joi.string().allow(""),
1095
-
1096
- description: Joi.string().allow(""),
1097
-
1098
- message: CommunicationModel.SmsTemplateMessage(),
1099
-
1100
- template_variables: Joi.any(),
1101
-
1102
- attachments: Joi.array().items(Joi.any()),
1103
-
1104
779
  priority: Joi.string().allow(""),
780
+ sound: Joi.boolean(),
781
+ time_to_live: Joi.string().allow(""),
1105
782
  });
1106
783
  }
1107
-
1108
- static SmsTemplateRes() {
784
+ static SystemNotificationsPage() {
1109
785
  return Joi.object({
1110
- is_system: Joi.boolean(),
1111
-
1112
- is_internal: Joi.boolean(),
1113
-
1114
- description: Joi.string().allow(""),
1115
-
1116
- tags: Joi.array().items(Joi.any()),
1117
-
1118
- priority: Joi.string().allow(""),
1119
-
1120
- published: Joi.boolean(),
1121
-
1122
- _id: Joi.string().allow(""),
1123
-
1124
- name: Joi.string().allow(""),
1125
-
1126
- message: CommunicationModel.SmsTemplateMessage(),
1127
-
1128
- template_variables: Joi.any(),
1129
-
1130
- created_at: Joi.string().allow(""),
1131
-
1132
- updated_at: Joi.string().allow(""),
1133
-
1134
- slug: Joi.string().allow(""),
1135
-
1136
- __v: Joi.number(),
786
+ current: Joi.number(),
787
+ has_next: Joi.boolean(),
788
+ item_total: Joi.number(),
789
+ size: Joi.number(),
790
+ type: Joi.string().allow(""),
1137
791
  });
1138
792
  }
1139
-
1140
- static SmsTemplate() {
793
+ static SystemNotificationUser() {
1141
794
  return Joi.object({
1142
- is_system: Joi.boolean(),
1143
-
1144
- is_internal: Joi.boolean(),
1145
-
1146
- description: Joi.string().allow(""),
1147
-
1148
- priority: Joi.string().allow(""),
1149
-
1150
- tags: Joi.array().items(Joi.any()),
1151
-
1152
- published: Joi.boolean(),
1153
-
1154
- _id: Joi.string().allow(""),
1155
-
1156
- slug: Joi.string().allow(""),
1157
-
1158
- name: Joi.string().allow(""),
1159
-
1160
- message: CommunicationModel.SmsTemplateMessage(),
1161
-
1162
- template_variables: Joi.any(),
1163
-
1164
- created_at: Joi.string().allow(""),
1165
-
1166
- updated_at: Joi.string().allow(""),
1167
-
1168
- __v: Joi.number(),
795
+ type: Joi.string().allow(""),
796
+ value: Joi.string().allow(""),
1169
797
  });
1170
798
  }
1171
-
1172
799
  static SystemSmsTemplate() {
1173
800
  return Joi.object({
1174
- is_system: Joi.boolean(),
1175
-
1176
- is_internal: Joi.boolean(),
1177
-
801
+ __v: Joi.number(),
802
+ _id: Joi.string().allow(""),
803
+ created_at: Joi.string().allow(""),
1178
804
  description: Joi.string().allow(""),
1179
-
1180
- tags: Joi.array().items(Joi.any()),
1181
-
805
+ is_internal: Joi.boolean(),
806
+ is_system: Joi.boolean(),
807
+ message: CommunicationModel.SmsTemplateMessage(),
808
+ name: Joi.string().allow(""),
1182
809
  priority: Joi.string().allow(""),
1183
-
1184
810
  published: Joi.boolean(),
1185
-
1186
- _id: Joi.string().allow(""),
1187
-
1188
811
  slug: Joi.string().allow(""),
1189
-
1190
- name: Joi.string().allow(""),
1191
-
1192
- message: CommunicationModel.SmsTemplateMessage(),
1193
-
812
+ tags: Joi.array().items(Joi.any()),
1194
813
  template_variables: Joi.any(),
1195
-
1196
- created_at: Joi.string().allow(""),
1197
-
1198
814
  updated_at: Joi.string().allow(""),
1199
-
1200
- __v: Joi.number(),
1201
- });
1202
- }
1203
-
1204
- static SmsTemplates() {
1205
- return Joi.object({
1206
- items: Joi.array().items(CommunicationModel.SmsTemplate()),
1207
-
1208
- page: CommunicationModel.Page(),
1209
815
  });
1210
816
  }
1211
-
1212
817
  static SystemSmsTemplates() {
1213
818
  return Joi.object({
1214
819
  items: Joi.array().items(CommunicationModel.SystemSmsTemplate()),
1215
-
1216
820
  page: CommunicationModel.Page(),
1217
821
  });
1218
822
  }
1219
-
1220
- static Notification() {
1221
- return Joi.object({
1222
- title: Joi.string().allow(""),
1223
-
1224
- body: Joi.string().allow(""),
1225
-
1226
- subtitle: Joi.string().allow(""),
1227
-
1228
- icon: Joi.string().allow(""),
1229
-
1230
- deeplink: Joi.string().allow(""),
1231
-
1232
- click_action: Joi.string().allow(""),
1233
- });
1234
- }
1235
-
1236
- static SystemNotificationUser() {
823
+ static TemplateAndType() {
1237
824
  return Joi.object({
1238
- type: Joi.string().allow(""),
1239
-
1240
- value: Joi.string().allow(""),
825
+ template: Joi.string().allow(""),
826
+ template_type: Joi.string().allow(""),
1241
827
  });
1242
828
  }
1243
-
1244
- static SystemNotificationSettings() {
829
+ static TriggerJobRequest() {
1245
830
  return Joi.object({
1246
- sound: Joi.boolean(),
1247
-
1248
- priority: Joi.string().allow(""),
1249
-
1250
- time_to_live: Joi.string().allow(""),
831
+ job_id: Joi.string().allow(""),
1251
832
  });
1252
833
  }
1253
-
1254
- static SystemNotification() {
834
+ static TriggerJobResponse() {
1255
835
  return Joi.object({
1256
- notification: CommunicationModel.Notification(),
1257
-
1258
- user: CommunicationModel.SystemNotificationUser(),
1259
-
1260
- settings: CommunicationModel.SystemNotificationUser(),
1261
-
1262
- _id: Joi.string().allow(""),
1263
-
1264
- group: Joi.string().allow(""),
1265
-
1266
- created_at: Joi.string().allow(""),
836
+ status: Joi.number(),
1267
837
  });
1268
838
  }
1269
-
1270
- static SystemNotificationsPage() {
839
+ static VerifyOtpCommsErrorRes() {
1271
840
  return Joi.object({
1272
- type: Joi.string().allow(""),
1273
-
1274
- current: Joi.number(),
1275
-
1276
- size: Joi.number(),
1277
-
1278
- item_total: Joi.number(),
1279
-
1280
- has_next: Joi.boolean(),
841
+ message: Joi.string().allow(""),
842
+ success: Joi.boolean(),
1281
843
  });
1282
844
  }
1283
-
1284
- static SystemNotifications() {
845
+ static VerifyOtpCommsReq() {
1285
846
  return Joi.object({
1286
- items: Joi.array().items(CommunicationModel.SystemNotification()),
1287
-
1288
- last_read_anchor: Joi.number(),
1289
-
1290
- page: CommunicationModel.Page(),
847
+ otp: Joi.string().allow(""),
848
+ request_id: Joi.string().allow(""),
1291
849
  });
1292
850
  }
1293
-
1294
- static Page() {
851
+ static VerifyOtpCommsSuccessRes() {
1295
852
  return Joi.object({
1296
- item_total: Joi.number(),
1297
-
1298
- next_id: Joi.string().allow(""),
1299
-
1300
- has_previous: Joi.boolean(),
1301
-
1302
- has_next: Joi.boolean(),
1303
-
1304
- current: Joi.number(),
1305
-
1306
- type: Joi.string().allow("").required(),
1307
-
1308
- size: Joi.number(),
853
+ country_code: Joi.string().allow(""),
854
+ message: Joi.string().allow(""),
855
+ mobile: Joi.string().allow(""),
856
+ success: Joi.boolean(),
1309
857
  });
1310
858
  }
1311
859
  }