@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -1,60 +1,382 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @typedef Accountkit
|
|
5
|
+
* @property {string} [app_id]
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef ArchiveUserRequestSchema
|
|
10
|
+
* @property {string} [user_id]
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef ArchiveUserSuccess
|
|
15
|
+
* @property {boolean} [success]
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef AuthenticationApiErrorSchema
|
|
20
|
+
* @property {string} [message]
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef BlockUserRequestSchema
|
|
25
|
+
* @property {string} [reason]
|
|
26
|
+
* @property {boolean} [status]
|
|
27
|
+
* @property {string[]} [user_id]
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef BlockUserSuccess
|
|
32
|
+
* @property {boolean} [success]
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef CreateUserGroupSchema
|
|
37
|
+
* @property {string} description
|
|
38
|
+
* @property {string} file_url
|
|
39
|
+
* @property {string} name
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @typedef CreateUserRequestSchema
|
|
44
|
+
* @property {string} [email]
|
|
45
|
+
* @property {string} [first_name]
|
|
46
|
+
* @property {string} [gender]
|
|
47
|
+
* @property {string} [last_name]
|
|
48
|
+
* @property {Object} [meta]
|
|
49
|
+
* @property {string} phone_number
|
|
50
|
+
* @property {string} username
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef CreateUserResponseSchema
|
|
55
|
+
* @property {UserSchema} [user]
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @typedef CreateUserSessionRequestSchema
|
|
60
|
+
* @property {string} [domain]
|
|
61
|
+
* @property {number} [max_age]
|
|
62
|
+
* @property {string} [user_id]
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @typedef CreateUserSessionResponseSchema
|
|
67
|
+
* @property {Object} [cookie]
|
|
68
|
+
* @property {string} [domain]
|
|
69
|
+
* @property {boolean} [http_only]
|
|
70
|
+
* @property {number} [max_age]
|
|
71
|
+
* @property {boolean} [secure]
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @typedef CustomerListResponseSchema
|
|
76
|
+
* @property {UserSchema[]} [items]
|
|
77
|
+
* @property {PaginationSchema} [page]
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @typedef DeleteAccountConsent
|
|
82
|
+
* @property {string} [consent_text]
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @typedef DeleteAccountReasons
|
|
87
|
+
* @property {string} [reason_id]
|
|
88
|
+
* @property {string} [reason_text]
|
|
89
|
+
* @property {boolean} [show_text_area]
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @typedef Email
|
|
94
|
+
* @property {boolean} [active]
|
|
95
|
+
* @property {string} [email]
|
|
96
|
+
* @property {boolean} [primary]
|
|
97
|
+
* @property {boolean} [verified]
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @typedef Facebook
|
|
102
|
+
* @property {string} [app_id]
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @typedef FlashCard
|
|
107
|
+
* @property {string} [background_color]
|
|
108
|
+
* @property {string} [text]
|
|
109
|
+
* @property {string} [text_color]
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @typedef Google
|
|
114
|
+
* @property {string} [app_id]
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef Login
|
|
119
|
+
* @property {boolean} [otp]
|
|
120
|
+
* @property {boolean} [password]
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @typedef LookAndFeel
|
|
125
|
+
* @property {string} [background_color]
|
|
126
|
+
* @property {string} [card_position]
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @typedef MetaSchema
|
|
131
|
+
* @property {boolean} [fynd_default]
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @typedef PaginationSchema
|
|
136
|
+
* @property {number} [current]
|
|
137
|
+
* @property {boolean} [has_next]
|
|
138
|
+
* @property {number} [item_total]
|
|
139
|
+
* @property {number} [size]
|
|
140
|
+
* @property {string} [type]
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @typedef PhoneNumber
|
|
145
|
+
* @property {boolean} [active]
|
|
146
|
+
* @property {number} [country_code]
|
|
147
|
+
* @property {string} [phone]
|
|
148
|
+
* @property {boolean} [primary]
|
|
149
|
+
* @property {boolean} [verified]
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @typedef PlatformEmail
|
|
154
|
+
* @property {boolean} [is_required]
|
|
155
|
+
* @property {string} [level]
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @typedef PlatformMobile
|
|
160
|
+
* @property {boolean} [is_required]
|
|
161
|
+
* @property {string} [level]
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @typedef PlatformSchema
|
|
166
|
+
* @property {string} [_id]
|
|
167
|
+
* @property {boolean} [active]
|
|
168
|
+
* @property {string} [created_at]
|
|
169
|
+
* @property {Object} [delete_account_consent]
|
|
170
|
+
* @property {number} [delete_account_day]
|
|
171
|
+
* @property {DeleteAccountReasons[]} [delete_account_reasons]
|
|
172
|
+
* @property {string} [desktop_image]
|
|
173
|
+
* @property {string} [display]
|
|
174
|
+
* @property {FlashCard} [flash_card]
|
|
175
|
+
* @property {boolean} [forgot_password]
|
|
176
|
+
* @property {Login} [login]
|
|
177
|
+
* @property {LookAndFeel} [look_and_feel]
|
|
178
|
+
* @property {MetaSchema} [meta]
|
|
179
|
+
* @property {string} [mobile_image]
|
|
180
|
+
* @property {string} [name]
|
|
181
|
+
* @property {boolean} [register]
|
|
182
|
+
* @property {RegisterRequiredFields} [register_required_fields]
|
|
183
|
+
* @property {RequiredFields} [required_fields]
|
|
184
|
+
* @property {Object} [session_config]
|
|
185
|
+
* @property {boolean} [skip_captcha]
|
|
186
|
+
* @property {boolean} [skip_login]
|
|
187
|
+
* @property {Social} [social]
|
|
188
|
+
* @property {SocialTokens} [social_tokens]
|
|
189
|
+
* @property {string} [subtext]
|
|
190
|
+
* @property {string} [updated_at]
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @typedef RegisterRequiredFields
|
|
195
|
+
* @property {RegisterRequiredFieldsEmail} [email]
|
|
196
|
+
* @property {RegisterRequiredFieldsMobile} [mobile]
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @typedef RegisterRequiredFieldsEmail
|
|
201
|
+
* @property {boolean} [is_required]
|
|
202
|
+
* @property {string} [level]
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @typedef RegisterRequiredFieldsMobile
|
|
207
|
+
* @property {boolean} [is_required]
|
|
208
|
+
* @property {string} [level]
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @typedef RequiredFields
|
|
213
|
+
* @property {PlatformEmail} [email]
|
|
214
|
+
* @property {PlatformMobile} [mobile]
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @typedef SessionDeleteResponseSchema
|
|
219
|
+
* @property {string[]} [items]
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @typedef SessionExpiry
|
|
224
|
+
* @property {number} [duration]
|
|
225
|
+
* @property {boolean} [is_rolling]
|
|
226
|
+
* @property {string} [type]
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @typedef SessionListResponseInfo
|
|
231
|
+
* @property {string} [domain]
|
|
232
|
+
* @property {string} [expire_in]
|
|
233
|
+
* @property {string} [ip]
|
|
234
|
+
* @property {string} [session_id]
|
|
235
|
+
* @property {string} [user_agent]
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @typedef SessionListResponseSchema
|
|
240
|
+
* @property {SessionListResponseInfo[]} [items]
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @typedef Social
|
|
245
|
+
* @property {boolean} [account_kit]
|
|
246
|
+
* @property {boolean} [apple]
|
|
247
|
+
* @property {boolean} [facebook]
|
|
248
|
+
* @property {boolean} [google]
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @typedef SocialTokens
|
|
253
|
+
* @property {Accountkit} [account_kit]
|
|
254
|
+
* @property {Facebook} [facebook]
|
|
255
|
+
* @property {Google} [google]
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @typedef UnDeleteUserRequestSchema
|
|
260
|
+
* @property {string} [reason]
|
|
261
|
+
* @property {string} [reason_id]
|
|
262
|
+
* @property {string} [user_id]
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @typedef UnDeleteUserSuccess
|
|
267
|
+
* @property {boolean} [success]
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @typedef UpdateUserGroupSchema
|
|
272
|
+
* @property {string} [description]
|
|
273
|
+
* @property {string} [file_url]
|
|
274
|
+
* @property {string} [name]
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @typedef UpdateUserRequestSchema
|
|
279
|
+
* @property {UserEmails[]} [emails]
|
|
280
|
+
* @property {string} [external_id]
|
|
281
|
+
* @property {string} [first_name]
|
|
282
|
+
* @property {string} [gender]
|
|
283
|
+
* @property {string} [last_name]
|
|
284
|
+
* @property {Object} [meta]
|
|
285
|
+
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @typedef UserEmails
|
|
290
|
+
* @property {boolean} [active]
|
|
291
|
+
* @property {string} [email]
|
|
292
|
+
* @property {boolean} [primary]
|
|
293
|
+
* @property {boolean} [verified]
|
|
294
|
+
*/
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @typedef UserGroupListResponseSchema
|
|
298
|
+
* @property {UserGroupResponseSchema[]} [items]
|
|
299
|
+
* @property {PaginationSchema} [page]
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @typedef UserGroupResponseSchema
|
|
304
|
+
* @property {number} [__v]
|
|
305
|
+
* @property {string} [_id]
|
|
306
|
+
* @property {string} [application_id]
|
|
307
|
+
* @property {string} [created_at]
|
|
308
|
+
* @property {string} [description]
|
|
309
|
+
* @property {string} [file_url]
|
|
310
|
+
* @property {string} [modified_at]
|
|
311
|
+
* @property {string} [name]
|
|
312
|
+
* @property {string} [status]
|
|
313
|
+
* @property {number} [uid]
|
|
314
|
+
*/
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @typedef UserPhoneNumbers
|
|
318
|
+
* @property {boolean} [active]
|
|
319
|
+
* @property {string} [country_code]
|
|
320
|
+
* @property {string} [phone]
|
|
321
|
+
* @property {boolean} [primary]
|
|
322
|
+
* @property {boolean} [verified]
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* @typedef UserSchema
|
|
327
|
+
* @property {string} [_id]
|
|
328
|
+
* @property {string} [account_type]
|
|
329
|
+
* @property {boolean} [active]
|
|
330
|
+
* @property {string} [application_id]
|
|
331
|
+
* @property {string} [created_at]
|
|
332
|
+
* @property {string} [dob]
|
|
333
|
+
* @property {Email[]} [emails]
|
|
334
|
+
* @property {string} [first_name]
|
|
335
|
+
* @property {string} [gender]
|
|
336
|
+
* @property {string} [last_name]
|
|
337
|
+
* @property {Object} [meta]
|
|
338
|
+
* @property {PhoneNumber[]} [phone_numbers]
|
|
339
|
+
* @property {string} [profile_pic_url]
|
|
340
|
+
* @property {string} [updated_at]
|
|
341
|
+
* @property {string} [user_id]
|
|
342
|
+
* @property {string} [username]
|
|
343
|
+
*/
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @typedef UserSearchResponseSchema
|
|
347
|
+
* @property {UserSchema[]} [users]
|
|
348
|
+
*/
|
|
349
|
+
|
|
350
|
+
class UserPlatformModel {
|
|
351
|
+
/** @returns {Accountkit} */
|
|
4
352
|
static Accountkit() {
|
|
5
353
|
return Joi.object({
|
|
6
354
|
app_id: Joi.string().allow(""),
|
|
7
355
|
});
|
|
8
356
|
}
|
|
357
|
+
|
|
358
|
+
/** @returns {ArchiveUserRequestSchema} */
|
|
9
359
|
static ArchiveUserRequestSchema() {
|
|
10
360
|
return Joi.object({
|
|
11
361
|
user_id: Joi.string().allow(""),
|
|
12
362
|
});
|
|
13
363
|
}
|
|
364
|
+
|
|
365
|
+
/** @returns {ArchiveUserSuccess} */
|
|
14
366
|
static ArchiveUserSuccess() {
|
|
15
367
|
return Joi.object({
|
|
16
368
|
success: Joi.boolean(),
|
|
17
369
|
});
|
|
18
370
|
}
|
|
371
|
+
|
|
372
|
+
/** @returns {AuthenticationApiErrorSchema} */
|
|
19
373
|
static AuthenticationApiErrorSchema() {
|
|
20
374
|
return Joi.object({
|
|
21
375
|
message: Joi.string().allow(""),
|
|
22
376
|
});
|
|
23
377
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
message: Joi.string().allow(""),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static AuthSuccess() {
|
|
30
|
-
return Joi.object({
|
|
31
|
-
register_token: Joi.string().allow(""),
|
|
32
|
-
user: UserModel.UserSchema(),
|
|
33
|
-
user_exists: Joi.boolean(),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
static AuthSuccessUser() {
|
|
37
|
-
return Joi.object({
|
|
38
|
-
active: Joi.boolean(),
|
|
39
|
-
debug: UserModel.AuthSuccessUserDebug(),
|
|
40
|
-
emails: UserModel.AuthSuccessUserEmails(),
|
|
41
|
-
first_name: Joi.string().allow(""),
|
|
42
|
-
last_name: Joi.string().allow(""),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
static AuthSuccessUserDebug() {
|
|
46
|
-
return Joi.object({
|
|
47
|
-
platform: Joi.string().allow(""),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
static AuthSuccessUserEmails() {
|
|
51
|
-
return Joi.object({
|
|
52
|
-
active: Joi.boolean(),
|
|
53
|
-
email: Joi.string().allow(""),
|
|
54
|
-
primary: Joi.boolean(),
|
|
55
|
-
verified: Joi.boolean(),
|
|
56
|
-
});
|
|
57
|
-
}
|
|
378
|
+
|
|
379
|
+
/** @returns {BlockUserRequestSchema} */
|
|
58
380
|
static BlockUserRequestSchema() {
|
|
59
381
|
return Joi.object({
|
|
60
382
|
reason: Joi.string().allow(""),
|
|
@@ -62,16 +384,15 @@ class UserModel {
|
|
|
62
384
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
63
385
|
});
|
|
64
386
|
}
|
|
387
|
+
|
|
388
|
+
/** @returns {BlockUserSuccess} */
|
|
65
389
|
static BlockUserSuccess() {
|
|
66
390
|
return Joi.object({
|
|
67
391
|
success: Joi.boolean(),
|
|
68
392
|
});
|
|
69
393
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
code: Joi.string().allow(""),
|
|
73
|
-
});
|
|
74
|
-
}
|
|
394
|
+
|
|
395
|
+
/** @returns {CreateUserGroupSchema} */
|
|
75
396
|
static CreateUserGroupSchema() {
|
|
76
397
|
return Joi.object({
|
|
77
398
|
description: Joi.string().allow("").required(),
|
|
@@ -79,6 +400,8 @@ class UserModel {
|
|
|
79
400
|
name: Joi.string().allow("").required(),
|
|
80
401
|
});
|
|
81
402
|
}
|
|
403
|
+
|
|
404
|
+
/** @returns {CreateUserRequestSchema} */
|
|
82
405
|
static CreateUserRequestSchema() {
|
|
83
406
|
return Joi.object({
|
|
84
407
|
email: Joi.string().allow(""),
|
|
@@ -90,11 +413,15 @@ class UserModel {
|
|
|
90
413
|
username: Joi.string().allow("").required(),
|
|
91
414
|
});
|
|
92
415
|
}
|
|
416
|
+
|
|
417
|
+
/** @returns {CreateUserResponseSchema} */
|
|
93
418
|
static CreateUserResponseSchema() {
|
|
94
419
|
return Joi.object({
|
|
95
|
-
user:
|
|
420
|
+
user: UserPlatformModel.UserSchema(),
|
|
96
421
|
});
|
|
97
422
|
}
|
|
423
|
+
|
|
424
|
+
/** @returns {CreateUserSessionRequestSchema} */
|
|
98
425
|
static CreateUserSessionRequestSchema() {
|
|
99
426
|
return Joi.object({
|
|
100
427
|
domain: Joi.string().allow(""),
|
|
@@ -102,6 +429,8 @@ class UserModel {
|
|
|
102
429
|
user_id: Joi.string().allow(""),
|
|
103
430
|
});
|
|
104
431
|
}
|
|
432
|
+
|
|
433
|
+
/** @returns {CreateUserSessionResponseSchema} */
|
|
105
434
|
static CreateUserSessionResponseSchema() {
|
|
106
435
|
return Joi.object({
|
|
107
436
|
cookie: Joi.any(),
|
|
@@ -111,17 +440,23 @@ class UserModel {
|
|
|
111
440
|
secure: Joi.boolean(),
|
|
112
441
|
});
|
|
113
442
|
}
|
|
443
|
+
|
|
444
|
+
/** @returns {CustomerListResponseSchema} */
|
|
114
445
|
static CustomerListResponseSchema() {
|
|
115
446
|
return Joi.object({
|
|
116
|
-
items: Joi.array().items(
|
|
117
|
-
page:
|
|
447
|
+
items: Joi.array().items(UserPlatformModel.UserSchema()),
|
|
448
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
118
449
|
});
|
|
119
450
|
}
|
|
451
|
+
|
|
452
|
+
/** @returns {DeleteAccountConsent} */
|
|
120
453
|
static DeleteAccountConsent() {
|
|
121
454
|
return Joi.object({
|
|
122
455
|
consent_text: Joi.string().allow(""),
|
|
123
456
|
});
|
|
124
457
|
}
|
|
458
|
+
|
|
459
|
+
/** @returns {DeleteAccountReasons} */
|
|
125
460
|
static DeleteAccountReasons() {
|
|
126
461
|
return Joi.object({
|
|
127
462
|
reason_id: Joi.string().allow(""),
|
|
@@ -129,52 +464,8 @@ class UserModel {
|
|
|
129
464
|
show_text_area: Joi.boolean(),
|
|
130
465
|
});
|
|
131
466
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
otp: Joi.string().allow(""),
|
|
135
|
-
reason: Joi.string().allow(""),
|
|
136
|
-
reason_id: Joi.string().allow(""),
|
|
137
|
-
request_id: Joi.string().allow(""),
|
|
138
|
-
user_id: Joi.string().allow(""),
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
static DeleteUserSuccess() {
|
|
142
|
-
return Joi.object({
|
|
143
|
-
success: Joi.boolean(),
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
static EditEmailRequestSchema() {
|
|
147
|
-
return Joi.object({
|
|
148
|
-
email: Joi.string().allow(""),
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
static EditMobileRequestSchema() {
|
|
152
|
-
return Joi.object({
|
|
153
|
-
country_code: Joi.string().allow(""),
|
|
154
|
-
phone: Joi.string().allow(""),
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
static EditProfileMobileSchema() {
|
|
158
|
-
return Joi.object({
|
|
159
|
-
country_code: Joi.string().allow(""),
|
|
160
|
-
phone: Joi.string().allow(""),
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
static EditProfileRequestSchema() {
|
|
164
|
-
return Joi.object({
|
|
165
|
-
android_hash: Joi.string().allow(""),
|
|
166
|
-
country_code: Joi.string().allow(""),
|
|
167
|
-
dob: Joi.string().allow(""),
|
|
168
|
-
email: Joi.string().allow(""),
|
|
169
|
-
first_name: Joi.string().allow(""),
|
|
170
|
-
gender: Joi.string().allow(""),
|
|
171
|
-
last_name: Joi.string().allow(""),
|
|
172
|
-
mobile: UserModel.EditProfileMobileSchema(),
|
|
173
|
-
profile_pic_url: Joi.string().allow(""),
|
|
174
|
-
register_token: Joi.string().allow(""),
|
|
175
|
-
sender: Joi.string().allow(""),
|
|
176
|
-
});
|
|
177
|
-
}
|
|
467
|
+
|
|
468
|
+
/** @returns {Email} */
|
|
178
469
|
static Email() {
|
|
179
470
|
return Joi.object({
|
|
180
471
|
active: Joi.boolean(),
|
|
@@ -183,16 +474,15 @@ class UserModel {
|
|
|
183
474
|
verified: Joi.boolean(),
|
|
184
475
|
});
|
|
185
476
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
success: Joi.boolean(),
|
|
189
|
-
});
|
|
190
|
-
}
|
|
477
|
+
|
|
478
|
+
/** @returns {Facebook} */
|
|
191
479
|
static Facebook() {
|
|
192
480
|
return Joi.object({
|
|
193
481
|
app_id: Joi.string().allow(""),
|
|
194
482
|
});
|
|
195
483
|
}
|
|
484
|
+
|
|
485
|
+
/** @returns {FlashCard} */
|
|
196
486
|
static FlashCard() {
|
|
197
487
|
return Joi.object({
|
|
198
488
|
background_color: Joi.string().allow(""),
|
|
@@ -200,128 +490,38 @@ class UserModel {
|
|
|
200
490
|
text_color: Joi.string().allow(""),
|
|
201
491
|
});
|
|
202
492
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
code: Joi.string().allow(""),
|
|
206
|
-
password: Joi.string().allow(""),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
static FormRegisterRequestSchema() {
|
|
210
|
-
return Joi.object({
|
|
211
|
-
email: Joi.string().allow(""),
|
|
212
|
-
first_name: Joi.string().allow(""),
|
|
213
|
-
gender: Joi.string().allow(""),
|
|
214
|
-
last_name: Joi.string().allow(""),
|
|
215
|
-
password: Joi.string().allow(""),
|
|
216
|
-
phone: UserModel.FormRegisterRequestSchemaPhone(),
|
|
217
|
-
register_token: Joi.string().allow(""),
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
static FormRegisterRequestSchemaPhone() {
|
|
221
|
-
return Joi.object({
|
|
222
|
-
country_code: Joi.string().allow(""),
|
|
223
|
-
mobile: Joi.string().allow(""),
|
|
224
|
-
});
|
|
225
|
-
}
|
|
493
|
+
|
|
494
|
+
/** @returns {Google} */
|
|
226
495
|
static Google() {
|
|
227
496
|
return Joi.object({
|
|
228
497
|
app_id: Joi.string().allow(""),
|
|
229
498
|
});
|
|
230
499
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
result: Joi.boolean(),
|
|
234
|
-
});
|
|
235
|
-
}
|
|
500
|
+
|
|
501
|
+
/** @returns {Login} */
|
|
236
502
|
static Login() {
|
|
237
503
|
return Joi.object({
|
|
238
504
|
otp: Joi.boolean(),
|
|
239
505
|
password: Joi.boolean(),
|
|
240
506
|
});
|
|
241
507
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
register_token: Joi.string().allow(""),
|
|
245
|
-
request_id: Joi.string().allow(""),
|
|
246
|
-
user: UserModel.UserSchema(),
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
static LogoutSuccess() {
|
|
250
|
-
return Joi.object({
|
|
251
|
-
logout: Joi.boolean(),
|
|
252
|
-
});
|
|
253
|
-
}
|
|
508
|
+
|
|
509
|
+
/** @returns {LookAndFeel} */
|
|
254
510
|
static LookAndFeel() {
|
|
255
511
|
return Joi.object({
|
|
256
512
|
background_color: Joi.string().allow(""),
|
|
257
513
|
card_position: Joi.string().allow(""),
|
|
258
514
|
});
|
|
259
515
|
}
|
|
516
|
+
|
|
517
|
+
/** @returns {MetaSchema} */
|
|
260
518
|
static MetaSchema() {
|
|
261
519
|
return Joi.object({
|
|
262
520
|
fynd_default: Joi.boolean(),
|
|
263
521
|
});
|
|
264
522
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
message: Joi.string().allow(""),
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
static OAuthRequestAppleSchema() {
|
|
271
|
-
return Joi.object({
|
|
272
|
-
oauth: UserModel.OAuthRequestAppleSchemaOauth(),
|
|
273
|
-
profile: UserModel.OAuthRequestAppleSchemaProfile(),
|
|
274
|
-
user_identifier: Joi.string().allow(""),
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
static OAuthRequestAppleSchemaOauth() {
|
|
278
|
-
return Joi.object({
|
|
279
|
-
identity_token: Joi.string().allow(""),
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
static OAuthRequestAppleSchemaProfile() {
|
|
283
|
-
return Joi.object({
|
|
284
|
-
first_name: Joi.string().allow(""),
|
|
285
|
-
full_name: Joi.string().allow(""),
|
|
286
|
-
last_name: Joi.string().allow(""),
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
static OAuthRequestSchema() {
|
|
290
|
-
return Joi.object({
|
|
291
|
-
is_signed_in: Joi.boolean(),
|
|
292
|
-
oauth2: UserModel.OAuthRequestSchemaOauth2(),
|
|
293
|
-
profile: UserModel.OAuthRequestSchemaProfile(),
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
static OAuthRequestSchemaOauth2() {
|
|
297
|
-
return Joi.object({
|
|
298
|
-
access_token: Joi.string().allow(""),
|
|
299
|
-
expiry: Joi.number(),
|
|
300
|
-
refresh_token: Joi.string().allow(""),
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
static OAuthRequestSchemaProfile() {
|
|
304
|
-
return Joi.object({
|
|
305
|
-
email: Joi.string().allow(""),
|
|
306
|
-
first_name: Joi.string().allow(""),
|
|
307
|
-
full_name: Joi.string().allow(""),
|
|
308
|
-
id: Joi.string().allow(""),
|
|
309
|
-
image: Joi.string().allow(""),
|
|
310
|
-
last_name: Joi.string().allow(""),
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
static OtpSuccess() {
|
|
314
|
-
return Joi.object({
|
|
315
|
-
country_code: Joi.string().allow(""),
|
|
316
|
-
message: Joi.string().allow(""),
|
|
317
|
-
mobile: Joi.string().allow(""),
|
|
318
|
-
register_token: Joi.string().allow(""),
|
|
319
|
-
request_id: Joi.string().allow(""),
|
|
320
|
-
resend_timer: Joi.number(),
|
|
321
|
-
resend_token: Joi.string().allow(""),
|
|
322
|
-
success: Joi.boolean(),
|
|
323
|
-
});
|
|
324
|
-
}
|
|
523
|
+
|
|
524
|
+
/** @returns {PaginationSchema} */
|
|
325
525
|
static PaginationSchema() {
|
|
326
526
|
return Joi.object({
|
|
327
527
|
current: Joi.number(),
|
|
@@ -331,13 +531,8 @@ class UserModel {
|
|
|
331
531
|
type: Joi.string().allow(""),
|
|
332
532
|
});
|
|
333
533
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
captcha_code: Joi.string().allow(""),
|
|
337
|
-
password: Joi.string().allow(""),
|
|
338
|
-
username: Joi.string().allow(""),
|
|
339
|
-
});
|
|
340
|
-
}
|
|
534
|
+
|
|
535
|
+
/** @returns {PhoneNumber} */
|
|
341
536
|
static PhoneNumber() {
|
|
342
537
|
return Joi.object({
|
|
343
538
|
active: Joi.boolean(),
|
|
@@ -347,18 +542,24 @@ class UserModel {
|
|
|
347
542
|
verified: Joi.boolean(),
|
|
348
543
|
});
|
|
349
544
|
}
|
|
545
|
+
|
|
546
|
+
/** @returns {PlatformEmail} */
|
|
350
547
|
static PlatformEmail() {
|
|
351
548
|
return Joi.object({
|
|
352
549
|
is_required: Joi.boolean(),
|
|
353
550
|
level: Joi.string().allow(""),
|
|
354
551
|
});
|
|
355
552
|
}
|
|
553
|
+
|
|
554
|
+
/** @returns {PlatformMobile} */
|
|
356
555
|
static PlatformMobile() {
|
|
357
556
|
return Joi.object({
|
|
358
557
|
is_required: Joi.boolean(),
|
|
359
558
|
level: Joi.string().allow(""),
|
|
360
559
|
});
|
|
361
560
|
}
|
|
561
|
+
|
|
562
|
+
/** @returns {PlatformSchema} */
|
|
362
563
|
static PlatformSchema() {
|
|
363
564
|
return Joi.object({
|
|
364
565
|
_id: Joi.string().allow(""),
|
|
@@ -367,186 +568,70 @@ class UserModel {
|
|
|
367
568
|
delete_account_consent: Joi.any(),
|
|
368
569
|
delete_account_day: Joi.number(),
|
|
369
570
|
delete_account_reasons: Joi.array().items(
|
|
370
|
-
|
|
571
|
+
UserPlatformModel.DeleteAccountReasons()
|
|
371
572
|
),
|
|
372
573
|
desktop_image: Joi.string().allow(""),
|
|
373
574
|
display: Joi.string().allow(""),
|
|
374
|
-
flash_card:
|
|
575
|
+
flash_card: UserPlatformModel.FlashCard(),
|
|
375
576
|
forgot_password: Joi.boolean(),
|
|
376
|
-
login:
|
|
377
|
-
look_and_feel:
|
|
378
|
-
meta:
|
|
577
|
+
login: UserPlatformModel.Login(),
|
|
578
|
+
look_and_feel: UserPlatformModel.LookAndFeel(),
|
|
579
|
+
meta: UserPlatformModel.MetaSchema(),
|
|
379
580
|
mobile_image: Joi.string().allow(""),
|
|
380
581
|
name: Joi.string().allow(""),
|
|
381
582
|
register: Joi.boolean(),
|
|
382
|
-
register_required_fields:
|
|
383
|
-
required_fields:
|
|
583
|
+
register_required_fields: UserPlatformModel.RegisterRequiredFields(),
|
|
584
|
+
required_fields: UserPlatformModel.RequiredFields(),
|
|
384
585
|
session_config: Joi.any(),
|
|
385
586
|
skip_captcha: Joi.boolean(),
|
|
386
587
|
skip_login: Joi.boolean(),
|
|
387
|
-
social:
|
|
388
|
-
social_tokens:
|
|
588
|
+
social: UserPlatformModel.Social(),
|
|
589
|
+
social_tokens: UserPlatformModel.SocialTokens(),
|
|
389
590
|
subtext: Joi.string().allow(""),
|
|
390
591
|
updated_at: Joi.string().allow(""),
|
|
391
592
|
});
|
|
392
593
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
country_code: Joi.string().allow(""),
|
|
396
|
-
email: Joi.string().allow(""),
|
|
397
|
-
message: Joi.string().allow(""),
|
|
398
|
-
mobile: Joi.string().allow(""),
|
|
399
|
-
register_token: Joi.string().allow(""),
|
|
400
|
-
request_id: Joi.string().allow(""),
|
|
401
|
-
resend_email_token: Joi.string().allow(""),
|
|
402
|
-
resend_timer: Joi.number(),
|
|
403
|
-
resend_token: Joi.string().allow(""),
|
|
404
|
-
success: Joi.boolean(),
|
|
405
|
-
user: UserModel.UserSchema(),
|
|
406
|
-
user_exists: Joi.boolean(),
|
|
407
|
-
verify_email_link: Joi.boolean(),
|
|
408
|
-
verify_email_otp: Joi.boolean(),
|
|
409
|
-
verify_mobile_otp: Joi.boolean(),
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
static ProfileEditSuccessSchema() {
|
|
413
|
-
return Joi.object({
|
|
414
|
-
email: Joi.string().allow(""),
|
|
415
|
-
register_token: Joi.string().allow(""),
|
|
416
|
-
user: Joi.string().allow(""),
|
|
417
|
-
user_exists: Joi.boolean(),
|
|
418
|
-
verify_email_link: Joi.boolean(),
|
|
419
|
-
verify_email_otp: Joi.boolean(),
|
|
420
|
-
verify_mobile_otp: Joi.boolean(),
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
static RegisterFormSuccess() {
|
|
424
|
-
return Joi.object({
|
|
425
|
-
country_code: Joi.string().allow(""),
|
|
426
|
-
email: Joi.string().allow(""),
|
|
427
|
-
message: Joi.string().allow(""),
|
|
428
|
-
mobile: Joi.string().allow(""),
|
|
429
|
-
register_token: Joi.string().allow(""),
|
|
430
|
-
request_id: Joi.string().allow(""),
|
|
431
|
-
resend_email_token: Joi.string().allow(""),
|
|
432
|
-
resend_timer: Joi.number(),
|
|
433
|
-
resend_token: Joi.string().allow(""),
|
|
434
|
-
success: Joi.boolean(),
|
|
435
|
-
user_exists: Joi.boolean(),
|
|
436
|
-
verify_email_otp: Joi.boolean(),
|
|
437
|
-
verify_mobile_otp: Joi.boolean(),
|
|
438
|
-
});
|
|
439
|
-
}
|
|
594
|
+
|
|
595
|
+
/** @returns {RegisterRequiredFields} */
|
|
440
596
|
static RegisterRequiredFields() {
|
|
441
597
|
return Joi.object({
|
|
442
|
-
email:
|
|
443
|
-
mobile:
|
|
598
|
+
email: UserPlatformModel.RegisterRequiredFieldsEmail(),
|
|
599
|
+
mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
|
|
444
600
|
});
|
|
445
601
|
}
|
|
602
|
+
|
|
603
|
+
/** @returns {RegisterRequiredFieldsEmail} */
|
|
446
604
|
static RegisterRequiredFieldsEmail() {
|
|
447
605
|
return Joi.object({
|
|
448
606
|
is_required: Joi.boolean(),
|
|
449
607
|
level: Joi.string().allow(""),
|
|
450
608
|
});
|
|
451
609
|
}
|
|
610
|
+
|
|
611
|
+
/** @returns {RegisterRequiredFieldsMobile} */
|
|
452
612
|
static RegisterRequiredFieldsMobile() {
|
|
453
613
|
return Joi.object({
|
|
454
614
|
is_required: Joi.boolean(),
|
|
455
615
|
level: Joi.string().allow(""),
|
|
456
616
|
});
|
|
457
617
|
}
|
|
618
|
+
|
|
619
|
+
/** @returns {RequiredFields} */
|
|
458
620
|
static RequiredFields() {
|
|
459
621
|
return Joi.object({
|
|
460
|
-
email:
|
|
461
|
-
mobile:
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
static ResetPasswordSuccess() {
|
|
465
|
-
return Joi.object({
|
|
466
|
-
status: Joi.string().allow(""),
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
static SendEmailOtpRequestSchema() {
|
|
470
|
-
return Joi.object({
|
|
471
|
-
action: Joi.string().allow(""),
|
|
472
|
-
email: Joi.string().allow(""),
|
|
473
|
-
register_token: Joi.string().allow(""),
|
|
474
|
-
token: Joi.string().allow(""),
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
static SendEmailVerifyLinkSuccess() {
|
|
478
|
-
return Joi.object({
|
|
479
|
-
verify_email_link: Joi.boolean(),
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
static SendMobileOtpRequestSchema() {
|
|
483
|
-
return Joi.object({
|
|
484
|
-
action: Joi.string().allow(""),
|
|
485
|
-
android_hash: Joi.string().allow(""),
|
|
486
|
-
captcha_code: Joi.string().allow(""),
|
|
487
|
-
country_code: Joi.string().allow(""),
|
|
488
|
-
force: Joi.string().allow(""),
|
|
489
|
-
mobile: Joi.string().allow(""),
|
|
490
|
-
token: Joi.string().allow(""),
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
static SendMobileVerifyLinkSuccess() {
|
|
494
|
-
return Joi.object({
|
|
495
|
-
verify_mobile_link: Joi.boolean(),
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
static SendOtpRequestSchema() {
|
|
499
|
-
return Joi.object({
|
|
500
|
-
android_hash: Joi.string().allow(""),
|
|
501
|
-
captcha_code: Joi.string().allow(""),
|
|
502
|
-
country_code: Joi.string().allow(""),
|
|
503
|
-
mobile: Joi.string().allow(""),
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
static SendOtpResponse() {
|
|
507
|
-
return Joi.object({
|
|
508
|
-
country_code: Joi.string().allow(""),
|
|
509
|
-
email: Joi.string().allow(""),
|
|
510
|
-
message: Joi.string().allow(""),
|
|
511
|
-
mobile: Joi.string().allow(""),
|
|
512
|
-
register_token: Joi.string().allow(""),
|
|
513
|
-
request_id: Joi.string().allow(""),
|
|
514
|
-
resend_email_token: Joi.string().allow(""),
|
|
515
|
-
resend_timer: Joi.number(),
|
|
516
|
-
resend_token: Joi.string().allow(""),
|
|
517
|
-
success: Joi.boolean(),
|
|
518
|
-
user_exists: Joi.boolean(),
|
|
519
|
-
verify_email_otp: Joi.boolean(),
|
|
520
|
-
verify_mobile_otp: Joi.boolean(),
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
static SendResetPasswordEmailRequestSchema() {
|
|
524
|
-
return Joi.object({
|
|
525
|
-
captcha_code: Joi.string().allow(""),
|
|
526
|
-
email: Joi.string().allow(""),
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
static SendResetPasswordMobileRequestSchema() {
|
|
530
|
-
return Joi.object({
|
|
531
|
-
captcha_code: Joi.string().allow(""),
|
|
532
|
-
country_code: Joi.string().allow(""),
|
|
533
|
-
mobile: Joi.string().allow(""),
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
static SendVerificationLinkMobileRequestSchema() {
|
|
537
|
-
return Joi.object({
|
|
538
|
-
active: Joi.boolean(),
|
|
539
|
-
country_code: Joi.string().allow(""),
|
|
540
|
-
phone: Joi.string().allow(""),
|
|
541
|
-
primary: Joi.boolean(),
|
|
542
|
-
verified: Joi.boolean(),
|
|
622
|
+
email: UserPlatformModel.PlatformEmail(),
|
|
623
|
+
mobile: UserPlatformModel.PlatformMobile(),
|
|
543
624
|
});
|
|
544
625
|
}
|
|
626
|
+
|
|
627
|
+
/** @returns {SessionDeleteResponseSchema} */
|
|
545
628
|
static SessionDeleteResponseSchema() {
|
|
546
629
|
return Joi.object({
|
|
547
630
|
items: Joi.array().items(Joi.string().allow("")),
|
|
548
631
|
});
|
|
549
632
|
}
|
|
633
|
+
|
|
634
|
+
/** @returns {SessionExpiry} */
|
|
550
635
|
static SessionExpiry() {
|
|
551
636
|
return Joi.object({
|
|
552
637
|
duration: Joi.number(),
|
|
@@ -554,6 +639,8 @@ class UserModel {
|
|
|
554
639
|
type: Joi.string().allow(""),
|
|
555
640
|
});
|
|
556
641
|
}
|
|
642
|
+
|
|
643
|
+
/** @returns {SessionListResponseInfo} */
|
|
557
644
|
static SessionListResponseInfo() {
|
|
558
645
|
return Joi.object({
|
|
559
646
|
domain: Joi.string().allow(""),
|
|
@@ -563,16 +650,15 @@ class UserModel {
|
|
|
563
650
|
user_agent: Joi.string().allow(""),
|
|
564
651
|
});
|
|
565
652
|
}
|
|
653
|
+
|
|
654
|
+
/** @returns {SessionListResponseSchema} */
|
|
566
655
|
static SessionListResponseSchema() {
|
|
567
656
|
return Joi.object({
|
|
568
|
-
items: Joi.array().items(
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
static SessionListSuccess() {
|
|
572
|
-
return Joi.object({
|
|
573
|
-
sessions: Joi.array().items(Joi.string().allow("")),
|
|
657
|
+
items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
|
|
574
658
|
});
|
|
575
659
|
}
|
|
660
|
+
|
|
661
|
+
/** @returns {Social} */
|
|
576
662
|
static Social() {
|
|
577
663
|
return Joi.object({
|
|
578
664
|
account_kit: Joi.boolean(),
|
|
@@ -581,28 +667,17 @@ class UserModel {
|
|
|
581
667
|
google: Joi.boolean(),
|
|
582
668
|
});
|
|
583
669
|
}
|
|
670
|
+
|
|
671
|
+
/** @returns {SocialTokens} */
|
|
584
672
|
static SocialTokens() {
|
|
585
673
|
return Joi.object({
|
|
586
|
-
account_kit:
|
|
587
|
-
facebook:
|
|
588
|
-
google:
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
static TokenRequestBodySchema() {
|
|
592
|
-
return Joi.object({
|
|
593
|
-
token: Joi.string().allow(""),
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
static UnauthenticatedSchema() {
|
|
597
|
-
return Joi.object({
|
|
598
|
-
authenticated: Joi.boolean(),
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
static UnauthorizedSchema() {
|
|
602
|
-
return Joi.object({
|
|
603
|
-
message: Joi.string().allow(""),
|
|
674
|
+
account_kit: UserPlatformModel.Accountkit(),
|
|
675
|
+
facebook: UserPlatformModel.Facebook(),
|
|
676
|
+
google: UserPlatformModel.Google(),
|
|
604
677
|
});
|
|
605
678
|
}
|
|
679
|
+
|
|
680
|
+
/** @returns {UnDeleteUserRequestSchema} */
|
|
606
681
|
static UnDeleteUserRequestSchema() {
|
|
607
682
|
return Joi.object({
|
|
608
683
|
reason: Joi.string().allow(""),
|
|
@@ -610,17 +685,15 @@ class UserModel {
|
|
|
610
685
|
user_id: Joi.string().allow(""),
|
|
611
686
|
});
|
|
612
687
|
}
|
|
688
|
+
|
|
689
|
+
/** @returns {UnDeleteUserSuccess} */
|
|
613
690
|
static UnDeleteUserSuccess() {
|
|
614
691
|
return Joi.object({
|
|
615
692
|
success: Joi.boolean(),
|
|
616
693
|
});
|
|
617
694
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
new_password: Joi.string().allow(""),
|
|
621
|
-
old_password: Joi.string().allow(""),
|
|
622
|
-
});
|
|
623
|
-
}
|
|
695
|
+
|
|
696
|
+
/** @returns {UpdateUserGroupSchema} */
|
|
624
697
|
static UpdateUserGroupSchema() {
|
|
625
698
|
return Joi.object({
|
|
626
699
|
description: Joi.string().allow(""),
|
|
@@ -628,17 +701,21 @@ class UserModel {
|
|
|
628
701
|
name: Joi.string().allow(""),
|
|
629
702
|
});
|
|
630
703
|
}
|
|
704
|
+
|
|
705
|
+
/** @returns {UpdateUserRequestSchema} */
|
|
631
706
|
static UpdateUserRequestSchema() {
|
|
632
707
|
return Joi.object({
|
|
633
|
-
emails: Joi.array().items(
|
|
708
|
+
emails: Joi.array().items(UserPlatformModel.UserEmails()),
|
|
634
709
|
external_id: Joi.string().allow(""),
|
|
635
710
|
first_name: Joi.string().allow(""),
|
|
636
711
|
gender: Joi.string().allow(""),
|
|
637
712
|
last_name: Joi.string().allow(""),
|
|
638
713
|
meta: Joi.any(),
|
|
639
|
-
phone_numbers: Joi.array().items(
|
|
714
|
+
phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
|
|
640
715
|
});
|
|
641
716
|
}
|
|
717
|
+
|
|
718
|
+
/** @returns {UserEmails} */
|
|
642
719
|
static UserEmails() {
|
|
643
720
|
return Joi.object({
|
|
644
721
|
active: Joi.boolean(),
|
|
@@ -647,12 +724,16 @@ class UserModel {
|
|
|
647
724
|
verified: Joi.boolean(),
|
|
648
725
|
});
|
|
649
726
|
}
|
|
727
|
+
|
|
728
|
+
/** @returns {UserGroupListResponseSchema} */
|
|
650
729
|
static UserGroupListResponseSchema() {
|
|
651
730
|
return Joi.object({
|
|
652
|
-
items: Joi.array().items(
|
|
653
|
-
page:
|
|
731
|
+
items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
|
|
732
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
654
733
|
});
|
|
655
734
|
}
|
|
735
|
+
|
|
736
|
+
/** @returns {UserGroupResponseSchema} */
|
|
656
737
|
static UserGroupResponseSchema() {
|
|
657
738
|
return Joi.object({
|
|
658
739
|
__v: Joi.number(),
|
|
@@ -667,11 +748,8 @@ class UserModel {
|
|
|
667
748
|
uid: Joi.number(),
|
|
668
749
|
});
|
|
669
750
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
user: UserModel.UserSchema(),
|
|
673
|
-
});
|
|
674
|
-
}
|
|
751
|
+
|
|
752
|
+
/** @returns {UserPhoneNumbers} */
|
|
675
753
|
static UserPhoneNumbers() {
|
|
676
754
|
return Joi.object({
|
|
677
755
|
active: Joi.boolean(),
|
|
@@ -681,6 +759,8 @@ class UserModel {
|
|
|
681
759
|
verified: Joi.boolean(),
|
|
682
760
|
});
|
|
683
761
|
}
|
|
762
|
+
|
|
763
|
+
/** @returns {UserSchema} */
|
|
684
764
|
static UserSchema() {
|
|
685
765
|
return Joi.object({
|
|
686
766
|
_id: Joi.string().allow(""),
|
|
@@ -689,61 +769,24 @@ class UserModel {
|
|
|
689
769
|
application_id: Joi.string().allow(""),
|
|
690
770
|
created_at: Joi.string().allow(""),
|
|
691
771
|
dob: Joi.string().allow(""),
|
|
692
|
-
emails: Joi.array().items(
|
|
772
|
+
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
693
773
|
first_name: Joi.string().allow(""),
|
|
694
774
|
gender: Joi.string().allow(""),
|
|
695
775
|
last_name: Joi.string().allow(""),
|
|
696
776
|
meta: Joi.any(),
|
|
697
|
-
phone_numbers: Joi.array().items(
|
|
777
|
+
phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
|
|
698
778
|
profile_pic_url: Joi.string().allow(""),
|
|
699
779
|
updated_at: Joi.string().allow(""),
|
|
700
780
|
user_id: Joi.string().allow(""),
|
|
701
781
|
username: Joi.string().allow(""),
|
|
702
782
|
});
|
|
703
783
|
}
|
|
784
|
+
|
|
785
|
+
/** @returns {UserSearchResponseSchema} */
|
|
704
786
|
static UserSearchResponseSchema() {
|
|
705
787
|
return Joi.object({
|
|
706
|
-
users: Joi.array().items(
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
static VerifyEmailOtpRequestSchema() {
|
|
710
|
-
return Joi.object({
|
|
711
|
-
action: Joi.string().allow(""),
|
|
712
|
-
email: Joi.string().allow(""),
|
|
713
|
-
otp: Joi.string().allow(""),
|
|
714
|
-
register_token: Joi.string().allow(""),
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
static VerifyEmailOTPSuccess() {
|
|
718
|
-
return Joi.object({
|
|
719
|
-
user: UserModel.UserSchema(),
|
|
720
|
-
verify_email_link: Joi.boolean(),
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
static VerifyEmailSuccess() {
|
|
724
|
-
return Joi.object({
|
|
725
|
-
message: Joi.string().allow(""),
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
static VerifyMobileOTPSuccess() {
|
|
729
|
-
return Joi.object({
|
|
730
|
-
user: UserModel.UserSchema(),
|
|
731
|
-
verify_mobile_link: Joi.boolean(),
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
static VerifyOtpRequestSchema() {
|
|
735
|
-
return Joi.object({
|
|
736
|
-
otp: Joi.string().allow(""),
|
|
737
|
-
register_token: Joi.string().allow(""),
|
|
738
|
-
request_id: Joi.string().allow(""),
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
static VerifyOtpSuccess() {
|
|
742
|
-
return Joi.object({
|
|
743
|
-
register_token: Joi.string().allow(""),
|
|
744
|
-
user: UserModel.UserSchema(),
|
|
745
|
-
user_exists: Joi.boolean(),
|
|
788
|
+
users: Joi.array().items(UserPlatformModel.UserSchema()),
|
|
746
789
|
});
|
|
747
790
|
}
|
|
748
791
|
}
|
|
749
|
-
module.exports =
|
|
792
|
+
module.exports = UserPlatformModel;
|