@gofynd/fdk-client-javascript 0.1.36 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +24 -0
  2. package/application.d.ts +2 -1
  3. package/application.js +2 -1
  4. package/documentation/application/CART.md +313 -281
  5. package/documentation/application/CATALOG.md +458 -435
  6. package/documentation/application/FILESTORAGE.md +2 -0
  7. package/documentation/application/LEAD.md +18 -18
  8. package/documentation/application/LOGISTIC.md +424 -102
  9. package/documentation/application/ORDER.md +293 -293
  10. package/documentation/application/PAYMENT.md +278 -278
  11. package/documentation/application/POSCART.md +350 -318
  12. package/documentation/application/README.md +1 -1
  13. package/documentation/application/REWARDS.md +1 -0
  14. package/documentation/application/USER.md +19 -14
  15. package/documentation/platform/AUDITTRAIL.md +2 -2
  16. package/documentation/platform/CART.md +442 -439
  17. package/documentation/platform/CATALOG.md +2925 -2641
  18. package/documentation/platform/COMPANYPROFILE.md +228 -369
  19. package/documentation/platform/DISCOUNT.md +86 -0
  20. package/documentation/platform/FILESTORAGE.md +2 -0
  21. package/documentation/platform/LEAD.md +60 -60
  22. package/documentation/platform/ORDER.md +1296 -1618
  23. package/documentation/platform/PAYMENT.md +89 -89
  24. package/documentation/platform/REWARDS.md +145 -0
  25. package/documentation/platform/USER.md +24 -14
  26. package/index.d.ts +4 -1
  27. package/index.js +6 -3
  28. package/package.json +9 -9
  29. package/platform.d.ts +2 -1
  30. package/platform.js +3 -2
  31. package/public.d.ts +1 -0
  32. package/public.js +3 -2
  33. package/sdk/application/ApplicationAPIClient.js +6 -1
  34. package/sdk/application/ApplicationClient.d.ts +17 -16
  35. package/sdk/application/ApplicationClient.js +43 -17
  36. package/sdk/application/ApplicationConfig.d.ts +1 -0
  37. package/sdk/application/ApplicationConfig.js +4 -2
  38. package/sdk/application/ApplicationModels.d.ts +0 -827
  39. package/sdk/application/ApplicationModels.js +6 -10486
  40. package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
  41. package/sdk/application/{client → Cart}/CartApplicationClient.js +14 -8
  42. package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
  43. package/sdk/application/Cart/CartApplicationModel.js +1136 -0
  44. package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +16 -12
  45. package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
  46. package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +11 -8
  47. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
  48. package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
  49. package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +3 -1
  50. package/sdk/application/{client → Common}/CommonApplicationClient.js +2 -2
  51. package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
  52. package/sdk/application/Common/CommonApplicationModel.js +228 -0
  53. package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +2 -1
  54. package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +2 -2
  55. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
  56. package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
  57. package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +4 -3
  58. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +2 -2
  59. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
  60. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
  61. package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +3 -2
  62. package/sdk/application/{client → Content}/ContentApplicationClient.js +2 -2
  63. package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
  64. package/sdk/application/Content/ContentApplicationModel.js +1349 -0
  65. package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +2 -1
  66. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +2 -2
  67. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
  68. package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
  69. package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +5 -4
  70. package/sdk/application/{client → Lead}/LeadApplicationClient.js +2 -2
  71. package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
  72. package/sdk/application/Lead/LeadApplicationModel.js +690 -0
  73. package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +5 -4
  74. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +53 -0
  75. package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +64 -29
  76. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
  77. package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
  78. package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +2 -1
  79. package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +13 -7
  80. package/sdk/application/{client → Order}/OrderApplicationClient.js +2 -2
  81. package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
  82. package/sdk/application/Order/OrderApplicationModel.js +872 -0
  83. package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +4 -3
  84. package/sdk/application/{client → Payment}/PaymentApplicationClient.js +2 -2
  85. package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
  86. package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
  87. package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +24 -23
  88. package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
  89. package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +14 -8
  90. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
  91. package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
  92. package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +17 -13
  93. package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +2 -2
  94. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
  95. package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
  96. package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +5 -4
  97. package/sdk/application/{client → Share}/ShareApplicationClient.js +2 -2
  98. package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
  99. package/sdk/application/Share/ShareApplicationModel.js +178 -0
  100. package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +3 -2
  101. package/sdk/application/{client → Theme}/ThemeApplicationClient.js +2 -2
  102. package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
  103. package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
  104. package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +2 -1
  105. package/sdk/application/{client → User}/UserApplicationClient.js +2 -2
  106. package/sdk/application/User/UserApplicationModel.d.ts +95 -0
  107. package/sdk/application/User/UserApplicationModel.js +998 -0
  108. package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +30 -29
  109. package/sdk/application/index.d.ts +18 -0
  110. package/sdk/application/index.js +33 -0
  111. package/sdk/common/AxiosHelper.js +23 -10
  112. package/sdk/common/Logger.d.ts +2 -0
  113. package/sdk/common/Logger.js +6 -0
  114. package/sdk/common/curlHelper.d.ts +2 -0
  115. package/sdk/common/curlHelper.js +95 -0
  116. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
  117. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +285 -0
  118. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
  119. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
  120. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +2 -2
  121. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
  122. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
  123. package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
  124. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +2 -2
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
  126. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
  127. package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
  128. package/sdk/platform/{client → Billing}/BillingPlatformClient.js +2 -2
  129. package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
  130. package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
  131. package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +755 -0
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
  137. package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2136 -0
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
  142. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +132 -123
  143. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +354 -323
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +316 -0
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +4690 -0
  146. package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +15 -14
  147. package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +91 -84
  148. package/sdk/platform/{client → Common}/CommonPlatformClient.js +2 -2
  149. package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
  150. package/sdk/platform/Common/CommonPlatformModel.js +228 -0
  151. package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1656 -0
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
  156. package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +2 -2
  157. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
  158. package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
  159. package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
  160. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
  161. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +2 -33
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
  164. package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
  165. package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
  166. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
  167. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +940 -0
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
  170. package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +2 -2
  171. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
  172. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
  173. package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
  174. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
  175. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2208 -0
  176. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
  177. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
  178. package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
  179. package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
  180. package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
  181. package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +35 -2
  182. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
  183. package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
  184. package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
  185. package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
  186. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
  187. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +247 -0
  188. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
  189. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
  190. package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +2 -2
  191. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
  192. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
  193. package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
  194. package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +2 -2
  195. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
  196. package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
  197. package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
  198. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
  199. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +397 -0
  200. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
  201. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
  202. package/sdk/platform/{client → Lead}/LeadPlatformClient.js +2 -2
  203. package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
  204. package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
  205. package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
  206. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
  207. package/sdk/platform/Order/OrderPlatformApplicationClient.js +152 -0
  208. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
  209. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
  210. package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +9 -49
  211. package/sdk/platform/{client → Order}/OrderPlatformClient.js +18 -130
  212. package/sdk/platform/Order/OrderPlatformModel.d.ts +215 -0
  213. package/sdk/platform/Order/OrderPlatformModel.js +3530 -0
  214. package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +0 -2
  215. package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +22 -44
  216. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
  217. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -0
  218. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
  219. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
  220. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
  221. package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
  222. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
  223. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +333 -0
  224. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
  225. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
  226. package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +2 -2
  227. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  228. package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
  229. package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
  230. package/sdk/platform/PlatformAPIClient.js +2 -1
  231. package/sdk/platform/PlatformApplicationClient.d.ts +2884 -18377
  232. package/sdk/platform/PlatformApplicationClient.js +3750 -13814
  233. package/sdk/platform/PlatformClient.d.ts +2898 -2861
  234. package/sdk/platform/PlatformClient.js +3714 -3057
  235. package/sdk/platform/PlatformConfig.js +2 -1
  236. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
  237. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +428 -0
  238. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
  239. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
  240. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
  241. package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
  242. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
  243. package/sdk/platform/Share/SharePlatformApplicationClient.js +182 -0
  244. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
  245. package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
  246. package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
  247. package/sdk/platform/Share/SharePlatformModel.js +170 -0
  248. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
  249. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +704 -0
  250. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
  251. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
  252. package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
  253. package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
  254. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
  255. package/sdk/platform/User/UserPlatformApplicationClient.js +361 -0
  256. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
  257. package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
  258. package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
  259. package/sdk/platform/User/UserPlatformModel.js +998 -0
  260. package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +2 -2
  261. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
  262. package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
  263. package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
  264. package/sdk/platform/index.d.ts +24 -0
  265. package/sdk/platform/index.js +45 -0
  266. package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +1 -1
  267. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
  268. package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
  269. package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +1 -1
  270. package/sdk/public/{client → Inventory}/InventoryPublicClient.js +1 -1
  271. package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
  272. package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
  273. package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +2 -2
  274. package/sdk/public/PublicClient.d.ts +3 -3
  275. package/sdk/public/PublicClient.js +8 -3
  276. package/sdk/public/{client → Webhook}/WebhookPublicClient.js +1 -1
  277. package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
  278. package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
  279. package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +2 -2
  280. package/sdk/public/index.d.ts +5 -0
  281. package/sdk/public/index.js +7 -0
  282. package/sdk/application/client/LogisticApplicationClient.d.ts +0 -42
  283. package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
  284. package/sdk/platform/PlatformApplicationModels.js +0 -22522
  285. package/sdk/platform/PlatformModels.d.ts +0 -1470
  286. package/sdk/platform/PlatformModels.js +0 -20510
  287. package/sdk/platform/models/CartValidator.d.ts +0 -0
  288. package/sdk/platform/models/CartValidator.js +0 -0
  289. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  290. package/sdk/platform/models/ContentValidator.js +0 -0
  291. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  292. package/sdk/platform/models/PartnerValidator.js +0 -0
  293. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  294. package/sdk/platform/models/RewardsValidator.js +0 -0
  295. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  296. package/sdk/platform/models/ShareValidator.js +0 -0
  297. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  298. package/sdk/platform/models/ThemeValidator.js +0 -0
  299. package/sdk/platform/models/UserValidator.d.ts +0 -0
  300. package/sdk/platform/models/UserValidator.js +0 -0
  301. package/sdk/public/PublicModels.d.ts +0 -50
  302. package/sdk/public/PublicModels.js +0 -712
  303. /package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
  304. /package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
  305. /package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
  306. /package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
  307. /package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
  308. /package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
  309. /package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
  310. /package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
  311. /package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
  312. /package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
  313. /package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
  314. /package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
  315. /package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
  316. /package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
  317. /package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
  318. /package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
  319. /package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
  320. /package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
  321. /package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
  322. /package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
  323. /package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
  324. /package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
  325. /package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
  326. /package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
  327. /package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
  328. /package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
  329. /package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
  330. /package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
  331. /package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
  332. /package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
  333. /package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
  334. /package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
  335. /package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
  336. /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
  337. /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
  338. /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
  339. /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
  340. /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
  341. /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
  342. /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
  343. /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
  344. /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
  345. /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
  346. /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
  347. /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
  348. /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
  349. /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
  350. /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
  351. /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
  352. /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
  353. /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
  354. /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
  355. /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
  356. /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
  357. /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
@@ -0,0 +1,2072 @@
1
+ const Joi = require("joi");
2
+
3
+ class ConfigurationModel {
4
+ static ApplicationInventory() {
5
+ return Joi.object({
6
+ inventory: ConfigurationModel.AppInventoryConfig(),
7
+
8
+ authentication: ConfigurationModel.AuthenticationConfig(),
9
+
10
+ article_assignment: ConfigurationModel.ArticleAssignmentConfig(),
11
+
12
+ reward_points: ConfigurationModel.RewardPointsConfig(),
13
+
14
+ cart: ConfigurationModel.AppCartConfig(),
15
+
16
+ payment: ConfigurationModel.AppPaymentConfig(),
17
+
18
+ order: ConfigurationModel.AppOrderConfig(),
19
+
20
+ logistics: ConfigurationModel.AppLogisticsConfig(),
21
+
22
+ business: Joi.string().allow(""),
23
+
24
+ comms_enabled: Joi.boolean(),
25
+
26
+ platforms: Joi.array().items(Joi.string().allow("")),
27
+
28
+ _id: Joi.string().allow(""),
29
+
30
+ loyalty_points: ConfigurationModel.LoyaltyPointsConfig(),
31
+
32
+ app: Joi.string().allow(""),
33
+
34
+ created_at: Joi.string().allow(""),
35
+
36
+ updated_at: Joi.string().allow(""),
37
+
38
+ modified_by: Joi.string().allow(""),
39
+ });
40
+ }
41
+
42
+ static AppInventoryConfig() {
43
+ return Joi.object({
44
+ brand: ConfigurationModel.InventoryBrand(),
45
+
46
+ store: ConfigurationModel.InventoryStore(),
47
+
48
+ category: ConfigurationModel.InventoryCategory(),
49
+
50
+ price: ConfigurationModel.InventoryPrice(),
51
+
52
+ discount: ConfigurationModel.InventoryDiscount(),
53
+
54
+ out_of_stock: Joi.boolean(),
55
+
56
+ only_verified_products: Joi.boolean(),
57
+
58
+ franchise_enabled: Joi.boolean(),
59
+
60
+ exclude_category: Joi.array().items(Joi.any()),
61
+
62
+ image: Joi.array().items(Joi.string().allow("")),
63
+
64
+ company_store: Joi.array().items(Joi.any()),
65
+ });
66
+ }
67
+
68
+ static InventoryBrand() {
69
+ return Joi.object({
70
+ criteria: Joi.string().allow(""),
71
+
72
+ brands: Joi.array().items(Joi.any()),
73
+ });
74
+ }
75
+
76
+ static InventoryStore() {
77
+ return Joi.object({
78
+ criteria: Joi.string().allow(""),
79
+
80
+ stores: Joi.array().items(Joi.any()),
81
+
82
+ rules: ConfigurationModel.AppStoreRules(),
83
+ });
84
+ }
85
+
86
+ static AppStoreRules() {
87
+ return Joi.object({
88
+ companies: Joi.array().items(Joi.number()),
89
+
90
+ brands: Joi.array().items(Joi.any()),
91
+ });
92
+ }
93
+
94
+ static InventoryCategory() {
95
+ return Joi.object({
96
+ criteria: Joi.string().allow(""),
97
+
98
+ categories: Joi.array().items(Joi.any()),
99
+ });
100
+ }
101
+
102
+ static InventoryPrice() {
103
+ return Joi.object({
104
+ min: Joi.number(),
105
+
106
+ max: Joi.number(),
107
+ });
108
+ }
109
+
110
+ static InventoryDiscount() {
111
+ return Joi.object({
112
+ min: Joi.number(),
113
+
114
+ max: Joi.number(),
115
+ });
116
+ }
117
+
118
+ static AuthenticationConfig() {
119
+ return Joi.object({
120
+ required: Joi.boolean(),
121
+
122
+ provider: Joi.string().allow(""),
123
+ });
124
+ }
125
+
126
+ static ArticleAssignmentConfig() {
127
+ return Joi.object({
128
+ rules: ConfigurationModel.ArticleAssignmentRules(),
129
+
130
+ post_order_reassignment: Joi.boolean(),
131
+ });
132
+ }
133
+
134
+ static ArticleAssignmentRules() {
135
+ return Joi.object({
136
+ store_priority: ConfigurationModel.StorePriority(),
137
+ });
138
+ }
139
+
140
+ static StorePriority() {
141
+ return Joi.object({
142
+ enabled: Joi.boolean(),
143
+
144
+ storetype_order: Joi.array().items(Joi.any()),
145
+ });
146
+ }
147
+
148
+ static AppCartConfig() {
149
+ return Joi.object({
150
+ delivery_charges: ConfigurationModel.DeliveryCharges(),
151
+
152
+ enabled: Joi.boolean(),
153
+
154
+ max_cart_items: Joi.number(),
155
+
156
+ min_cart_value: Joi.number(),
157
+
158
+ bulk_coupons: Joi.boolean(),
159
+
160
+ revenue_engine_coupon: Joi.boolean(),
161
+ });
162
+ }
163
+
164
+ static DeliveryCharges() {
165
+ return Joi.object({
166
+ enabled: Joi.boolean(),
167
+
168
+ charges: ConfigurationModel.Charges(),
169
+ });
170
+ }
171
+
172
+ static Charges() {
173
+ return Joi.object({
174
+ threshold: Joi.number(),
175
+
176
+ charges: Joi.number(),
177
+ });
178
+ }
179
+
180
+ static AppPaymentConfig() {
181
+ return Joi.object({
182
+ callback_url: ConfigurationModel.CallbackUrl(),
183
+
184
+ methods: ConfigurationModel.Methods(),
185
+
186
+ payment_selection_lock: ConfigurationModel.PaymentSelectionLock(),
187
+
188
+ mode_of_payment: Joi.string().allow(""),
189
+
190
+ source: Joi.string().allow(""),
191
+
192
+ enabled: Joi.boolean(),
193
+
194
+ cod_amount_limit: Joi.number(),
195
+
196
+ cod_charges: Joi.number(),
197
+ });
198
+ }
199
+
200
+ static CallbackUrl() {
201
+ return Joi.object({
202
+ app: Joi.string().allow(""),
203
+
204
+ web: Joi.string().allow(""),
205
+ });
206
+ }
207
+
208
+ static Methods() {
209
+ return Joi.object({
210
+ pl: ConfigurationModel.PaymentModeConfig(),
211
+
212
+ card: ConfigurationModel.PaymentModeConfig(),
213
+
214
+ nb: ConfigurationModel.PaymentModeConfig(),
215
+
216
+ wl: ConfigurationModel.PaymentModeConfig(),
217
+
218
+ ps: ConfigurationModel.PaymentModeConfig(),
219
+
220
+ upi: ConfigurationModel.PaymentModeConfig(),
221
+
222
+ qr: ConfigurationModel.PaymentModeConfig(),
223
+
224
+ cod: ConfigurationModel.PaymentModeConfig(),
225
+
226
+ pp: ConfigurationModel.PaymentModeConfig(),
227
+
228
+ jp: ConfigurationModel.PaymentModeConfig(),
229
+
230
+ pac: ConfigurationModel.PaymentModeConfig(),
231
+
232
+ fc: ConfigurationModel.PaymentModeConfig(),
233
+
234
+ jiopp: ConfigurationModel.PaymentModeConfig(),
235
+
236
+ stripepg: ConfigurationModel.PaymentModeConfig(),
237
+
238
+ juspaypg: ConfigurationModel.PaymentModeConfig(),
239
+
240
+ payubizpg: ConfigurationModel.PaymentModeConfig(),
241
+
242
+ payumoneypg: ConfigurationModel.PaymentModeConfig(),
243
+
244
+ rupifipg: ConfigurationModel.PaymentModeConfig(),
245
+
246
+ simpl: ConfigurationModel.PaymentModeConfig(),
247
+ });
248
+ }
249
+
250
+ static PaymentModeConfig() {
251
+ return Joi.object({
252
+ enabled: Joi.boolean(),
253
+ });
254
+ }
255
+
256
+ static PaymentSelectionLock() {
257
+ return Joi.object({
258
+ enabled: Joi.boolean(),
259
+
260
+ default_options: Joi.string().allow(""),
261
+
262
+ payment_identifier: Joi.string().allow(""),
263
+ });
264
+ }
265
+
266
+ static AppOrderConfig() {
267
+ return Joi.object({
268
+ enabled: Joi.boolean(),
269
+
270
+ force_reassignment: Joi.boolean(),
271
+
272
+ message: Joi.string().allow(""),
273
+ });
274
+ }
275
+
276
+ static AppLogisticsConfig() {
277
+ return Joi.object({
278
+ logistics_by_seller: Joi.boolean(),
279
+
280
+ serviceability_check: Joi.boolean(),
281
+
282
+ same_day_delivery: Joi.boolean(),
283
+
284
+ dp_assignment: Joi.boolean(),
285
+ });
286
+ }
287
+
288
+ static LoyaltyPointsConfig() {
289
+ return Joi.object({
290
+ enabled: Joi.boolean(),
291
+
292
+ auto_apply: Joi.boolean(),
293
+ });
294
+ }
295
+
296
+ static AppInventoryPartialUpdate() {
297
+ return Joi.object({
298
+ reward_points: ConfigurationModel.RewardPointsConfig(),
299
+
300
+ cart: ConfigurationModel.AppCartConfig(),
301
+
302
+ payment: ConfigurationModel.AppPaymentConfig(),
303
+
304
+ loyalty_points: ConfigurationModel.LoyaltyPointsConfig(),
305
+
306
+ comms_enabled: Joi.boolean(),
307
+ });
308
+ }
309
+
310
+ static BrandCompanyInfo() {
311
+ return Joi.object({
312
+ company_name: Joi.string().allow(""),
313
+
314
+ company_id: Joi.number(),
315
+ });
316
+ }
317
+
318
+ static CompanyByBrandsRequest() {
319
+ return Joi.object({
320
+ brands: Joi.number().required(),
321
+
322
+ search_text: Joi.string().allow(""),
323
+ });
324
+ }
325
+
326
+ static CompanyByBrandsResponse() {
327
+ return Joi.object({
328
+ items: Joi.array().items(ConfigurationModel.BrandCompanyInfo()),
329
+
330
+ page: ConfigurationModel.Page(),
331
+ });
332
+ }
333
+
334
+ static StoreByBrandsRequest() {
335
+ return Joi.object({
336
+ company_id: Joi.number(),
337
+
338
+ brands: Joi.number().required(),
339
+
340
+ search_text: Joi.string().allow(""),
341
+ });
342
+ }
343
+
344
+ static StoreByBrandsResponse() {
345
+ return Joi.object({
346
+ items: Joi.array().items(ConfigurationModel.BrandStoreInfo()),
347
+
348
+ page: ConfigurationModel.Page(),
349
+ });
350
+ }
351
+
352
+ static BrandStoreInfo() {
353
+ return Joi.object({
354
+ store_name: Joi.string().allow(""),
355
+
356
+ store_id: Joi.number(),
357
+
358
+ store_type: Joi.string().allow(""),
359
+
360
+ store_code: Joi.string().allow(""),
361
+
362
+ store_address: ConfigurationModel.OptedStoreAddress(),
363
+
364
+ company: ConfigurationModel.OptedCompany(),
365
+ });
366
+ }
367
+
368
+ static CompanyBrandInfo() {
369
+ return Joi.object({
370
+ name: Joi.string().allow(""),
371
+
372
+ value: Joi.number(),
373
+
374
+ brand_logo_url: Joi.string().allow(""),
375
+
376
+ brand_banner_url: Joi.string().allow(""),
377
+
378
+ brand_banner_portrait_url: Joi.string().allow(""),
379
+ });
380
+ }
381
+
382
+ static BrandsByCompanyResponse() {
383
+ return Joi.object({
384
+ brands: ConfigurationModel.CompanyBrandInfo(),
385
+ });
386
+ }
387
+
388
+ static CreateApplicationRequest() {
389
+ return Joi.object({
390
+ app: ConfigurationModel.App(),
391
+
392
+ configuration: ConfigurationModel.AppInventory(),
393
+
394
+ domain: ConfigurationModel.AppDomain(),
395
+ });
396
+ }
397
+
398
+ static CreateAppResponse() {
399
+ return Joi.object({
400
+ app: ConfigurationModel.Application(),
401
+
402
+ configuration: ConfigurationModel.ApplicationInventory(),
403
+ });
404
+ }
405
+
406
+ static ApplicationsResponse() {
407
+ return Joi.object({
408
+ items: Joi.array().items(ConfigurationModel.Application()),
409
+
410
+ page: ConfigurationModel.Page(),
411
+ });
412
+ }
413
+
414
+ static MobileAppConfiguration() {
415
+ return Joi.object({
416
+ is_active: Joi.boolean(),
417
+
418
+ _id: Joi.string().allow(""),
419
+
420
+ app_name: Joi.string().allow(""),
421
+
422
+ landing_image: ConfigurationModel.LandingImage(),
423
+
424
+ splash_image: ConfigurationModel.SplashImage(),
425
+
426
+ application: Joi.string().allow(""),
427
+
428
+ platform_type: Joi.string().allow(""),
429
+
430
+ created_at: Joi.string().allow(""),
431
+
432
+ updated_at: Joi.string().allow(""),
433
+
434
+ __v: Joi.number(),
435
+
436
+ package_name: Joi.string().allow(""),
437
+ });
438
+ }
439
+
440
+ static LandingImage() {
441
+ return Joi.object({
442
+ aspect_ratio: Joi.string().allow(""),
443
+
444
+ secure_url: Joi.string().allow(""),
445
+ });
446
+ }
447
+
448
+ static SplashImage() {
449
+ return Joi.object({
450
+ aspect_ratio: Joi.string().allow(""),
451
+
452
+ secure_url: Joi.string().allow(""),
453
+ });
454
+ }
455
+
456
+ static MobileAppConfigRequest() {
457
+ return Joi.object({
458
+ app_name: Joi.string().allow(""),
459
+
460
+ landing_image: ConfigurationModel.LandingImage(),
461
+
462
+ splash_image: ConfigurationModel.SplashImage(),
463
+
464
+ is_active: Joi.boolean(),
465
+ });
466
+ }
467
+
468
+ static BuildVersionHistory() {
469
+ return Joi.object({
470
+ versions: ConfigurationModel.BuildVersion(),
471
+
472
+ latest_available_version_name: Joi.string().allow(""),
473
+ });
474
+ }
475
+
476
+ static BuildVersion() {
477
+ return Joi.object({
478
+ _id: Joi.string().allow(""),
479
+
480
+ application: Joi.string().allow(""),
481
+
482
+ platform_type: Joi.string().allow(""),
483
+
484
+ build_status: Joi.string().allow(""),
485
+
486
+ version_name: Joi.string().allow(""),
487
+
488
+ version_code: Joi.number(),
489
+
490
+ created_at: Joi.string().allow(""),
491
+
492
+ updated_at: Joi.string().allow(""),
493
+
494
+ __v: Joi.number(),
495
+ });
496
+ }
497
+
498
+ static AppSupportedCurrency() {
499
+ return Joi.object({
500
+ _id: Joi.string().allow(""),
501
+
502
+ supported_currency: Joi.array().items(Joi.string().allow("")),
503
+
504
+ application: Joi.string().allow(""),
505
+
506
+ default_currency: ConfigurationModel.DefaultCurrency(),
507
+
508
+ created_at: Joi.string().allow(""),
509
+
510
+ updated_at: Joi.string().allow(""),
511
+ });
512
+ }
513
+
514
+ static DefaultCurrency() {
515
+ return Joi.object({
516
+ ref: Joi.string().allow(""),
517
+
518
+ code: Joi.string().allow(""),
519
+ });
520
+ }
521
+
522
+ static CurrencyConfig() {
523
+ return Joi.object({
524
+ _id: Joi.string().allow(""),
525
+
526
+ is_active: Joi.boolean(),
527
+
528
+ name: Joi.string().allow(""),
529
+
530
+ code: Joi.string().allow(""),
531
+
532
+ created_at: Joi.string().allow(""),
533
+
534
+ updated_at: Joi.string().allow(""),
535
+
536
+ decimal_digits: Joi.number(),
537
+
538
+ symbol: Joi.string().allow(""),
539
+ });
540
+ }
541
+
542
+ static DomainAdd() {
543
+ return Joi.object({
544
+ name: Joi.string().allow(""),
545
+ });
546
+ }
547
+
548
+ static DomainAddRequest() {
549
+ return Joi.object({
550
+ domain: ConfigurationModel.DomainAdd(),
551
+ });
552
+ }
553
+
554
+ static DomainsResponse() {
555
+ return Joi.object({
556
+ domains: Joi.array().items(ConfigurationModel.Domain()),
557
+ });
558
+ }
559
+
560
+ static UpdateDomain() {
561
+ return Joi.object({
562
+ _id: Joi.string().allow(""),
563
+ });
564
+ }
565
+
566
+ static UpdateDomainTypeRequest() {
567
+ return Joi.object({
568
+ domain: ConfigurationModel.UpdateDomain(),
569
+
570
+ action: Joi.string().allow(""),
571
+ });
572
+ }
573
+
574
+ static DomainStatusRequest() {
575
+ return Joi.object({
576
+ domain_url: Joi.string().allow(""),
577
+ });
578
+ }
579
+
580
+ static DomainStatus() {
581
+ return Joi.object({
582
+ display: Joi.string().allow(""),
583
+
584
+ status: Joi.boolean(),
585
+ });
586
+ }
587
+
588
+ static DomainStatusResponse() {
589
+ return Joi.object({
590
+ connected: Joi.boolean(),
591
+
592
+ status: Joi.array().items(ConfigurationModel.DomainStatus()),
593
+ });
594
+ }
595
+
596
+ static DomainSuggestionsRequest() {
597
+ return Joi.object({
598
+ domain_url: Joi.string().allow(""),
599
+
600
+ custom: Joi.boolean(),
601
+ });
602
+ }
603
+
604
+ static DomainSuggestion() {
605
+ return Joi.object({
606
+ name: Joi.string().allow("").required(),
607
+
608
+ unsupported: Joi.boolean(),
609
+
610
+ is_available: Joi.boolean().required(),
611
+
612
+ price: Joi.number(),
613
+
614
+ currency: Joi.string().allow(""),
615
+ });
616
+ }
617
+
618
+ static DomainSuggestionsResponse() {
619
+ return Joi.object({
620
+ domains: Joi.array().items(ConfigurationModel.DomainSuggestion()),
621
+ });
622
+ }
623
+
624
+ static GetIntegrationsOptInsResponse() {
625
+ return Joi.object({
626
+ items: Joi.array().items(ConfigurationModel.IntegrationOptIn()),
627
+
628
+ page: ConfigurationModel.Page(),
629
+ });
630
+ }
631
+
632
+ static IntegrationOptIn() {
633
+ return Joi.object({
634
+ validators: ConfigurationModel.Validators(),
635
+
636
+ description: Joi.string().allow(""),
637
+
638
+ description_html: Joi.string().allow(""),
639
+
640
+ constants: Joi.string().allow(""),
641
+
642
+ companies: Joi.array().items(Joi.any()),
643
+
644
+ support: Joi.array().items(Joi.string().allow("")),
645
+
646
+ _id: Joi.string().allow(""),
647
+
648
+ name: Joi.string().allow(""),
649
+
650
+ meta: Joi.array().items(ConfigurationModel.IntegrationMeta()),
651
+
652
+ icon: Joi.string().allow(""),
653
+
654
+ owner: Joi.string().allow(""),
655
+
656
+ created_at: Joi.string().allow(""),
657
+
658
+ updated_at: Joi.string().allow(""),
659
+
660
+ token: Joi.string().allow(""),
661
+
662
+ secret: Joi.string().allow(""),
663
+
664
+ __v: Joi.number(),
665
+ });
666
+ }
667
+
668
+ static Validators() {
669
+ return Joi.object({
670
+ company: ConfigurationModel.CompanyValidator(),
671
+
672
+ store: ConfigurationModel.StoreValidator(),
673
+
674
+ inventory: ConfigurationModel.InventoryValidator(),
675
+
676
+ order: ConfigurationModel.OrderValidator(),
677
+ });
678
+ }
679
+
680
+ static CompanyValidator() {
681
+ return Joi.object({
682
+ json_schema: Joi.array().items(ConfigurationModel.JsonSchema()),
683
+
684
+ browser_script: Joi.string().allow(""),
685
+ });
686
+ }
687
+
688
+ static JsonSchema() {
689
+ return Joi.object({
690
+ display: Joi.string().allow(""),
691
+
692
+ key: Joi.string().allow(""),
693
+
694
+ type: Joi.string().allow(""),
695
+
696
+ tooltip: Joi.string().allow(""),
697
+ });
698
+ }
699
+
700
+ static StoreValidator() {
701
+ return Joi.object({
702
+ json_schema: Joi.array().items(ConfigurationModel.JsonSchema()),
703
+
704
+ browser_script: Joi.string().allow(""),
705
+ });
706
+ }
707
+
708
+ static InventoryValidator() {
709
+ return Joi.object({
710
+ json_schema: Joi.array().items(ConfigurationModel.JsonSchema()),
711
+
712
+ browser_script: Joi.string().allow(""),
713
+ });
714
+ }
715
+
716
+ static OrderValidator() {
717
+ return Joi.object({
718
+ json_schema: Joi.array().items(ConfigurationModel.JsonSchema()),
719
+
720
+ browser_script: Joi.string().allow(""),
721
+ });
722
+ }
723
+
724
+ static IntegrationMeta() {
725
+ return Joi.object({
726
+ is_public: Joi.boolean(),
727
+
728
+ _id: Joi.string().allow(""),
729
+
730
+ name: Joi.string().allow(""),
731
+
732
+ value: Joi.string().allow(""),
733
+ });
734
+ }
735
+
736
+ static Integration() {
737
+ return Joi.object({
738
+ validators: ConfigurationModel.Validators(),
739
+
740
+ description: Joi.string().allow(""),
741
+
742
+ description_html: Joi.string().allow(""),
743
+
744
+ constants: Joi.any(),
745
+
746
+ companies: Joi.array().items(Joi.any()),
747
+
748
+ support: Joi.array().items(Joi.string().allow("")),
749
+
750
+ _id: Joi.string().allow(""),
751
+
752
+ name: Joi.string().allow(""),
753
+
754
+ meta: Joi.array().items(ConfigurationModel.IntegrationMeta()),
755
+
756
+ icon: Joi.string().allow(""),
757
+
758
+ owner: Joi.string().allow(""),
759
+
760
+ created_at: Joi.string().allow(""),
761
+
762
+ updated_at: Joi.string().allow(""),
763
+
764
+ token: Joi.string().allow(""),
765
+
766
+ secret: Joi.string().allow(""),
767
+
768
+ __v: Joi.number(),
769
+ });
770
+ }
771
+
772
+ static IntegrationConfigResponse() {
773
+ return Joi.object({
774
+ items: Joi.array().items(ConfigurationModel.IntegrationLevel()),
775
+ });
776
+ }
777
+
778
+ static IntegrationLevel() {
779
+ return Joi.object({
780
+ opted: Joi.boolean(),
781
+
782
+ permissions: Joi.array().items(Joi.any()),
783
+
784
+ last_patch: Joi.array().items(ConfigurationModel.LastPatch()),
785
+
786
+ _id: Joi.string().allow(""),
787
+
788
+ integration: Joi.string().allow(""),
789
+
790
+ level: Joi.string().allow(""),
791
+
792
+ uid: Joi.number(),
793
+
794
+ meta: Joi.array().items(ConfigurationModel.IntegrationMeta()),
795
+
796
+ token: Joi.string().allow(""),
797
+
798
+ created_at: Joi.string().allow(""),
799
+
800
+ updated_at: Joi.string().allow(""),
801
+
802
+ __v: Joi.number(),
803
+
804
+ data: Joi.any(),
805
+ });
806
+ }
807
+
808
+ static UpdateIntegrationLevelRequest() {
809
+ return Joi.object({
810
+ items: Joi.array().items(ConfigurationModel.IntegrationLevel()),
811
+ });
812
+ }
813
+
814
+ static OptedStoreIntegration() {
815
+ return Joi.object({
816
+ other_opted: Joi.boolean(),
817
+
818
+ other_integration: ConfigurationModel.IntegrationOptIn(),
819
+
820
+ other_entity: ConfigurationModel.OtherEntity(),
821
+ });
822
+ }
823
+
824
+ static OtherEntity() {
825
+ return Joi.object({
826
+ opted: Joi.boolean(),
827
+
828
+ permissions: Joi.array().items(Joi.string().allow("")),
829
+
830
+ last_patch: Joi.array().items(ConfigurationModel.LastPatch()),
831
+
832
+ _id: Joi.string().allow(""),
833
+
834
+ integration: Joi.string().allow(""),
835
+
836
+ level: Joi.string().allow(""),
837
+
838
+ uid: Joi.number(),
839
+
840
+ data: ConfigurationModel.OtherEntityData(),
841
+
842
+ meta: Joi.array().items(Joi.any()),
843
+
844
+ token: Joi.string().allow(""),
845
+
846
+ created_at: Joi.string().allow(""),
847
+
848
+ updated_at: Joi.string().allow(""),
849
+
850
+ __v: Joi.number(),
851
+ });
852
+ }
853
+
854
+ static LastPatch() {
855
+ return Joi.object({
856
+ op: Joi.string().allow(""),
857
+
858
+ path: Joi.string().allow(""),
859
+
860
+ value: Joi.string().allow(""),
861
+ });
862
+ }
863
+
864
+ static OtherEntityData() {
865
+ return Joi.object({
866
+ article_identifier: Joi.string().allow(""),
867
+ });
868
+ }
869
+
870
+ static App() {
871
+ return Joi.object({
872
+ company_id: Joi.string().allow(""),
873
+
874
+ channel_type: Joi.string().allow(""),
875
+
876
+ auth: ConfigurationModel.ApplicationAuth(),
877
+
878
+ name: Joi.string().allow(""),
879
+
880
+ desc: Joi.string().allow(""),
881
+ });
882
+ }
883
+
884
+ static AppInventory() {
885
+ return Joi.object({
886
+ brand: ConfigurationModel.InventoryBrandRule(),
887
+
888
+ store: ConfigurationModel.InventoryStoreRule(),
889
+
890
+ image: Joi.array().items(Joi.string().allow("")),
891
+
892
+ franchise_enabled: Joi.boolean(),
893
+
894
+ out_of_stock: Joi.boolean(),
895
+
896
+ only_verified_products: Joi.boolean(),
897
+
898
+ payment: ConfigurationModel.InventoryPaymentConfig(),
899
+
900
+ article_assignment: ConfigurationModel.InventoryArticleAssignment(),
901
+ });
902
+ }
903
+
904
+ static AppDomain() {
905
+ return Joi.object({
906
+ name: Joi.string().allow(""),
907
+ });
908
+ }
909
+
910
+ static CompaniesResponse() {
911
+ return Joi.object({
912
+ items: ConfigurationModel.AppInventoryCompanies(),
913
+
914
+ page: ConfigurationModel.Page(),
915
+ });
916
+ }
917
+
918
+ static AppInventoryCompanies() {
919
+ return Joi.object({
920
+ uid: Joi.number(),
921
+
922
+ name: Joi.string().allow(""),
923
+
924
+ company_type: Joi.string().allow(""),
925
+ });
926
+ }
927
+
928
+ static StoresResponse() {
929
+ return Joi.object({
930
+ items: ConfigurationModel.AppInventoryStores(),
931
+
932
+ page: ConfigurationModel.Page(),
933
+ });
934
+ }
935
+
936
+ static AppInventoryStores() {
937
+ return Joi.object({
938
+ _id: Joi.string().allow(""),
939
+
940
+ modified_on: Joi.string().allow(""),
941
+
942
+ uid: Joi.number(),
943
+
944
+ name: Joi.string().allow(""),
945
+
946
+ display_name: Joi.string().allow(""),
947
+
948
+ store_type: Joi.string().allow(""),
949
+
950
+ store_code: Joi.string().allow(""),
951
+
952
+ company_id: Joi.number(),
953
+ });
954
+ }
955
+
956
+ static FilterOrderingStoreRequest() {
957
+ return Joi.object({
958
+ all_stores: Joi.boolean(),
959
+
960
+ deployed_stores: Joi.array().items(Joi.number()),
961
+
962
+ q: Joi.string().allow(""),
963
+ });
964
+ }
965
+
966
+ static DeploymentMeta() {
967
+ return Joi.object({
968
+ deployed_stores: Joi.array().items(Joi.number()),
969
+
970
+ all_stores: Joi.boolean(),
971
+
972
+ enabled: Joi.boolean(),
973
+
974
+ type: Joi.string().allow(""),
975
+
976
+ _id: Joi.string().allow(""),
977
+
978
+ app: Joi.string().allow(""),
979
+ });
980
+ }
981
+
982
+ static OrderingStoreConfig() {
983
+ return Joi.object({
984
+ deployment_meta: ConfigurationModel.DeploymentMeta(),
985
+ });
986
+ }
987
+
988
+ static OtherSellerCompany() {
989
+ return Joi.object({
990
+ uid: Joi.number(),
991
+
992
+ name: Joi.string().allow(""),
993
+ });
994
+ }
995
+
996
+ static OtherSellerApplication() {
997
+ return Joi.object({
998
+ name: Joi.string().allow(""),
999
+
1000
+ description: Joi.string().allow(""),
1001
+
1002
+ _id: Joi.string().allow(""),
1003
+
1004
+ domain: Joi.string().allow(""),
1005
+
1006
+ company: ConfigurationModel.OtherSellerCompany(),
1007
+
1008
+ opt_type: Joi.string().allow(""),
1009
+ });
1010
+ }
1011
+
1012
+ static OtherSellerApplications() {
1013
+ return Joi.object({
1014
+ items: Joi.array().items(ConfigurationModel.OtherSellerApplication()),
1015
+
1016
+ page: ConfigurationModel.Page(),
1017
+ });
1018
+ }
1019
+
1020
+ static OptedApplicationResponse() {
1021
+ return Joi.object({
1022
+ name: Joi.string().allow(""),
1023
+
1024
+ description: Joi.string().allow(""),
1025
+
1026
+ _id: Joi.string().allow(""),
1027
+
1028
+ domain: Joi.string().allow(""),
1029
+
1030
+ company: ConfigurationModel.OptedCompany(),
1031
+
1032
+ opted_inventory: ConfigurationModel.OptedInventory(),
1033
+
1034
+ opt_out_inventory: ConfigurationModel.OptOutInventory(),
1035
+ });
1036
+ }
1037
+
1038
+ static OptedCompany() {
1039
+ return Joi.object({
1040
+ uid: Joi.number(),
1041
+
1042
+ name: Joi.string().allow(""),
1043
+ });
1044
+ }
1045
+
1046
+ static OptedInventory() {
1047
+ return Joi.object({
1048
+ opt_type: ConfigurationModel.OptType(),
1049
+
1050
+ items: Joi.any(),
1051
+ });
1052
+ }
1053
+
1054
+ static OptType() {
1055
+ return Joi.object({
1056
+ key: Joi.string().allow(""),
1057
+
1058
+ display: Joi.string().allow(""),
1059
+ });
1060
+ }
1061
+
1062
+ static OptedStore() {
1063
+ return Joi.object({
1064
+ name: Joi.string().allow(""),
1065
+
1066
+ store_code: Joi.string().allow(""),
1067
+
1068
+ _id: Joi.string().allow(""),
1069
+
1070
+ modified_on: Joi.string().allow(""),
1071
+
1072
+ uid: Joi.number(),
1073
+
1074
+ address: ConfigurationModel.OptedStoreAddress(),
1075
+
1076
+ display_name: Joi.string().allow(""),
1077
+
1078
+ store_type: Joi.string().allow(""),
1079
+
1080
+ company_id: Joi.number(),
1081
+ });
1082
+ }
1083
+
1084
+ static OptOutInventory() {
1085
+ return Joi.object({
1086
+ store: Joi.array().items(Joi.number()).required(),
1087
+
1088
+ company: Joi.array().items(Joi.number()).required(),
1089
+ });
1090
+ }
1091
+
1092
+ static TokenResponse() {
1093
+ return Joi.object({
1094
+ tokens: ConfigurationModel.Tokens(),
1095
+
1096
+ _id: Joi.string().allow(""),
1097
+
1098
+ application: Joi.string().allow(""),
1099
+
1100
+ created_at: Joi.string().allow(""),
1101
+
1102
+ updated_at: Joi.string().allow(""),
1103
+
1104
+ __v: Joi.number(),
1105
+ });
1106
+ }
1107
+
1108
+ static Tokens() {
1109
+ return Joi.object({
1110
+ firebase: ConfigurationModel.Firebase(),
1111
+
1112
+ moengage: ConfigurationModel.Moengage(),
1113
+
1114
+ segment: ConfigurationModel.Segment(),
1115
+
1116
+ gtm: ConfigurationModel.Gtm(),
1117
+
1118
+ freshchat: ConfigurationModel.Freshchat(),
1119
+
1120
+ safetynet: ConfigurationModel.Safetynet(),
1121
+
1122
+ fynd_rewards: ConfigurationModel.FyndRewards(),
1123
+
1124
+ google_map: ConfigurationModel.GoogleMap(),
1125
+ });
1126
+ }
1127
+
1128
+ static Firebase() {
1129
+ return Joi.object({
1130
+ credentials: ConfigurationModel.Credentials(),
1131
+
1132
+ enabled: Joi.boolean(),
1133
+ });
1134
+ }
1135
+
1136
+ static Credentials() {
1137
+ return Joi.object({
1138
+ ios: ConfigurationModel.Ios(),
1139
+
1140
+ android: ConfigurationModel.Android(),
1141
+
1142
+ project_id: Joi.string().allow(""),
1143
+
1144
+ gcm_sender_id: Joi.string().allow(""),
1145
+
1146
+ application_id: Joi.string().allow(""),
1147
+
1148
+ api_key: Joi.string().allow(""),
1149
+ });
1150
+ }
1151
+
1152
+ static Ios() {
1153
+ return Joi.object({
1154
+ application_id: Joi.string().allow(""),
1155
+
1156
+ api_key: Joi.string().allow(""),
1157
+ });
1158
+ }
1159
+
1160
+ static Android() {
1161
+ return Joi.object({
1162
+ application_id: Joi.string().allow(""),
1163
+
1164
+ api_key: Joi.string().allow(""),
1165
+ });
1166
+ }
1167
+
1168
+ static Moengage() {
1169
+ return Joi.object({
1170
+ credentials: ConfigurationModel.MoengageCredentials(),
1171
+
1172
+ enabled: Joi.boolean(),
1173
+ });
1174
+ }
1175
+
1176
+ static MoengageCredentials() {
1177
+ return Joi.object({
1178
+ app_id: Joi.string().allow(""),
1179
+ });
1180
+ }
1181
+
1182
+ static Segment() {
1183
+ return Joi.object({
1184
+ credentials: ConfigurationModel.SegmentCredentials(),
1185
+
1186
+ enabled: Joi.boolean(),
1187
+ });
1188
+ }
1189
+
1190
+ static SegmentCredentials() {
1191
+ return Joi.object({
1192
+ write_key: Joi.string().allow(""),
1193
+ });
1194
+ }
1195
+
1196
+ static Gtm() {
1197
+ return Joi.object({
1198
+ credentials: ConfigurationModel.GtmCredentials(),
1199
+
1200
+ enabled: Joi.boolean(),
1201
+ });
1202
+ }
1203
+
1204
+ static GtmCredentials() {
1205
+ return Joi.object({
1206
+ api_key: Joi.string().allow(""),
1207
+ });
1208
+ }
1209
+
1210
+ static Freshchat() {
1211
+ return Joi.object({
1212
+ credentials: ConfigurationModel.FreshchatCredentials(),
1213
+
1214
+ enabled: Joi.boolean(),
1215
+ });
1216
+ }
1217
+
1218
+ static FreshchatCredentials() {
1219
+ return Joi.object({
1220
+ app_id: Joi.string().allow(""),
1221
+
1222
+ app_key: Joi.string().allow(""),
1223
+
1224
+ web_token: Joi.string().allow(""),
1225
+ });
1226
+ }
1227
+
1228
+ static Safetynet() {
1229
+ return Joi.object({
1230
+ credentials: ConfigurationModel.SafetynetCredentials(),
1231
+
1232
+ enabled: Joi.boolean(),
1233
+ });
1234
+ }
1235
+
1236
+ static SafetynetCredentials() {
1237
+ return Joi.object({
1238
+ api_key: Joi.string().allow(""),
1239
+ });
1240
+ }
1241
+
1242
+ static FyndRewards() {
1243
+ return Joi.object({
1244
+ credentials: ConfigurationModel.FyndRewardsCredentials(),
1245
+ });
1246
+ }
1247
+
1248
+ static FyndRewardsCredentials() {
1249
+ return Joi.object({
1250
+ public_key: Joi.string().allow(""),
1251
+ });
1252
+ }
1253
+
1254
+ static GoogleMap() {
1255
+ return Joi.object({
1256
+ credentials: ConfigurationModel.GoogleMapCredentials(),
1257
+ });
1258
+ }
1259
+
1260
+ static GoogleMapCredentials() {
1261
+ return Joi.object({
1262
+ api_key: Joi.string().allow(""),
1263
+ });
1264
+ }
1265
+
1266
+ static RewardPointsConfig() {
1267
+ return Joi.object({
1268
+ credit: ConfigurationModel.Credit(),
1269
+
1270
+ debit: ConfigurationModel.Debit(),
1271
+ });
1272
+ }
1273
+
1274
+ static Credit() {
1275
+ return Joi.object({
1276
+ enabled: Joi.boolean(),
1277
+ });
1278
+ }
1279
+
1280
+ static Debit() {
1281
+ return Joi.object({
1282
+ enabled: Joi.boolean(),
1283
+
1284
+ auto_apply: Joi.boolean(),
1285
+
1286
+ strategy_channel: Joi.string().allow(""),
1287
+ });
1288
+ }
1289
+
1290
+ static ProductDetailFeature() {
1291
+ return Joi.object({
1292
+ similar: Joi.array().items(Joi.string().allow("")),
1293
+
1294
+ seller_selection: Joi.boolean(),
1295
+
1296
+ update_product_meta: Joi.boolean(),
1297
+
1298
+ request_product: Joi.boolean(),
1299
+ });
1300
+ }
1301
+
1302
+ static LaunchPage() {
1303
+ return Joi.object({
1304
+ page_type: Joi.string().allow(""),
1305
+
1306
+ params: Joi.any(),
1307
+
1308
+ query: Joi.any(),
1309
+ });
1310
+ }
1311
+
1312
+ static LandingPageFeature() {
1313
+ return Joi.object({
1314
+ launch_page: ConfigurationModel.LaunchPage(),
1315
+
1316
+ continue_as_guest: Joi.boolean(),
1317
+
1318
+ login_btn_text: Joi.string().allow(""),
1319
+
1320
+ show_domain_textbox: Joi.boolean(),
1321
+
1322
+ show_register_btn: Joi.boolean(),
1323
+ });
1324
+ }
1325
+
1326
+ static RegistrationPageFeature() {
1327
+ return Joi.object({
1328
+ ask_store_address: Joi.boolean(),
1329
+ });
1330
+ }
1331
+
1332
+ static AppFeature() {
1333
+ return Joi.object({
1334
+ product_detail: ConfigurationModel.ProductDetailFeature(),
1335
+
1336
+ landing_page: ConfigurationModel.LandingPageFeature(),
1337
+
1338
+ registration_page: ConfigurationModel.RegistrationPageFeature(),
1339
+
1340
+ home_page: ConfigurationModel.HomePageFeature(),
1341
+
1342
+ common: ConfigurationModel.CommonFeature(),
1343
+
1344
+ cart: ConfigurationModel.CartFeature(),
1345
+
1346
+ qr: ConfigurationModel.QrFeature(),
1347
+
1348
+ pcr: ConfigurationModel.PcrFeature(),
1349
+
1350
+ order: ConfigurationModel.OrderFeature(),
1351
+
1352
+ _id: Joi.string().allow(""),
1353
+
1354
+ app: Joi.string().allow(""),
1355
+
1356
+ created_at: Joi.string().allow(""),
1357
+
1358
+ updated_at: Joi.string().allow(""),
1359
+
1360
+ __v: Joi.number(),
1361
+ });
1362
+ }
1363
+
1364
+ static HomePageFeature() {
1365
+ return Joi.object({
1366
+ order_processing: Joi.boolean(),
1367
+ });
1368
+ }
1369
+
1370
+ static CommonFeature() {
1371
+ return Joi.object({
1372
+ communication_optin_dialog: ConfigurationModel.CommunicationOptinDialogFeature(),
1373
+
1374
+ deployment_store_selection: ConfigurationModel.DeploymentStoreSelectionFeature(),
1375
+
1376
+ listing_price: ConfigurationModel.ListingPriceFeature(),
1377
+
1378
+ currency: ConfigurationModel.CurrencyFeature(),
1379
+
1380
+ revenue_engine: ConfigurationModel.RevenueEngineFeature(),
1381
+
1382
+ feedback: ConfigurationModel.FeedbackFeature(),
1383
+
1384
+ compare_products: ConfigurationModel.CompareProductsFeature(),
1385
+
1386
+ reward_points: ConfigurationModel.RewardPointsConfig(),
1387
+ });
1388
+ }
1389
+
1390
+ static CommunicationOptinDialogFeature() {
1391
+ return Joi.object({
1392
+ visibility: Joi.boolean(),
1393
+ });
1394
+ }
1395
+
1396
+ static DeploymentStoreSelectionFeature() {
1397
+ return Joi.object({
1398
+ enabled: Joi.boolean(),
1399
+
1400
+ type: Joi.string().allow(""),
1401
+ });
1402
+ }
1403
+
1404
+ static ListingPriceFeature() {
1405
+ return Joi.object({
1406
+ value: Joi.string().allow(""),
1407
+ });
1408
+ }
1409
+
1410
+ static CurrencyFeature() {
1411
+ return Joi.object({
1412
+ value: Joi.array().items(Joi.string().allow("")),
1413
+
1414
+ type: Joi.string().allow(""),
1415
+
1416
+ default_currency: Joi.string().allow(""),
1417
+ });
1418
+ }
1419
+
1420
+ static RevenueEngineFeature() {
1421
+ return Joi.object({
1422
+ enabled: Joi.boolean(),
1423
+ });
1424
+ }
1425
+
1426
+ static FeedbackFeature() {
1427
+ return Joi.object({
1428
+ enabled: Joi.boolean(),
1429
+ });
1430
+ }
1431
+
1432
+ static CompareProductsFeature() {
1433
+ return Joi.object({
1434
+ enabled: Joi.boolean(),
1435
+ });
1436
+ }
1437
+
1438
+ static CartFeature() {
1439
+ return Joi.object({
1440
+ gst_input: Joi.boolean(),
1441
+
1442
+ staff_selection: Joi.boolean(),
1443
+
1444
+ placing_for_customer: Joi.boolean(),
1445
+
1446
+ google_map: Joi.boolean(),
1447
+
1448
+ revenue_engine_coupon: Joi.boolean(),
1449
+ });
1450
+ }
1451
+
1452
+ static QrFeature() {
1453
+ return Joi.object({
1454
+ application: Joi.boolean(),
1455
+
1456
+ products: Joi.boolean(),
1457
+
1458
+ collections: Joi.boolean(),
1459
+ });
1460
+ }
1461
+
1462
+ static PcrFeature() {
1463
+ return Joi.object({
1464
+ staff_selection: Joi.boolean(),
1465
+ });
1466
+ }
1467
+
1468
+ static OrderFeature() {
1469
+ return Joi.object({
1470
+ buy_again: Joi.boolean(),
1471
+ });
1472
+ }
1473
+
1474
+ static AppFeatureRequest() {
1475
+ return Joi.object({
1476
+ feature: ConfigurationModel.AppFeature(),
1477
+ });
1478
+ }
1479
+
1480
+ static AppFeatureResponse() {
1481
+ return Joi.object({
1482
+ feature: ConfigurationModel.AppFeature(),
1483
+ });
1484
+ }
1485
+
1486
+ static Currency() {
1487
+ return Joi.object({
1488
+ _id: Joi.string().allow(""),
1489
+
1490
+ is_active: Joi.boolean(),
1491
+
1492
+ name: Joi.string().allow(""),
1493
+
1494
+ code: Joi.string().allow(""),
1495
+
1496
+ created_at: Joi.string().allow(""),
1497
+
1498
+ updated_at: Joi.string().allow(""),
1499
+
1500
+ decimal_digits: Joi.number(),
1501
+
1502
+ symbol: Joi.string().allow(""),
1503
+ });
1504
+ }
1505
+
1506
+ static Domain() {
1507
+ return Joi.object({
1508
+ verified: Joi.boolean(),
1509
+
1510
+ is_primary: Joi.boolean(),
1511
+
1512
+ is_shortlink: Joi.boolean(),
1513
+
1514
+ _id: Joi.string().allow(""),
1515
+
1516
+ name: Joi.string().allow(""),
1517
+
1518
+ is_predefined: Joi.boolean(),
1519
+ });
1520
+ }
1521
+
1522
+ static ApplicationWebsite() {
1523
+ return Joi.object({
1524
+ enabled: Joi.boolean(),
1525
+
1526
+ basepath: Joi.string().allow(""),
1527
+ });
1528
+ }
1529
+
1530
+ static ApplicationCors() {
1531
+ return Joi.object({
1532
+ domains: Joi.array().items(Joi.string().allow("")),
1533
+ });
1534
+ }
1535
+
1536
+ static ApplicationAuth() {
1537
+ return Joi.object({
1538
+ enabled: Joi.boolean(),
1539
+ });
1540
+ }
1541
+
1542
+ static ApplicationRedirections() {
1543
+ return Joi.object({
1544
+ redirect_from: Joi.string().allow(""),
1545
+
1546
+ redirect_to: Joi.string().allow(""),
1547
+
1548
+ type: Joi.string().allow(""),
1549
+ });
1550
+ }
1551
+
1552
+ static ApplicationMeta() {
1553
+ return Joi.object({
1554
+ name: Joi.string().allow(""),
1555
+
1556
+ value: Joi.string().allow(""),
1557
+ });
1558
+ }
1559
+
1560
+ static SecureUrl() {
1561
+ return Joi.object({
1562
+ secure_url: Joi.string().allow(""),
1563
+ });
1564
+ }
1565
+
1566
+ static Application() {
1567
+ return Joi.object({
1568
+ website: ConfigurationModel.ApplicationWebsite(),
1569
+
1570
+ cors: ConfigurationModel.ApplicationCors(),
1571
+
1572
+ auth: ConfigurationModel.ApplicationAuth(),
1573
+
1574
+ description: Joi.string().allow(""),
1575
+
1576
+ channel_type: Joi.string().allow(""),
1577
+
1578
+ cache_ttl: Joi.number(),
1579
+
1580
+ is_internal: Joi.boolean(),
1581
+
1582
+ is_active: Joi.boolean(),
1583
+
1584
+ _id: Joi.string().allow(""),
1585
+
1586
+ name: Joi.string().allow(""),
1587
+
1588
+ owner: Joi.string().allow(""),
1589
+
1590
+ company_id: Joi.number(),
1591
+
1592
+ token: Joi.string().allow(""),
1593
+
1594
+ redirections: Joi.array().items(
1595
+ ConfigurationModel.ApplicationRedirections()
1596
+ ),
1597
+
1598
+ meta: Joi.array().items(ConfigurationModel.ApplicationMeta()),
1599
+
1600
+ created_at: Joi.string().allow(""),
1601
+
1602
+ updated_at: Joi.string().allow(""),
1603
+
1604
+ __v: Joi.number(),
1605
+
1606
+ banner: ConfigurationModel.SecureUrl(),
1607
+
1608
+ logo: ConfigurationModel.SecureUrl(),
1609
+
1610
+ favicon: ConfigurationModel.SecureUrl(),
1611
+
1612
+ domains: Joi.array().items(ConfigurationModel.Domain()),
1613
+
1614
+ app_type: Joi.string().allow(""),
1615
+
1616
+ mobile_logo: ConfigurationModel.SecureUrl(),
1617
+
1618
+ domain: ConfigurationModel.Domain(),
1619
+ });
1620
+ }
1621
+
1622
+ static NotFound() {
1623
+ return Joi.object({
1624
+ message: Joi.string().allow(""),
1625
+ });
1626
+ }
1627
+
1628
+ static UnhandledError() {
1629
+ return Joi.object({
1630
+ message: Joi.string().allow(""),
1631
+ });
1632
+ }
1633
+
1634
+ static InvalidPayloadRequest() {
1635
+ return Joi.object({
1636
+ message: Joi.string().allow(""),
1637
+ });
1638
+ }
1639
+
1640
+ static SuccessMessageResponse() {
1641
+ return Joi.object({
1642
+ message: Joi.string().allow(""),
1643
+ });
1644
+ }
1645
+
1646
+ static InventoryBrandRule() {
1647
+ return Joi.object({
1648
+ criteria: Joi.string().allow(""),
1649
+
1650
+ brands: Joi.array().items(Joi.number()),
1651
+ });
1652
+ }
1653
+
1654
+ static StoreCriteriaRule() {
1655
+ return Joi.object({
1656
+ companies: Joi.array().items(Joi.number()),
1657
+
1658
+ brands: Joi.array().items(Joi.number()),
1659
+ });
1660
+ }
1661
+
1662
+ static InventoryStoreRule() {
1663
+ return Joi.object({
1664
+ criteria: Joi.string().allow(""),
1665
+
1666
+ rules: Joi.array().items(ConfigurationModel.StoreCriteriaRule()),
1667
+
1668
+ stores: Joi.array().items(Joi.number()),
1669
+ });
1670
+ }
1671
+
1672
+ static InventoryPaymentConfig() {
1673
+ return Joi.object({
1674
+ mode_of_payment: Joi.string().allow(""),
1675
+
1676
+ source: Joi.string().allow(""),
1677
+ });
1678
+ }
1679
+
1680
+ static StorePriorityRule() {
1681
+ return Joi.object({
1682
+ enabled: Joi.boolean(),
1683
+
1684
+ storetype_order: Joi.array().items(Joi.string().allow("")),
1685
+ });
1686
+ }
1687
+
1688
+ static ArticleAssignmentRule() {
1689
+ return Joi.object({
1690
+ store_priority: ConfigurationModel.StorePriorityRule(),
1691
+ });
1692
+ }
1693
+
1694
+ static InventoryArticleAssignment() {
1695
+ return Joi.object({
1696
+ post_order_reassignment: Joi.boolean(),
1697
+
1698
+ rules: ConfigurationModel.ArticleAssignmentRule(),
1699
+ });
1700
+ }
1701
+
1702
+ static CompanyAboutAddress() {
1703
+ return Joi.object({
1704
+ pincode: Joi.number(),
1705
+
1706
+ address1: Joi.string().allow(""),
1707
+
1708
+ address2: Joi.string().allow(""),
1709
+
1710
+ city: Joi.string().allow(""),
1711
+
1712
+ state: Joi.string().allow(""),
1713
+
1714
+ country: Joi.string().allow(""),
1715
+
1716
+ address_type: Joi.string().allow(""),
1717
+ });
1718
+ }
1719
+
1720
+ static UserEmail() {
1721
+ return Joi.object({
1722
+ active: Joi.boolean(),
1723
+
1724
+ primary: Joi.boolean(),
1725
+
1726
+ verified: Joi.boolean(),
1727
+
1728
+ email: Joi.string().allow(""),
1729
+ });
1730
+ }
1731
+
1732
+ static UserPhoneNumber() {
1733
+ return Joi.object({
1734
+ active: Joi.boolean(),
1735
+
1736
+ primary: Joi.boolean(),
1737
+
1738
+ verified: Joi.boolean(),
1739
+
1740
+ country_code: Joi.number(),
1741
+
1742
+ phone: Joi.string().allow(""),
1743
+ });
1744
+ }
1745
+
1746
+ static Page() {
1747
+ return Joi.object({
1748
+ item_total: Joi.number(),
1749
+
1750
+ next_id: Joi.string().allow(""),
1751
+
1752
+ has_previous: Joi.boolean(),
1753
+
1754
+ has_next: Joi.boolean(),
1755
+
1756
+ current: Joi.number(),
1757
+
1758
+ type: Joi.string().allow("").required(),
1759
+
1760
+ size: Joi.number(),
1761
+ });
1762
+ }
1763
+
1764
+ static ApplicationInformation() {
1765
+ return Joi.object({
1766
+ address: ConfigurationModel.InformationAddress(),
1767
+
1768
+ support: ConfigurationModel.InformationSupport(),
1769
+
1770
+ social_links: ConfigurationModel.SocialLinks(),
1771
+
1772
+ links: ConfigurationModel.Links(),
1773
+
1774
+ copyright_text: Joi.string().allow(""),
1775
+
1776
+ _id: Joi.string().allow(""),
1777
+
1778
+ business_highlights: ConfigurationModel.BusinessHighlights(),
1779
+
1780
+ application: Joi.string().allow(""),
1781
+
1782
+ created_at: Joi.string().allow(""),
1783
+
1784
+ updated_at: Joi.string().allow(""),
1785
+
1786
+ __v: Joi.number(),
1787
+ });
1788
+ }
1789
+
1790
+ static InformationAddress() {
1791
+ return Joi.object({
1792
+ loc: Joi.string().allow(""),
1793
+
1794
+ address_line: Joi.array().items(Joi.string().allow("")),
1795
+
1796
+ phone: ConfigurationModel.InformationPhone(),
1797
+
1798
+ city: Joi.string().allow(""),
1799
+
1800
+ country: Joi.string().allow(""),
1801
+
1802
+ pincode: Joi.number(),
1803
+ });
1804
+ }
1805
+
1806
+ static InformationPhone() {
1807
+ return Joi.object({
1808
+ code: Joi.string().allow(""),
1809
+
1810
+ number: Joi.string().allow(""),
1811
+ });
1812
+ }
1813
+
1814
+ static InformationSupport() {
1815
+ return Joi.object({
1816
+ phone: Joi.array().items(Joi.string().allow("")),
1817
+
1818
+ email: Joi.array().items(Joi.string().allow("")),
1819
+
1820
+ timing: Joi.string().allow(""),
1821
+ });
1822
+ }
1823
+
1824
+ static SocialLinks() {
1825
+ return Joi.object({
1826
+ facebook: ConfigurationModel.FacebookLink(),
1827
+
1828
+ instagram: ConfigurationModel.InstagramLink(),
1829
+
1830
+ twitter: ConfigurationModel.TwitterLink(),
1831
+
1832
+ pinterest: ConfigurationModel.PinterestLink(),
1833
+
1834
+ google_plus: ConfigurationModel.GooglePlusLink(),
1835
+
1836
+ youtube: ConfigurationModel.YoutubeLink(),
1837
+
1838
+ linked_in: ConfigurationModel.LinkedInLink(),
1839
+
1840
+ vimeo: ConfigurationModel.VimeoLink(),
1841
+
1842
+ blog_link: ConfigurationModel.BlogLink(),
1843
+ });
1844
+ }
1845
+
1846
+ static FacebookLink() {
1847
+ return Joi.object({
1848
+ title: Joi.string().allow(""),
1849
+
1850
+ icon: Joi.string().allow(""),
1851
+
1852
+ link: Joi.string().allow(""),
1853
+ });
1854
+ }
1855
+
1856
+ static InstagramLink() {
1857
+ return Joi.object({
1858
+ title: Joi.string().allow(""),
1859
+
1860
+ icon: Joi.string().allow(""),
1861
+
1862
+ link: Joi.string().allow(""),
1863
+ });
1864
+ }
1865
+
1866
+ static TwitterLink() {
1867
+ return Joi.object({
1868
+ title: Joi.string().allow(""),
1869
+
1870
+ icon: Joi.string().allow(""),
1871
+
1872
+ link: Joi.string().allow(""),
1873
+ });
1874
+ }
1875
+
1876
+ static PinterestLink() {
1877
+ return Joi.object({
1878
+ title: Joi.string().allow(""),
1879
+
1880
+ icon: Joi.string().allow(""),
1881
+
1882
+ link: Joi.string().allow(""),
1883
+ });
1884
+ }
1885
+
1886
+ static GooglePlusLink() {
1887
+ return Joi.object({
1888
+ title: Joi.string().allow(""),
1889
+
1890
+ icon: Joi.string().allow(""),
1891
+
1892
+ link: Joi.string().allow(""),
1893
+ });
1894
+ }
1895
+
1896
+ static YoutubeLink() {
1897
+ return Joi.object({
1898
+ title: Joi.string().allow(""),
1899
+
1900
+ icon: Joi.string().allow(""),
1901
+
1902
+ link: Joi.string().allow(""),
1903
+ });
1904
+ }
1905
+
1906
+ static LinkedInLink() {
1907
+ return Joi.object({
1908
+ title: Joi.string().allow(""),
1909
+
1910
+ icon: Joi.string().allow(""),
1911
+
1912
+ link: Joi.string().allow(""),
1913
+ });
1914
+ }
1915
+
1916
+ static VimeoLink() {
1917
+ return Joi.object({
1918
+ title: Joi.string().allow(""),
1919
+
1920
+ icon: Joi.string().allow(""),
1921
+
1922
+ link: Joi.string().allow(""),
1923
+ });
1924
+ }
1925
+
1926
+ static BlogLink() {
1927
+ return Joi.object({
1928
+ title: Joi.string().allow(""),
1929
+
1930
+ icon: Joi.string().allow(""),
1931
+
1932
+ link: Joi.string().allow(""),
1933
+ });
1934
+ }
1935
+
1936
+ static Links() {
1937
+ return Joi.object({
1938
+ title: Joi.string().allow(""),
1939
+
1940
+ link: Joi.string().allow(""),
1941
+ });
1942
+ }
1943
+
1944
+ static BusinessHighlights() {
1945
+ return Joi.object({
1946
+ _id: Joi.string().allow(""),
1947
+
1948
+ title: Joi.string().allow(""),
1949
+
1950
+ icon: Joi.string().allow(""),
1951
+
1952
+ sub_title: Joi.string().allow(""),
1953
+ });
1954
+ }
1955
+
1956
+ static ApplicationDetail() {
1957
+ return Joi.object({
1958
+ name: Joi.string().allow("").required(),
1959
+
1960
+ description: Joi.string().allow("").required(),
1961
+
1962
+ logo: ConfigurationModel.SecureUrl().required(),
1963
+
1964
+ mobile_logo: ConfigurationModel.SecureUrl().required(),
1965
+
1966
+ favicon: ConfigurationModel.SecureUrl().required(),
1967
+
1968
+ banner: ConfigurationModel.SecureUrl().required(),
1969
+
1970
+ domain: ConfigurationModel.Domain(),
1971
+
1972
+ domains: Joi.array().items(ConfigurationModel.Domain()),
1973
+
1974
+ _id: Joi.string().allow(""),
1975
+ });
1976
+ }
1977
+
1978
+ static CurrenciesResponse() {
1979
+ return Joi.object({
1980
+ items: Joi.array().items(ConfigurationModel.Currency()),
1981
+ });
1982
+ }
1983
+
1984
+ static AppCurrencyResponse() {
1985
+ return Joi.object({
1986
+ application: Joi.string().allow(""),
1987
+
1988
+ default_currency: ConfigurationModel.DefaultCurrency(),
1989
+
1990
+ supported_currency: Joi.array().items(ConfigurationModel.Currency()),
1991
+ });
1992
+ }
1993
+
1994
+ static StoreLatLong() {
1995
+ return Joi.object({
1996
+ type: Joi.string().allow(""),
1997
+
1998
+ coordinates: Joi.array().items(Joi.number()),
1999
+ });
2000
+ }
2001
+
2002
+ static OptedStoreAddress() {
2003
+ return Joi.object({
2004
+ state: Joi.string().allow(""),
2005
+
2006
+ address1: Joi.string().allow(""),
2007
+
2008
+ lat_long: ConfigurationModel.StoreLatLong(),
2009
+
2010
+ address2: Joi.string().allow(""),
2011
+
2012
+ pincode: Joi.number(),
2013
+
2014
+ country: Joi.string().allow(""),
2015
+
2016
+ city: Joi.string().allow(""),
2017
+ });
2018
+ }
2019
+
2020
+ static OrderingStore() {
2021
+ return Joi.object({
2022
+ address: ConfigurationModel.OptedStoreAddress(),
2023
+
2024
+ _id: Joi.string().allow(""),
2025
+
2026
+ uid: Joi.number(),
2027
+
2028
+ name: Joi.string().allow(""),
2029
+
2030
+ display_name: Joi.string().allow(""),
2031
+
2032
+ store_type: Joi.string().allow(""),
2033
+
2034
+ store_code: Joi.string().allow(""),
2035
+
2036
+ pincode: Joi.number(),
2037
+
2038
+ code: Joi.string().allow(""),
2039
+ });
2040
+ }
2041
+
2042
+ static OrderingStores() {
2043
+ return Joi.object({
2044
+ page: ConfigurationModel.Page(),
2045
+
2046
+ items: Joi.array().items(ConfigurationModel.OrderingStore()),
2047
+
2048
+ deployed_stores: Joi.array().items(Joi.number()),
2049
+
2050
+ all_stores: Joi.boolean(),
2051
+
2052
+ enabled: Joi.boolean(),
2053
+
2054
+ type: Joi.string().allow(""),
2055
+
2056
+ _id: Joi.string().allow(""),
2057
+
2058
+ app: Joi.string().allow(""),
2059
+
2060
+ __v: Joi.number(),
2061
+ });
2062
+ }
2063
+
2064
+ static OrderingStoresResponse() {
2065
+ return Joi.object({
2066
+ page: ConfigurationModel.Page(),
2067
+
2068
+ items: Joi.array().items(ConfigurationModel.OrderingStore()),
2069
+ });
2070
+ }
2071
+ }
2072
+ module.exports = ConfigurationModel;