@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -1,11 +1,300 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef BasicDetailsPayloadSchema
|
|
5
|
+
* @property {string} [name]
|
|
6
|
+
* @property {string} [logo_url]
|
|
7
|
+
* @property {string} [favicon_url]
|
|
8
|
+
* @property {string} [title]
|
|
9
|
+
* @property {string} [meta_title]
|
|
10
|
+
* @property {string} [meta_description]
|
|
11
|
+
* @property {string} [meta_image]
|
|
12
|
+
* @property {WhatsNew[]} [whats_new]
|
|
13
|
+
* @property {Features[]} [features]
|
|
14
|
+
* @property {Object} [authentication]
|
|
15
|
+
* @property {BusinessAccount} [business_account]
|
|
16
|
+
* @property {SellerSupport} [seller_support]
|
|
17
|
+
* @property {string} [copyright]
|
|
18
|
+
* @property {string} [address]
|
|
19
|
+
* @property {string} [documentation_url]
|
|
20
|
+
* @property {string} [faq_url]
|
|
21
|
+
* @property {string} [facebook_url]
|
|
22
|
+
* @property {string} [instagram_url]
|
|
23
|
+
* @property {string} [privacy_url]
|
|
24
|
+
* @property {string} [twitter_url]
|
|
25
|
+
* @property {string} [termsofservice_url]
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef WhatsNew
|
|
30
|
+
* @property {string} [description]
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @typedef Features
|
|
35
|
+
* @property {string} [title]
|
|
36
|
+
* @property {string} [text]
|
|
37
|
+
* @property {string[]} [list]
|
|
38
|
+
* @property {string} [image]
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef BusinessAccount
|
|
43
|
+
* @property {boolean} [is_limit]
|
|
44
|
+
* @property {number} [threshold]
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @typedef SellerSupport
|
|
49
|
+
* @property {string} [email]
|
|
50
|
+
* @property {number} [phone_number]
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef MenuSchema
|
|
55
|
+
* @property {SalesChannelSchema} [sales_channel]
|
|
56
|
+
* @property {OtherSellerSchema} [other_seller]
|
|
57
|
+
* @property {FooterContentSchema} [footer_content]
|
|
58
|
+
* @property {boolean} [can_create_business_account]
|
|
59
|
+
* @property {CompanyLevelMenuItemSchema[]} [company_level]
|
|
60
|
+
* @property {ApplicationLevelMenuItemSchema[]} [application_level]
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @typedef MenusSchema
|
|
65
|
+
* @property {string} [_id]
|
|
66
|
+
* @property {MenuTypeSchema} [desktop]
|
|
67
|
+
* @property {MenuTypeSchema} [mobile]
|
|
68
|
+
* @property {number} [__v]
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @typedef MenuTypeSchema
|
|
73
|
+
* @property {MenuSchema} [menu]
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @typedef CompanyLevelMenuItemSchema
|
|
78
|
+
* @property {VisibleOnSchema} [visible_on]
|
|
79
|
+
* @property {string} [display]
|
|
80
|
+
* @property {string[]} [permissions]
|
|
81
|
+
* @property {string} [title]
|
|
82
|
+
* @property {string} [link]
|
|
83
|
+
* @property {string} [icon]
|
|
84
|
+
* @property {boolean} [is_disabled]
|
|
85
|
+
* @property {CompanyLevelMenuItemSchema[]} [child]
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @typedef ApplicationLevelMenuItemSchema
|
|
90
|
+
* @property {VisibleOnSchema} [visible_on]
|
|
91
|
+
* @property {string} [display]
|
|
92
|
+
* @property {string[]} [permissions]
|
|
93
|
+
* @property {string} [title]
|
|
94
|
+
* @property {string} [link]
|
|
95
|
+
* @property {string} [icon]
|
|
96
|
+
* @property {boolean} [is_disabled]
|
|
97
|
+
* @property {ApplicationLevelMenuItemSchema[]} [child]
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @typedef VisibleOnSchema
|
|
102
|
+
* @property {boolean} [web]
|
|
103
|
+
* @property {boolean} [ios]
|
|
104
|
+
* @property {boolean} [android]
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @typedef SalesChannelSchema
|
|
109
|
+
* @property {boolean} [can_add]
|
|
110
|
+
* @property {string} [title]
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @typedef OtherSellerSchema
|
|
115
|
+
* @property {boolean} [is_visible]
|
|
116
|
+
* @property {string} [title]
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @typedef FooterContentSchema
|
|
121
|
+
* @property {boolean} [is_visible]
|
|
122
|
+
* @property {string} [line_one]
|
|
123
|
+
* @property {string} [line_two]
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @typedef AnalyticsTagsSchema
|
|
128
|
+
* @property {string} [_id]
|
|
129
|
+
* @property {number} [__v]
|
|
130
|
+
* @property {string} [body_code]
|
|
131
|
+
* @property {boolean} [enabled]
|
|
132
|
+
* @property {string} [header_code]
|
|
133
|
+
* @property {string} [name]
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @typedef CustomPageBySlugSchema
|
|
138
|
+
* @property {string} [_id]
|
|
139
|
+
* @property {string} [title]
|
|
140
|
+
* @property {string} [slug]
|
|
141
|
+
* @property {string} [type]
|
|
142
|
+
* @property {string} [description]
|
|
143
|
+
* @property {boolean} [published]
|
|
144
|
+
* @property {ItemSchema[]} [content]
|
|
145
|
+
* @property {CreateCustomPageSeoSchema} [seo]
|
|
146
|
+
* @property {CreatedBySchema} [created_by]
|
|
147
|
+
* @property {CreatedBySchema} [modified_by]
|
|
148
|
+
* @property {boolean} [archived]
|
|
149
|
+
* @property {string} [created_on]
|
|
150
|
+
* @property {string} [modified_on]
|
|
151
|
+
* @property {number} [__v]
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @typedef ItemSchema
|
|
156
|
+
* @property {string} [type]
|
|
157
|
+
* @property {string} [value]
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @typedef CreateCustomPageSeoSchema
|
|
162
|
+
* @property {string} [title]
|
|
163
|
+
* @property {string} [description]
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @typedef RawHtmlContentSchema
|
|
168
|
+
* @property {string} [type]
|
|
169
|
+
* @property {string} [value]
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @typedef FooterSchema
|
|
174
|
+
* @property {string} [_id]
|
|
175
|
+
* @property {string} [title]
|
|
176
|
+
* @property {string} [description]
|
|
177
|
+
* @property {string} [type]
|
|
178
|
+
* @property {Object[]} [tags]
|
|
179
|
+
* @property {boolean} [published]
|
|
180
|
+
* @property {RawHtmlContentSchema[]} [content]
|
|
181
|
+
* @property {Object[]} [footer_meta]
|
|
182
|
+
* @property {CreatedBySchema} [created_by]
|
|
183
|
+
* @property {CreatedBySchema} [modified_by]
|
|
184
|
+
* @property {boolean} [archived]
|
|
185
|
+
* @property {number} [__v]
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @typedef HomePageContentSchema
|
|
190
|
+
* @property {string} [_id]
|
|
191
|
+
* @property {string} [slug]
|
|
192
|
+
* @property {CreatedBySchema} [created_by]
|
|
193
|
+
* @property {boolean} [archived]
|
|
194
|
+
* @property {string} [page_type]
|
|
195
|
+
* @property {string} [created_on]
|
|
196
|
+
* @property {string} [modified_on]
|
|
197
|
+
* @property {number} [__v]
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @typedef NavItemSchema
|
|
202
|
+
* @property {string} [title]
|
|
203
|
+
* @property {string} [link]
|
|
204
|
+
* @property {string} [href]
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @typedef NavbarSchema
|
|
209
|
+
* @property {string} [_id]
|
|
210
|
+
* @property {NavItemSchema[]} [items]
|
|
211
|
+
* @property {number} [__v]
|
|
212
|
+
* @property {CreatedBySchema} [modified_by]
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @typedef MediaSchema
|
|
217
|
+
* @property {string} [url]
|
|
218
|
+
* @property {string} [type]
|
|
219
|
+
* @property {string} [alt]
|
|
220
|
+
* @property {string} [anchor_link]
|
|
221
|
+
*/
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @typedef CreatedBySchema
|
|
225
|
+
* @property {string} [user_id]
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @typedef PricingBannerSchema
|
|
230
|
+
* @property {string} [_id]
|
|
231
|
+
* @property {MediaSchema} [web_banner]
|
|
232
|
+
* @property {MediaSchema} [mobile_banner]
|
|
233
|
+
* @property {boolean} [published]
|
|
234
|
+
* @property {CreatedBySchema} [created_by]
|
|
235
|
+
* @property {CreatedBySchema} [modified_by]
|
|
236
|
+
* @property {string} [created_on]
|
|
237
|
+
* @property {string} [modified_on]
|
|
238
|
+
* @property {number} [__v]
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @typedef SdkReadmeSchema
|
|
243
|
+
* @property {string} [data]
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @typedef TagsSchema
|
|
248
|
+
* @property {CustomItemSchema[]} [items]
|
|
249
|
+
* @property {PageSchema} [page]
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @typedef CustomItemSchema
|
|
254
|
+
* @property {string} [_id]
|
|
255
|
+
* @property {string} [name]
|
|
256
|
+
* @property {string} [type]
|
|
257
|
+
* @property {string} [sub_type]
|
|
258
|
+
* @property {string} [position]
|
|
259
|
+
* @property {boolean} [archived]
|
|
260
|
+
* @property {UserSchema} [created_by]
|
|
261
|
+
* @property {string} [url]
|
|
262
|
+
* @property {string} [content]
|
|
263
|
+
* @property {string} [created_on]
|
|
264
|
+
* @property {string} [modified_on]
|
|
265
|
+
* @property {number} [__v]
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @typedef PageSchema
|
|
270
|
+
* @property {string} [type]
|
|
271
|
+
* @property {number} [current]
|
|
272
|
+
* @property {number} [size]
|
|
273
|
+
* @property {number} [item_total]
|
|
274
|
+
* @property {boolean} [has_next]
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @typedef UserSchema
|
|
279
|
+
* @property {string} [user_id]
|
|
280
|
+
*/
|
|
281
|
+
|
|
3
282
|
/**
|
|
4
283
|
* @typedef CredentialSchema
|
|
5
|
-
* @property {
|
|
284
|
+
* @property {string} [_id]
|
|
285
|
+
* @property {ConfigurationSchema} [configuration]
|
|
6
286
|
* @property {string} [entity_type]
|
|
7
287
|
* @property {string} [type]
|
|
8
288
|
* @property {boolean} [is_enable]
|
|
289
|
+
* @property {string} [updated_at]
|
|
290
|
+
* @property {string} [created_at]
|
|
291
|
+
* @property {number} [__v]
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @typedef ConfigurationSchema
|
|
296
|
+
* @property {string} [token]
|
|
297
|
+
* @property {string} [host]
|
|
9
298
|
*/
|
|
10
299
|
|
|
11
300
|
/**
|
|
@@ -25,14 +314,424 @@ const Joi = require("joi");
|
|
|
25
314
|
* @property {Object} [meta]
|
|
26
315
|
*/
|
|
27
316
|
|
|
317
|
+
/**
|
|
318
|
+
* @typedef Language
|
|
319
|
+
* @property {string} [_id] - Unique identifier for the language entry in the
|
|
320
|
+
* system database.
|
|
321
|
+
* @property {string} locale - Standard language code following ISO 639-1 format
|
|
322
|
+
* for language identification.
|
|
323
|
+
* @property {string} direction - Text direction specification for proper
|
|
324
|
+
* content rendering in the language.
|
|
325
|
+
* @property {string} name - Full name of the language in English for easy
|
|
326
|
+
* reference and display at the merchant panel.
|
|
327
|
+
* @property {string} [display_name] - Translated name of the language in
|
|
328
|
+
* English for easy reference and display at the website.
|
|
329
|
+
* @property {boolean} [is_enabled] - Indicates whether the language is enabled for use.
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @typedef Error
|
|
334
|
+
* @property {string} [error] - Detailed error message explaining the nature of
|
|
335
|
+
* the failure or invalid request.
|
|
336
|
+
*/
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @typedef TranslatableResource
|
|
340
|
+
* @property {string} [_id] - Unique identifier for the translatable resource in
|
|
341
|
+
* the system.
|
|
342
|
+
* @property {string} type - Categorization of the resource indicating its
|
|
343
|
+
* context and ownership level
|
|
344
|
+
* @property {string} name - Primary identifier or title of the resource in its
|
|
345
|
+
* default language.
|
|
346
|
+
* @property {string} description - Detailed explanation of the resource's
|
|
347
|
+
* purpose and content scope.
|
|
348
|
+
* @property {Meta} meta
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @typedef Meta
|
|
353
|
+
* @property {string} [created_by] - ID of the user who initially created the resource.
|
|
354
|
+
* @property {string} [updated_by] - ID of the user who last modified the resource.
|
|
355
|
+
* @property {string} [created_at] - Timestamp indicating when the resource was
|
|
356
|
+
* first created.
|
|
357
|
+
* @property {string} [updated_at] - Timestamp indicating when the resource was
|
|
358
|
+
* last modified.
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @typedef ResourceTranslation
|
|
363
|
+
* @property {string} [_id] - Unique identifier for the translation entry in the system.
|
|
364
|
+
* @property {string} [locale] - Language code indicating the target language of
|
|
365
|
+
* the translation.
|
|
366
|
+
* @property {Object} [value] - Contains the translated content with flexible
|
|
367
|
+
* schema based on resource type.
|
|
368
|
+
*/
|
|
369
|
+
|
|
28
370
|
class ContentPublicModel {
|
|
371
|
+
/** @returns {BasicDetailsPayloadSchema} */
|
|
372
|
+
static BasicDetailsPayloadSchema() {
|
|
373
|
+
return Joi.object({
|
|
374
|
+
name: Joi.string().allow(""),
|
|
375
|
+
logo_url: Joi.string().allow(""),
|
|
376
|
+
favicon_url: Joi.string().allow(""),
|
|
377
|
+
title: Joi.string().allow(""),
|
|
378
|
+
meta_title: Joi.string().allow(""),
|
|
379
|
+
meta_description: Joi.string().allow(""),
|
|
380
|
+
meta_image: Joi.string().allow(""),
|
|
381
|
+
whats_new: Joi.array().items(ContentPublicModel.WhatsNew()),
|
|
382
|
+
features: Joi.array().items(ContentPublicModel.Features()),
|
|
383
|
+
authentication: Joi.object().pattern(/\S/, Joi.any()),
|
|
384
|
+
business_account: ContentPublicModel.BusinessAccount(),
|
|
385
|
+
seller_support: ContentPublicModel.SellerSupport(),
|
|
386
|
+
copyright: Joi.string().allow(""),
|
|
387
|
+
address: Joi.string().allow(""),
|
|
388
|
+
documentation_url: Joi.string().allow(""),
|
|
389
|
+
faq_url: Joi.string().allow(""),
|
|
390
|
+
facebook_url: Joi.string().allow(""),
|
|
391
|
+
instagram_url: Joi.string().allow(""),
|
|
392
|
+
privacy_url: Joi.string().allow(""),
|
|
393
|
+
twitter_url: Joi.string().allow(""),
|
|
394
|
+
termsofservice_url: Joi.string().allow(""),
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/** @returns {WhatsNew} */
|
|
399
|
+
static WhatsNew() {
|
|
400
|
+
return Joi.object({
|
|
401
|
+
description: Joi.string().allow(""),
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/** @returns {Features} */
|
|
406
|
+
static Features() {
|
|
407
|
+
return Joi.object({
|
|
408
|
+
title: Joi.string().allow(""),
|
|
409
|
+
text: Joi.string().allow(""),
|
|
410
|
+
list: Joi.array().items(Joi.string().allow("")),
|
|
411
|
+
image: Joi.string().allow(""),
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** @returns {BusinessAccount} */
|
|
416
|
+
static BusinessAccount() {
|
|
417
|
+
return Joi.object({
|
|
418
|
+
is_limit: Joi.boolean(),
|
|
419
|
+
threshold: Joi.number(),
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/** @returns {SellerSupport} */
|
|
424
|
+
static SellerSupport() {
|
|
425
|
+
return Joi.object({
|
|
426
|
+
email: Joi.string().allow(""),
|
|
427
|
+
phone_number: Joi.number(),
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/** @returns {MenuSchema} */
|
|
432
|
+
static MenuSchema() {
|
|
433
|
+
return Joi.object({
|
|
434
|
+
sales_channel: ContentPublicModel.SalesChannelSchema(),
|
|
435
|
+
other_seller: ContentPublicModel.OtherSellerSchema(),
|
|
436
|
+
footer_content: ContentPublicModel.FooterContentSchema(),
|
|
437
|
+
can_create_business_account: Joi.boolean(),
|
|
438
|
+
company_level: Joi.array().items(
|
|
439
|
+
ContentPublicModel.CompanyLevelMenuItemSchema()
|
|
440
|
+
),
|
|
441
|
+
application_level: Joi.array().items(
|
|
442
|
+
ContentPublicModel.ApplicationLevelMenuItemSchema()
|
|
443
|
+
),
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/** @returns {MenusSchema} */
|
|
448
|
+
static MenusSchema() {
|
|
449
|
+
return Joi.object({
|
|
450
|
+
_id: Joi.string().allow(""),
|
|
451
|
+
desktop: ContentPublicModel.MenuTypeSchema(),
|
|
452
|
+
mobile: ContentPublicModel.MenuTypeSchema(),
|
|
453
|
+
__v: Joi.number(),
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/** @returns {MenuTypeSchema} */
|
|
458
|
+
static MenuTypeSchema() {
|
|
459
|
+
return Joi.object({
|
|
460
|
+
menu: ContentPublicModel.MenuSchema(),
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** @returns {CompanyLevelMenuItemSchema} */
|
|
465
|
+
static CompanyLevelMenuItemSchema() {
|
|
466
|
+
return Joi.object({
|
|
467
|
+
visible_on: ContentPublicModel.VisibleOnSchema(),
|
|
468
|
+
display: Joi.string().allow(""),
|
|
469
|
+
permissions: Joi.array().items(Joi.string().allow("")),
|
|
470
|
+
title: Joi.string().allow(""),
|
|
471
|
+
link: Joi.string().allow(""),
|
|
472
|
+
icon: Joi.string().allow(""),
|
|
473
|
+
is_disabled: Joi.boolean(),
|
|
474
|
+
child: Joi.array().items(Joi.link("#CompanyLevelMenuItemSchema")),
|
|
475
|
+
}).id("CompanyLevelMenuItemSchema");
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/** @returns {ApplicationLevelMenuItemSchema} */
|
|
479
|
+
static ApplicationLevelMenuItemSchema() {
|
|
480
|
+
return Joi.object({
|
|
481
|
+
visible_on: ContentPublicModel.VisibleOnSchema(),
|
|
482
|
+
display: Joi.string().allow(""),
|
|
483
|
+
permissions: Joi.array().items(Joi.string().allow("")),
|
|
484
|
+
title: Joi.string().allow(""),
|
|
485
|
+
link: Joi.string().allow(""),
|
|
486
|
+
icon: Joi.string().allow(""),
|
|
487
|
+
is_disabled: Joi.boolean(),
|
|
488
|
+
child: Joi.array().items(Joi.link("#ApplicationLevelMenuItemSchema")),
|
|
489
|
+
}).id("ApplicationLevelMenuItemSchema");
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** @returns {VisibleOnSchema} */
|
|
493
|
+
static VisibleOnSchema() {
|
|
494
|
+
return Joi.object({
|
|
495
|
+
web: Joi.boolean(),
|
|
496
|
+
ios: Joi.boolean(),
|
|
497
|
+
android: Joi.boolean(),
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/** @returns {SalesChannelSchema} */
|
|
502
|
+
static SalesChannelSchema() {
|
|
503
|
+
return Joi.object({
|
|
504
|
+
can_add: Joi.boolean(),
|
|
505
|
+
title: Joi.string().allow(""),
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/** @returns {OtherSellerSchema} */
|
|
510
|
+
static OtherSellerSchema() {
|
|
511
|
+
return Joi.object({
|
|
512
|
+
is_visible: Joi.boolean(),
|
|
513
|
+
title: Joi.string().allow(""),
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/** @returns {FooterContentSchema} */
|
|
518
|
+
static FooterContentSchema() {
|
|
519
|
+
return Joi.object({
|
|
520
|
+
is_visible: Joi.boolean(),
|
|
521
|
+
line_one: Joi.string().allow(""),
|
|
522
|
+
line_two: Joi.string().allow(""),
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/** @returns {AnalyticsTagsSchema} */
|
|
527
|
+
static AnalyticsTagsSchema() {
|
|
528
|
+
return Joi.object({
|
|
529
|
+
_id: Joi.string().allow(""),
|
|
530
|
+
__v: Joi.number(),
|
|
531
|
+
body_code: Joi.string().allow(""),
|
|
532
|
+
enabled: Joi.boolean(),
|
|
533
|
+
header_code: Joi.string().allow(""),
|
|
534
|
+
name: Joi.string().allow(""),
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/** @returns {CustomPageBySlugSchema} */
|
|
539
|
+
static CustomPageBySlugSchema() {
|
|
540
|
+
return Joi.object({
|
|
541
|
+
_id: Joi.string().allow(""),
|
|
542
|
+
title: Joi.string().allow(""),
|
|
543
|
+
slug: Joi.string().allow(""),
|
|
544
|
+
type: Joi.string().allow(""),
|
|
545
|
+
description: Joi.string().allow(""),
|
|
546
|
+
published: Joi.boolean(),
|
|
547
|
+
content: Joi.array().items(ContentPublicModel.ItemSchema()),
|
|
548
|
+
seo: ContentPublicModel.CreateCustomPageSeoSchema(),
|
|
549
|
+
created_by: ContentPublicModel.CreatedBySchema(),
|
|
550
|
+
modified_by: ContentPublicModel.CreatedBySchema(),
|
|
551
|
+
archived: Joi.boolean(),
|
|
552
|
+
created_on: Joi.string().allow(""),
|
|
553
|
+
modified_on: Joi.string().allow(""),
|
|
554
|
+
__v: Joi.number(),
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** @returns {ItemSchema} */
|
|
559
|
+
static ItemSchema() {
|
|
560
|
+
return Joi.object({
|
|
561
|
+
type: Joi.string().allow(""),
|
|
562
|
+
value: Joi.string().allow(""),
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** @returns {CreateCustomPageSeoSchema} */
|
|
567
|
+
static CreateCustomPageSeoSchema() {
|
|
568
|
+
return Joi.object({
|
|
569
|
+
title: Joi.string().allow(""),
|
|
570
|
+
description: Joi.string().allow(""),
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/** @returns {RawHtmlContentSchema} */
|
|
575
|
+
static RawHtmlContentSchema() {
|
|
576
|
+
return Joi.object({
|
|
577
|
+
type: Joi.string().allow(""),
|
|
578
|
+
value: Joi.string().allow(""),
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/** @returns {FooterSchema} */
|
|
583
|
+
static FooterSchema() {
|
|
584
|
+
return Joi.object({
|
|
585
|
+
_id: Joi.string().allow(""),
|
|
586
|
+
title: Joi.string().allow(""),
|
|
587
|
+
description: Joi.string().allow(""),
|
|
588
|
+
type: Joi.string().allow(""),
|
|
589
|
+
tags: Joi.array().items(Joi.any()),
|
|
590
|
+
published: Joi.boolean(),
|
|
591
|
+
content: Joi.array().items(ContentPublicModel.RawHtmlContentSchema()),
|
|
592
|
+
footer_meta: Joi.array().items(Joi.any()),
|
|
593
|
+
created_by: ContentPublicModel.CreatedBySchema(),
|
|
594
|
+
modified_by: ContentPublicModel.CreatedBySchema(),
|
|
595
|
+
archived: Joi.boolean(),
|
|
596
|
+
__v: Joi.number(),
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/** @returns {HomePageContentSchema} */
|
|
601
|
+
static HomePageContentSchema() {
|
|
602
|
+
return Joi.object({
|
|
603
|
+
_id: Joi.string().allow(""),
|
|
604
|
+
slug: Joi.string().allow(""),
|
|
605
|
+
created_by: ContentPublicModel.CreatedBySchema(),
|
|
606
|
+
archived: Joi.boolean(),
|
|
607
|
+
page_type: Joi.string().allow(""),
|
|
608
|
+
created_on: Joi.string().allow(""),
|
|
609
|
+
modified_on: Joi.string().allow(""),
|
|
610
|
+
__v: Joi.number(),
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/** @returns {NavItemSchema} */
|
|
615
|
+
static NavItemSchema() {
|
|
616
|
+
return Joi.object({
|
|
617
|
+
title: Joi.string().allow(""),
|
|
618
|
+
link: Joi.string().allow(""),
|
|
619
|
+
href: Joi.string().allow(""),
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** @returns {NavbarSchema} */
|
|
624
|
+
static NavbarSchema() {
|
|
625
|
+
return Joi.object({
|
|
626
|
+
_id: Joi.string().allow(""),
|
|
627
|
+
items: Joi.array().items(ContentPublicModel.NavItemSchema()),
|
|
628
|
+
__v: Joi.number(),
|
|
629
|
+
modified_by: ContentPublicModel.CreatedBySchema(),
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** @returns {MediaSchema} */
|
|
634
|
+
static MediaSchema() {
|
|
635
|
+
return Joi.object({
|
|
636
|
+
url: Joi.string().allow(""),
|
|
637
|
+
type: Joi.string().allow(""),
|
|
638
|
+
alt: Joi.string().allow(""),
|
|
639
|
+
anchor_link: Joi.string().allow(""),
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/** @returns {CreatedBySchema} */
|
|
644
|
+
static CreatedBySchema() {
|
|
645
|
+
return Joi.object({
|
|
646
|
+
user_id: Joi.string().allow(""),
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/** @returns {PricingBannerSchema} */
|
|
651
|
+
static PricingBannerSchema() {
|
|
652
|
+
return Joi.object({
|
|
653
|
+
_id: Joi.string().allow(""),
|
|
654
|
+
web_banner: ContentPublicModel.MediaSchema(),
|
|
655
|
+
mobile_banner: ContentPublicModel.MediaSchema(),
|
|
656
|
+
published: Joi.boolean(),
|
|
657
|
+
created_by: ContentPublicModel.CreatedBySchema(),
|
|
658
|
+
modified_by: ContentPublicModel.CreatedBySchema(),
|
|
659
|
+
created_on: Joi.string().allow(""),
|
|
660
|
+
modified_on: Joi.string().allow(""),
|
|
661
|
+
__v: Joi.number(),
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/** @returns {SdkReadmeSchema} */
|
|
666
|
+
static SdkReadmeSchema() {
|
|
667
|
+
return Joi.object({
|
|
668
|
+
data: Joi.string().allow(""),
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/** @returns {TagsSchema} */
|
|
673
|
+
static TagsSchema() {
|
|
674
|
+
return Joi.object({
|
|
675
|
+
items: Joi.array().items(ContentPublicModel.CustomItemSchema()),
|
|
676
|
+
page: ContentPublicModel.PageSchema(),
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/** @returns {CustomItemSchema} */
|
|
681
|
+
static CustomItemSchema() {
|
|
682
|
+
return Joi.object({
|
|
683
|
+
_id: Joi.string().allow(""),
|
|
684
|
+
name: Joi.string().allow(""),
|
|
685
|
+
type: Joi.string().allow(""),
|
|
686
|
+
sub_type: Joi.string().allow(""),
|
|
687
|
+
position: Joi.string().allow(""),
|
|
688
|
+
archived: Joi.boolean(),
|
|
689
|
+
created_by: ContentPublicModel.UserSchema(),
|
|
690
|
+
url: Joi.string().allow(""),
|
|
691
|
+
content: Joi.string().allow(""),
|
|
692
|
+
created_on: Joi.string().allow(""),
|
|
693
|
+
modified_on: Joi.string().allow(""),
|
|
694
|
+
__v: Joi.number(),
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/** @returns {PageSchema} */
|
|
699
|
+
static PageSchema() {
|
|
700
|
+
return Joi.object({
|
|
701
|
+
type: Joi.string().allow(""),
|
|
702
|
+
current: Joi.number(),
|
|
703
|
+
size: Joi.number(),
|
|
704
|
+
item_total: Joi.number(),
|
|
705
|
+
has_next: Joi.boolean(),
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/** @returns {UserSchema} */
|
|
710
|
+
static UserSchema() {
|
|
711
|
+
return Joi.object({
|
|
712
|
+
user_id: Joi.string().allow(""),
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
|
|
29
716
|
/** @returns {CredentialSchema} */
|
|
30
717
|
static CredentialSchema() {
|
|
31
718
|
return Joi.object({
|
|
32
|
-
|
|
719
|
+
_id: Joi.string().allow(""),
|
|
720
|
+
configuration: ContentPublicModel.ConfigurationSchema(),
|
|
33
721
|
entity_type: Joi.string().allow(""),
|
|
34
722
|
type: Joi.string().allow(""),
|
|
35
723
|
is_enable: Joi.boolean(),
|
|
724
|
+
updated_at: Joi.string().allow(""),
|
|
725
|
+
created_at: Joi.string().allow(""),
|
|
726
|
+
__v: Joi.number(),
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/** @returns {ConfigurationSchema} */
|
|
731
|
+
static ConfigurationSchema() {
|
|
732
|
+
return Joi.object({
|
|
733
|
+
token: Joi.string().allow(""),
|
|
734
|
+
host: Joi.string().allow(""),
|
|
36
735
|
});
|
|
37
736
|
}
|
|
38
737
|
|
|
@@ -53,7 +752,56 @@ class ContentPublicModel {
|
|
|
53
752
|
info: Joi.string().allow(""),
|
|
54
753
|
request_id: Joi.string().allow(""),
|
|
55
754
|
stack_trace: Joi.string().allow(""),
|
|
56
|
-
meta: Joi.any(),
|
|
755
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/** @returns {Language} */
|
|
760
|
+
static Language() {
|
|
761
|
+
return Joi.object({
|
|
762
|
+
_id: Joi.string().allow(""),
|
|
763
|
+
locale: Joi.string().allow("").required(),
|
|
764
|
+
direction: Joi.string().allow("").required(),
|
|
765
|
+
name: Joi.string().allow("").required(),
|
|
766
|
+
display_name: Joi.string().allow(""),
|
|
767
|
+
is_enabled: Joi.boolean(),
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/** @returns {Error} */
|
|
772
|
+
static Error() {
|
|
773
|
+
return Joi.object({
|
|
774
|
+
error: Joi.string().allow(""),
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/** @returns {TranslatableResource} */
|
|
779
|
+
static TranslatableResource() {
|
|
780
|
+
return Joi.object({
|
|
781
|
+
_id: Joi.string().allow(""),
|
|
782
|
+
type: Joi.string().allow("").required(),
|
|
783
|
+
name: Joi.string().allow("").required(),
|
|
784
|
+
description: Joi.string().allow("").required(),
|
|
785
|
+
meta: ContentPublicModel.Meta().required(),
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/** @returns {Meta} */
|
|
790
|
+
static Meta() {
|
|
791
|
+
return Joi.object({
|
|
792
|
+
created_by: Joi.string().allow(""),
|
|
793
|
+
updated_by: Joi.string().allow(""),
|
|
794
|
+
created_at: Joi.string().allow(""),
|
|
795
|
+
updated_at: Joi.string().allow(""),
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/** @returns {ResourceTranslation} */
|
|
800
|
+
static ResourceTranslation() {
|
|
801
|
+
return Joi.object({
|
|
802
|
+
_id: Joi.string().allow(""),
|
|
803
|
+
locale: Joi.string().allow(""),
|
|
804
|
+
value: Joi.object().pattern(/\S/, Joi.any()),
|
|
57
805
|
});
|
|
58
806
|
}
|
|
59
807
|
}
|