@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15

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 (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -1,10 +1,23 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef SuccessMessageResponse
4
+ * @typedef SuccessMessage
5
5
  * @property {string} [success]
6
6
  */
7
7
 
8
+ /**
9
+ * @typedef UserAttributeDefinitionList
10
+ * @property {UserAttributeDefinition[]} [items] - Array of user attribute
11
+ * definition objects.
12
+ * @property {PaginationSchema} [page]
13
+ */
14
+
15
+ /**
16
+ * @typedef UserAttributeDefinitionsResponseSchema
17
+ * @property {UserAttribute[]} [items]
18
+ * @property {PaginationSchema} [page]
19
+ */
20
+
8
21
  /**
9
22
  * @typedef UserAttributeDefinition
10
23
  * @property {string} [_id] - The unique identifier for the attribute definition.
@@ -13,7 +26,14 @@ const Joi = require("joi");
13
26
  * @property {string} [description] - The description of the attribute.
14
27
  * @property {string} [application_id] - The application ID.
15
28
  * @property {string} [type] - The attribute type.
16
- * @property {boolean} [multi_value] - Whether the attribute supports multiple values.
29
+ * @property {string} [icon] - Optional icon representation for this attribute.
30
+ * Defaults to an empty string.
31
+ * @property {string[]} [ordering_channels] - Ordering Channels where this
32
+ * attribute should be visible.
33
+ * @property {AttributeMaskingProperties} [masking]
34
+ * @property {AttributeRegistrationProperties} [registration]
35
+ * @property {boolean} [is_multi_value] - Indicates if this attribute can accept
36
+ * multiple values.
17
37
  * @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
18
38
  * @property {boolean} [encrypted] - Whether the attribute is encrypted.
19
39
  * @property {boolean} [pinned] - Whether the attribute is pinned.
@@ -23,17 +43,25 @@ const Joi = require("joi");
23
43
  * @property {string} [created_at] - The creation date of the attribute.
24
44
  * @property {string} [modified_at] - The modification date of the attribute.
25
45
  * @property {number} [__v] - The version number of the attribute.
46
+ * @property {string[]} [options] - List of possible values for the attribute
26
47
  */
27
48
 
28
49
  /**
29
- * @typedef UserAttributeDefinitionResponse
50
+ * @typedef UserAttributeDefinitionDetails
30
51
  * @property {string} [_id] - The unique identifier for the attribute definition.
31
52
  * @property {string} [name] - The attribute name.
32
53
  * @property {string} [slug] - The attribute key.
33
54
  * @property {string} [description] - The description of the attribute.
34
55
  * @property {string} [application_id] - The application ID.
35
56
  * @property {string} [type] - The attribute type.
36
- * @property {boolean} [multi_value] - Whether the attribute supports multiple values.
57
+ * @property {string} [icon] - Optional icon representation for this attribute.
58
+ * Defaults to an empty string.
59
+ * @property {string[]} [ordering_channels] - Ordering Channels where this
60
+ * attribute should be visible.
61
+ * @property {AttributeMaskingProperties} [masking]
62
+ * @property {AttributeRegistrationProperties} [registration]
63
+ * @property {boolean} [is_multi_value] - Indicates if this attribute can accept
64
+ * multiple values.
37
65
  * @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
38
66
  * @property {boolean} [encrypted] - Whether the attribute is encrypted.
39
67
  * @property {boolean} [pinned] - Whether the attribute is pinned.
@@ -47,6 +75,22 @@ const Joi = require("joi");
47
75
  * attribute definition.
48
76
  */
49
77
 
78
+ /**
79
+ * @typedef AttributeMaskingProperties
80
+ * @property {boolean} [enabled] - Indicates if PII masking is editable for this
81
+ * attribute.
82
+ * @property {string} [type] - Indicates the PII masking options available
83
+ * default or others
84
+ */
85
+
86
+ /**
87
+ * @typedef AttributeRegistrationProperties
88
+ * @property {boolean} [enabled] - Indicates if an attribute is editable when
89
+ * customer registers for a storefront.
90
+ * @property {string} [type] - Indicates if this attribute is mandatory or
91
+ * optional when customer registers for a storefront.
92
+ */
93
+
50
94
  /**
51
95
  * @typedef UserAttributeDefinitionValidation
52
96
  * @property {string} [type] - The type of validation.
@@ -54,20 +98,47 @@ const Joi = require("joi");
54
98
  */
55
99
 
56
100
  /**
57
- * @typedef UserAttributeResponse
101
+ * @typedef BulkUserAttribute
102
+ * @property {boolean} [success] - This describes the status of the API response
103
+ * @property {UserAttribute[]} [attributes]
104
+ */
105
+
106
+ /**
107
+ * @typedef UserAttribute
58
108
  * @property {string} [_id] - The unique identifier for the attribute definition.
59
109
  * @property {string} [name] - The name of user attribute definition.
60
110
  * @property {string} [user_id] - The unique identifier for the user.
61
111
  * @property {string} [application_id] - The application ID.
112
+ * @property {string} [user_attribute_definition_id] - The unique id of the
113
+ * attribute definition.
114
+ * @property {string} [created_at] - The time when attribute value is created
115
+ * for a user in ISO format.
116
+ * @property {string} [updated_at] - The time when attribute value is updated
117
+ * for a user in ISO format.
62
118
  * @property {string} [type] - The attribute type.
63
- * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable.
119
+ * @property {boolean} [customer_overridden] - Whether the attribute is customer-editable.
64
120
  * @property {Object} [attribute]
65
121
  * @property {string} [updated_by]
66
122
  */
67
123
 
68
124
  /**
69
- * @typedef CreateUserAttributeRequest
70
- * @property {boolean} [customer_overriden]
125
+ * @typedef CreateBulkUserAttribute
126
+ * @property {BulkUserAttributeRequestBody[]} attributes - This is an array of
127
+ * objects containing id of attribute definitions and the respective values to
128
+ * created or updated
129
+ */
130
+
131
+ /**
132
+ * @typedef BulkUserAttributeRequestBody
133
+ * @property {string} definition_id - Theis is an unique id of user attribute definition
134
+ * @property {Object} value - Attribute values to be create or updated. Can be a
135
+ * single value or an array of values. Types supported: string, number, array
136
+ * of string, or array of number.
137
+ */
138
+
139
+ /**
140
+ * @typedef CreateUserAttribute
141
+ * @property {boolean} [customer_overridden]
71
142
  * @property {Object} [attribute]
72
143
  */
73
144
 
@@ -76,8 +147,15 @@ const Joi = require("joi");
76
147
  * @property {string} [name]
77
148
  * @property {string} [slug]
78
149
  * @property {string} [description]
79
- * @property {string} [type]
80
- * @property {boolean} [multi_value]
150
+ * @property {string} [type] - The attribute type.
151
+ * @property {string} [icon] - Optional icon representation for this attribute.
152
+ * Defaults to an empty string.
153
+ * @property {string[]} [ordering_channels] - Ordering Channels where this
154
+ * attribute should be visible.
155
+ * @property {AttributeMaskingProperties} [masking]
156
+ * @property {AttributeRegistrationProperties} [registration]
157
+ * @property {boolean} [is_multi_value] - Indicates if this attribute can accept
158
+ * multiple values.
81
159
  * @property {boolean} [customer_editable]
82
160
  * @property {boolean} [encrypted]
83
161
  * @property {boolean} [pinned]
@@ -86,6 +164,71 @@ const Joi = require("joi");
86
164
  * @property {Object[]} [validations]
87
165
  */
88
166
 
167
+ /**
168
+ * @typedef CreateStoreFrontUsersPayload
169
+ * @property {string} absolute_url - A valid URL linking to the file containing
170
+ * user data to be imported.
171
+ * @property {string} file_format - The format of the file containing the user's
172
+ * data. Supported formats are CSV and XLSX.
173
+ * @property {string} relative_url - A valid relative path to the file within
174
+ * the storage system. This path should not include the base URL or domain and
175
+ * must conform to the storage structure
176
+ */
177
+
178
+ /**
179
+ * @typedef BulkUserExportSchema
180
+ * @property {string} file_format - The format of the file in which you want to
181
+ * export data. Supported formats are CSV and XLSX.
182
+ */
183
+
184
+ /**
185
+ * @typedef BulkActionModel
186
+ * @property {string} _id - The Job ID associated with an Import or Export Job
187
+ * @property {string} file_name - The name of the file
188
+ * @property {string} file_format - The format of the uploaded file (e.g., CSV, XLSX).
189
+ * @property {string} action_type - The type of bulk action being performed
190
+ * (e.g., import, export).
191
+ * @property {CreatedBySchema} created_by
192
+ * @property {BulkActionCountSchema} [count]
193
+ * @property {string} [status] - The current status of the bulk action.
194
+ * @property {BulkActionLinkSchema} [links]
195
+ * @property {string} application_id - The unique identifier of the associated
196
+ * application.
197
+ * @property {string} company_id - The unique identifier of the company
198
+ * associated with the bulk action.
199
+ * @property {string} [created_at] - The timestamp when the bulk action was created.
200
+ * @property {string} [updated_at] - The timestamp when the bulk action was last updated.
201
+ */
202
+
203
+ /**
204
+ * @typedef CreatedBySchema
205
+ * @property {string} name - The name of the user who initiated the operation.
206
+ * @property {string} user_id - A unique identifier for the user who initiated
207
+ * the operation.
208
+ */
209
+
210
+ /**
211
+ * @typedef BulkActionLinkSchema
212
+ * @property {FileLinks} [file]
213
+ * @property {FileLinks} [error]
214
+ */
215
+
216
+ /**
217
+ * @typedef FileLinks
218
+ * @property {string} [absolute_url] - The full URL of the file, including the
219
+ * domain and protocol, allowing direct access to the file from any location.
220
+ * @property {string} [relative_url] - The relative path to the file within the
221
+ * storage system, excluding the base URL or domain. This path is specific to
222
+ * the storage structure.
223
+ */
224
+
225
+ /**
226
+ * @typedef BulkActionCountSchema
227
+ * @property {number} [total] - The total number of items to be processed.
228
+ * @property {number} [success] - The number of successfully processed items.
229
+ * @property {number} [error] - The number of items that failed to process.
230
+ */
231
+
89
232
  /**
90
233
  * @typedef BlockUserRequestSchema
91
234
  * @property {boolean} [status]
@@ -131,13 +274,20 @@ const Joi = require("joi");
131
274
  * @property {PaginationSchema} [page]
132
275
  */
133
276
 
277
+ /**
278
+ * @typedef BulkActionPaginationSchema
279
+ * @property {BulkActionModel[]} [items] - Array of Bulk Action Documents
280
+ * @property {PaginationSchema} [page]
281
+ */
282
+
134
283
  /**
135
284
  * @typedef PaginationSchema
136
- * @property {number} [size]
137
- * @property {number} [item_total]
138
- * @property {boolean} [has_next]
139
- * @property {string} [type]
140
- * @property {number} [current]
285
+ * @property {number} [size] - The number of items per page.
286
+ * @property {number} [total] - The total number of items across all pages.
287
+ * @property {number} [item_total] - The total number of items across all pages.
288
+ * @property {boolean} [has_next] - Indicates whether there are more pages to retrieve.
289
+ * @property {string} [type] - The type of pagination used (eg Number).
290
+ * @property {number} [current] - The current page number.
141
291
  */
142
292
 
143
293
  /**
@@ -218,9 +368,92 @@ const Joi = require("joi");
218
368
 
219
369
  /**
220
370
  * @typedef ConditionsSchema
221
- * @property {string} [user_attribute_definition_id]
222
- * @property {string} [type]
223
- * @property {string} [value]
371
+ * @property {string} [user_attribute_definition_id] - ID of the user attribute
372
+ * definition used in the condition
373
+ * @property {string} [type] - Type of condition to apply on the attribute value.
374
+ * @property {Object} [value] - Value of the condition
375
+ * @property {boolean} [ignore_year] - Indicates if the year should be ignored
376
+ * for the condition
377
+ */
378
+
379
+ /**
380
+ * @typedef DeleteBulkUserAttribute
381
+ * @property {string[]} [definition_ids] - List of user attribute definition IDs
382
+ * for which the corresponding values should be deleted.
383
+ */
384
+
385
+ /**
386
+ * @typedef UserAttributeFilter
387
+ * @property {UserAttributeFilterQuery} [query]
388
+ */
389
+
390
+ /**
391
+ * @typedef UserAttributeFilterQuery
392
+ * @property {string} type - Logical condition type to apply between multiple
393
+ * attribute filters.
394
+ * @property {number} limit - Number of results to return per page.
395
+ * @property {number} page - Page number to fetch.
396
+ * @property {string} [email] - Filter users by their exact email address.
397
+ * @property {boolean} [has_email] - Apply a filter to retrieve users who have a
398
+ * valid email address specified in their profile.
399
+ * @property {boolean} [has_phone] - Apply a filter to retrieve users who have a
400
+ * valid phone number specified in their profile.
401
+ * @property {string} [phone] - Filter users by their exact phone number.
402
+ * @property {string[]} [definition_ids] - List of user attribute definition IDs
403
+ * to fetch attributes values available for each user.
404
+ * @property {UserAttributeFilterRequestConditions[]} conditions - List of
405
+ * filtering conditions to apply on user attributes.
406
+ */
407
+
408
+ /**
409
+ * @typedef UserAttributeFilterRequestConditions
410
+ * @property {string} definition_id - ID of the user attribute definition to filter on.
411
+ * @property {string} type - Filter operation to apply on the attribute value.
412
+ * Supported operations include:
413
+ *
414
+ * - `eq`: Equal to - `ne`: Not equal to - `gt`: Greater than (or is after for
415
+ * dates) - `lt`: Less than (or is before for dates) - `gte`: Greater than
416
+ * or equal to - `lte`: Less than or equal to - `cnt`: Contains (for
417
+ * strings) - `nct`: Does not contain (for strings) - `is`: Matches
418
+ * exactly (for strings) - `nis`: Does not match exactly (for strings) -
419
+ * `sw`: Starts with (for strings) - `ew`: Ends with (for strings) -
420
+ * `btw`: Between two values (for date and datetime types) - `in`: Value
421
+ * exists in given list - `nin`: Value does not exist in given list
422
+ *
423
+ * @property {Object} value - Values to be used in filtering the attribute. Can
424
+ * be a single value or an array of values. Types supported: string, number,
425
+ * array of string, or array of number.
426
+ */
427
+
428
+ /**
429
+ * @typedef UserAttributeFiltered
430
+ * @property {UserAttributeFilteredList[]} [items] - List of user objects that
431
+ * match the filter criteria.
432
+ * @property {PaginationSchema} [page]
433
+ */
434
+
435
+ /**
436
+ * @typedef UserAttributeFilteredList
437
+ * @property {string} [_id] - Unique ID of the user.
438
+ * @property {string} [username] - Generated username for the user.
439
+ * @property {UserPhoneNumbers[]} [phone_numbers] - List of phone numbers
440
+ * associated with the user.
441
+ * @property {UserEmails[]} [emails] - List of emails associated with the user.
442
+ * @property {string} [gender] - Gender of the user.
443
+ * @property {boolean} [active] - Whether the user account is active.
444
+ * @property {boolean} [archive] - Whether the user account is archived.
445
+ * @property {string} [status] - Status of the user account.
446
+ * @property {UserAttribute[]} [attributes]
447
+ * @property {string} [first_name] - First name of the user.
448
+ * @property {string} [last_name] - Last name of the user.
449
+ * @property {string} [account_type] - Type of user account.
450
+ * @property {string} [profile_pic_url] - URL to user's profile picture.
451
+ * @property {boolean} [has_old_password_hash] - Whether user has legacy password format.
452
+ * @property {string} [user_id] - Unique user ID.
453
+ * @property {string} [application_id] - Application ID associated with the user.
454
+ * @property {boolean} [is_encrypted] - Whether the user data is encrypted.
455
+ * @property {string} [created_at] - Timestamp of user creation.
456
+ * @property {string} [updated_at] - Timestamp of last update.
224
457
  */
225
458
 
226
459
  /**
@@ -234,15 +467,17 @@ const Joi = require("joi");
234
467
 
235
468
  /**
236
469
  * @typedef CreateUserRequestSchema
237
- * @property {string} phone_number
470
+ * @property {string} [phone_number]
238
471
  * @property {string} [email]
239
472
  * @property {string} [first_name]
240
473
  * @property {string} [last_name]
241
474
  * @property {string} [gender]
242
- * @property {string} username
475
+ * @property {string} [username]
243
476
  * @property {Object} [meta]
244
477
  * @property {string} [external_id]
245
478
  * @property {string} [rr_id]
479
+ * @property {string} [dob] - User's date of birth in ISO date
480
+ * format("1990-01-01T00:00:00.000Z").
246
481
  */
247
482
 
248
483
  /**
@@ -368,6 +603,7 @@ const Joi = require("joi");
368
603
  * @property {Facebook} [facebook]
369
604
  * @property {Accountkit} [account_kit]
370
605
  * @property {Google} [google]
606
+ * @property {Apple} [apple]
371
607
  */
372
608
 
373
609
  /**
@@ -382,6 +618,21 @@ const Joi = require("joi");
382
618
  * @property {string} [consent_text]
383
619
  */
384
620
 
621
+ /**
622
+ * @typedef GetUserTimeline
623
+ * @property {string} [delete_on] - Denotes the date on which the user will be deleted
624
+ * @property {UserTimeline[]} [timeline] - List of user timeline events
625
+ */
626
+
627
+ /**
628
+ * @typedef UserTimeline
629
+ * @property {string} [date] - Denotes the date at which this event occured
630
+ * @property {string} [title] - Title of the timeline event
631
+ * @property {string} [type] - Type of the event, indicating its status
632
+ * @property {boolean} [visible] - Indicates whether the event should be shown on the UI
633
+ * @property {string} [sub_title] - Additional information about the event
634
+ */
635
+
385
636
  /**
386
637
  * @typedef Facebook
387
638
  * @property {string} [app_id]
@@ -400,6 +651,12 @@ const Joi = require("joi");
400
651
  * @property {string} [app_secret]
401
652
  */
402
653
 
654
+ /**
655
+ * @typedef Apple
656
+ * @property {string} [app_id]
657
+ * @property {string} [redirect_uri]
658
+ */
659
+
403
660
  /**
404
661
  * @typedef SessionExpiry
405
662
  * @property {number} [duration]
@@ -433,7 +690,7 @@ const Joi = require("joi");
433
690
 
434
691
  /**
435
692
  * @typedef UserGroupUpdateData
436
- * @property {string} [user_id] - Must be valid mongodb objectid of existing user
693
+ * @property {string} [user_id] - Must be valid ID of existing user
437
694
  * @property {string} [phone_number] - Phone number of registered user
438
695
  * @property {string} [email] - Email of registered user
439
696
  * @property {string} action
@@ -443,6 +700,8 @@ const Joi = require("joi");
443
700
  * @typedef UpdateUserRequestSchema
444
701
  * @property {string} [first_name]
445
702
  * @property {string} [last_name]
703
+ * @property {string} [dob] - User's date of birth in ISO date
704
+ * format("1990-01-01T00:00:00.000Z").
446
705
  * @property {string} [gender]
447
706
  * @property {string} [external_id]
448
707
  * @property {string} [rr_id]
@@ -478,7 +737,8 @@ const Joi = require("joi");
478
737
  * @property {PhoneNumber[]} [phone_numbers]
479
738
  * @property {Email[]} [emails]
480
739
  * @property {string} [gender]
481
- * @property {string} [dob]
740
+ * @property {string} [dob] - User's date of birth in ISO date
741
+ * format("1990-01-01T00:00:00.000Z").
482
742
  * @property {boolean} [active]
483
743
  * @property {string} [profile_pic_url]
484
744
  * @property {string} [username]
@@ -488,6 +748,7 @@ const Joi = require("joi");
488
748
  * @property {string} [updated_at]
489
749
  * @property {string} [external_id]
490
750
  * @property {string} [rr_id]
751
+ * @property {UserConsent} [consent]
491
752
  */
492
753
 
493
754
  /**
@@ -500,7 +761,8 @@ const Joi = require("joi");
500
761
  * @property {PhoneNumber[]} [phone_numbers]
501
762
  * @property {Email[]} [emails]
502
763
  * @property {string} [gender]
503
- * @property {string} [dob]
764
+ * @property {string} [dob] - User's date of birth in ISO date
765
+ * format("1990-01-01T00:00:00.000Z").
504
766
  * @property {boolean} [active]
505
767
  * @property {string} [profile_pic_url]
506
768
  * @property {string} [username]
@@ -512,6 +774,8 @@ const Joi = require("joi");
512
774
  * @property {string} [rr_id]
513
775
  * @property {boolean} [archive]
514
776
  * @property {string} [status]
777
+ * @property {string} [deleted_on]
778
+ * @property {UserConsent} [consent]
515
779
  */
516
780
 
517
781
  /**
@@ -531,14 +795,48 @@ const Joi = require("joi");
531
795
  * @property {boolean} [verified] - Is the email verified.
532
796
  */
533
797
 
798
+ /**
799
+ * @typedef UserConsent
800
+ * @property {PrivacyPolicyConsentSchema} [privacy_policy]
801
+ */
802
+
803
+ /**
804
+ * @typedef DeleteUserGroupSuccess
805
+ * @property {string} id - ID of the user group that was deleted
806
+ * @property {boolean} success - Success indicating the user group was deleted
807
+ * successfully.
808
+ */
809
+
810
+ /**
811
+ * @typedef PrivacyPolicyConsentSchema
812
+ * @property {boolean} [value] - Whether the user has consented to the privacy policy
813
+ * @property {string} [updated_at] - When the consent was last updated
814
+ */
815
+
534
816
  class UserPlatformModel {
535
- /** @returns {SuccessMessageResponse} */
536
- static SuccessMessageResponse() {
817
+ /** @returns {SuccessMessage} */
818
+ static SuccessMessage() {
537
819
  return Joi.object({
538
820
  success: Joi.string().allow(""),
539
821
  });
540
822
  }
541
823
 
824
+ /** @returns {UserAttributeDefinitionList} */
825
+ static UserAttributeDefinitionList() {
826
+ return Joi.object({
827
+ items: Joi.array().items(UserPlatformModel.UserAttributeDefinition()),
828
+ page: UserPlatformModel.PaginationSchema(),
829
+ });
830
+ }
831
+
832
+ /** @returns {UserAttributeDefinitionsResponseSchema} */
833
+ static UserAttributeDefinitionsResponseSchema() {
834
+ return Joi.object({
835
+ items: Joi.array().items(UserPlatformModel.UserAttribute()),
836
+ page: UserPlatformModel.PaginationSchema(),
837
+ });
838
+ }
839
+
542
840
  /** @returns {UserAttributeDefinition} */
543
841
  static UserAttributeDefinition() {
544
842
  return Joi.object({
@@ -548,7 +846,11 @@ class UserPlatformModel {
548
846
  description: Joi.string().allow(""),
549
847
  application_id: Joi.string().allow(""),
550
848
  type: Joi.string().allow(""),
551
- multi_value: Joi.boolean(),
849
+ icon: Joi.string().allow(""),
850
+ ordering_channels: Joi.array().items(Joi.string().allow("")),
851
+ masking: UserPlatformModel.AttributeMaskingProperties(),
852
+ registration: UserPlatformModel.AttributeRegistrationProperties(),
853
+ is_multi_value: Joi.boolean(),
552
854
  customer_editable: Joi.boolean(),
553
855
  encrypted: Joi.boolean(),
554
856
  pinned: Joi.boolean(),
@@ -558,11 +860,12 @@ class UserPlatformModel {
558
860
  created_at: Joi.string().allow(""),
559
861
  modified_at: Joi.string().allow(""),
560
862
  __v: Joi.number(),
863
+ options: Joi.array().items(Joi.string().allow("")),
561
864
  });
562
865
  }
563
866
 
564
- /** @returns {UserAttributeDefinitionResponse} */
565
- static UserAttributeDefinitionResponse() {
867
+ /** @returns {UserAttributeDefinitionDetails} */
868
+ static UserAttributeDefinitionDetails() {
566
869
  return Joi.object({
567
870
  _id: Joi.string().allow(""),
568
871
  name: Joi.string().allow(""),
@@ -570,7 +873,11 @@ class UserPlatformModel {
570
873
  description: Joi.string().allow(""),
571
874
  application_id: Joi.string().allow(""),
572
875
  type: Joi.string().allow(""),
573
- multi_value: Joi.boolean(),
876
+ icon: Joi.string().allow(""),
877
+ ordering_channels: Joi.array().items(Joi.string().allow("")),
878
+ masking: UserPlatformModel.AttributeMaskingProperties(),
879
+ registration: UserPlatformModel.AttributeRegistrationProperties(),
880
+ is_multi_value: Joi.boolean(),
574
881
  customer_editable: Joi.boolean(),
575
882
  encrypted: Joi.boolean(),
576
883
  pinned: Joi.boolean(),
@@ -586,6 +893,22 @@ class UserPlatformModel {
586
893
  });
587
894
  }
588
895
 
896
+ /** @returns {AttributeMaskingProperties} */
897
+ static AttributeMaskingProperties() {
898
+ return Joi.object({
899
+ enabled: Joi.boolean(),
900
+ type: Joi.string().allow(""),
901
+ });
902
+ }
903
+
904
+ /** @returns {AttributeRegistrationProperties} */
905
+ static AttributeRegistrationProperties() {
906
+ return Joi.object({
907
+ enabled: Joi.boolean(),
908
+ type: Joi.string().allow(""),
909
+ });
910
+ }
911
+
589
912
  /** @returns {UserAttributeDefinitionValidation} */
590
913
  static UserAttributeDefinitionValidation() {
591
914
  return Joi.object({
@@ -594,25 +917,53 @@ class UserPlatformModel {
594
917
  });
595
918
  }
596
919
 
597
- /** @returns {UserAttributeResponse} */
598
- static UserAttributeResponse() {
920
+ /** @returns {BulkUserAttribute} */
921
+ static BulkUserAttribute() {
922
+ return Joi.object({
923
+ success: Joi.boolean(),
924
+ attributes: Joi.array().items(UserPlatformModel.UserAttribute()),
925
+ });
926
+ }
927
+
928
+ /** @returns {UserAttribute} */
929
+ static UserAttribute() {
599
930
  return Joi.object({
600
931
  _id: Joi.string().allow(""),
601
932
  name: Joi.string().allow(""),
602
933
  user_id: Joi.string().allow(""),
603
934
  application_id: Joi.string().allow(""),
935
+ user_attribute_definition_id: Joi.string().allow(""),
936
+ created_at: Joi.string().allow(""),
937
+ updated_at: Joi.string().allow(""),
604
938
  type: Joi.string().allow(""),
605
- customer_overriden: Joi.boolean(),
606
- attribute: Joi.any(),
939
+ customer_overridden: Joi.boolean(),
940
+ attribute: Joi.object().pattern(/\S/, Joi.any()),
607
941
  updated_by: Joi.string().allow(""),
608
942
  });
609
943
  }
610
944
 
611
- /** @returns {CreateUserAttributeRequest} */
612
- static CreateUserAttributeRequest() {
945
+ /** @returns {CreateBulkUserAttribute} */
946
+ static CreateBulkUserAttribute() {
947
+ return Joi.object({
948
+ attributes: Joi.array()
949
+ .items(UserPlatformModel.BulkUserAttributeRequestBody())
950
+ .required(),
951
+ });
952
+ }
953
+
954
+ /** @returns {BulkUserAttributeRequestBody} */
955
+ static BulkUserAttributeRequestBody() {
956
+ return Joi.object({
957
+ definition_id: Joi.string().allow("").required(),
958
+ value: Joi.any().required(),
959
+ });
960
+ }
961
+
962
+ /** @returns {CreateUserAttribute} */
963
+ static CreateUserAttribute() {
613
964
  return Joi.object({
614
- customer_overriden: Joi.boolean(),
615
- attribute: Joi.any(),
965
+ customer_overridden: Joi.boolean(),
966
+ attribute: Joi.object().pattern(/\S/, Joi.any()),
616
967
  });
617
968
  }
618
969
 
@@ -623,7 +974,11 @@ class UserPlatformModel {
623
974
  slug: Joi.string().allow(""),
624
975
  description: Joi.string().allow(""),
625
976
  type: Joi.string().allow(""),
626
- multi_value: Joi.boolean(),
977
+ icon: Joi.string().allow(""),
978
+ ordering_channels: Joi.array().items(Joi.string().allow("")),
979
+ masking: UserPlatformModel.AttributeMaskingProperties(),
980
+ registration: UserPlatformModel.AttributeRegistrationProperties(),
981
+ is_multi_value: Joi.boolean(),
627
982
  customer_editable: Joi.boolean(),
628
983
  encrypted: Joi.boolean(),
629
984
  pinned: Joi.boolean(),
@@ -633,6 +988,73 @@ class UserPlatformModel {
633
988
  });
634
989
  }
635
990
 
991
+ /** @returns {CreateStoreFrontUsersPayload} */
992
+ static CreateStoreFrontUsersPayload() {
993
+ return Joi.object({
994
+ absolute_url: Joi.string().allow("").required(),
995
+ file_format: Joi.string().allow("").required(),
996
+ relative_url: Joi.string().allow("").required(),
997
+ });
998
+ }
999
+
1000
+ /** @returns {BulkUserExportSchema} */
1001
+ static BulkUserExportSchema() {
1002
+ return Joi.object({
1003
+ file_format: Joi.string().allow("").required(),
1004
+ });
1005
+ }
1006
+
1007
+ /** @returns {BulkActionModel} */
1008
+ static BulkActionModel() {
1009
+ return Joi.object({
1010
+ _id: Joi.string().allow("").required(),
1011
+ file_name: Joi.string().allow("").required(),
1012
+ file_format: Joi.string().allow("").required(),
1013
+ action_type: Joi.string().allow("").required(),
1014
+ created_by: UserPlatformModel.CreatedBySchema().required(),
1015
+ count: UserPlatformModel.BulkActionCountSchema(),
1016
+ status: Joi.string().allow(""),
1017
+ links: UserPlatformModel.BulkActionLinkSchema(),
1018
+ application_id: Joi.string().allow("").required(),
1019
+ company_id: Joi.string().allow("").required(),
1020
+ created_at: Joi.string().allow(""),
1021
+ updated_at: Joi.string().allow(""),
1022
+ });
1023
+ }
1024
+
1025
+ /** @returns {CreatedBySchema} */
1026
+ static CreatedBySchema() {
1027
+ return Joi.object({
1028
+ name: Joi.string().allow("").required(),
1029
+ user_id: Joi.string().allow("").required(),
1030
+ });
1031
+ }
1032
+
1033
+ /** @returns {BulkActionLinkSchema} */
1034
+ static BulkActionLinkSchema() {
1035
+ return Joi.object({
1036
+ file: UserPlatformModel.FileLinks(),
1037
+ error: UserPlatformModel.FileLinks(),
1038
+ });
1039
+ }
1040
+
1041
+ /** @returns {FileLinks} */
1042
+ static FileLinks() {
1043
+ return Joi.object({
1044
+ absolute_url: Joi.string().allow(""),
1045
+ relative_url: Joi.string().allow(""),
1046
+ });
1047
+ }
1048
+
1049
+ /** @returns {BulkActionCountSchema} */
1050
+ static BulkActionCountSchema() {
1051
+ return Joi.object({
1052
+ total: Joi.number(),
1053
+ success: Joi.number(),
1054
+ error: Joi.number(),
1055
+ });
1056
+ }
1057
+
636
1058
  /** @returns {BlockUserRequestSchema} */
637
1059
  static BlockUserRequestSchema() {
638
1060
  return Joi.object({
@@ -694,10 +1116,19 @@ class UserPlatformModel {
694
1116
  });
695
1117
  }
696
1118
 
1119
+ /** @returns {BulkActionPaginationSchema} */
1120
+ static BulkActionPaginationSchema() {
1121
+ return Joi.object({
1122
+ items: Joi.array().items(UserPlatformModel.BulkActionModel()),
1123
+ page: UserPlatformModel.PaginationSchema(),
1124
+ });
1125
+ }
1126
+
697
1127
  /** @returns {PaginationSchema} */
698
1128
  static PaginationSchema() {
699
1129
  return Joi.object({
700
1130
  size: Joi.number(),
1131
+ total: Joi.number(),
701
1132
  item_total: Joi.number(),
702
1133
  has_next: Joi.boolean(),
703
1134
  type: Joi.string().allow(""),
@@ -736,7 +1167,7 @@ class UserPlatformModel {
736
1167
  info: Joi.string().allow(""),
737
1168
  request_id: Joi.string().allow(""),
738
1169
  error: Joi.string().allow(""),
739
- meta: Joi.any(),
1170
+ meta: Joi.object().pattern(/\S/, Joi.any()),
740
1171
  authenticated: Joi.boolean(),
741
1172
  });
742
1173
  }
@@ -804,7 +1235,81 @@ class UserPlatformModel {
804
1235
  return Joi.object({
805
1236
  user_attribute_definition_id: Joi.string().allow(""),
806
1237
  type: Joi.string().allow(""),
807
- value: Joi.string().allow(""),
1238
+ value: Joi.object().pattern(/\S/, Joi.any()),
1239
+ ignore_year: Joi.boolean(),
1240
+ });
1241
+ }
1242
+
1243
+ /** @returns {DeleteBulkUserAttribute} */
1244
+ static DeleteBulkUserAttribute() {
1245
+ return Joi.object({
1246
+ definition_ids: Joi.array().items(Joi.string().allow("")),
1247
+ });
1248
+ }
1249
+
1250
+ /** @returns {UserAttributeFilter} */
1251
+ static UserAttributeFilter() {
1252
+ return Joi.object({
1253
+ query: UserPlatformModel.UserAttributeFilterQuery(),
1254
+ });
1255
+ }
1256
+
1257
+ /** @returns {UserAttributeFilterQuery} */
1258
+ static UserAttributeFilterQuery() {
1259
+ return Joi.object({
1260
+ type: Joi.string().allow("").required(),
1261
+ limit: Joi.number().required(),
1262
+ page: Joi.number().required(),
1263
+ email: Joi.string().allow(""),
1264
+ has_email: Joi.boolean(),
1265
+ has_phone: Joi.boolean(),
1266
+ phone: Joi.string().allow(""),
1267
+ definition_ids: Joi.array().items(Joi.string().allow("")),
1268
+ conditions: Joi.array()
1269
+ .items(UserPlatformModel.UserAttributeFilterRequestConditions())
1270
+ .required(),
1271
+ });
1272
+ }
1273
+
1274
+ /** @returns {UserAttributeFilterRequestConditions} */
1275
+ static UserAttributeFilterRequestConditions() {
1276
+ return Joi.object({
1277
+ definition_id: Joi.string().allow("").required(),
1278
+ type: Joi.string().allow("").required(),
1279
+ value: Joi.object().pattern(/\S/, Joi.any()).required(),
1280
+ });
1281
+ }
1282
+
1283
+ /** @returns {UserAttributeFiltered} */
1284
+ static UserAttributeFiltered() {
1285
+ return Joi.object({
1286
+ items: Joi.array().items(UserPlatformModel.UserAttributeFilteredList()),
1287
+ page: UserPlatformModel.PaginationSchema(),
1288
+ });
1289
+ }
1290
+
1291
+ /** @returns {UserAttributeFilteredList} */
1292
+ static UserAttributeFilteredList() {
1293
+ return Joi.object({
1294
+ _id: Joi.string().allow(""),
1295
+ username: Joi.string().allow(""),
1296
+ phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
1297
+ emails: Joi.array().items(UserPlatformModel.UserEmails()),
1298
+ gender: Joi.string().allow(""),
1299
+ active: Joi.boolean(),
1300
+ archive: Joi.boolean(),
1301
+ status: Joi.string().allow(""),
1302
+ attributes: Joi.array().items(UserPlatformModel.UserAttribute()),
1303
+ first_name: Joi.string().allow(""),
1304
+ last_name: Joi.string().allow(""),
1305
+ account_type: Joi.string().allow(""),
1306
+ profile_pic_url: Joi.string().allow(""),
1307
+ has_old_password_hash: Joi.boolean(),
1308
+ user_id: Joi.string().allow(""),
1309
+ application_id: Joi.string().allow(""),
1310
+ is_encrypted: Joi.boolean(),
1311
+ created_at: Joi.string().allow(""),
1312
+ updated_at: Joi.string().allow(""),
808
1313
  });
809
1314
  }
810
1315
 
@@ -822,15 +1327,16 @@ class UserPlatformModel {
822
1327
  /** @returns {CreateUserRequestSchema} */
823
1328
  static CreateUserRequestSchema() {
824
1329
  return Joi.object({
825
- phone_number: Joi.string().allow("").required(),
1330
+ phone_number: Joi.string().allow(""),
826
1331
  email: Joi.string().allow(""),
827
1332
  first_name: Joi.string().allow(""),
828
1333
  last_name: Joi.string().allow(""),
829
1334
  gender: Joi.string().allow(""),
830
- username: Joi.string().allow("").required(),
831
- meta: Joi.any(),
1335
+ username: Joi.string().allow(""),
1336
+ meta: Joi.object().pattern(/\S/, Joi.any()),
832
1337
  external_id: Joi.string().allow(""),
833
1338
  rr_id: Joi.string().allow(""),
1339
+ dob: Joi.string().allow(""),
834
1340
  });
835
1341
  }
836
1342
 
@@ -990,6 +1496,7 @@ class UserPlatformModel {
990
1496
  facebook: UserPlatformModel.Facebook(),
991
1497
  account_kit: UserPlatformModel.Accountkit(),
992
1498
  google: UserPlatformModel.Google(),
1499
+ apple: UserPlatformModel.Apple(),
993
1500
  });
994
1501
  }
995
1502
 
@@ -1009,6 +1516,25 @@ class UserPlatformModel {
1009
1516
  });
1010
1517
  }
1011
1518
 
1519
+ /** @returns {GetUserTimeline} */
1520
+ static GetUserTimeline() {
1521
+ return Joi.object({
1522
+ delete_on: Joi.string().allow(""),
1523
+ timeline: Joi.array().items(UserPlatformModel.UserTimeline()),
1524
+ });
1525
+ }
1526
+
1527
+ /** @returns {UserTimeline} */
1528
+ static UserTimeline() {
1529
+ return Joi.object({
1530
+ date: Joi.string().allow(""),
1531
+ title: Joi.string().allow(""),
1532
+ type: Joi.string().allow(""),
1533
+ visible: Joi.boolean(),
1534
+ sub_title: Joi.string().allow("").allow(null),
1535
+ });
1536
+ }
1537
+
1012
1538
  /** @returns {Facebook} */
1013
1539
  static Facebook() {
1014
1540
  return Joi.object({
@@ -1033,6 +1559,14 @@ class UserPlatformModel {
1033
1559
  });
1034
1560
  }
1035
1561
 
1562
+ /** @returns {Apple} */
1563
+ static Apple() {
1564
+ return Joi.object({
1565
+ app_id: Joi.string().allow(""),
1566
+ redirect_uri: Joi.string().allow(""),
1567
+ });
1568
+ }
1569
+
1036
1570
  /** @returns {SessionExpiry} */
1037
1571
  static SessionExpiry() {
1038
1572
  return Joi.object({
@@ -1079,10 +1613,11 @@ class UserPlatformModel {
1079
1613
  return Joi.object({
1080
1614
  first_name: Joi.string().allow(""),
1081
1615
  last_name: Joi.string().allow(""),
1616
+ dob: Joi.string().allow(""),
1082
1617
  gender: Joi.string().allow(""),
1083
1618
  external_id: Joi.string().allow(""),
1084
1619
  rr_id: Joi.string().allow(""),
1085
- meta: Joi.any(),
1620
+ meta: Joi.object().pattern(/\S/, Joi.any()),
1086
1621
  phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
1087
1622
  emails: Joi.array().items(UserPlatformModel.UserEmails()),
1088
1623
  });
@@ -1115,7 +1650,7 @@ class UserPlatformModel {
1115
1650
  application_id: Joi.string().allow(""),
1116
1651
  user_id: Joi.string().allow(""),
1117
1652
  first_name: Joi.string().allow(""),
1118
- meta: Joi.any(),
1653
+ meta: Joi.object().pattern(/\S/, Joi.any()),
1119
1654
  last_name: Joi.string().allow(""),
1120
1655
  phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
1121
1656
  emails: Joi.array().items(UserPlatformModel.Email()),
@@ -1130,6 +1665,7 @@ class UserPlatformModel {
1130
1665
  updated_at: Joi.string().allow(""),
1131
1666
  external_id: Joi.string().allow(""),
1132
1667
  rr_id: Joi.string().allow(""),
1668
+ consent: UserPlatformModel.UserConsent(),
1133
1669
  });
1134
1670
  }
1135
1671
 
@@ -1139,7 +1675,7 @@ class UserPlatformModel {
1139
1675
  application_id: Joi.string().allow(""),
1140
1676
  user_id: Joi.string().allow(""),
1141
1677
  first_name: Joi.string().allow(""),
1142
- meta: Joi.any(),
1678
+ meta: Joi.object().pattern(/\S/, Joi.any()),
1143
1679
  last_name: Joi.string().allow(""),
1144
1680
  phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
1145
1681
  emails: Joi.array().items(UserPlatformModel.Email()),
@@ -1156,6 +1692,8 @@ class UserPlatformModel {
1156
1692
  rr_id: Joi.string().allow(""),
1157
1693
  archive: Joi.boolean(),
1158
1694
  status: Joi.string().allow(""),
1695
+ deleted_on: Joi.string().allow(""),
1696
+ consent: UserPlatformModel.UserConsent(),
1159
1697
  });
1160
1698
  }
1161
1699
 
@@ -1179,5 +1717,28 @@ class UserPlatformModel {
1179
1717
  verified: Joi.boolean(),
1180
1718
  });
1181
1719
  }
1720
+
1721
+ /** @returns {UserConsent} */
1722
+ static UserConsent() {
1723
+ return Joi.object({
1724
+ privacy_policy: UserPlatformModel.PrivacyPolicyConsentSchema(),
1725
+ });
1726
+ }
1727
+
1728
+ /** @returns {DeleteUserGroupSuccess} */
1729
+ static DeleteUserGroupSuccess() {
1730
+ return Joi.object({
1731
+ id: Joi.string().allow("").required(),
1732
+ success: Joi.boolean().required(),
1733
+ });
1734
+ }
1735
+
1736
+ /** @returns {PrivacyPolicyConsentSchema} */
1737
+ static PrivacyPolicyConsentSchema() {
1738
+ return Joi.object({
1739
+ value: Joi.boolean(),
1740
+ updated_at: Joi.string().allow(""),
1741
+ });
1742
+ }
1182
1743
  }
1183
1744
  module.exports = UserPlatformModel;