@gofynd/fdk-client-javascript 1.4.2-beta.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.
- package/README.md +1 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
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
|
|
20
|
-
* @property {
|
|
33
|
+
* @typedef UnDeleteUserSuccess
|
|
34
|
+
* @property {boolean} [success]
|
|
21
35
|
*/
|
|
22
36
|
|
|
23
37
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {
|
|
26
|
-
* @property {boolean} [status]
|
|
27
|
-
* @property {string[]} [user_id]
|
|
38
|
+
* @typedef UserSearchResponseSchema
|
|
39
|
+
* @property {UserSchema[]} [users]
|
|
28
40
|
*/
|
|
29
41
|
|
|
30
42
|
/**
|
|
31
|
-
* @typedef
|
|
32
|
-
* @property {
|
|
43
|
+
* @typedef CustomerListResponseSchema
|
|
44
|
+
* @property {UserSchema[]} [items]
|
|
45
|
+
* @property {PaginationSchema} [page]
|
|
33
46
|
*/
|
|
34
47
|
|
|
35
48
|
/**
|
|
36
|
-
* @typedef
|
|
37
|
-
* @property {
|
|
49
|
+
* @typedef PaginationSchema
|
|
50
|
+
* @property {number} [size]
|
|
51
|
+
* @property {number} [item_total]
|
|
52
|
+
* @property {boolean} [has_next]
|
|
38
53
|
* @property {string} [type]
|
|
39
|
-
* @property {
|
|
40
|
-
* @property {string} [value]
|
|
54
|
+
* @property {number} [current]
|
|
41
55
|
*/
|
|
42
56
|
|
|
43
57
|
/**
|
|
44
|
-
* @typedef
|
|
45
|
-
* @property {
|
|
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
|
|
52
|
-
* @property {
|
|
53
|
-
* @property {string} [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* @
|
|
58
|
-
* @property {
|
|
59
|
-
* @property {
|
|
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
|
|
67
|
-
* @property {
|
|
68
|
-
* @property {boolean} [customer_overriden]
|
|
75
|
+
* @typedef AuthenticationApiErrorSchema
|
|
76
|
+
* @property {string} [message]
|
|
69
77
|
*/
|
|
70
78
|
|
|
71
79
|
/**
|
|
72
|
-
* @typedef
|
|
73
|
-
* @property {
|
|
74
|
-
* @property {string}
|
|
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}
|
|
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 {
|
|
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
|
|
115
|
-
* @property {
|
|
116
|
-
* @property {
|
|
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 {
|
|
135
|
-
* @property {
|
|
136
|
-
* @property {boolean} [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* @
|
|
141
|
-
* @property {
|
|
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
|
|
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
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {boolean} [
|
|
177
|
-
* @property {
|
|
178
|
-
* @property {
|
|
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
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
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
|
|
267
|
-
* @property {
|
|
268
|
-
* @property {
|
|
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
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {
|
|
246
|
+
* @typedef SocialTokens
|
|
247
|
+
* @property {Facebook} [facebook]
|
|
248
|
+
* @property {Accountkit} [account_kit]
|
|
249
|
+
* @property {Google} [google]
|
|
275
250
|
*/
|
|
276
251
|
|
|
277
252
|
/**
|
|
278
|
-
* @typedef
|
|
279
|
-
* @property {
|
|
280
|
-
* @property {
|
|
281
|
-
* @property {
|
|
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
|
|
286
|
-
* @property {string} [
|
|
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
|
|
300
|
-
* @property {string
|
|
301
|
-
* @property {string} [user_id]
|
|
265
|
+
* @typedef Facebook
|
|
266
|
+
* @property {string} [app_id]
|
|
302
267
|
*/
|
|
303
268
|
|
|
304
269
|
/**
|
|
305
|
-
* @typedef
|
|
306
|
-
* @property {
|
|
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
|
|
314
|
-
* @property {
|
|
315
|
-
* @property {Facebook} [facebook]
|
|
316
|
-
* @property {Google} [google]
|
|
275
|
+
* @typedef Google
|
|
276
|
+
* @property {string} [app_id]
|
|
317
277
|
*/
|
|
318
278
|
|
|
319
279
|
/**
|
|
320
|
-
* @typedef
|
|
321
|
-
* @property {
|
|
280
|
+
* @typedef SessionExpiry
|
|
281
|
+
* @property {number} [duration]
|
|
282
|
+
* @property {string} [type]
|
|
283
|
+
* @property {boolean} [is_rolling]
|
|
322
284
|
*/
|
|
323
285
|
|
|
324
286
|
/**
|
|
325
|
-
* @typedef
|
|
326
|
-
* @property {string} [
|
|
327
|
-
* @property {string} [
|
|
328
|
-
* @property {string} [
|
|
287
|
+
* @typedef UpdateUserGroupSchema
|
|
288
|
+
* @property {string} [name]
|
|
289
|
+
* @property {string} [description]
|
|
290
|
+
* @property {string} [file_url]
|
|
329
291
|
*/
|
|
330
292
|
|
|
331
293
|
/**
|
|
332
|
-
* @typedef
|
|
333
|
-
* @property {
|
|
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
|
|
338
|
-
* @property {
|
|
339
|
-
* @property {string} [
|
|
340
|
-
* @property {string} [
|
|
341
|
-
* @property {string}
|
|
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} [
|
|
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
|
|
494
|
-
* @property {
|
|
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 {
|
|
499
|
-
static
|
|
383
|
+
/** @returns {BlockUserRequestSchema} */
|
|
384
|
+
static BlockUserRequestSchema() {
|
|
500
385
|
return Joi.object({
|
|
501
|
-
|
|
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 {
|
|
513
|
-
static
|
|
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
|
-
|
|
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 {
|
|
543
|
-
static
|
|
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
|
-
|
|
418
|
+
success: Joi.boolean(),
|
|
615
419
|
});
|
|
616
420
|
}
|
|
617
421
|
|
|
618
|
-
/** @returns {
|
|
619
|
-
static
|
|
422
|
+
/** @returns {UnDeleteUserSuccess} */
|
|
423
|
+
static UnDeleteUserSuccess() {
|
|
620
424
|
return Joi.object({
|
|
621
|
-
|
|
622
|
-
max_age: Joi.number(),
|
|
623
|
-
user_id: Joi.string().allow(""),
|
|
425
|
+
success: Joi.boolean(),
|
|
624
426
|
});
|
|
625
427
|
}
|
|
626
428
|
|
|
627
|
-
/** @returns {
|
|
628
|
-
static
|
|
429
|
+
/** @returns {UserSearchResponseSchema} */
|
|
430
|
+
static UserSearchResponseSchema() {
|
|
629
431
|
return Joi.object({
|
|
630
|
-
|
|
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 {
|
|
647
|
-
static
|
|
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
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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 {
|
|
663
|
-
static
|
|
455
|
+
/** @returns {SessionListResponseSchema} */
|
|
456
|
+
static SessionListResponseSchema() {
|
|
664
457
|
return Joi.object({
|
|
665
|
-
|
|
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 {
|
|
673
|
-
static
|
|
462
|
+
/** @returns {SessionDeleteResponseSchema} */
|
|
463
|
+
static SessionDeleteResponseSchema() {
|
|
674
464
|
return Joi.object({
|
|
675
|
-
|
|
465
|
+
user_id: Joi.string().allow(""),
|
|
466
|
+
session_id: Joi.string().allow(""),
|
|
676
467
|
});
|
|
677
468
|
}
|
|
678
469
|
|
|
679
|
-
/** @returns {
|
|
680
|
-
static
|
|
470
|
+
/** @returns {SessionsDeleteResponseSchema} */
|
|
471
|
+
static SessionsDeleteResponseSchema() {
|
|
681
472
|
return Joi.object({
|
|
682
|
-
|
|
683
|
-
|
|
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 {
|
|
689
|
-
static
|
|
478
|
+
/** @returns {AuthenticationApiErrorSchema} */
|
|
479
|
+
static AuthenticationApiErrorSchema() {
|
|
690
480
|
return Joi.object({
|
|
691
|
-
|
|
481
|
+
message: Joi.string().allow(""),
|
|
692
482
|
});
|
|
693
483
|
}
|
|
694
484
|
|
|
695
|
-
/** @returns {
|
|
696
|
-
static
|
|
485
|
+
/** @returns {SessionListResponseInfo} */
|
|
486
|
+
static SessionListResponseInfo() {
|
|
697
487
|
return Joi.object({
|
|
698
|
-
|
|
699
|
-
|
|
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 {
|
|
704
|
-
static
|
|
496
|
+
/** @returns {UserGroupResponseSchema} */
|
|
497
|
+
static UserGroupResponseSchema() {
|
|
705
498
|
return Joi.object({
|
|
706
|
-
|
|
707
|
-
|
|
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 {
|
|
712
|
-
static
|
|
512
|
+
/** @returns {UserGroupListResponseSchema} */
|
|
513
|
+
static UserGroupListResponseSchema() {
|
|
713
514
|
return Joi.object({
|
|
714
|
-
|
|
515
|
+
items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
|
|
516
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
715
517
|
});
|
|
716
518
|
}
|
|
717
519
|
|
|
718
|
-
/** @returns {
|
|
719
|
-
static
|
|
520
|
+
/** @returns {CreateUserGroupSchema} */
|
|
521
|
+
static CreateUserGroupSchema() {
|
|
720
522
|
return Joi.object({
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
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 {
|
|
730
|
-
static
|
|
529
|
+
/** @returns {CreateUserRequestSchema} */
|
|
530
|
+
static CreateUserRequestSchema() {
|
|
731
531
|
return Joi.object({
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
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 {
|
|
741
|
-
static
|
|
543
|
+
/** @returns {CreateUserResponseSchema} */
|
|
544
|
+
static CreateUserResponseSchema() {
|
|
742
545
|
return Joi.object({
|
|
743
|
-
|
|
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 {
|
|
752
|
-
static
|
|
550
|
+
/** @returns {CreateUserSessionRequestSchema} */
|
|
551
|
+
static CreateUserSessionRequestSchema() {
|
|
753
552
|
return Joi.object({
|
|
754
|
-
|
|
755
|
-
|
|
553
|
+
domain: Joi.string().allow(""),
|
|
554
|
+
max_age: Joi.number(),
|
|
555
|
+
user_id: Joi.string().allow(""),
|
|
756
556
|
});
|
|
757
557
|
}
|
|
758
558
|
|
|
759
|
-
/** @returns {
|
|
760
|
-
static
|
|
559
|
+
/** @returns {CreateUserSessionResponseSchema} */
|
|
560
|
+
static CreateUserSessionResponseSchema() {
|
|
761
561
|
return Joi.object({
|
|
762
|
-
|
|
763
|
-
|
|
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
|
-
|
|
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
|
-
|
|
784
|
-
meta: UserPlatformModel.MetaSchema(),
|
|
785
|
-
mobile_image: Joi.string().allow(""),
|
|
579
|
+
skip_captcha: Joi.boolean(),
|
|
786
580
|
name: Joi.string().allow(""),
|
|
787
|
-
|
|
788
|
-
|
|
581
|
+
meta: UserPlatformModel.MetaSchema(),
|
|
582
|
+
_id: Joi.string().allow(""),
|
|
583
|
+
social: UserPlatformModel.Social(),
|
|
789
584
|
required_fields: UserPlatformModel.RequiredFields(),
|
|
790
|
-
|
|
791
|
-
skip_captcha: Joi.boolean(),
|
|
585
|
+
register_required_fields: UserPlatformModel.RegisterRequiredFields(),
|
|
792
586
|
skip_login: Joi.boolean(),
|
|
793
|
-
|
|
794
|
-
social_tokens: UserPlatformModel.SocialTokens(),
|
|
587
|
+
flash_card: UserPlatformModel.FlashCard(),
|
|
795
588
|
subtext: Joi.string().allow(""),
|
|
796
|
-
|
|
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 {
|
|
801
|
-
static
|
|
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
|
-
|
|
804
|
-
|
|
614
|
+
password: Joi.boolean(),
|
|
615
|
+
otp: Joi.boolean(),
|
|
805
616
|
});
|
|
806
617
|
}
|
|
807
618
|
|
|
808
|
-
/** @returns {
|
|
809
|
-
static
|
|
619
|
+
/** @returns {MetaSchema} */
|
|
620
|
+
static MetaSchema() {
|
|
810
621
|
return Joi.object({
|
|
811
|
-
|
|
812
|
-
level: Joi.string().allow(""),
|
|
622
|
+
fynd_default: Joi.boolean(),
|
|
813
623
|
});
|
|
814
624
|
}
|
|
815
625
|
|
|
816
|
-
/** @returns {
|
|
817
|
-
static
|
|
626
|
+
/** @returns {Social} */
|
|
627
|
+
static Social() {
|
|
818
628
|
return Joi.object({
|
|
819
|
-
|
|
820
|
-
|
|
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 {
|
|
833
|
-
static
|
|
644
|
+
/** @returns {PlatformEmail} */
|
|
645
|
+
static PlatformEmail() {
|
|
834
646
|
return Joi.object({
|
|
835
|
-
|
|
836
|
-
|
|
647
|
+
is_required: Joi.boolean(),
|
|
648
|
+
level: Joi.string().allow(""),
|
|
837
649
|
});
|
|
838
650
|
}
|
|
839
651
|
|
|
840
|
-
/** @returns {
|
|
841
|
-
static
|
|
652
|
+
/** @returns {PlatformMobile} */
|
|
653
|
+
static PlatformMobile() {
|
|
842
654
|
return Joi.object({
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
type: Joi.string().allow(""),
|
|
655
|
+
is_required: Joi.boolean(),
|
|
656
|
+
level: Joi.string().allow(""),
|
|
846
657
|
});
|
|
847
658
|
}
|
|
848
659
|
|
|
849
|
-
/** @returns {
|
|
850
|
-
static
|
|
660
|
+
/** @returns {RegisterRequiredFields} */
|
|
661
|
+
static RegisterRequiredFields() {
|
|
851
662
|
return Joi.object({
|
|
852
|
-
|
|
853
|
-
|
|
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 {
|
|
861
|
-
static
|
|
668
|
+
/** @returns {RegisterRequiredFieldsEmail} */
|
|
669
|
+
static RegisterRequiredFieldsEmail() {
|
|
862
670
|
return Joi.object({
|
|
863
|
-
|
|
671
|
+
is_required: Joi.boolean(),
|
|
672
|
+
level: Joi.string().allow(""),
|
|
864
673
|
});
|
|
865
674
|
}
|
|
866
675
|
|
|
867
|
-
/** @returns {
|
|
868
|
-
static
|
|
676
|
+
/** @returns {RegisterRequiredFieldsMobile} */
|
|
677
|
+
static RegisterRequiredFieldsMobile() {
|
|
869
678
|
return Joi.object({
|
|
870
|
-
|
|
871
|
-
|
|
679
|
+
is_required: Joi.boolean(),
|
|
680
|
+
level: Joi.string().allow(""),
|
|
872
681
|
});
|
|
873
682
|
}
|
|
874
683
|
|
|
875
|
-
/** @returns {
|
|
876
|
-
static
|
|
684
|
+
/** @returns {FlashCard} */
|
|
685
|
+
static FlashCard() {
|
|
877
686
|
return Joi.object({
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
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 {
|
|
895
|
-
static
|
|
702
|
+
/** @returns {DeleteAccountReasons} */
|
|
703
|
+
static DeleteAccountReasons() {
|
|
896
704
|
return Joi.object({
|
|
897
|
-
|
|
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 {
|
|
902
|
-
static
|
|
711
|
+
/** @returns {DeleteAccountConsent} */
|
|
712
|
+
static DeleteAccountConsent() {
|
|
903
713
|
return Joi.object({
|
|
904
|
-
|
|
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 {
|
|
911
|
-
static
|
|
718
|
+
/** @returns {Facebook} */
|
|
719
|
+
static Facebook() {
|
|
912
720
|
return Joi.object({
|
|
913
|
-
|
|
721
|
+
app_id: Joi.string().allow(""),
|
|
914
722
|
});
|
|
915
723
|
}
|
|
916
724
|
|
|
917
|
-
/** @returns {
|
|
918
|
-
static
|
|
725
|
+
/** @returns {Accountkit} */
|
|
726
|
+
static Accountkit() {
|
|
919
727
|
return Joi.object({
|
|
920
|
-
|
|
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 {
|
|
929
|
-
static
|
|
732
|
+
/** @returns {Google} */
|
|
733
|
+
static Google() {
|
|
930
734
|
return Joi.object({
|
|
931
|
-
|
|
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 {
|
|
942
|
-
static
|
|
739
|
+
/** @returns {SessionExpiry} */
|
|
740
|
+
static SessionExpiry() {
|
|
943
741
|
return Joi.object({
|
|
944
|
-
|
|
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
|
-
|
|
744
|
+
is_rolling: Joi.boolean(),
|
|
960
745
|
});
|
|
961
746
|
}
|
|
962
747
|
|
|
963
|
-
/** @returns {
|
|
964
|
-
static
|
|
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
|
-
|
|
978
|
-
|
|
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 {
|
|
989
|
-
static
|
|
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
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
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 {
|
|
1011
|
-
static
|
|
768
|
+
/** @returns {UserGroupUpdateData} */
|
|
769
|
+
static UserGroupUpdateData() {
|
|
1012
770
|
return Joi.object({
|
|
1013
|
-
|
|
771
|
+
user_id: Joi.string().allow(""),
|
|
772
|
+
phone_number: Joi.string().allow(""),
|
|
1014
773
|
email: Joi.string().allow(""),
|
|
1015
|
-
|
|
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 {
|
|
1029
|
-
static
|
|
778
|
+
/** @returns {UpdateUserRequestSchema} */
|
|
779
|
+
static UpdateUserRequestSchema() {
|
|
1030
780
|
return Joi.object({
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
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 {
|
|
1049
|
-
static
|
|
791
|
+
/** @returns {UserEmails} */
|
|
792
|
+
static UserEmails() {
|
|
1050
793
|
return Joi.object({
|
|
1051
|
-
|
|
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
|
-
|
|
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 {
|
|
1101
|
-
static
|
|
835
|
+
/** @returns {PhoneNumber} */
|
|
836
|
+
static PhoneNumber() {
|
|
1102
837
|
return Joi.object({
|
|
1103
|
-
|
|
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
|
}
|