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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/sdk/application/ApplicationClient.js +20 -0
  4. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  5. package/sdk/application/Cart/CartApplicationClient.js +3 -5
  6. package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
  7. package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
  8. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
  9. package/sdk/application/Cart/CartApplicationValidator.js +0 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
  12. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  13. package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
  14. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
  16. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  17. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  18. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  19. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
  22. package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
  23. package/sdk/application/Content/ContentApplicationClient.js +0 -246
  24. package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
  25. package/sdk/application/Content/ContentApplicationModel.js +565 -817
  26. package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
  27. package/sdk/application/Content/ContentApplicationValidator.js +0 -41
  28. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  29. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  30. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  31. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  32. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
  33. package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
  34. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
  35. package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
  36. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
  37. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
  38. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  39. package/sdk/application/Order/OrderApplicationClient.js +8 -32
  40. package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
  41. package/sdk/application/Order/OrderApplicationModel.js +816 -824
  42. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
  43. package/sdk/application/Order/OrderApplicationValidator.js +0 -8
  44. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
  45. package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
  46. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
  47. package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
  48. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
  49. package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
  50. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
  51. package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
  52. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  53. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  54. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  55. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  56. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  57. package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
  58. package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
  59. package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
  60. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
  62. package/sdk/application/User/UserApplicationClient.d.ts +0 -33
  63. package/sdk/application/User/UserApplicationClient.js +0 -239
  64. package/sdk/application/User/UserApplicationModel.d.ts +753 -768
  65. package/sdk/application/User/UserApplicationModel.js +731 -755
  66. package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
  67. package/sdk/application/User/UserApplicationValidator.js +0 -36
  68. package/sdk/common/Clickstream.d.ts +1 -0
  69. package/sdk/common/Clickstream.js +254 -0
  70. package/sdk/common/Utility.js +1 -4
  71. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
  72. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
  73. package/sdk/partner/PartnerClient.d.ts +0 -6
  74. package/sdk/partner/PartnerClient.js +0 -9
  75. package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
  76. package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
  77. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
  78. package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
  79. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
  80. package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
  81. package/sdk/partner/index.d.ts +0 -3
  82. package/sdk/partner/index.js +0 -6
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
  87. package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
  89. package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
  97. package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
  108. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  109. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
  112. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
  114. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
  115. package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  124. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
  125. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
  126. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  127. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  128. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
  129. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
  130. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
  131. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
  133. package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
  145. package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
  147. package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
  150. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  151. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
  157. package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
  163. package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
  165. package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
  167. package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
  168. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  169. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
  174. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  175. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  176. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
  177. package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
  178. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  179. package/sdk/platform/PlatformApplicationClient.js +4 -4
  180. package/sdk/platform/PlatformClient.d.ts +2 -4
  181. package/sdk/platform/PlatformClient.js +4 -8
  182. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  183. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +990 -1589
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +986 -1702
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  195. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  196. package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
  197. package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
  198. package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
  199. package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
  200. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
  201. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
  206. package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
  207. package/sdk/platform/User/UserPlatformModel.js +428 -679
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  214. package/sdk/platform/index.d.ts +1 -1
  215. package/sdk/platform/index.js +2 -2
  216. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  217. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  218. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  219. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  220. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  221. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  222. package/sdk/public/PublicClient.d.ts +0 -4
  223. package/sdk/public/PublicClient.js +0 -8
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
  225. package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
  227. package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
  230. package/sdk/public/index.d.ts +0 -2
  231. package/sdk/public/index.js +0 -4
  232. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
  233. package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
  234. package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
  235. package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
  236. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
  237. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
  238. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
  239. package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
  240. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
  241. package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
  242. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
  243. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
  244. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
  245. package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
  246. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
  247. package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
  248. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
  249. package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
  250. package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
  251. package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
  252. package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
  253. package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
  254. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
  255. package/sdk/public/Billing/BillingPublicClient.js +0 -116
  256. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
  257. package/sdk/public/Billing/BillingPublicModel.js +0 -96
  258. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
  259. package/sdk/public/Billing/BillingPublicValidator.js +0 -19
  260. package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
  261. package/sdk/public/Content/ContentPublicClient.js +0 -114
  262. package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
  263. package/sdk/public/Content/ContentPublicModel.js +0 -60
  264. package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
  265. package/sdk/public/Content/ContentPublicValidator.js +0 -19
@@ -1,8 +1,10 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Accountkit
5
- * @property {string} [app_id]
4
+ * @typedef BlockUserRequestSchema
5
+ * @property {boolean} [status]
6
+ * @property {string[]} [user_id]
7
+ * @property {string} [reason]
6
8
  */
7
9
 
8
10
  /**
@@ -10,83 +12,116 @@ const Joi = require("joi");
10
12
  * @property {string} [user_id]
11
13
  */
12
14
 
15
+ /**
16
+ * @typedef UnDeleteUserRequestSchema
17
+ * @property {string} [user_id]
18
+ * @property {string} [reason]
19
+ * @property {string} [reason_id]
20
+ */
21
+
22
+ /**
23
+ * @typedef BlockUserSuccess
24
+ * @property {boolean} [success]
25
+ */
26
+
13
27
  /**
14
28
  * @typedef ArchiveUserSuccess
15
29
  * @property {boolean} [success]
16
30
  */
17
31
 
18
32
  /**
19
- * @typedef AuthenticationApiErrorSchema
20
- * @property {string} [message]
33
+ * @typedef UnDeleteUserSuccess
34
+ * @property {boolean} [success]
21
35
  */
22
36
 
23
37
  /**
24
- * @typedef BlockUserRequestSchema
25
- * @property {string} [reason]
26
- * @property {boolean} [status]
27
- * @property {string[]} [user_id]
38
+ * @typedef UserSearchResponseSchema
39
+ * @property {UserSchema[]} [users]
28
40
  */
29
41
 
30
42
  /**
31
- * @typedef BlockUserSuccess
32
- * @property {boolean} [success]
43
+ * @typedef CustomerListResponseSchema
44
+ * @property {UserSchema[]} [items]
45
+ * @property {PaginationSchema} [page]
33
46
  */
34
47
 
35
48
  /**
36
- * @typedef Conditions
37
- * @property {string} [key]
49
+ * @typedef PaginationSchema
50
+ * @property {number} [size]
51
+ * @property {number} [item_total]
52
+ * @property {boolean} [has_next]
38
53
  * @property {string} [type]
39
- * @property {string} [user_attribute_definition_id]
40
- * @property {string} [value]
54
+ * @property {number} [current]
41
55
  */
42
56
 
43
57
  /**
44
- * @typedef ConditionsSchema
45
- * @property {string} [type]
46
- * @property {string} [user_attribute_definition_id]
47
- * @property {string} [value]
58
+ * @typedef SessionListResponseSchema
59
+ * @property {SessionListResponseInfo[]} [items]
48
60
  */
49
61
 
50
62
  /**
51
- * @typedef CreateUserAttributeDefinition
52
- * @property {boolean} [customer_editable]
53
- * @property {string} [default_value]
54
- * @property {string} [description]
55
- * @property {boolean} [encrypted]
56
- * @property {boolean} [multi_value]
57
- * @property {string} [name]
58
- * @property {number} [pin_order]
59
- * @property {boolean} [pinned]
60
- * @property {string} [slug]
61
- * @property {string} [type]
62
- * @property {Object[]} [validations]
63
+ * @typedef SessionDeleteResponseSchema
64
+ * @property {string} [user_id]
65
+ * @property {string} [session_id]
66
+ */
67
+
68
+ /**
69
+ * @typedef SessionsDeleteResponseSchema
70
+ * @property {string} [user_id]
71
+ * @property {string[]} [session_ids]
63
72
  */
64
73
 
65
74
  /**
66
- * @typedef CreateUserAttributeRequest
67
- * @property {Object} [attribute]
68
- * @property {boolean} [customer_overriden]
75
+ * @typedef AuthenticationApiErrorSchema
76
+ * @property {string} [message]
69
77
  */
70
78
 
71
79
  /**
72
- * @typedef CreateUserGroup
73
- * @property {ConditionsSchema[]} [conditions]
74
- * @property {string} description
80
+ * @typedef SessionListResponseInfo
81
+ * @property {string} [session_id]
82
+ * @property {string} [user_agent]
83
+ * @property {string} [ip]
84
+ * @property {string} [domain]
85
+ * @property {string} [expire_in]
86
+ */
87
+
88
+ /**
89
+ * @typedef UserGroupResponseSchema
90
+ * @property {string} [name]
91
+ * @property {string} [description]
75
92
  * @property {string} [file_url]
93
+ * @property {string} [_id]
94
+ * @property {string} [status]
95
+ * @property {number} [uid]
96
+ * @property {string} [application_id]
97
+ * @property {string} [created_at]
98
+ * @property {string} [modified_at]
99
+ * @property {number} [__v]
100
+ */
101
+
102
+ /**
103
+ * @typedef UserGroupListResponseSchema
104
+ * @property {UserGroupResponseSchema[]} [items]
105
+ * @property {PaginationSchema} [page]
106
+ */
107
+
108
+ /**
109
+ * @typedef CreateUserGroupSchema
76
110
  * @property {string} name
77
- * @property {string} [type]
111
+ * @property {string} description
112
+ * @property {string} file_url
78
113
  */
79
114
 
80
115
  /**
81
116
  * @typedef CreateUserRequestSchema
117
+ * @property {string} phone_number
82
118
  * @property {string} [email]
83
- * @property {string} [external_id]
84
119
  * @property {string} [first_name]
85
- * @property {string} [gender]
86
120
  * @property {string} [last_name]
87
- * @property {Object} [meta]
88
- * @property {string} phone_number
121
+ * @property {string} [gender]
89
122
  * @property {string} username
123
+ * @property {Object} [meta]
124
+ * @property {string} [external_id]
90
125
  */
91
126
 
92
127
  /**
@@ -103,66 +138,52 @@ const Joi = require("joi");
103
138
 
104
139
  /**
105
140
  * @typedef CreateUserSessionResponseSchema
106
- * @property {Object} [cookie]
107
141
  * @property {string} [domain]
108
- * @property {boolean} [http_only]
109
142
  * @property {number} [max_age]
110
143
  * @property {boolean} [secure]
144
+ * @property {boolean} [http_only]
145
+ * @property {Object} [cookie]
111
146
  */
112
147
 
113
148
  /**
114
- * @typedef CustomerListResponseSchema
115
- * @property {UserSchema[]} [items]
116
- * @property {PaginationSchema} [page]
117
- */
118
-
119
- /**
120
- * @typedef DeleteAccountConsent
121
- * @property {string} [consent_text]
122
- */
123
-
124
- /**
125
- * @typedef DeleteAccountReasons
126
- * @property {string} [reason_id]
127
- * @property {string} [reason_text]
128
- * @property {boolean} [show_text_area]
129
- */
130
-
131
- /**
132
- * @typedef Email
149
+ * @typedef PlatformSchema
150
+ * @property {string} [display]
151
+ * @property {LookAndFeel} [look_and_feel]
152
+ * @property {string} [updated_at]
133
153
  * @property {boolean} [active]
134
- * @property {string} [email]
135
- * @property {boolean} [primary]
136
- * @property {boolean} [verified]
137
- */
138
-
139
- /**
140
- * @typedef Facebook
141
- * @property {string} [app_id]
154
+ * @property {boolean} [forgot_password]
155
+ * @property {Login} [login]
156
+ * @property {boolean} [skip_captcha]
157
+ * @property {string} [name]
158
+ * @property {MetaSchema} [meta]
159
+ * @property {string} [_id]
160
+ * @property {Social} [social]
161
+ * @property {RequiredFields} [required_fields]
162
+ * @property {RegisterRequiredFields} [register_required_fields]
163
+ * @property {boolean} [skip_login]
164
+ * @property {FlashCard} [flash_card]
165
+ * @property {string} [subtext]
166
+ * @property {SocialTokens} [social_tokens]
167
+ * @property {string} [created_at]
168
+ * @property {boolean} [register]
169
+ * @property {string} [mobile_image]
170
+ * @property {string} [desktop_image]
171
+ * @property {number} [delete_account_day]
172
+ * @property {DeleteAccountReasons[]} [delete_account_reasons]
173
+ * @property {Object} [delete_account_consent]
174
+ * @property {Object} [session_config]
142
175
  */
143
176
 
144
177
  /**
145
- * @typedef FlashCard
178
+ * @typedef LookAndFeel
179
+ * @property {string} [card_position]
146
180
  * @property {string} [background_color]
147
- * @property {string} [text]
148
- * @property {string} [text_color]
149
- */
150
-
151
- /**
152
- * @typedef Google
153
- * @property {string} [app_id]
154
181
  */
155
182
 
156
183
  /**
157
184
  * @typedef Login
158
- * @property {boolean} [otp]
159
185
  * @property {boolean} [password]
160
- */
161
-
162
- /**
163
- * @typedef LookAndFeel
164
- * @property {string} [background_color]
165
- * @property {string} [card_position]
186
+ * @property {boolean} [otp]
166
187
  */
167
188
 
168
189
  /**
@@ -171,36 +192,17 @@ const Joi = require("joi");
171
192
  */
172
193
 
173
194
  /**
174
- * @typedef PaginationSchema
175
- * @property {number} [current]
176
- * @property {boolean} [has_next]
177
- * @property {number} [item_total]
178
- * @property {number} [size]
179
- * @property {string} [type]
180
- */
181
-
182
- /**
183
- * @typedef PartialUserGroupUpdateSchema
184
- * @property {string} [description]
185
- * @property {string} [file_url] - Required property when passed type file_url.
186
- * Internet reachable csv file url which will be used to fetch download data.
187
- * It must have one of columns from `phone_number``, `email`, `user_id` and
188
- * must have `action` column. `action` column can have `add` or `remove` value.
189
- * @property {string} [name]
190
- * @property {string} [type] - Source of update to be used to update individual
191
- * users. Default value is considered file_url if not passed.
192
- * @property {UserGroupUpdateData[]} [user_data] - Required property when passed
193
- * type json. Array of user data. Must have `action` field and one of
194
- * `phone_number`, `email` or `user_id` field in object
195
+ * @typedef Social
196
+ * @property {boolean} [account_kit]
197
+ * @property {boolean} [facebook]
198
+ * @property {boolean} [google]
199
+ * @property {boolean} [apple]
195
200
  */
196
201
 
197
202
  /**
198
- * @typedef PhoneNumber
199
- * @property {boolean} [active]
200
- * @property {number} [country_code]
201
- * @property {string} [phone]
202
- * @property {boolean} [primary]
203
- * @property {boolean} [verified]
203
+ * @typedef RequiredFields
204
+ * @property {PlatformEmail} [email]
205
+ * @property {PlatformMobile} [mobile]
204
206
  */
205
207
 
206
208
  /**
@@ -215,35 +217,6 @@ const Joi = require("joi");
215
217
  * @property {string} [level]
216
218
  */
217
219
 
218
- /**
219
- * @typedef PlatformSchema
220
- * @property {string} [_id]
221
- * @property {boolean} [active]
222
- * @property {string} [created_at]
223
- * @property {Object} [delete_account_consent]
224
- * @property {number} [delete_account_day]
225
- * @property {DeleteAccountReasons[]} [delete_account_reasons]
226
- * @property {string} [desktop_image]
227
- * @property {string} [display]
228
- * @property {FlashCard} [flash_card]
229
- * @property {boolean} [forgot_password]
230
- * @property {Login} [login]
231
- * @property {LookAndFeel} [look_and_feel]
232
- * @property {MetaSchema} [meta]
233
- * @property {string} [mobile_image]
234
- * @property {string} [name]
235
- * @property {boolean} [register]
236
- * @property {RegisterRequiredFields} [register_required_fields]
237
- * @property {RequiredFields} [required_fields]
238
- * @property {Object} [session_config]
239
- * @property {boolean} [skip_captcha]
240
- * @property {boolean} [skip_login]
241
- * @property {Social} [social]
242
- * @property {SocialTokens} [social_tokens]
243
- * @property {string} [subtext]
244
- * @property {string} [updated_at]
245
- */
246
-
247
220
  /**
248
221
  * @typedef RegisterRequiredFields
249
222
  * @property {RegisterRequiredFieldsEmail} [email]
@@ -263,242 +236,156 @@ const Joi = require("joi");
263
236
  */
264
237
 
265
238
  /**
266
- * @typedef RequiredFields
267
- * @property {PlatformEmail} [email]
268
- * @property {PlatformMobile} [mobile]
239
+ * @typedef FlashCard
240
+ * @property {string} [text]
241
+ * @property {string} [text_color]
242
+ * @property {string} [background_color]
269
243
  */
270
244
 
271
245
  /**
272
- * @typedef SessionDeleteResponseSchema
273
- * @property {string} [session_id]
274
- * @property {string} [user_id]
246
+ * @typedef SocialTokens
247
+ * @property {Facebook} [facebook]
248
+ * @property {Accountkit} [account_kit]
249
+ * @property {Google} [google]
275
250
  */
276
251
 
277
252
  /**
278
- * @typedef SessionExpiry
279
- * @property {number} [duration]
280
- * @property {boolean} [is_rolling]
281
- * @property {string} [type]
253
+ * @typedef DeleteAccountReasons
254
+ * @property {string} [reason_text]
255
+ * @property {string} [reason_id]
256
+ * @property {boolean} [show_text_area]
282
257
  */
283
258
 
284
259
  /**
285
- * @typedef SessionListResponseInfo
286
- * @property {string} [domain]
287
- * @property {string} [expire_in]
288
- * @property {string} [ip]
289
- * @property {string} [session_id]
290
- * @property {string} [user_agent]
291
- */
292
-
293
- /**
294
- * @typedef SessionListResponseSchema
295
- * @property {SessionListResponseInfo[]} [items]
260
+ * @typedef DeleteAccountConsent
261
+ * @property {string} [consent_text]
296
262
  */
297
263
 
298
264
  /**
299
- * @typedef SessionsDeleteResponseSchema
300
- * @property {string[]} [session_ids]
301
- * @property {string} [user_id]
265
+ * @typedef Facebook
266
+ * @property {string} [app_id]
302
267
  */
303
268
 
304
269
  /**
305
- * @typedef Social
306
- * @property {boolean} [account_kit]
307
- * @property {boolean} [apple]
308
- * @property {boolean} [facebook]
309
- * @property {boolean} [google]
270
+ * @typedef Accountkit
271
+ * @property {string} [app_id]
310
272
  */
311
273
 
312
274
  /**
313
- * @typedef SocialTokens
314
- * @property {Accountkit} [account_kit]
315
- * @property {Facebook} [facebook]
316
- * @property {Google} [google]
275
+ * @typedef Google
276
+ * @property {string} [app_id]
317
277
  */
318
278
 
319
279
  /**
320
- * @typedef SuccessMessageResponse
321
- * @property {string} [success]
280
+ * @typedef SessionExpiry
281
+ * @property {number} [duration]
282
+ * @property {string} [type]
283
+ * @property {boolean} [is_rolling]
322
284
  */
323
285
 
324
286
  /**
325
- * @typedef UnDeleteUserRequestSchema
326
- * @property {string} [reason]
327
- * @property {string} [reason_id]
328
- * @property {string} [user_id]
287
+ * @typedef UpdateUserGroupSchema
288
+ * @property {string} [name]
289
+ * @property {string} [description]
290
+ * @property {string} [file_url]
329
291
  */
330
292
 
331
293
  /**
332
- * @typedef UnDeleteUserSuccess
333
- * @property {boolean} [success]
294
+ * @typedef PartialUserGroupUpdateSchema
295
+ * @property {string} [type] - Source of update to be used to update individual
296
+ * users. Default value is considered file_url if not passed.
297
+ * @property {string} [name]
298
+ * @property {string} [description]
299
+ * @property {string} [file_url] - Required property when passed type file_url.
300
+ * Internet reachable csv file url which will be used to fetch download data.
301
+ * It must have one of columns from `phone_number``, `email`, `user_id` and
302
+ * must have `action` column. `action` column can have `add` or `remove` value.
303
+ * @property {UserGroupUpdateData[]} [user_data] - Required property when passed
304
+ * type json. Array of user data. Must have `action` field and one of
305
+ * `phone_number`, `email` or `user_id` field in object
334
306
  */
335
307
 
336
308
  /**
337
- * @typedef UpdateUserGroupSchema
338
- * @property {ConditionsSchema[]} [conditions]
339
- * @property {string} [description]
340
- * @property {string} [file_url]
341
- * @property {string} [name]
342
- * @property {string} [type]
309
+ * @typedef UserGroupUpdateData
310
+ * @property {string} [user_id] - Must be valid mongodb objectid of existing user
311
+ * @property {string} [phone_number] - Phone number of registered user
312
+ * @property {string} [email] - Email of registered user
313
+ * @property {string} action
343
314
  */
344
315
 
345
316
  /**
346
317
  * @typedef UpdateUserRequestSchema
347
- * @property {UserEmails[]} [emails]
348
- * @property {string} [external_id]
349
318
  * @property {string} [first_name]
350
- * @property {string} [gender]
351
319
  * @property {string} [last_name]
320
+ * @property {string} [gender]
321
+ * @property {string} [external_id]
352
322
  * @property {Object} [meta]
353
323
  * @property {UserPhoneNumbers[]} [phone_numbers]
354
- */
355
-
356
- /**
357
- * @typedef UserAttributeDefinition
358
- * @property {number} [__v] - The version number of the attribute.
359
- * @property {string} [_id] - The unique identifier for the attribute definition.
360
- * @property {string} [application_id] - The application ID.
361
- * @property {string} [created_at] - The creation date of the attribute.
362
- * @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
363
- * @property {string} [description] - The description of the attribute.
364
- * @property {boolean} [encrypted] - Whether the attribute is encrypted.
365
- * @property {boolean} [is_locked] - Whether the attribute is locked.
366
- * @property {string} [modified_at] - The modification date of the attribute.
367
- * @property {boolean} [multi_value] - Whether the attribute supports multiple values.
368
- * @property {string} [name] - The attribute name.
369
- * @property {number} [pin_order] - The order in which the attribute is pinned.
370
- * @property {boolean} [pinned] - Whether the attribute is pinned.
371
- * @property {string} [slug] - The attribute key.
372
- * @property {string} [type] - The attribute type.
373
- * @property {Object[]} [validations]
374
- */
375
-
376
- /**
377
- * @typedef UserAttributeDefinitionResponse
378
- * @property {string} [_id] - The unique identifier for the attribute definition.
379
- * @property {string} [application_id] - The application ID.
380
- * @property {string} [created_at] - The creation date of the attribute definition.
381
- * @property {string} [created_by] - The user who created the attribute.
382
- * @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
383
- * @property {string} [description] - The description of the attribute.
384
- * @property {boolean} [encrypted] - Whether the attribute is encrypted.
385
- * @property {boolean} [is_locked] - Whether the attribute is locked.
386
- * @property {string} [modified_at] - The last modification date of the
387
- * attribute definition.
388
- * @property {boolean} [multi_value] - Whether the attribute supports multiple values.
389
- * @property {string} [name] - The attribute name.
390
- * @property {number} [pin_order] - The order in which the attribute is pinned.
391
- * @property {boolean} [pinned] - Whether the attribute is pinned.
392
- * @property {string} [slug] - The attribute key.
393
- * @property {string} [type] - The attribute type.
394
- * @property {string} [updated_by] - The user who last updated the attribute.
395
- * @property {UserAttributeDefinitionValidation[]} [validations]
396
- */
397
-
398
- /**
399
- * @typedef UserAttributeDefinitionValidation
400
- * @property {string} [type] - The type of validation.
401
- * @property {Object} [value] - The validation value.
402
- */
403
-
404
- /**
405
- * @typedef UserAttributeResponse
406
- * @property {string} [_id] - The unique identifier for the attribute definition.
407
- * @property {string} [application_id] - The application ID.
408
- * @property {Object} [attribute]
409
- * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable.
410
- * @property {string} [name] - The name of user attribute definition.
411
- * @property {string} [type] - The attribute type.
412
- * @property {string} [updated_by]
413
- * @property {string} [user_id] - The unique identifier for the user.
324
+ * @property {UserEmails[]} [emails]
414
325
  */
415
326
 
416
327
  /**
417
328
  * @typedef UserEmails
418
329
  * @property {boolean} [active]
419
- * @property {string} [email]
420
330
  * @property {boolean} [primary]
421
331
  * @property {boolean} [verified]
422
- */
423
-
424
- /**
425
- * @typedef UserGroupListResponseSchema
426
- * @property {UserGroupResponseSchema[]} [items]
427
- * @property {PaginationSchema} [page]
428
- */
429
-
430
- /**
431
- * @typedef UserGroupResponseSchema
432
- * @property {number} [__v]
433
- * @property {string} [_id]
434
- * @property {string} [application_id]
435
- * @property {Conditions[]} [conditions]
436
- * @property {string} [created_at]
437
- * @property {string} [description]
438
- * @property {UserResponseErrorSchema} [error]
439
- * @property {string} [file_url]
440
- * @property {boolean} [is_active]
441
- * @property {string} [modified_at]
442
- * @property {string} [name]
443
- * @property {string} [status]
444
- * @property {string} [type]
445
- * @property {number} [uid]
446
- */
447
-
448
- /**
449
- * @typedef UserGroupUpdateData
450
- * @property {string} action
451
- * @property {string} [email] - Email of registered user
452
- * @property {string} [phone_number] - Phone number of registered user
453
- * @property {string} [user_id] - Must be valid mongodb objectid of existing user
332
+ * @property {string} [email]
454
333
  */
455
334
 
456
335
  /**
457
336
  * @typedef UserPhoneNumbers
458
337
  * @property {boolean} [active]
459
- * @property {string} [country_code]
460
- * @property {string} [phone]
461
338
  * @property {boolean} [primary]
462
339
  * @property {boolean} [verified]
463
- */
464
-
465
- /**
466
- * @typedef UserResponseErrorSchema
467
- * @property {number} [count]
468
- * @property {string} [file_url]
340
+ * @property {string} [phone]
341
+ * @property {string} [country_code]
469
342
  */
470
343
 
471
344
  /**
472
345
  * @typedef UserSchema
473
- * @property {string} [_id]
474
- * @property {string} [account_type]
475
- * @property {boolean} [active]
476
346
  * @property {string} [application_id]
477
- * @property {string} [created_at]
478
- * @property {string} [dob]
479
- * @property {Email[]} [emails]
480
- * @property {string} [external_id]
347
+ * @property {string} [user_id]
481
348
  * @property {string} [first_name]
482
- * @property {string} [gender]
483
- * @property {string} [last_name]
484
349
  * @property {Object} [meta]
350
+ * @property {string} [last_name]
485
351
  * @property {PhoneNumber[]} [phone_numbers]
352
+ * @property {Email[]} [emails]
353
+ * @property {string} [gender]
354
+ * @property {string} [dob]
355
+ * @property {boolean} [active]
486
356
  * @property {string} [profile_pic_url]
487
- * @property {string} [updated_at]
488
- * @property {string} [user_id]
489
357
  * @property {string} [username]
358
+ * @property {string} [account_type]
359
+ * @property {string} [_id]
360
+ * @property {string} [created_at]
361
+ * @property {string} [updated_at]
362
+ * @property {string} [external_id]
490
363
  */
491
364
 
492
365
  /**
493
- * @typedef UserSearchResponseSchema
494
- * @property {UserSchema[]} [users]
366
+ * @typedef PhoneNumber
367
+ * @property {boolean} [active]
368
+ * @property {boolean} [primary]
369
+ * @property {boolean} [verified]
370
+ * @property {string} [phone]
371
+ * @property {number} [country_code]
372
+ */
373
+
374
+ /**
375
+ * @typedef Email
376
+ * @property {boolean} [primary]
377
+ * @property {boolean} [verified]
378
+ * @property {string} [email]
379
+ * @property {boolean} [active]
495
380
  */
496
381
 
497
382
  class UserPlatformModel {
498
- /** @returns {Accountkit} */
499
- static Accountkit() {
383
+ /** @returns {BlockUserRequestSchema} */
384
+ static BlockUserRequestSchema() {
500
385
  return Joi.object({
501
- app_id: Joi.string().allow(""),
386
+ status: Joi.boolean(),
387
+ user_id: Joi.array().items(Joi.string().allow("")),
388
+ reason: Joi.string().allow(""),
502
389
  });
503
390
  }
504
391
 
@@ -509,26 +396,12 @@ class UserPlatformModel {
509
396
  });
510
397
  }
511
398
 
512
- /** @returns {ArchiveUserSuccess} */
513
- static ArchiveUserSuccess() {
514
- return Joi.object({
515
- success: Joi.boolean(),
516
- });
517
- }
518
-
519
- /** @returns {AuthenticationApiErrorSchema} */
520
- static AuthenticationApiErrorSchema() {
521
- return Joi.object({
522
- message: Joi.string().allow(""),
523
- });
524
- }
525
-
526
- /** @returns {BlockUserRequestSchema} */
527
- static BlockUserRequestSchema() {
399
+ /** @returns {UnDeleteUserRequestSchema} */
400
+ static UnDeleteUserRequestSchema() {
528
401
  return Joi.object({
402
+ user_id: Joi.string().allow(""),
529
403
  reason: Joi.string().allow(""),
530
- status: Joi.boolean(),
531
- user_id: Joi.array().items(Joi.string().allow("")),
404
+ reason_id: Joi.string().allow(""),
532
405
  });
533
406
  }
534
407
 
@@ -539,99 +412,24 @@ class UserPlatformModel {
539
412
  });
540
413
  }
541
414
 
542
- /** @returns {Conditions} */
543
- static Conditions() {
544
- return Joi.object({
545
- key: Joi.string().allow(""),
546
- type: Joi.string().allow(""),
547
- user_attribute_definition_id: Joi.string().allow(""),
548
- value: Joi.string().allow(""),
549
- });
550
- }
551
-
552
- /** @returns {ConditionsSchema} */
553
- static ConditionsSchema() {
554
- return Joi.object({
555
- type: Joi.string().allow(""),
556
- user_attribute_definition_id: Joi.string().allow(""),
557
- value: Joi.string().allow(""),
558
- });
559
- }
560
-
561
- /** @returns {CreateUserAttributeDefinition} */
562
- static CreateUserAttributeDefinition() {
563
- return Joi.object({
564
- customer_editable: Joi.boolean(),
565
- default_value: Joi.string().allow(""),
566
- description: Joi.string().allow(""),
567
- encrypted: Joi.boolean(),
568
- multi_value: Joi.boolean(),
569
- name: Joi.string().allow(""),
570
- pin_order: Joi.number(),
571
- pinned: Joi.boolean(),
572
- slug: Joi.string().allow(""),
573
- type: Joi.string().allow(""),
574
- validations: Joi.array().items(Joi.any()),
575
- });
576
- }
577
-
578
- /** @returns {CreateUserAttributeRequest} */
579
- static CreateUserAttributeRequest() {
580
- return Joi.object({
581
- attribute: Joi.any(),
582
- customer_overriden: Joi.boolean(),
583
- });
584
- }
585
-
586
- /** @returns {CreateUserGroup} */
587
- static CreateUserGroup() {
588
- return Joi.object({
589
- conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
590
- description: Joi.string().allow("").required(),
591
- file_url: Joi.string().allow(""),
592
- name: Joi.string().allow("").required(),
593
- type: Joi.string().allow(""),
594
- });
595
- }
596
-
597
- /** @returns {CreateUserRequestSchema} */
598
- static CreateUserRequestSchema() {
599
- return Joi.object({
600
- email: Joi.string().allow(""),
601
- external_id: Joi.string().allow(""),
602
- first_name: Joi.string().allow(""),
603
- gender: Joi.string().allow(""),
604
- last_name: Joi.string().allow(""),
605
- meta: Joi.any(),
606
- phone_number: Joi.string().allow("").required(),
607
- username: Joi.string().allow("").required(),
608
- });
609
- }
610
-
611
- /** @returns {CreateUserResponseSchema} */
612
- static CreateUserResponseSchema() {
415
+ /** @returns {ArchiveUserSuccess} */
416
+ static ArchiveUserSuccess() {
613
417
  return Joi.object({
614
- user: UserPlatformModel.UserSchema(),
418
+ success: Joi.boolean(),
615
419
  });
616
420
  }
617
421
 
618
- /** @returns {CreateUserSessionRequestSchema} */
619
- static CreateUserSessionRequestSchema() {
422
+ /** @returns {UnDeleteUserSuccess} */
423
+ static UnDeleteUserSuccess() {
620
424
  return Joi.object({
621
- domain: Joi.string().allow(""),
622
- max_age: Joi.number(),
623
- user_id: Joi.string().allow(""),
425
+ success: Joi.boolean(),
624
426
  });
625
427
  }
626
428
 
627
- /** @returns {CreateUserSessionResponseSchema} */
628
- static CreateUserSessionResponseSchema() {
429
+ /** @returns {UserSearchResponseSchema} */
430
+ static UserSearchResponseSchema() {
629
431
  return Joi.object({
630
- cookie: Joi.any(),
631
- domain: Joi.string().allow(""),
632
- http_only: Joi.boolean(),
633
- max_age: Joi.number(),
634
- secure: Joi.boolean(),
432
+ users: Joi.array().items(UserPlatformModel.UserSchema()),
635
433
  });
636
434
  }
637
435
 
@@ -643,181 +441,195 @@ class UserPlatformModel {
643
441
  });
644
442
  }
645
443
 
646
- /** @returns {DeleteAccountConsent} */
647
- static DeleteAccountConsent() {
648
- return Joi.object({
649
- consent_text: Joi.string().allow(""),
650
- });
651
- }
652
-
653
- /** @returns {DeleteAccountReasons} */
654
- static DeleteAccountReasons() {
444
+ /** @returns {PaginationSchema} */
445
+ static PaginationSchema() {
655
446
  return Joi.object({
656
- reason_id: Joi.string().allow(""),
657
- reason_text: Joi.string().allow(""),
658
- show_text_area: Joi.boolean(),
447
+ size: Joi.number(),
448
+ item_total: Joi.number(),
449
+ has_next: Joi.boolean(),
450
+ type: Joi.string().allow(""),
451
+ current: Joi.number(),
659
452
  });
660
453
  }
661
454
 
662
- /** @returns {Email} */
663
- static Email() {
455
+ /** @returns {SessionListResponseSchema} */
456
+ static SessionListResponseSchema() {
664
457
  return Joi.object({
665
- active: Joi.boolean(),
666
- email: Joi.string().allow(""),
667
- primary: Joi.boolean(),
668
- verified: Joi.boolean(),
458
+ items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
669
459
  });
670
460
  }
671
461
 
672
- /** @returns {Facebook} */
673
- static Facebook() {
462
+ /** @returns {SessionDeleteResponseSchema} */
463
+ static SessionDeleteResponseSchema() {
674
464
  return Joi.object({
675
- app_id: Joi.string().allow(""),
465
+ user_id: Joi.string().allow(""),
466
+ session_id: Joi.string().allow(""),
676
467
  });
677
468
  }
678
469
 
679
- /** @returns {FlashCard} */
680
- static FlashCard() {
470
+ /** @returns {SessionsDeleteResponseSchema} */
471
+ static SessionsDeleteResponseSchema() {
681
472
  return Joi.object({
682
- background_color: Joi.string().allow(""),
683
- text: Joi.string().allow(""),
684
- text_color: Joi.string().allow(""),
473
+ user_id: Joi.string().allow(""),
474
+ session_ids: Joi.array().items(Joi.string().allow("")),
685
475
  });
686
476
  }
687
477
 
688
- /** @returns {Google} */
689
- static Google() {
478
+ /** @returns {AuthenticationApiErrorSchema} */
479
+ static AuthenticationApiErrorSchema() {
690
480
  return Joi.object({
691
- app_id: Joi.string().allow(""),
481
+ message: Joi.string().allow(""),
692
482
  });
693
483
  }
694
484
 
695
- /** @returns {Login} */
696
- static Login() {
485
+ /** @returns {SessionListResponseInfo} */
486
+ static SessionListResponseInfo() {
697
487
  return Joi.object({
698
- otp: Joi.boolean(),
699
- password: Joi.boolean(),
488
+ session_id: Joi.string().allow(""),
489
+ user_agent: Joi.string().allow(""),
490
+ ip: Joi.string().allow(""),
491
+ domain: Joi.string().allow(""),
492
+ expire_in: Joi.string().allow(""),
700
493
  });
701
494
  }
702
495
 
703
- /** @returns {LookAndFeel} */
704
- static LookAndFeel() {
496
+ /** @returns {UserGroupResponseSchema} */
497
+ static UserGroupResponseSchema() {
705
498
  return Joi.object({
706
- background_color: Joi.string().allow(""),
707
- card_position: Joi.string().allow(""),
499
+ name: Joi.string().allow(""),
500
+ description: Joi.string().allow(""),
501
+ file_url: Joi.string().allow(""),
502
+ _id: Joi.string().allow(""),
503
+ status: Joi.string().allow(""),
504
+ uid: Joi.number(),
505
+ application_id: Joi.string().allow(""),
506
+ created_at: Joi.string().allow(""),
507
+ modified_at: Joi.string().allow(""),
508
+ __v: Joi.number(),
708
509
  });
709
510
  }
710
511
 
711
- /** @returns {MetaSchema} */
712
- static MetaSchema() {
512
+ /** @returns {UserGroupListResponseSchema} */
513
+ static UserGroupListResponseSchema() {
713
514
  return Joi.object({
714
- fynd_default: Joi.boolean(),
515
+ items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
516
+ page: UserPlatformModel.PaginationSchema(),
715
517
  });
716
518
  }
717
519
 
718
- /** @returns {PaginationSchema} */
719
- static PaginationSchema() {
520
+ /** @returns {CreateUserGroupSchema} */
521
+ static CreateUserGroupSchema() {
720
522
  return Joi.object({
721
- current: Joi.number(),
722
- has_next: Joi.boolean(),
723
- item_total: Joi.number(),
724
- size: Joi.number(),
725
- type: Joi.string().allow(""),
523
+ name: Joi.string().allow("").required(),
524
+ description: Joi.string().allow("").required(),
525
+ file_url: Joi.string().allow("").required(),
726
526
  });
727
527
  }
728
528
 
729
- /** @returns {PartialUserGroupUpdateSchema} */
730
- static PartialUserGroupUpdateSchema() {
529
+ /** @returns {CreateUserRequestSchema} */
530
+ static CreateUserRequestSchema() {
731
531
  return Joi.object({
732
- description: Joi.string().allow(""),
733
- file_url: Joi.string().allow(""),
734
- name: Joi.string().allow(""),
735
- type: Joi.string().allow(""),
736
- user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
532
+ phone_number: Joi.string().allow("").required(),
533
+ email: Joi.string().allow(""),
534
+ first_name: Joi.string().allow(""),
535
+ last_name: Joi.string().allow(""),
536
+ gender: Joi.string().allow(""),
537
+ username: Joi.string().allow("").required(),
538
+ meta: Joi.any(),
539
+ external_id: Joi.string().allow(""),
737
540
  });
738
541
  }
739
542
 
740
- /** @returns {PhoneNumber} */
741
- static PhoneNumber() {
543
+ /** @returns {CreateUserResponseSchema} */
544
+ static CreateUserResponseSchema() {
742
545
  return Joi.object({
743
- active: Joi.boolean(),
744
- country_code: Joi.number(),
745
- phone: Joi.string().allow(""),
746
- primary: Joi.boolean(),
747
- verified: Joi.boolean(),
546
+ user: UserPlatformModel.UserSchema(),
748
547
  });
749
548
  }
750
549
 
751
- /** @returns {PlatformEmail} */
752
- static PlatformEmail() {
550
+ /** @returns {CreateUserSessionRequestSchema} */
551
+ static CreateUserSessionRequestSchema() {
753
552
  return Joi.object({
754
- is_required: Joi.boolean(),
755
- level: Joi.string().allow(""),
553
+ domain: Joi.string().allow(""),
554
+ max_age: Joi.number(),
555
+ user_id: Joi.string().allow(""),
756
556
  });
757
557
  }
758
558
 
759
- /** @returns {PlatformMobile} */
760
- static PlatformMobile() {
559
+ /** @returns {CreateUserSessionResponseSchema} */
560
+ static CreateUserSessionResponseSchema() {
761
561
  return Joi.object({
762
- is_required: Joi.boolean(),
763
- level: Joi.string().allow(""),
562
+ domain: Joi.string().allow(""),
563
+ max_age: Joi.number(),
564
+ secure: Joi.boolean(),
565
+ http_only: Joi.boolean(),
566
+ cookie: Joi.any(),
764
567
  });
765
568
  }
766
569
 
767
570
  /** @returns {PlatformSchema} */
768
571
  static PlatformSchema() {
769
572
  return Joi.object({
770
- _id: Joi.string().allow(""),
771
- active: Joi.boolean(),
772
- created_at: Joi.string().allow(""),
773
- delete_account_consent: Joi.any(),
774
- delete_account_day: Joi.number(),
775
- delete_account_reasons: Joi.array().items(
776
- UserPlatformModel.DeleteAccountReasons()
777
- ),
778
- desktop_image: Joi.string().allow(""),
779
573
  display: Joi.string().allow(""),
780
- flash_card: UserPlatformModel.FlashCard(),
574
+ look_and_feel: UserPlatformModel.LookAndFeel(),
575
+ updated_at: Joi.string().allow(""),
576
+ active: Joi.boolean(),
781
577
  forgot_password: Joi.boolean(),
782
578
  login: UserPlatformModel.Login(),
783
- look_and_feel: UserPlatformModel.LookAndFeel(),
784
- meta: UserPlatformModel.MetaSchema(),
785
- mobile_image: Joi.string().allow(""),
579
+ skip_captcha: Joi.boolean(),
786
580
  name: Joi.string().allow(""),
787
- register: Joi.boolean(),
788
- register_required_fields: UserPlatformModel.RegisterRequiredFields(),
581
+ meta: UserPlatformModel.MetaSchema(),
582
+ _id: Joi.string().allow(""),
583
+ social: UserPlatformModel.Social(),
789
584
  required_fields: UserPlatformModel.RequiredFields(),
790
- session_config: Joi.any(),
791
- skip_captcha: Joi.boolean(),
585
+ register_required_fields: UserPlatformModel.RegisterRequiredFields(),
792
586
  skip_login: Joi.boolean(),
793
- social: UserPlatformModel.Social(),
794
- social_tokens: UserPlatformModel.SocialTokens(),
587
+ flash_card: UserPlatformModel.FlashCard(),
795
588
  subtext: Joi.string().allow(""),
796
- updated_at: Joi.string().allow(""),
589
+ social_tokens: UserPlatformModel.SocialTokens(),
590
+ created_at: Joi.string().allow(""),
591
+ register: Joi.boolean(),
592
+ mobile_image: Joi.string().allow(""),
593
+ desktop_image: Joi.string().allow(""),
594
+ delete_account_day: Joi.number(),
595
+ delete_account_reasons: Joi.array().items(
596
+ UserPlatformModel.DeleteAccountReasons()
597
+ ),
598
+ delete_account_consent: Joi.any(),
599
+ session_config: Joi.any(),
797
600
  });
798
601
  }
799
602
 
800
- /** @returns {RegisterRequiredFields} */
801
- static RegisterRequiredFields() {
603
+ /** @returns {LookAndFeel} */
604
+ static LookAndFeel() {
605
+ return Joi.object({
606
+ card_position: Joi.string().allow(""),
607
+ background_color: Joi.string().allow(""),
608
+ });
609
+ }
610
+
611
+ /** @returns {Login} */
612
+ static Login() {
802
613
  return Joi.object({
803
- email: UserPlatformModel.RegisterRequiredFieldsEmail(),
804
- mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
614
+ password: Joi.boolean(),
615
+ otp: Joi.boolean(),
805
616
  });
806
617
  }
807
618
 
808
- /** @returns {RegisterRequiredFieldsEmail} */
809
- static RegisterRequiredFieldsEmail() {
619
+ /** @returns {MetaSchema} */
620
+ static MetaSchema() {
810
621
  return Joi.object({
811
- is_required: Joi.boolean(),
812
- level: Joi.string().allow(""),
622
+ fynd_default: Joi.boolean(),
813
623
  });
814
624
  }
815
625
 
816
- /** @returns {RegisterRequiredFieldsMobile} */
817
- static RegisterRequiredFieldsMobile() {
626
+ /** @returns {Social} */
627
+ static Social() {
818
628
  return Joi.object({
819
- is_required: Joi.boolean(),
820
- level: Joi.string().allow(""),
629
+ account_kit: Joi.boolean(),
630
+ facebook: Joi.boolean(),
631
+ google: Joi.boolean(),
632
+ apple: Joi.boolean(),
821
633
  });
822
634
  }
823
635
 
@@ -829,229 +641,160 @@ class UserPlatformModel {
829
641
  });
830
642
  }
831
643
 
832
- /** @returns {SessionDeleteResponseSchema} */
833
- static SessionDeleteResponseSchema() {
644
+ /** @returns {PlatformEmail} */
645
+ static PlatformEmail() {
834
646
  return Joi.object({
835
- session_id: Joi.string().allow(""),
836
- user_id: Joi.string().allow(""),
647
+ is_required: Joi.boolean(),
648
+ level: Joi.string().allow(""),
837
649
  });
838
650
  }
839
651
 
840
- /** @returns {SessionExpiry} */
841
- static SessionExpiry() {
652
+ /** @returns {PlatformMobile} */
653
+ static PlatformMobile() {
842
654
  return Joi.object({
843
- duration: Joi.number(),
844
- is_rolling: Joi.boolean(),
845
- type: Joi.string().allow(""),
655
+ is_required: Joi.boolean(),
656
+ level: Joi.string().allow(""),
846
657
  });
847
658
  }
848
659
 
849
- /** @returns {SessionListResponseInfo} */
850
- static SessionListResponseInfo() {
660
+ /** @returns {RegisterRequiredFields} */
661
+ static RegisterRequiredFields() {
851
662
  return Joi.object({
852
- domain: Joi.string().allow(""),
853
- expire_in: Joi.string().allow(""),
854
- ip: Joi.string().allow(""),
855
- session_id: Joi.string().allow(""),
856
- user_agent: Joi.string().allow(""),
663
+ email: UserPlatformModel.RegisterRequiredFieldsEmail(),
664
+ mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
857
665
  });
858
666
  }
859
667
 
860
- /** @returns {SessionListResponseSchema} */
861
- static SessionListResponseSchema() {
668
+ /** @returns {RegisterRequiredFieldsEmail} */
669
+ static RegisterRequiredFieldsEmail() {
862
670
  return Joi.object({
863
- items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
671
+ is_required: Joi.boolean(),
672
+ level: Joi.string().allow(""),
864
673
  });
865
674
  }
866
675
 
867
- /** @returns {SessionsDeleteResponseSchema} */
868
- static SessionsDeleteResponseSchema() {
676
+ /** @returns {RegisterRequiredFieldsMobile} */
677
+ static RegisterRequiredFieldsMobile() {
869
678
  return Joi.object({
870
- session_ids: Joi.array().items(Joi.string().allow("")),
871
- user_id: Joi.string().allow(""),
679
+ is_required: Joi.boolean(),
680
+ level: Joi.string().allow(""),
872
681
  });
873
682
  }
874
683
 
875
- /** @returns {Social} */
876
- static Social() {
684
+ /** @returns {FlashCard} */
685
+ static FlashCard() {
877
686
  return Joi.object({
878
- account_kit: Joi.boolean(),
879
- apple: Joi.boolean(),
880
- facebook: Joi.boolean(),
881
- google: Joi.boolean(),
687
+ text: Joi.string().allow(""),
688
+ text_color: Joi.string().allow(""),
689
+ background_color: Joi.string().allow(""),
882
690
  });
883
691
  }
884
692
 
885
693
  /** @returns {SocialTokens} */
886
694
  static SocialTokens() {
887
695
  return Joi.object({
888
- account_kit: UserPlatformModel.Accountkit(),
889
696
  facebook: UserPlatformModel.Facebook(),
697
+ account_kit: UserPlatformModel.Accountkit(),
890
698
  google: UserPlatformModel.Google(),
891
699
  });
892
700
  }
893
701
 
894
- /** @returns {SuccessMessageResponse} */
895
- static SuccessMessageResponse() {
702
+ /** @returns {DeleteAccountReasons} */
703
+ static DeleteAccountReasons() {
896
704
  return Joi.object({
897
- success: Joi.string().allow(""),
705
+ reason_text: Joi.string().allow(""),
706
+ reason_id: Joi.string().allow(""),
707
+ show_text_area: Joi.boolean(),
898
708
  });
899
709
  }
900
710
 
901
- /** @returns {UnDeleteUserRequestSchema} */
902
- static UnDeleteUserRequestSchema() {
711
+ /** @returns {DeleteAccountConsent} */
712
+ static DeleteAccountConsent() {
903
713
  return Joi.object({
904
- reason: Joi.string().allow(""),
905
- reason_id: Joi.string().allow(""),
906
- user_id: Joi.string().allow(""),
714
+ consent_text: Joi.string().allow(""),
907
715
  });
908
716
  }
909
717
 
910
- /** @returns {UnDeleteUserSuccess} */
911
- static UnDeleteUserSuccess() {
718
+ /** @returns {Facebook} */
719
+ static Facebook() {
912
720
  return Joi.object({
913
- success: Joi.boolean(),
721
+ app_id: Joi.string().allow(""),
914
722
  });
915
723
  }
916
724
 
917
- /** @returns {UpdateUserGroupSchema} */
918
- static UpdateUserGroupSchema() {
725
+ /** @returns {Accountkit} */
726
+ static Accountkit() {
919
727
  return Joi.object({
920
- conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
921
- description: Joi.string().allow(""),
922
- file_url: Joi.string().allow(""),
923
- name: Joi.string().allow(""),
924
- type: Joi.string().allow(""),
728
+ app_id: Joi.string().allow(""),
925
729
  });
926
730
  }
927
731
 
928
- /** @returns {UpdateUserRequestSchema} */
929
- static UpdateUserRequestSchema() {
732
+ /** @returns {Google} */
733
+ static Google() {
930
734
  return Joi.object({
931
- emails: Joi.array().items(UserPlatformModel.UserEmails()),
932
- external_id: Joi.string().allow(""),
933
- first_name: Joi.string().allow(""),
934
- gender: Joi.string().allow(""),
935
- last_name: Joi.string().allow(""),
936
- meta: Joi.any(),
937
- phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
735
+ app_id: Joi.string().allow(""),
938
736
  });
939
737
  }
940
738
 
941
- /** @returns {UserAttributeDefinition} */
942
- static UserAttributeDefinition() {
739
+ /** @returns {SessionExpiry} */
740
+ static SessionExpiry() {
943
741
  return Joi.object({
944
- __v: Joi.number(),
945
- _id: Joi.string().allow(""),
946
- application_id: Joi.string().allow(""),
947
- created_at: Joi.string().allow(""),
948
- customer_editable: Joi.boolean(),
949
- description: Joi.string().allow(""),
950
- encrypted: Joi.boolean(),
951
- is_locked: Joi.boolean(),
952
- modified_at: Joi.string().allow(""),
953
- multi_value: Joi.boolean(),
954
- name: Joi.string().allow(""),
955
- pin_order: Joi.number(),
956
- pinned: Joi.boolean(),
957
- slug: Joi.string().allow(""),
742
+ duration: Joi.number(),
958
743
  type: Joi.string().allow(""),
959
- validations: Joi.array().items(Joi.any()),
744
+ is_rolling: Joi.boolean(),
960
745
  });
961
746
  }
962
747
 
963
- /** @returns {UserAttributeDefinitionResponse} */
964
- static UserAttributeDefinitionResponse() {
748
+ /** @returns {UpdateUserGroupSchema} */
749
+ static UpdateUserGroupSchema() {
965
750
  return Joi.object({
966
- _id: Joi.string().allow(""),
967
- application_id: Joi.string().allow(""),
968
- created_at: Joi.string().allow(""),
969
- created_by: Joi.string().allow(""),
970
- customer_editable: Joi.boolean(),
971
- description: Joi.string().allow(""),
972
- encrypted: Joi.boolean(),
973
- is_locked: Joi.boolean(),
974
- modified_at: Joi.string().allow(""),
975
- multi_value: Joi.boolean(),
976
751
  name: Joi.string().allow(""),
977
- pin_order: Joi.number(),
978
- pinned: Joi.boolean(),
979
- slug: Joi.string().allow(""),
980
- type: Joi.string().allow(""),
981
- updated_by: Joi.string().allow(""),
982
- validations: Joi.array().items(
983
- UserPlatformModel.UserAttributeDefinitionValidation()
984
- ),
752
+ description: Joi.string().allow(""),
753
+ file_url: Joi.string().allow(""),
985
754
  });
986
755
  }
987
756
 
988
- /** @returns {UserAttributeDefinitionValidation} */
989
- static UserAttributeDefinitionValidation() {
757
+ /** @returns {PartialUserGroupUpdateSchema} */
758
+ static PartialUserGroupUpdateSchema() {
990
759
  return Joi.object({
991
760
  type: Joi.string().allow(""),
992
- value: Joi.any(),
993
- });
994
- }
995
-
996
- /** @returns {UserAttributeResponse} */
997
- static UserAttributeResponse() {
998
- return Joi.object({
999
- _id: Joi.string().allow(""),
1000
- application_id: Joi.string().allow(""),
1001
- attribute: Joi.any(),
1002
- customer_overriden: Joi.boolean(),
1003
761
  name: Joi.string().allow(""),
1004
- type: Joi.string().allow(""),
1005
- updated_by: Joi.string().allow(""),
1006
- user_id: Joi.string().allow(""),
762
+ description: Joi.string().allow(""),
763
+ file_url: Joi.string().allow(""),
764
+ user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
1007
765
  });
1008
766
  }
1009
767
 
1010
- /** @returns {UserEmails} */
1011
- static UserEmails() {
768
+ /** @returns {UserGroupUpdateData} */
769
+ static UserGroupUpdateData() {
1012
770
  return Joi.object({
1013
- active: Joi.boolean(),
771
+ user_id: Joi.string().allow(""),
772
+ phone_number: Joi.string().allow(""),
1014
773
  email: Joi.string().allow(""),
1015
- primary: Joi.boolean(),
1016
- verified: Joi.boolean(),
1017
- });
1018
- }
1019
-
1020
- /** @returns {UserGroupListResponseSchema} */
1021
- static UserGroupListResponseSchema() {
1022
- return Joi.object({
1023
- items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
1024
- page: UserPlatformModel.PaginationSchema(),
774
+ action: Joi.string().allow("").required(),
1025
775
  });
1026
776
  }
1027
777
 
1028
- /** @returns {UserGroupResponseSchema} */
1029
- static UserGroupResponseSchema() {
778
+ /** @returns {UpdateUserRequestSchema} */
779
+ static UpdateUserRequestSchema() {
1030
780
  return Joi.object({
1031
- __v: Joi.number(),
1032
- _id: Joi.string().allow(""),
1033
- application_id: Joi.string().allow(""),
1034
- conditions: Joi.array().items(UserPlatformModel.Conditions()),
1035
- created_at: Joi.string().allow(""),
1036
- description: Joi.string().allow(""),
1037
- error: UserPlatformModel.UserResponseErrorSchema(),
1038
- file_url: Joi.string().allow(""),
1039
- is_active: Joi.boolean(),
1040
- modified_at: Joi.string().allow(""),
1041
- name: Joi.string().allow(""),
1042
- status: Joi.string().allow(""),
1043
- type: Joi.string().allow(""),
1044
- uid: Joi.number(),
781
+ first_name: Joi.string().allow(""),
782
+ last_name: Joi.string().allow(""),
783
+ gender: Joi.string().allow(""),
784
+ external_id: Joi.string().allow(""),
785
+ meta: Joi.any(),
786
+ phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
787
+ emails: Joi.array().items(UserPlatformModel.UserEmails()),
1045
788
  });
1046
789
  }
1047
790
 
1048
- /** @returns {UserGroupUpdateData} */
1049
- static UserGroupUpdateData() {
791
+ /** @returns {UserEmails} */
792
+ static UserEmails() {
1050
793
  return Joi.object({
1051
- action: Joi.string().allow("").required(),
794
+ active: Joi.boolean(),
795
+ primary: Joi.boolean(),
796
+ verified: Joi.boolean(),
1052
797
  email: Joi.string().allow(""),
1053
- phone_number: Joi.string().allow(""),
1054
- user_id: Joi.string().allow(""),
1055
798
  });
1056
799
  }
1057
800
 
@@ -1059,48 +802,54 @@ class UserPlatformModel {
1059
802
  static UserPhoneNumbers() {
1060
803
  return Joi.object({
1061
804
  active: Joi.boolean(),
1062
- country_code: Joi.string().allow(""),
1063
- phone: Joi.string().allow(""),
1064
805
  primary: Joi.boolean(),
1065
806
  verified: Joi.boolean(),
1066
- });
1067
- }
1068
-
1069
- /** @returns {UserResponseErrorSchema} */
1070
- static UserResponseErrorSchema() {
1071
- return Joi.object({
1072
- count: Joi.number(),
1073
- file_url: Joi.string().allow(""),
807
+ phone: Joi.string().allow(""),
808
+ country_code: Joi.string().allow(""),
1074
809
  });
1075
810
  }
1076
811
 
1077
812
  /** @returns {UserSchema} */
1078
813
  static UserSchema() {
1079
814
  return Joi.object({
1080
- _id: Joi.string().allow(""),
1081
- account_type: Joi.string().allow(""),
1082
- active: Joi.boolean(),
1083
815
  application_id: Joi.string().allow(""),
1084
- created_at: Joi.string().allow(""),
1085
- dob: Joi.string().allow(""),
1086
- emails: Joi.array().items(UserPlatformModel.Email()),
1087
- external_id: Joi.string().allow(""),
816
+ user_id: Joi.string().allow(""),
1088
817
  first_name: Joi.string().allow(""),
1089
- gender: Joi.string().allow(""),
1090
- last_name: Joi.string().allow(""),
1091
818
  meta: Joi.any(),
819
+ last_name: Joi.string().allow(""),
1092
820
  phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
821
+ emails: Joi.array().items(UserPlatformModel.Email()),
822
+ gender: Joi.string().allow(""),
823
+ dob: Joi.string().allow(""),
824
+ active: Joi.boolean(),
1093
825
  profile_pic_url: Joi.string().allow(""),
1094
- updated_at: Joi.string().allow(""),
1095
- user_id: Joi.string().allow(""),
1096
826
  username: Joi.string().allow(""),
827
+ account_type: Joi.string().allow(""),
828
+ _id: Joi.string().allow(""),
829
+ created_at: Joi.string().allow(""),
830
+ updated_at: Joi.string().allow(""),
831
+ external_id: Joi.string().allow(""),
1097
832
  });
1098
833
  }
1099
834
 
1100
- /** @returns {UserSearchResponseSchema} */
1101
- static UserSearchResponseSchema() {
835
+ /** @returns {PhoneNumber} */
836
+ static PhoneNumber() {
1102
837
  return Joi.object({
1103
- users: Joi.array().items(UserPlatformModel.UserSchema()),
838
+ active: Joi.boolean(),
839
+ primary: Joi.boolean(),
840
+ verified: Joi.boolean(),
841
+ phone: Joi.string().allow(""),
842
+ country_code: Joi.number(),
843
+ });
844
+ }
845
+
846
+ /** @returns {Email} */
847
+ static Email() {
848
+ return Joi.object({
849
+ primary: Joi.boolean(),
850
+ verified: Joi.boolean(),
851
+ email: Joi.string().allow(""),
852
+ active: Joi.boolean(),
1104
853
  });
1105
854
  }
1106
855
  }