@gofynd/fdk-client-javascript 1.0.2 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +557 -1279
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +14453 -17192
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3438 -4172
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3400 -5361
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +38 -38
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +100 -100
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +84 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +581 -581
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -1,1515 +1,981 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class CartModel {
|
|
4
|
-
static
|
|
4
|
+
static AbandonedCart() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
_id: Joi.string().allow("").required(),
|
|
7
|
+
app_id: Joi.string().allow(""),
|
|
8
|
+
articles: Joi.array().items(Joi.any()).required(),
|
|
9
|
+
bulk_coupon_discount: Joi.number().allow(null),
|
|
10
|
+
buy_now: Joi.boolean(),
|
|
11
|
+
cart_value: Joi.number(),
|
|
12
|
+
cashback: Joi.any().required(),
|
|
13
|
+
checkout_mode: Joi.string().allow(""),
|
|
14
|
+
cod_charges: Joi.any(),
|
|
15
|
+
comment: Joi.string().allow("").allow(null),
|
|
16
|
+
coupon: Joi.any().allow(null),
|
|
17
|
+
created_on: Joi.string().allow("").required(),
|
|
18
|
+
delivery_charges: Joi.any(),
|
|
19
|
+
discount: Joi.number(),
|
|
20
|
+
expire_at: Joi.string().allow("").required(),
|
|
21
|
+
fc_index_map: Joi.array().items(Joi.number()),
|
|
22
|
+
fynd_credits: Joi.any(),
|
|
23
|
+
gstin: Joi.string().allow("").allow(null),
|
|
24
|
+
is_active: Joi.boolean(),
|
|
25
|
+
is_archive: Joi.boolean(),
|
|
26
|
+
is_default: Joi.boolean().required(),
|
|
27
|
+
last_modified: Joi.string().allow("").required(),
|
|
28
|
+
merge_qty: Joi.boolean().allow(null),
|
|
29
|
+
meta: Joi.any().allow(null),
|
|
30
|
+
order_id: Joi.string().allow(""),
|
|
31
|
+
payment_methods: Joi.array().items(Joi.any()),
|
|
32
|
+
payment_mode: Joi.string().allow("").allow(null),
|
|
33
|
+
payments: Joi.any().allow(null),
|
|
34
|
+
pick_up_customer_details: Joi.any().allow(null),
|
|
35
|
+
promotion: Joi.any(),
|
|
36
|
+
shipments: Joi.array().items(Joi.any()),
|
|
37
|
+
uid: Joi.number().required(),
|
|
38
|
+
user_id: Joi.string().allow("").required(),
|
|
19
39
|
});
|
|
20
40
|
}
|
|
21
|
-
|
|
22
|
-
static Validation() {
|
|
41
|
+
static AbandonedCartResponse() {
|
|
23
42
|
return Joi.object({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
items: Joi.array().items(CartModel.AbandonedCart()),
|
|
44
|
+
message: Joi.string().allow(""),
|
|
45
|
+
page: CartModel.Page(),
|
|
46
|
+
result: Joi.any(),
|
|
47
|
+
success: Joi.boolean(),
|
|
29
48
|
});
|
|
30
49
|
}
|
|
31
|
-
|
|
32
|
-
static RuleDefinition() {
|
|
50
|
+
static ActionQuery() {
|
|
33
51
|
return Joi.object({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
currency_code: Joi.string().allow(""),
|
|
37
|
-
|
|
38
|
-
scope: Joi.array().items(Joi.string().allow("")),
|
|
39
|
-
|
|
40
|
-
calculate_on: Joi.string().allow("").required(),
|
|
41
|
-
|
|
42
|
-
is_exact: Joi.boolean(),
|
|
43
|
-
|
|
44
|
-
auto_apply: Joi.boolean(),
|
|
45
|
-
|
|
46
|
-
value_type: Joi.string().allow("").required(),
|
|
47
|
-
|
|
48
|
-
applicable_on: Joi.string().allow("").required(),
|
|
52
|
+
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
|
|
52
|
-
static State() {
|
|
55
|
+
static AddCartDetailResponse() {
|
|
53
56
|
return Joi.object({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
is_archived: Joi.boolean(),
|
|
57
|
+
cart: CartModel.CartDetailResponse(),
|
|
58
|
+
message: Joi.string().allow(""),
|
|
59
|
+
partial: Joi.boolean(),
|
|
60
|
+
success: Joi.boolean(),
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
|
-
|
|
62
|
-
static CouponAuthor() {
|
|
63
|
+
static AddCartRequest() {
|
|
63
64
|
return Joi.object({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
modified_by: Joi.string().allow("").allow(null),
|
|
65
|
+
items: Joi.array().items(CartModel.AddProductCart()),
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
|
-
|
|
70
|
-
static Validity() {
|
|
68
|
+
static AddProductCart() {
|
|
71
69
|
return Joi.object({
|
|
72
|
-
|
|
70
|
+
_custom_json: Joi.any(),
|
|
71
|
+
article_assignment: Joi.any(),
|
|
72
|
+
article_id: Joi.string().allow(""),
|
|
73
|
+
display: Joi.string().allow(""),
|
|
74
|
+
extra_meta: Joi.any(),
|
|
75
|
+
item_id: Joi.number(),
|
|
76
|
+
item_size: Joi.string().allow(""),
|
|
77
|
+
parent_item_identifiers: Joi.any(),
|
|
78
|
+
pos: Joi.boolean(),
|
|
79
|
+
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
80
|
+
quantity: Joi.number(),
|
|
81
|
+
seller_id: Joi.number(),
|
|
82
|
+
store_id: Joi.number(),
|
|
73
83
|
});
|
|
74
84
|
}
|
|
75
|
-
|
|
76
|
-
static CouponDateMeta() {
|
|
85
|
+
static AppliedPromotion() {
|
|
77
86
|
return Joi.object({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
amount: Joi.number(),
|
|
88
|
+
article_quantity: Joi.number(),
|
|
89
|
+
mrp_promotion: Joi.boolean(),
|
|
90
|
+
offer_text: Joi.string().allow(""),
|
|
91
|
+
ownership: CartModel.Ownership2(),
|
|
92
|
+
promo_id: Joi.string().allow(""),
|
|
93
|
+
promotion_type: Joi.string().allow(""),
|
|
81
94
|
});
|
|
82
95
|
}
|
|
83
|
-
|
|
84
|
-
static PaymentAllowValue() {
|
|
96
|
+
static ArticlePriceInfo() {
|
|
85
97
|
return Joi.object({
|
|
86
|
-
|
|
98
|
+
base: CartModel.BasePrice(),
|
|
99
|
+
converted: CartModel.BasePrice(),
|
|
87
100
|
});
|
|
88
101
|
}
|
|
89
|
-
|
|
90
|
-
static PaymentModes() {
|
|
102
|
+
static BaseInfo() {
|
|
91
103
|
return Joi.object({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
name: Joi.string().allow(""),
|
|
105
|
+
uid: Joi.number(),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
static BasePrice() {
|
|
109
|
+
return Joi.object({
|
|
110
|
+
currency_code: Joi.string().allow(""),
|
|
111
|
+
currency_symbol: Joi.string().allow(""),
|
|
112
|
+
effective: Joi.number(),
|
|
113
|
+
marked: Joi.number(),
|
|
99
114
|
});
|
|
100
115
|
}
|
|
101
|
-
|
|
102
116
|
static BulkBundleRestriction() {
|
|
103
117
|
return Joi.object({
|
|
104
118
|
multi_store_allowed: Joi.boolean().required(),
|
|
105
119
|
});
|
|
106
120
|
}
|
|
107
|
-
|
|
108
|
-
static UsesRemaining() {
|
|
121
|
+
static CartBreakup() {
|
|
109
122
|
return Joi.object({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
app: Joi.number(),
|
|
123
|
+
coupon: CartModel.CouponBreakup(),
|
|
124
|
+
display: Joi.array().items(CartModel.DisplayBreakup()),
|
|
125
|
+
loyalty_points: CartModel.LoyaltyPoints(),
|
|
126
|
+
raw: CartModel.RawBreakup(),
|
|
115
127
|
});
|
|
116
128
|
}
|
|
117
|
-
|
|
118
|
-
static UsesRestriction() {
|
|
129
|
+
static CartCurrency() {
|
|
119
130
|
return Joi.object({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
remaining: CartModel.UsesRemaining(),
|
|
131
|
+
code: Joi.string().allow(""),
|
|
132
|
+
symbol: Joi.string().allow(""),
|
|
123
133
|
});
|
|
124
134
|
}
|
|
125
|
-
|
|
126
|
-
static PostOrder() {
|
|
135
|
+
static CartDetailResponse() {
|
|
127
136
|
return Joi.object({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
137
|
+
applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
|
|
138
|
+
breakup_values: CartModel.CartBreakup(),
|
|
139
|
+
buy_now: Joi.boolean(),
|
|
140
|
+
checkout_mode: Joi.string().allow(""),
|
|
141
|
+
comment: Joi.string().allow(""),
|
|
142
|
+
coupon_text: Joi.string().allow(""),
|
|
143
|
+
currency: CartModel.CartCurrency(),
|
|
144
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
145
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
146
|
+
gstin: Joi.string().allow(""),
|
|
147
|
+
id: Joi.string().allow(""),
|
|
148
|
+
is_valid: Joi.boolean(),
|
|
149
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
150
|
+
last_modified: Joi.string().allow(""),
|
|
151
|
+
message: Joi.string().allow(""),
|
|
152
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
153
|
+
restrict_checkout: Joi.boolean(),
|
|
131
154
|
});
|
|
132
155
|
}
|
|
133
|
-
|
|
134
|
-
static PriceRange() {
|
|
156
|
+
static CartItem() {
|
|
135
157
|
return Joi.object({
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
158
|
+
product_id: Joi.string().allow("").required(),
|
|
159
|
+
quantity: Joi.number(),
|
|
160
|
+
size: Joi.string().allow("").required(),
|
|
139
161
|
});
|
|
140
162
|
}
|
|
141
|
-
|
|
142
|
-
static Restrictions() {
|
|
163
|
+
static CartItemMeta() {
|
|
143
164
|
return Joi.object({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
bulk_bundle: CartModel.BulkBundleRestriction(),
|
|
147
|
-
|
|
148
|
-
uses: CartModel.UsesRestriction(),
|
|
149
|
-
|
|
150
|
-
platforms: Joi.array().items(Joi.string().allow("")),
|
|
151
|
-
|
|
152
|
-
post_order: CartModel.PostOrder(),
|
|
153
|
-
|
|
154
|
-
coupon_allowed: Joi.boolean(),
|
|
155
|
-
|
|
156
|
-
ordering_stores: Joi.array().items(Joi.number()),
|
|
157
|
-
|
|
158
|
-
user_groups: Joi.array().items(Joi.number()),
|
|
159
|
-
|
|
160
|
-
price_range: CartModel.PriceRange(),
|
|
165
|
+
group_id: Joi.string().allow(""),
|
|
166
|
+
primary_item: Joi.boolean(),
|
|
161
167
|
});
|
|
162
168
|
}
|
|
163
|
-
|
|
164
|
-
static CouponAction() {
|
|
169
|
+
static CartProduct() {
|
|
165
170
|
return Joi.object({
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
action: CartModel.ProductAction(),
|
|
172
|
+
brand: CartModel.BaseInfo(),
|
|
173
|
+
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
174
|
+
images: Joi.array().items(CartModel.ProductImage()),
|
|
175
|
+
name: Joi.string().allow(""),
|
|
176
|
+
slug: Joi.string().allow(""),
|
|
177
|
+
type: Joi.string().allow(""),
|
|
178
|
+
uid: Joi.number(),
|
|
169
179
|
});
|
|
170
180
|
}
|
|
171
|
-
|
|
172
|
-
static CouponSchedule() {
|
|
181
|
+
static CartProductIdentifer() {
|
|
173
182
|
return Joi.object({
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
start: Joi.string().allow(""),
|
|
177
|
-
|
|
178
|
-
end: Joi.string().allow("").allow(null),
|
|
179
|
-
|
|
180
|
-
duration: Joi.number().allow(null),
|
|
181
|
-
|
|
182
|
-
next_schedule: Joi.array().items(Joi.any()),
|
|
183
|
+
identifier: Joi.string().allow(""),
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
|
-
|
|
186
|
-
static Rule() {
|
|
187
|
-
return Joi.object({
|
|
188
|
-
value: Joi.number(),
|
|
189
|
-
|
|
190
|
-
key: Joi.number(),
|
|
191
|
-
|
|
192
|
-
max: Joi.number(),
|
|
193
|
-
|
|
194
|
-
min: Joi.number(),
|
|
195
|
-
|
|
196
|
-
discount_qty: Joi.number(),
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
static Ownership() {
|
|
186
|
+
static CartProductInfo() {
|
|
201
187
|
return Joi.object({
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
188
|
+
article: CartModel.ProductArticle(),
|
|
189
|
+
availability: CartModel.ProductAvailability(),
|
|
190
|
+
bulk_offer: Joi.any(),
|
|
191
|
+
coupon_message: Joi.string().allow(""),
|
|
192
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
193
|
+
discount: Joi.string().allow(""),
|
|
194
|
+
identifiers: CartModel.CartProductIdentifer().required(),
|
|
195
|
+
is_set: Joi.boolean(),
|
|
196
|
+
key: Joi.string().allow(""),
|
|
197
|
+
message: Joi.string().allow(""),
|
|
198
|
+
moq: Joi.any(),
|
|
199
|
+
parent_item_identifiers: Joi.any(),
|
|
200
|
+
price: CartModel.ProductPriceInfo(),
|
|
201
|
+
price_per_unit: CartModel.ProductPriceInfo(),
|
|
202
|
+
product: CartModel.CartProduct(),
|
|
203
|
+
promo_meta: CartModel.PromoMeta(),
|
|
204
|
+
promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
|
|
205
|
+
quantity: Joi.number(),
|
|
205
206
|
});
|
|
206
207
|
}
|
|
207
|
-
|
|
208
|
-
static DisplayMetaDict() {
|
|
208
|
+
static CategoryInfo() {
|
|
209
209
|
return Joi.object({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
title: Joi.string().allow(""),
|
|
210
|
+
name: Joi.string().allow(""),
|
|
211
|
+
uid: Joi.number(),
|
|
213
212
|
});
|
|
214
213
|
}
|
|
215
|
-
|
|
216
|
-
static DisplayMeta() {
|
|
214
|
+
static CompareObject() {
|
|
217
215
|
return Joi.object({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
title: Joi.string().allow(""),
|
|
225
|
-
|
|
226
|
-
description: Joi.string().allow(""),
|
|
227
|
-
|
|
228
|
-
subtitle: Joi.string().allow(""),
|
|
216
|
+
equals: Joi.number(),
|
|
217
|
+
greater_than: Joi.number(),
|
|
218
|
+
greater_than_equals: Joi.number(),
|
|
219
|
+
less_than: Joi.number(),
|
|
220
|
+
less_than_equals: Joi.number(),
|
|
229
221
|
});
|
|
230
222
|
}
|
|
231
|
-
|
|
232
|
-
static Identifier() {
|
|
223
|
+
static CouponAction() {
|
|
233
224
|
return Joi.object({
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
item_id: Joi.array().items(Joi.number()),
|
|
237
|
-
|
|
238
|
-
brand_id: Joi.array().items(Joi.number()),
|
|
239
|
-
|
|
240
|
-
user_id: Joi.array().items(Joi.string().allow("")),
|
|
241
|
-
|
|
242
|
-
category_id: Joi.array().items(Joi.number()),
|
|
243
|
-
|
|
244
|
-
company_id: Joi.array().items(Joi.number()),
|
|
245
|
-
|
|
246
|
-
article_id: Joi.array().items(Joi.string().allow("")),
|
|
247
|
-
|
|
248
|
-
store_id: Joi.array().items(Joi.number()),
|
|
249
|
-
|
|
250
|
-
collection_id: Joi.array().items(Joi.string().allow("")),
|
|
225
|
+
action_date: Joi.string().allow("").allow(null),
|
|
226
|
+
txn_mode: Joi.string().allow(""),
|
|
251
227
|
});
|
|
252
228
|
}
|
|
253
|
-
|
|
254
229
|
static CouponAdd() {
|
|
255
230
|
return Joi.object({
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
rule_definition: CartModel.RuleDefinition().required(),
|
|
259
|
-
|
|
260
|
-
state: CartModel.State(),
|
|
261
|
-
|
|
262
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
263
|
-
|
|
264
|
-
code: Joi.string().allow("").required(),
|
|
265
|
-
|
|
231
|
+
_schedule: CartModel.CouponSchedule(),
|
|
232
|
+
action: CartModel.CouponAction(),
|
|
266
233
|
author: CartModel.CouponAuthor(),
|
|
267
|
-
|
|
268
|
-
validity: CartModel.Validity().required(),
|
|
269
|
-
|
|
234
|
+
code: Joi.string().allow("").required(),
|
|
270
235
|
date_meta: CartModel.CouponDateMeta(),
|
|
271
|
-
|
|
236
|
+
display_meta: CartModel.DisplayMeta().required(),
|
|
237
|
+
identifiers: CartModel.Identifier().required(),
|
|
238
|
+
ownership: CartModel.Ownership().required(),
|
|
272
239
|
restrictions: CartModel.Restrictions(),
|
|
273
|
-
|
|
274
|
-
action: CartModel.CouponAction(),
|
|
275
|
-
|
|
276
|
-
_schedule: CartModel.CouponSchedule(),
|
|
277
|
-
|
|
278
240
|
rule: Joi.array().items(CartModel.Rule()).required(),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
display_meta: CartModel.DisplayMeta().required(),
|
|
283
|
-
|
|
241
|
+
rule_definition: CartModel.RuleDefinition().required(),
|
|
242
|
+
state: CartModel.State(),
|
|
243
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
284
244
|
type_slug: Joi.string().allow("").required(),
|
|
285
|
-
|
|
286
|
-
|
|
245
|
+
validation: CartModel.Validation(),
|
|
246
|
+
validity: CartModel.Validity().required(),
|
|
287
247
|
});
|
|
288
248
|
}
|
|
289
|
-
|
|
290
|
-
static CouponsResponse() {
|
|
249
|
+
static CouponAuthor() {
|
|
291
250
|
return Joi.object({
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
items: CartModel.CouponAdd(),
|
|
251
|
+
created_by: Joi.string().allow("").allow(null),
|
|
252
|
+
modified_by: Joi.string().allow("").allow(null),
|
|
295
253
|
});
|
|
296
254
|
}
|
|
297
|
-
|
|
298
|
-
static SuccessMessage() {
|
|
255
|
+
static CouponBreakup() {
|
|
299
256
|
return Joi.object({
|
|
257
|
+
code: Joi.string().allow(""),
|
|
258
|
+
is_applied: Joi.boolean(),
|
|
300
259
|
message: Joi.string().allow(""),
|
|
301
|
-
|
|
302
|
-
|
|
260
|
+
type: Joi.string().allow(""),
|
|
261
|
+
uid: Joi.string().allow(""),
|
|
262
|
+
value: Joi.number(),
|
|
303
263
|
});
|
|
304
264
|
}
|
|
305
|
-
|
|
306
|
-
static OperationErrorResponse() {
|
|
265
|
+
static CouponDateMeta() {
|
|
307
266
|
return Joi.object({
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
267
|
+
created_on: Joi.string().allow("").allow(null),
|
|
268
|
+
modified_on: Joi.string().allow("").allow(null),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
static CouponPartialUpdate() {
|
|
272
|
+
return Joi.object({
|
|
273
|
+
archive: Joi.boolean(),
|
|
274
|
+
schedule: CartModel.CouponSchedule(),
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
static CouponSchedule() {
|
|
278
|
+
return Joi.object({
|
|
279
|
+
cron: Joi.string().allow("").allow(null),
|
|
280
|
+
duration: Joi.number().allow(null),
|
|
281
|
+
end: Joi.string().allow("").allow(null),
|
|
282
|
+
next_schedule: Joi.array().items(Joi.any()),
|
|
283
|
+
start: Joi.string().allow(""),
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
static CouponsResponse() {
|
|
287
|
+
return Joi.object({
|
|
288
|
+
items: CartModel.CouponAdd(),
|
|
289
|
+
page: CartModel.Page(),
|
|
311
290
|
});
|
|
312
291
|
}
|
|
313
|
-
|
|
314
292
|
static CouponUpdate() {
|
|
315
293
|
return Joi.object({
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
rule_definition: CartModel.RuleDefinition().required(),
|
|
319
|
-
|
|
320
|
-
state: CartModel.State(),
|
|
321
|
-
|
|
322
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
323
|
-
|
|
324
|
-
code: Joi.string().allow("").required(),
|
|
325
|
-
|
|
294
|
+
_schedule: CartModel.CouponSchedule(),
|
|
295
|
+
action: CartModel.CouponAction(),
|
|
326
296
|
author: CartModel.CouponAuthor(),
|
|
327
|
-
|
|
328
|
-
validity: CartModel.Validity().required(),
|
|
329
|
-
|
|
297
|
+
code: Joi.string().allow("").required(),
|
|
330
298
|
date_meta: CartModel.CouponDateMeta(),
|
|
331
|
-
|
|
299
|
+
display_meta: CartModel.DisplayMeta().required(),
|
|
300
|
+
identifiers: CartModel.Identifier().required(),
|
|
301
|
+
ownership: CartModel.Ownership().required(),
|
|
332
302
|
restrictions: CartModel.Restrictions(),
|
|
333
|
-
|
|
334
|
-
action: CartModel.CouponAction(),
|
|
335
|
-
|
|
336
|
-
_schedule: CartModel.CouponSchedule(),
|
|
337
|
-
|
|
338
303
|
rule: Joi.array().items(CartModel.Rule()).required(),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
display_meta: CartModel.DisplayMeta().required(),
|
|
343
|
-
|
|
304
|
+
rule_definition: CartModel.RuleDefinition().required(),
|
|
305
|
+
state: CartModel.State(),
|
|
306
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
344
307
|
type_slug: Joi.string().allow("").required(),
|
|
345
|
-
|
|
346
|
-
|
|
308
|
+
validation: CartModel.Validation(),
|
|
309
|
+
validity: CartModel.Validity().required(),
|
|
347
310
|
});
|
|
348
311
|
}
|
|
349
|
-
|
|
350
|
-
static CouponPartialUpdate() {
|
|
312
|
+
static DiscountOffer() {
|
|
351
313
|
return Joi.object({
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
314
|
+
code: Joi.string().allow(""),
|
|
315
|
+
discount_amount: Joi.number(),
|
|
316
|
+
discount_percentage: Joi.number(),
|
|
317
|
+
discount_price: Joi.number(),
|
|
318
|
+
max_discount_amount: Joi.number(),
|
|
319
|
+
max_offer_quantity: Joi.number(),
|
|
320
|
+
min_offer_quantity: Joi.number(),
|
|
355
321
|
});
|
|
356
322
|
}
|
|
357
|
-
|
|
358
|
-
static CompareObject() {
|
|
323
|
+
static DiscountRule() {
|
|
359
324
|
return Joi.object({
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
equals: Joi.number(),
|
|
365
|
-
|
|
366
|
-
less_than: Joi.number(),
|
|
367
|
-
|
|
368
|
-
greater_than_equals: Joi.number(),
|
|
325
|
+
buy_condition: Joi.string().allow("").required(),
|
|
326
|
+
discount_type: Joi.string().allow("").required(),
|
|
327
|
+
item_criteria: CartModel.ItemCriteria().required(),
|
|
328
|
+
offer: CartModel.DiscountOffer().required(),
|
|
369
329
|
});
|
|
370
330
|
}
|
|
371
|
-
|
|
372
|
-
static ItemCriteria() {
|
|
331
|
+
static DisplayBreakup() {
|
|
373
332
|
return Joi.object({
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
item_category: Joi.array().items(Joi.number()),
|
|
381
|
-
|
|
382
|
-
item_exclude_sku: Joi.array().items(Joi.string().allow("")),
|
|
383
|
-
|
|
384
|
-
all_items: Joi.boolean(),
|
|
385
|
-
|
|
386
|
-
item_id: Joi.array().items(Joi.number()),
|
|
387
|
-
|
|
388
|
-
item_store: Joi.array().items(Joi.number()),
|
|
389
|
-
|
|
390
|
-
cart_quantity: CartModel.CompareObject(),
|
|
391
|
-
|
|
392
|
-
cart_total: CartModel.CompareObject(),
|
|
393
|
-
|
|
394
|
-
item_brand: Joi.array().items(Joi.number()),
|
|
395
|
-
|
|
396
|
-
item_company: Joi.array().items(Joi.number()),
|
|
397
|
-
|
|
398
|
-
item_sku: Joi.array().items(Joi.string().allow("")),
|
|
399
|
-
|
|
400
|
-
item_exclude_store: Joi.array().items(Joi.number()),
|
|
401
|
-
|
|
402
|
-
item_exclude_company: Joi.array().items(Joi.number()),
|
|
403
|
-
|
|
404
|
-
item_size: Joi.array().items(Joi.string().allow("")),
|
|
333
|
+
currency_code: Joi.string().allow(""),
|
|
334
|
+
currency_symbol: Joi.string().allow(""),
|
|
335
|
+
display: Joi.string().allow(""),
|
|
336
|
+
key: Joi.string().allow(""),
|
|
337
|
+
message: Joi.array().items(Joi.string().allow("")),
|
|
338
|
+
value: Joi.number(),
|
|
405
339
|
});
|
|
406
340
|
}
|
|
407
|
-
|
|
408
|
-
static Ownership1() {
|
|
341
|
+
static DisplayMeta() {
|
|
409
342
|
return Joi.object({
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
343
|
+
apply: CartModel.DisplayMetaDict(),
|
|
344
|
+
auto: CartModel.DisplayMetaDict(),
|
|
345
|
+
description: Joi.string().allow(""),
|
|
346
|
+
remove: CartModel.DisplayMetaDict(),
|
|
347
|
+
subtitle: Joi.string().allow(""),
|
|
348
|
+
title: Joi.string().allow(""),
|
|
413
349
|
});
|
|
414
350
|
}
|
|
415
|
-
|
|
416
|
-
static PromotionAction() {
|
|
351
|
+
static DisplayMeta1() {
|
|
417
352
|
return Joi.object({
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
353
|
+
description: Joi.string().allow(""),
|
|
354
|
+
name: Joi.string().allow(""),
|
|
355
|
+
offer_text: Joi.string().allow(""),
|
|
421
356
|
});
|
|
422
357
|
}
|
|
423
|
-
|
|
424
|
-
static PromotionAuthor() {
|
|
358
|
+
static DisplayMetaDict() {
|
|
425
359
|
return Joi.object({
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
modified_by: Joi.string().allow("").allow(null),
|
|
360
|
+
subtitle: Joi.string().allow(""),
|
|
361
|
+
title: Joi.string().allow(""),
|
|
429
362
|
});
|
|
430
363
|
}
|
|
431
|
-
|
|
432
|
-
static PaymentAllowValue1() {
|
|
364
|
+
static Identifier() {
|
|
433
365
|
return Joi.object({
|
|
434
|
-
|
|
366
|
+
article_id: Joi.array().items(Joi.string().allow("")),
|
|
367
|
+
brand_id: Joi.array().items(Joi.number()),
|
|
368
|
+
category_id: Joi.array().items(Joi.number()),
|
|
369
|
+
collection_id: Joi.array().items(Joi.string().allow("")),
|
|
370
|
+
company_id: Joi.array().items(Joi.number()),
|
|
371
|
+
exclude_brand_id: Joi.array().items(Joi.number()),
|
|
372
|
+
item_id: Joi.array().items(Joi.number()),
|
|
373
|
+
store_id: Joi.array().items(Joi.number()),
|
|
374
|
+
user_id: Joi.array().items(Joi.string().allow("")),
|
|
435
375
|
});
|
|
436
376
|
}
|
|
437
|
-
|
|
438
|
-
static PromotionPaymentModes() {
|
|
377
|
+
static ItemCriteria() {
|
|
439
378
|
return Joi.object({
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
379
|
+
all_items: Joi.boolean(),
|
|
380
|
+
buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
381
|
+
cart_quantity: CartModel.CompareObject(),
|
|
382
|
+
cart_total: CartModel.CompareObject(),
|
|
383
|
+
item_brand: Joi.array().items(Joi.number()),
|
|
384
|
+
item_category: Joi.array().items(Joi.number()),
|
|
385
|
+
item_company: Joi.array().items(Joi.number()),
|
|
386
|
+
item_exclude_brand: Joi.array().items(Joi.number()),
|
|
387
|
+
item_exclude_category: Joi.array().items(Joi.number()),
|
|
388
|
+
item_exclude_company: Joi.array().items(Joi.number()),
|
|
389
|
+
item_exclude_sku: Joi.array().items(Joi.string().allow("")),
|
|
390
|
+
item_exclude_store: Joi.array().items(Joi.number()),
|
|
391
|
+
item_id: Joi.array().items(Joi.number()),
|
|
392
|
+
item_size: Joi.array().items(Joi.string().allow("")),
|
|
393
|
+
item_sku: Joi.array().items(Joi.string().allow("")),
|
|
394
|
+
item_store: Joi.array().items(Joi.number()),
|
|
445
395
|
});
|
|
446
396
|
}
|
|
447
|
-
|
|
448
|
-
static UsesRemaining1() {
|
|
397
|
+
static LoyaltyPoints() {
|
|
449
398
|
return Joi.object({
|
|
399
|
+
applicable: Joi.number(),
|
|
400
|
+
description: Joi.string().allow(""),
|
|
401
|
+
is_applied: Joi.boolean(),
|
|
450
402
|
total: Joi.number(),
|
|
451
|
-
|
|
452
|
-
user: Joi.number(),
|
|
453
403
|
});
|
|
454
404
|
}
|
|
455
|
-
|
|
456
|
-
static UsesRestriction1() {
|
|
405
|
+
static MultiTenderPaymentMeta() {
|
|
457
406
|
return Joi.object({
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
407
|
+
current_status: Joi.string().allow("").allow(null),
|
|
408
|
+
extra_meta: Joi.any().allow(null),
|
|
409
|
+
order_id: Joi.string().allow("").allow(null),
|
|
410
|
+
payment_gateway: Joi.string().allow("").allow(null),
|
|
411
|
+
payment_id: Joi.string().allow("").allow(null),
|
|
461
412
|
});
|
|
462
413
|
}
|
|
463
|
-
|
|
464
|
-
static UserRegistered() {
|
|
414
|
+
static MultiTenderPaymentMethod() {
|
|
465
415
|
return Joi.object({
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
416
|
+
amount: Joi.number().required(),
|
|
417
|
+
meta: CartModel.MultiTenderPaymentMeta(),
|
|
418
|
+
mode: Joi.string().allow("").required(),
|
|
419
|
+
name: Joi.string().allow(""),
|
|
469
420
|
});
|
|
470
421
|
}
|
|
471
|
-
|
|
472
|
-
static PostOrder1() {
|
|
422
|
+
static OpenapiCartDetailsRequest() {
|
|
473
423
|
return Joi.object({
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
cancellation_allowed: Joi.boolean(),
|
|
424
|
+
cart_items: CartModel.CartItem(),
|
|
477
425
|
});
|
|
478
426
|
}
|
|
479
|
-
|
|
480
|
-
static Restrictions1() {
|
|
427
|
+
static OpenapiCartDetailsResponse() {
|
|
481
428
|
return Joi.object({
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
platforms: Joi.array().items(Joi.string().allow("")),
|
|
487
|
-
|
|
488
|
-
user_id: Joi.array().items(Joi.string().allow("")),
|
|
489
|
-
|
|
490
|
-
user_registered: CartModel.UserRegistered(),
|
|
491
|
-
|
|
492
|
-
order_quantity: Joi.number(),
|
|
493
|
-
|
|
494
|
-
post_order: CartModel.PostOrder1(),
|
|
495
|
-
|
|
496
|
-
user_groups: Joi.array().items(Joi.number()),
|
|
497
|
-
|
|
498
|
-
anonymous_users: Joi.boolean(),
|
|
429
|
+
breakup_values: CartModel.CartBreakup(),
|
|
430
|
+
is_valid: Joi.boolean(),
|
|
431
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
432
|
+
message: Joi.string().allow(""),
|
|
499
433
|
});
|
|
500
434
|
}
|
|
501
|
-
|
|
502
|
-
static DiscountOffer() {
|
|
435
|
+
static OpenApiCartServiceabilityRequest() {
|
|
503
436
|
return Joi.object({
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
min_offer_quantity: Joi.number(),
|
|
507
|
-
|
|
508
|
-
discount_percentage: Joi.number(),
|
|
509
|
-
|
|
510
|
-
code: Joi.string().allow(""),
|
|
511
|
-
|
|
512
|
-
max_discount_amount: Joi.number(),
|
|
513
|
-
|
|
514
|
-
max_offer_quantity: Joi.number(),
|
|
515
|
-
|
|
516
|
-
discount_amount: Joi.number(),
|
|
437
|
+
cart_items: CartModel.CartItem(),
|
|
438
|
+
shipping_address: CartModel.ShippingAddress().required(),
|
|
517
439
|
});
|
|
518
440
|
}
|
|
519
|
-
|
|
520
|
-
static DiscountRule() {
|
|
441
|
+
static OpenApiCartServiceabilityResponse() {
|
|
521
442
|
return Joi.object({
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
offer: CartModel.DiscountOffer().required(),
|
|
443
|
+
breakup_values: CartModel.CartBreakup(),
|
|
444
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
445
|
+
is_valid: Joi.boolean(),
|
|
446
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
447
|
+
message: Joi.string().allow(""),
|
|
529
448
|
});
|
|
530
449
|
}
|
|
531
|
-
|
|
532
|
-
static PromotionDateMeta() {
|
|
450
|
+
static OpenApiCheckoutResponse() {
|
|
533
451
|
return Joi.object({
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
452
|
+
message: Joi.string().allow(""),
|
|
453
|
+
order_id: Joi.string().allow("").required(),
|
|
454
|
+
order_ref_id: Joi.string().allow(""),
|
|
455
|
+
success: Joi.boolean(),
|
|
537
456
|
});
|
|
538
457
|
}
|
|
539
|
-
|
|
540
|
-
static Visibility() {
|
|
458
|
+
static OpenApiErrorResponse() {
|
|
541
459
|
return Joi.object({
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
460
|
+
errors: Joi.any(),
|
|
461
|
+
message: Joi.string().allow(""),
|
|
462
|
+
success: Joi.boolean(),
|
|
545
463
|
});
|
|
546
464
|
}
|
|
547
|
-
|
|
548
|
-
static PromotionSchedule() {
|
|
465
|
+
static OpenApiFiles() {
|
|
549
466
|
return Joi.object({
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
start: Joi.string().allow("").required(),
|
|
553
|
-
|
|
554
|
-
end: Joi.string().allow("").allow(null),
|
|
555
|
-
|
|
556
|
-
duration: Joi.number().allow(null),
|
|
557
|
-
|
|
558
|
-
next_schedule: Joi.array().items(Joi.any()),
|
|
559
|
-
|
|
560
|
-
published: Joi.boolean().required(),
|
|
467
|
+
key: Joi.string().allow("").required(),
|
|
468
|
+
values: Joi.array().items(Joi.string().allow("")).required(),
|
|
561
469
|
});
|
|
562
470
|
}
|
|
563
|
-
|
|
564
|
-
static DisplayMeta1() {
|
|
471
|
+
static OpenApiOrderItem() {
|
|
565
472
|
return Joi.object({
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
473
|
+
amount_paid: Joi.number().required(),
|
|
474
|
+
cashback_applied: Joi.number().required(),
|
|
475
|
+
cod_charges: Joi.number().required(),
|
|
476
|
+
coupon_effective_discount: Joi.number().required(),
|
|
477
|
+
delivery_charges: Joi.number().required(),
|
|
478
|
+
discount: Joi.number().required(),
|
|
479
|
+
employee_discount: Joi.number(),
|
|
480
|
+
extra_meta: Joi.any(),
|
|
481
|
+
files: Joi.array().items(CartModel.OpenApiFiles()),
|
|
482
|
+
loyalty_discount: Joi.number(),
|
|
483
|
+
meta: CartModel.CartItemMeta(),
|
|
484
|
+
payment_methods: Joi.array()
|
|
485
|
+
.items(CartModel.MultiTenderPaymentMethod())
|
|
486
|
+
.required(),
|
|
487
|
+
price_effective: Joi.number().required(),
|
|
488
|
+
price_marked: Joi.number().required(),
|
|
489
|
+
product_id: Joi.number().required(),
|
|
490
|
+
quantity: Joi.number(),
|
|
491
|
+
size: Joi.string().allow("").required(),
|
|
571
492
|
});
|
|
572
493
|
}
|
|
573
|
-
|
|
574
|
-
static PromotionListItem() {
|
|
494
|
+
static OpenApiPlatformCheckoutReq() {
|
|
575
495
|
return Joi.object({
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
599
|
-
|
|
600
|
-
mode: Joi.string().allow("").required(),
|
|
601
|
-
|
|
602
|
-
apply_exclusive: Joi.string().allow("").allow(null),
|
|
603
|
-
|
|
604
|
-
date_meta: CartModel.PromotionDateMeta(),
|
|
605
|
-
|
|
606
|
-
stackable: Joi.boolean(),
|
|
607
|
-
|
|
608
|
-
promo_group: Joi.string().allow("").required(),
|
|
609
|
-
|
|
610
|
-
code: Joi.string().allow(""),
|
|
611
|
-
|
|
612
|
-
visiblility: CartModel.Visibility(),
|
|
613
|
-
|
|
614
|
-
_schedule: CartModel.PromotionSchedule(),
|
|
615
|
-
|
|
616
|
-
display_meta: CartModel.DisplayMeta1().required(),
|
|
496
|
+
affiliate_order_id: Joi.string().allow(""),
|
|
497
|
+
billing_address: CartModel.ShippingAddress().required(),
|
|
498
|
+
cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
|
|
499
|
+
cart_value: Joi.number().required(),
|
|
500
|
+
cashback_applied: Joi.number().required(),
|
|
501
|
+
cod_charges: Joi.number().required(),
|
|
502
|
+
comment: Joi.string().allow("").allow(null),
|
|
503
|
+
coupon: Joi.string().allow(""),
|
|
504
|
+
coupon_code: Joi.string().allow("").required(),
|
|
505
|
+
coupon_value: Joi.number().required(),
|
|
506
|
+
currency_code: Joi.string().allow(""),
|
|
507
|
+
delivery_charges: Joi.number().required(),
|
|
508
|
+
employee_discount: Joi.any(),
|
|
509
|
+
files: Joi.array().items(CartModel.OpenApiFiles()),
|
|
510
|
+
gstin: Joi.string().allow("").allow(null),
|
|
511
|
+
loyalty_discount: Joi.number(),
|
|
512
|
+
order_id: Joi.string().allow(""),
|
|
513
|
+
payment_methods: Joi.array()
|
|
514
|
+
.items(CartModel.MultiTenderPaymentMethod())
|
|
515
|
+
.required(),
|
|
516
|
+
payment_mode: Joi.string().allow(""),
|
|
517
|
+
shipping_address: CartModel.ShippingAddress(),
|
|
617
518
|
});
|
|
618
519
|
}
|
|
619
|
-
|
|
620
|
-
static PromotionsResponse() {
|
|
520
|
+
static OperationErrorResponse() {
|
|
621
521
|
return Joi.object({
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
items: CartModel.PromotionListItem(),
|
|
522
|
+
message: Joi.string().allow(""),
|
|
523
|
+
success: Joi.boolean(),
|
|
625
524
|
});
|
|
626
525
|
}
|
|
627
|
-
|
|
628
|
-
static PromotionAdd() {
|
|
526
|
+
static Ownership() {
|
|
629
527
|
return Joi.object({
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
_custom_json: Joi.any(),
|
|
633
|
-
|
|
634
|
-
ownership: CartModel.Ownership1().required(),
|
|
635
|
-
|
|
636
|
-
apply_priority: Joi.number(),
|
|
637
|
-
|
|
638
|
-
post_order_action: CartModel.PromotionAction(),
|
|
639
|
-
|
|
640
|
-
promotion_type: Joi.string().allow("").required(),
|
|
641
|
-
|
|
642
|
-
apply_all_discount: Joi.boolean(),
|
|
643
|
-
|
|
644
|
-
application_id: Joi.string().allow("").required(),
|
|
645
|
-
|
|
646
|
-
currency: Joi.string().allow(""),
|
|
647
|
-
|
|
648
|
-
author: CartModel.PromotionAuthor(),
|
|
649
|
-
|
|
650
|
-
restrictions: CartModel.Restrictions1(),
|
|
651
|
-
|
|
652
|
-
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
653
|
-
|
|
654
|
-
mode: Joi.string().allow("").required(),
|
|
655
|
-
|
|
656
|
-
apply_exclusive: Joi.string().allow("").allow(null),
|
|
657
|
-
|
|
658
|
-
date_meta: CartModel.PromotionDateMeta(),
|
|
659
|
-
|
|
660
|
-
stackable: Joi.boolean(),
|
|
661
|
-
|
|
662
|
-
promo_group: Joi.string().allow("").required(),
|
|
663
|
-
|
|
664
|
-
code: Joi.string().allow(""),
|
|
665
|
-
|
|
666
|
-
visiblility: CartModel.Visibility(),
|
|
667
|
-
|
|
668
|
-
_schedule: CartModel.PromotionSchedule(),
|
|
669
|
-
|
|
670
|
-
display_meta: CartModel.DisplayMeta1().required(),
|
|
528
|
+
payable_by: Joi.string().allow("").required(),
|
|
529
|
+
payable_category: Joi.string().allow("").required(),
|
|
671
530
|
});
|
|
672
531
|
}
|
|
673
|
-
|
|
674
|
-
static PromotionUpdate() {
|
|
532
|
+
static Ownership1() {
|
|
675
533
|
return Joi.object({
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
_custom_json: Joi.any(),
|
|
679
|
-
|
|
680
|
-
ownership: CartModel.Ownership1().required(),
|
|
681
|
-
|
|
682
|
-
apply_priority: Joi.number(),
|
|
683
|
-
|
|
684
|
-
post_order_action: CartModel.PromotionAction(),
|
|
685
|
-
|
|
686
|
-
promotion_type: Joi.string().allow("").required(),
|
|
687
|
-
|
|
688
|
-
apply_all_discount: Joi.boolean(),
|
|
689
|
-
|
|
690
|
-
application_id: Joi.string().allow("").required(),
|
|
691
|
-
|
|
692
|
-
currency: Joi.string().allow(""),
|
|
693
|
-
|
|
694
|
-
author: CartModel.PromotionAuthor(),
|
|
695
|
-
|
|
696
|
-
restrictions: CartModel.Restrictions1(),
|
|
697
|
-
|
|
698
|
-
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
699
|
-
|
|
700
|
-
mode: Joi.string().allow("").required(),
|
|
701
|
-
|
|
702
|
-
apply_exclusive: Joi.string().allow("").allow(null),
|
|
703
|
-
|
|
704
|
-
date_meta: CartModel.PromotionDateMeta(),
|
|
705
|
-
|
|
706
|
-
stackable: Joi.boolean(),
|
|
707
|
-
|
|
708
|
-
promo_group: Joi.string().allow("").required(),
|
|
709
|
-
|
|
710
|
-
code: Joi.string().allow(""),
|
|
711
|
-
|
|
712
|
-
visiblility: CartModel.Visibility(),
|
|
713
|
-
|
|
714
|
-
_schedule: CartModel.PromotionSchedule(),
|
|
715
|
-
|
|
716
|
-
display_meta: CartModel.DisplayMeta1().required(),
|
|
534
|
+
payable_by: Joi.string().allow("").required(),
|
|
535
|
+
payable_category: Joi.string().allow("").required(),
|
|
717
536
|
});
|
|
718
537
|
}
|
|
719
|
-
|
|
720
|
-
static PromotionPartialUpdate() {
|
|
538
|
+
static Ownership2() {
|
|
721
539
|
return Joi.object({
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
schedule: CartModel.PromotionSchedule(),
|
|
540
|
+
payable_by: Joi.string().allow(""),
|
|
541
|
+
payable_category: Joi.string().allow(""),
|
|
725
542
|
});
|
|
726
543
|
}
|
|
727
|
-
|
|
728
|
-
static CartItem() {
|
|
544
|
+
static Page() {
|
|
729
545
|
return Joi.object({
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
546
|
+
current: Joi.number(),
|
|
547
|
+
has_next: Joi.boolean(),
|
|
548
|
+
has_previous: Joi.boolean(),
|
|
549
|
+
item_total: Joi.number(),
|
|
550
|
+
next_id: Joi.string().allow(""),
|
|
551
|
+
size: Joi.number(),
|
|
552
|
+
type: Joi.string().allow("").required(),
|
|
735
553
|
});
|
|
736
554
|
}
|
|
737
|
-
|
|
738
|
-
static OpenapiCartDetailsRequest() {
|
|
555
|
+
static PaymentAllowValue() {
|
|
739
556
|
return Joi.object({
|
|
740
|
-
|
|
557
|
+
max: Joi.number(),
|
|
741
558
|
});
|
|
742
559
|
}
|
|
743
|
-
|
|
744
|
-
static ProductImage() {
|
|
560
|
+
static PaymentAllowValue1() {
|
|
745
561
|
return Joi.object({
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
aspect_ratio: Joi.string().allow(""),
|
|
749
|
-
|
|
750
|
-
url: Joi.string().allow(""),
|
|
562
|
+
max: Joi.number(),
|
|
751
563
|
});
|
|
752
564
|
}
|
|
753
|
-
|
|
754
|
-
static ActionQuery() {
|
|
565
|
+
static PaymentModes() {
|
|
755
566
|
return Joi.object({
|
|
756
|
-
|
|
567
|
+
codes: Joi.array().items(Joi.string().allow("")),
|
|
568
|
+
networks: Joi.array().items(Joi.string().allow("")),
|
|
569
|
+
types: Joi.array().items(Joi.string().allow("")),
|
|
570
|
+
uses: CartModel.PaymentAllowValue(),
|
|
757
571
|
});
|
|
758
572
|
}
|
|
759
|
-
|
|
760
|
-
static ProductAction() {
|
|
573
|
+
static PaymentSelectionLock() {
|
|
761
574
|
return Joi.object({
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
url: Joi.string().allow(""),
|
|
575
|
+
default_options: Joi.string().allow(""),
|
|
576
|
+
enabled: Joi.boolean(),
|
|
577
|
+
payment_identifier: Joi.string().allow(""),
|
|
767
578
|
});
|
|
768
579
|
}
|
|
769
|
-
|
|
770
|
-
static CategoryInfo() {
|
|
580
|
+
static PostOrder() {
|
|
771
581
|
return Joi.object({
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
name: Joi.string().allow(""),
|
|
582
|
+
cancellation_allowed: Joi.boolean(),
|
|
583
|
+
return_allowed: Joi.boolean(),
|
|
775
584
|
});
|
|
776
585
|
}
|
|
777
|
-
|
|
778
|
-
static BaseInfo() {
|
|
586
|
+
static PostOrder1() {
|
|
779
587
|
return Joi.object({
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
name: Joi.string().allow(""),
|
|
588
|
+
cancellation_allowed: Joi.boolean(),
|
|
589
|
+
return_allowed: Joi.boolean(),
|
|
783
590
|
});
|
|
784
591
|
}
|
|
785
|
-
|
|
786
|
-
static CartProduct() {
|
|
592
|
+
static PriceRange() {
|
|
787
593
|
return Joi.object({
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
name: Joi.string().allow(""),
|
|
791
|
-
|
|
792
|
-
type: Joi.string().allow(""),
|
|
793
|
-
|
|
794
|
-
uid: Joi.number(),
|
|
795
|
-
|
|
796
|
-
action: CartModel.ProductAction(),
|
|
797
|
-
|
|
798
|
-
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
799
|
-
|
|
800
|
-
brand: CartModel.BaseInfo(),
|
|
801
|
-
|
|
802
|
-
slug: Joi.string().allow(""),
|
|
594
|
+
max: Joi.number(),
|
|
595
|
+
min: Joi.number(),
|
|
803
596
|
});
|
|
804
597
|
}
|
|
805
|
-
|
|
806
|
-
static BasePrice() {
|
|
598
|
+
static ProductAction() {
|
|
807
599
|
return Joi.object({
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
effective: Joi.number(),
|
|
813
|
-
|
|
814
|
-
currency_symbol: Joi.string().allow(""),
|
|
600
|
+
query: CartModel.ActionQuery(),
|
|
601
|
+
type: Joi.string().allow(""),
|
|
602
|
+
url: Joi.string().allow(""),
|
|
815
603
|
});
|
|
816
604
|
}
|
|
817
|
-
|
|
818
|
-
static ArticlePriceInfo() {
|
|
819
|
-
return Joi.object({
|
|
820
|
-
converted: CartModel.BasePrice(),
|
|
821
|
-
|
|
822
|
-
base: CartModel.BasePrice(),
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
|
|
826
605
|
static ProductArticle() {
|
|
827
606
|
return Joi.object({
|
|
828
|
-
size: Joi.string().allow(""),
|
|
829
|
-
|
|
830
|
-
parent_item_identifiers: Joi.any(),
|
|
831
|
-
|
|
832
|
-
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
833
|
-
|
|
834
607
|
_custom_json: Joi.any(),
|
|
835
|
-
|
|
836
|
-
type: Joi.string().allow(""),
|
|
837
|
-
|
|
838
|
-
store: CartModel.BaseInfo(),
|
|
839
|
-
|
|
840
608
|
extra_meta: Joi.any(),
|
|
841
|
-
|
|
842
|
-
uid: Joi.string().allow(""),
|
|
843
|
-
|
|
609
|
+
parent_item_identifiers: Joi.any(),
|
|
844
610
|
price: CartModel.ArticlePriceInfo(),
|
|
845
|
-
|
|
846
|
-
seller: CartModel.BaseInfo(),
|
|
847
|
-
|
|
611
|
+
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
848
612
|
quantity: Joi.number(),
|
|
613
|
+
seller: CartModel.BaseInfo(),
|
|
614
|
+
size: Joi.string().allow(""),
|
|
615
|
+
store: CartModel.BaseInfo(),
|
|
616
|
+
type: Joi.string().allow(""),
|
|
617
|
+
uid: Joi.string().allow(""),
|
|
849
618
|
});
|
|
850
619
|
}
|
|
851
|
-
|
|
852
620
|
static ProductAvailability() {
|
|
853
621
|
return Joi.object({
|
|
622
|
+
available_sizes: Joi.array().items(CartModel.ProductAvailabilitySize()),
|
|
854
623
|
deliverable: Joi.boolean(),
|
|
855
|
-
|
|
856
|
-
other_store_quantity: Joi.number(),
|
|
857
|
-
|
|
858
|
-
sizes: Joi.array().items(Joi.string().allow("")),
|
|
859
|
-
|
|
860
624
|
is_valid: Joi.boolean(),
|
|
861
|
-
|
|
625
|
+
other_store_quantity: Joi.number(),
|
|
862
626
|
out_of_stock: Joi.boolean(),
|
|
627
|
+
sizes: Joi.array().items(Joi.string().allow("")),
|
|
863
628
|
});
|
|
864
629
|
}
|
|
865
|
-
|
|
866
|
-
static PromoMeta() {
|
|
867
|
-
return Joi.object({
|
|
868
|
-
message: Joi.string().allow(""),
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
static Ownership2() {
|
|
630
|
+
static ProductAvailabilitySize() {
|
|
873
631
|
return Joi.object({
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
632
|
+
display: Joi.string().allow(""),
|
|
633
|
+
is_available: Joi.boolean(),
|
|
634
|
+
value: Joi.string().allow(""),
|
|
877
635
|
});
|
|
878
636
|
}
|
|
879
|
-
|
|
880
|
-
static AppliedPromotion() {
|
|
637
|
+
static ProductImage() {
|
|
881
638
|
return Joi.object({
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
promotion_type: Joi.string().allow(""),
|
|
887
|
-
|
|
888
|
-
ownership: CartModel.Ownership2(),
|
|
889
|
-
|
|
890
|
-
article_quantity: Joi.number(),
|
|
891
|
-
|
|
892
|
-
mrp_promotion: Joi.boolean(),
|
|
893
|
-
|
|
894
|
-
promo_id: Joi.string().allow(""),
|
|
639
|
+
aspect_ratio: Joi.string().allow(""),
|
|
640
|
+
secure_url: Joi.string().allow(""),
|
|
641
|
+
url: Joi.string().allow(""),
|
|
895
642
|
});
|
|
896
643
|
}
|
|
897
|
-
|
|
898
644
|
static ProductPrice() {
|
|
899
645
|
return Joi.object({
|
|
900
|
-
selling: Joi.number(),
|
|
901
|
-
|
|
902
|
-
currency_code: Joi.string().allow(""),
|
|
903
|
-
|
|
904
646
|
add_on: Joi.number(),
|
|
905
|
-
|
|
647
|
+
currency_code: Joi.string().allow(""),
|
|
906
648
|
currency_symbol: Joi.string().allow(""),
|
|
907
|
-
|
|
908
|
-
marked: Joi.number(),
|
|
909
|
-
|
|
910
649
|
effective: Joi.number(),
|
|
650
|
+
marked: Joi.number(),
|
|
651
|
+
selling: Joi.number(),
|
|
911
652
|
});
|
|
912
653
|
}
|
|
913
|
-
|
|
914
654
|
static ProductPriceInfo() {
|
|
915
655
|
return Joi.object({
|
|
916
|
-
converted: CartModel.ProductPrice(),
|
|
917
|
-
|
|
918
656
|
base: CartModel.ProductPrice(),
|
|
657
|
+
converted: CartModel.ProductPrice(),
|
|
919
658
|
});
|
|
920
659
|
}
|
|
921
|
-
|
|
922
|
-
static CartProductIdentifer() {
|
|
923
|
-
return Joi.object({
|
|
924
|
-
identifier: Joi.string().allow(""),
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
static CartProductInfo() {
|
|
660
|
+
static PromiseFormatted() {
|
|
929
661
|
return Joi.object({
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
product: CartModel.CartProduct(),
|
|
933
|
-
|
|
934
|
-
article: CartModel.ProductArticle(),
|
|
935
|
-
|
|
936
|
-
bulk_offer: Joi.any(),
|
|
937
|
-
|
|
938
|
-
availability: CartModel.ProductAvailability(),
|
|
939
|
-
|
|
940
|
-
coupon_message: Joi.string().allow(""),
|
|
941
|
-
|
|
942
|
-
promo_meta: CartModel.PromoMeta(),
|
|
943
|
-
|
|
944
|
-
key: Joi.string().allow(""),
|
|
945
|
-
|
|
946
|
-
is_set: Joi.boolean(),
|
|
947
|
-
|
|
948
|
-
discount: Joi.string().allow(""),
|
|
949
|
-
|
|
950
|
-
promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
|
|
951
|
-
|
|
952
|
-
price: CartModel.ProductPriceInfo(),
|
|
953
|
-
|
|
954
|
-
message: Joi.string().allow(""),
|
|
955
|
-
|
|
956
|
-
price_per_unit: CartModel.ProductPriceInfo(),
|
|
957
|
-
|
|
958
|
-
quantity: Joi.number(),
|
|
959
|
-
|
|
960
|
-
identifiers: CartModel.CartProductIdentifer().required(),
|
|
662
|
+
max: Joi.string().allow(""),
|
|
663
|
+
min: Joi.string().allow(""),
|
|
961
664
|
});
|
|
962
665
|
}
|
|
963
|
-
|
|
964
|
-
static LoyaltyPoints() {
|
|
666
|
+
static PromiseTimestamp() {
|
|
965
667
|
return Joi.object({
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
description: Joi.string().allow(""),
|
|
969
|
-
|
|
970
|
-
applicable: Joi.number(),
|
|
971
|
-
|
|
972
|
-
is_applied: Joi.boolean(),
|
|
668
|
+
max: Joi.number(),
|
|
669
|
+
min: Joi.number(),
|
|
973
670
|
});
|
|
974
671
|
}
|
|
975
|
-
|
|
976
|
-
static RawBreakup() {
|
|
672
|
+
static PromoMeta() {
|
|
977
673
|
return Joi.object({
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
total: Joi.number(),
|
|
981
|
-
|
|
982
|
-
delivery_charge: Joi.number(),
|
|
983
|
-
|
|
984
|
-
mrp_total: Joi.number(),
|
|
985
|
-
|
|
986
|
-
convenience_fee: Joi.number(),
|
|
987
|
-
|
|
988
|
-
discount: Joi.number(),
|
|
989
|
-
|
|
990
|
-
you_saved: Joi.number(),
|
|
991
|
-
|
|
992
|
-
vog: Joi.number(),
|
|
993
|
-
|
|
994
|
-
gst_charges: Joi.number(),
|
|
995
|
-
|
|
996
|
-
cod_charge: Joi.number(),
|
|
997
|
-
|
|
998
|
-
fynd_cash: Joi.number(),
|
|
999
|
-
|
|
1000
|
-
subtotal: Joi.number(),
|
|
674
|
+
message: Joi.string().allow(""),
|
|
1001
675
|
});
|
|
1002
676
|
}
|
|
1003
|
-
|
|
1004
|
-
static DisplayBreakup() {
|
|
677
|
+
static PromotionAction() {
|
|
1005
678
|
return Joi.object({
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
display: Joi.string().allow(""),
|
|
1009
|
-
|
|
1010
|
-
currency_code: Joi.string().allow(""),
|
|
1011
|
-
|
|
1012
|
-
key: Joi.string().allow(""),
|
|
1013
|
-
|
|
1014
|
-
message: Joi.array().items(Joi.string().allow("")),
|
|
1015
|
-
|
|
1016
|
-
currency_symbol: Joi.string().allow(""),
|
|
679
|
+
action_date: Joi.string().allow("").allow(null).required(),
|
|
680
|
+
action_type: Joi.string().allow("").required(),
|
|
1017
681
|
});
|
|
1018
682
|
}
|
|
1019
|
-
|
|
1020
|
-
static CouponBreakup() {
|
|
683
|
+
static PromotionAdd() {
|
|
1021
684
|
return Joi.object({
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
685
|
+
_custom_json: Joi.any(),
|
|
686
|
+
_schedule: CartModel.PromotionSchedule(),
|
|
687
|
+
application_id: Joi.string().allow("").required(),
|
|
688
|
+
apply_all_discount: Joi.boolean(),
|
|
689
|
+
apply_exclusive: Joi.string().allow("").allow(null),
|
|
690
|
+
apply_priority: Joi.number(),
|
|
691
|
+
author: CartModel.PromotionAuthor(),
|
|
692
|
+
buy_rules: Joi.object()
|
|
693
|
+
.pattern(/\S/, CartModel.ItemCriteria())
|
|
694
|
+
.required(),
|
|
1026
695
|
code: Joi.string().allow(""),
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
raw: CartModel.RawBreakup(),
|
|
1041
|
-
|
|
1042
|
-
display: Joi.array().items(CartModel.DisplayBreakup()),
|
|
1043
|
-
|
|
1044
|
-
coupon: CartModel.CouponBreakup(),
|
|
696
|
+
currency: Joi.string().allow(""),
|
|
697
|
+
date_meta: CartModel.PromotionDateMeta(),
|
|
698
|
+
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
699
|
+
display_meta: CartModel.DisplayMeta1().required(),
|
|
700
|
+
mode: Joi.string().allow("").required(),
|
|
701
|
+
ownership: CartModel.Ownership1().required(),
|
|
702
|
+
post_order_action: CartModel.PromotionAction(),
|
|
703
|
+
promo_group: Joi.string().allow("").required(),
|
|
704
|
+
promotion_type: Joi.string().allow("").required(),
|
|
705
|
+
restrictions: CartModel.Restrictions1(),
|
|
706
|
+
stackable: Joi.boolean(),
|
|
707
|
+
visiblility: CartModel.Visibility(),
|
|
1045
708
|
});
|
|
1046
709
|
}
|
|
1047
|
-
|
|
1048
|
-
static OpenapiCartDetailsResponse() {
|
|
710
|
+
static PromotionAuthor() {
|
|
1049
711
|
return Joi.object({
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
message: Joi.string().allow(""),
|
|
1053
|
-
|
|
1054
|
-
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1055
|
-
|
|
1056
|
-
breakup_values: CartModel.CartBreakup(),
|
|
712
|
+
created_by: Joi.string().allow("").allow(null),
|
|
713
|
+
modified_by: Joi.string().allow("").allow(null),
|
|
1057
714
|
});
|
|
1058
715
|
}
|
|
1059
|
-
|
|
1060
|
-
static OpenApiErrorResponse() {
|
|
716
|
+
static PromotionDateMeta() {
|
|
1061
717
|
return Joi.object({
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
success: Joi.boolean(),
|
|
1065
|
-
|
|
1066
|
-
errors: Joi.any(),
|
|
718
|
+
created_on: Joi.string().allow("").allow(null),
|
|
719
|
+
modified_on: Joi.string().allow("").allow(null),
|
|
1067
720
|
});
|
|
1068
721
|
}
|
|
1069
|
-
|
|
1070
|
-
static ShippingAddress() {
|
|
722
|
+
static PromotionListItem() {
|
|
1071
723
|
return Joi.object({
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
country: Joi.string().allow("").allow(null),
|
|
1089
|
-
|
|
1090
|
-
country_code: Joi.string().allow(""),
|
|
1091
|
-
|
|
1092
|
-
area_code_slug: Joi.string().allow(""),
|
|
1093
|
-
|
|
1094
|
-
meta: Joi.any(),
|
|
1095
|
-
|
|
1096
|
-
area: Joi.string().allow(""),
|
|
1097
|
-
|
|
1098
|
-
email: Joi.string().allow(""),
|
|
1099
|
-
|
|
1100
|
-
city: Joi.string().allow("").allow(null),
|
|
1101
|
-
});
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
static OpenApiCartServiceabilityRequest() {
|
|
1105
|
-
return Joi.object({
|
|
1106
|
-
cart_items: CartModel.CartItem(),
|
|
1107
|
-
|
|
1108
|
-
shipping_address: CartModel.ShippingAddress().required(),
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
static PromiseFormatted() {
|
|
1113
|
-
return Joi.object({
|
|
1114
|
-
min: Joi.string().allow(""),
|
|
1115
|
-
|
|
1116
|
-
max: Joi.string().allow(""),
|
|
1117
|
-
});
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
static PromiseTimestamp() {
|
|
1121
|
-
return Joi.object({
|
|
1122
|
-
min: Joi.number(),
|
|
1123
|
-
|
|
1124
|
-
max: Joi.number(),
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
static ShipmentPromise() {
|
|
1129
|
-
return Joi.object({
|
|
1130
|
-
formatted: CartModel.PromiseFormatted(),
|
|
1131
|
-
|
|
1132
|
-
timestamp: CartModel.PromiseTimestamp(),
|
|
1133
|
-
});
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
static OpenApiCartServiceabilityResponse() {
|
|
1137
|
-
return Joi.object({
|
|
1138
|
-
breakup_values: CartModel.CartBreakup(),
|
|
1139
|
-
|
|
1140
|
-
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1141
|
-
|
|
1142
|
-
message: Joi.string().allow(""),
|
|
1143
|
-
|
|
1144
|
-
delivery_promise: CartModel.ShipmentPromise(),
|
|
1145
|
-
|
|
1146
|
-
is_valid: Joi.boolean(),
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
static MultiTenderPaymentMeta() {
|
|
1151
|
-
return Joi.object({
|
|
1152
|
-
order_id: Joi.string().allow("").allow(null),
|
|
1153
|
-
|
|
1154
|
-
payment_id: Joi.string().allow("").allow(null),
|
|
1155
|
-
|
|
1156
|
-
extra_meta: Joi.any().allow(null),
|
|
1157
|
-
|
|
1158
|
-
payment_gateway: Joi.string().allow("").allow(null),
|
|
1159
|
-
|
|
1160
|
-
current_status: Joi.string().allow("").allow(null),
|
|
1161
|
-
});
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
static MultiTenderPaymentMethod() {
|
|
1165
|
-
return Joi.object({
|
|
1166
|
-
amount: Joi.number().required(),
|
|
1167
|
-
|
|
724
|
+
_custom_json: Joi.any(),
|
|
725
|
+
_schedule: CartModel.PromotionSchedule(),
|
|
726
|
+
application_id: Joi.string().allow("").required(),
|
|
727
|
+
apply_all_discount: Joi.boolean(),
|
|
728
|
+
apply_exclusive: Joi.string().allow("").allow(null),
|
|
729
|
+
apply_priority: Joi.number(),
|
|
730
|
+
author: CartModel.PromotionAuthor(),
|
|
731
|
+
buy_rules: Joi.object()
|
|
732
|
+
.pattern(/\S/, CartModel.ItemCriteria())
|
|
733
|
+
.required(),
|
|
734
|
+
code: Joi.string().allow(""),
|
|
735
|
+
currency: Joi.string().allow(""),
|
|
736
|
+
date_meta: CartModel.PromotionDateMeta(),
|
|
737
|
+
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
738
|
+
display_meta: CartModel.DisplayMeta1().required(),
|
|
1168
739
|
mode: Joi.string().allow("").required(),
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
static OpenApiFiles() {
|
|
1177
|
-
return Joi.object({
|
|
1178
|
-
key: Joi.string().allow("").required(),
|
|
1179
|
-
|
|
1180
|
-
values: Joi.array().items(Joi.string().allow("")).required(),
|
|
740
|
+
ownership: CartModel.Ownership1().required(),
|
|
741
|
+
post_order_action: CartModel.PromotionAction(),
|
|
742
|
+
promo_group: Joi.string().allow("").required(),
|
|
743
|
+
promotion_type: Joi.string().allow("").required(),
|
|
744
|
+
restrictions: CartModel.Restrictions1(),
|
|
745
|
+
stackable: Joi.boolean(),
|
|
746
|
+
visiblility: CartModel.Visibility(),
|
|
1181
747
|
});
|
|
1182
748
|
}
|
|
1183
|
-
|
|
1184
|
-
static CartItemMeta() {
|
|
749
|
+
static PromotionPartialUpdate() {
|
|
1185
750
|
return Joi.object({
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
group_id: Joi.string().allow(""),
|
|
751
|
+
archive: Joi.boolean(),
|
|
752
|
+
schedule: CartModel.PromotionSchedule(),
|
|
1189
753
|
});
|
|
1190
754
|
}
|
|
1191
|
-
|
|
1192
|
-
static OpenApiOrderItem() {
|
|
755
|
+
static PromotionPaymentModes() {
|
|
1193
756
|
return Joi.object({
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
loyalty_discount: Joi.number(),
|
|
1199
|
-
|
|
1200
|
-
payment_methods: Joi.array()
|
|
1201
|
-
.items(CartModel.MultiTenderPaymentMethod())
|
|
1202
|
-
.required(),
|
|
1203
|
-
|
|
1204
|
-
product_id: Joi.number().required(),
|
|
1205
|
-
|
|
1206
|
-
delivery_charges: Joi.number().required(),
|
|
1207
|
-
|
|
1208
|
-
discount: Joi.number().required(),
|
|
1209
|
-
|
|
1210
|
-
price_marked: Joi.number().required(),
|
|
1211
|
-
|
|
1212
|
-
employee_discount: Joi.number(),
|
|
1213
|
-
|
|
1214
|
-
files: Joi.array().items(CartModel.OpenApiFiles()),
|
|
1215
|
-
|
|
1216
|
-
cashback_applied: Joi.number().required(),
|
|
1217
|
-
|
|
1218
|
-
cod_charges: Joi.number().required(),
|
|
1219
|
-
|
|
1220
|
-
meta: CartModel.CartItemMeta(),
|
|
1221
|
-
|
|
1222
|
-
price_effective: Joi.number().required(),
|
|
1223
|
-
|
|
1224
|
-
coupon_effective_discount: Joi.number().required(),
|
|
1225
|
-
|
|
1226
|
-
quantity: Joi.number(),
|
|
1227
|
-
|
|
1228
|
-
size: Joi.string().allow("").required(),
|
|
757
|
+
codes: Joi.array().items(Joi.string().allow("")),
|
|
758
|
+
type: Joi.string().allow("").required(),
|
|
759
|
+
uses: CartModel.PaymentAllowValue1(),
|
|
1229
760
|
});
|
|
1230
761
|
}
|
|
1231
|
-
|
|
1232
|
-
static OpenApiPlatformCheckoutReq() {
|
|
762
|
+
static PromotionSchedule() {
|
|
1233
763
|
return Joi.object({
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
delivery_charges: Joi.number().required(),
|
|
1241
|
-
|
|
1242
|
-
files: Joi.array().items(CartModel.OpenApiFiles()),
|
|
1243
|
-
|
|
1244
|
-
comment: Joi.string().allow("").allow(null),
|
|
1245
|
-
|
|
1246
|
-
coupon: Joi.string().allow(""),
|
|
1247
|
-
|
|
1248
|
-
coupon_value: Joi.number().required(),
|
|
1249
|
-
|
|
1250
|
-
affiliate_order_id: Joi.string().allow(""),
|
|
1251
|
-
|
|
1252
|
-
payment_mode: Joi.string().allow(""),
|
|
1253
|
-
|
|
1254
|
-
cart_value: Joi.number().required(),
|
|
1255
|
-
|
|
1256
|
-
payment_methods: Joi.array()
|
|
1257
|
-
.items(CartModel.MultiTenderPaymentMethod())
|
|
1258
|
-
.required(),
|
|
1259
|
-
|
|
1260
|
-
loyalty_discount: Joi.number(),
|
|
1261
|
-
|
|
1262
|
-
billing_address: CartModel.ShippingAddress().required(),
|
|
1263
|
-
|
|
1264
|
-
employee_discount: Joi.any(),
|
|
1265
|
-
|
|
1266
|
-
cashback_applied: Joi.number().required(),
|
|
1267
|
-
|
|
1268
|
-
cod_charges: Joi.number().required(),
|
|
1269
|
-
|
|
1270
|
-
coupon_code: Joi.string().allow("").required(),
|
|
1271
|
-
|
|
1272
|
-
shipping_address: CartModel.ShippingAddress(),
|
|
1273
|
-
|
|
1274
|
-
gstin: Joi.string().allow("").allow(null),
|
|
764
|
+
cron: Joi.string().allow("").allow(null),
|
|
765
|
+
duration: Joi.number().allow(null),
|
|
766
|
+
end: Joi.string().allow("").allow(null),
|
|
767
|
+
next_schedule: Joi.array().items(Joi.any()),
|
|
768
|
+
published: Joi.boolean().required(),
|
|
769
|
+
start: Joi.string().allow("").required(),
|
|
1275
770
|
});
|
|
1276
771
|
}
|
|
1277
|
-
|
|
1278
|
-
static OpenApiCheckoutResponse() {
|
|
772
|
+
static PromotionsResponse() {
|
|
1279
773
|
return Joi.object({
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
message: Joi.string().allow(""),
|
|
1283
|
-
|
|
1284
|
-
success: Joi.boolean(),
|
|
1285
|
-
|
|
1286
|
-
order_id: Joi.string().allow("").required(),
|
|
774
|
+
items: CartModel.PromotionListItem(),
|
|
775
|
+
page: CartModel.Page(),
|
|
1287
776
|
});
|
|
1288
777
|
}
|
|
1289
|
-
|
|
1290
|
-
static AbandonedCart() {
|
|
778
|
+
static PromotionUpdate() {
|
|
1291
779
|
return Joi.object({
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
merge_qty: Joi.boolean().allow(null),
|
|
1317
|
-
|
|
1318
|
-
delivery_charges: Joi.any(),
|
|
1319
|
-
|
|
1320
|
-
bulk_coupon_discount: Joi.number().allow(null),
|
|
1321
|
-
|
|
1322
|
-
is_archive: Joi.boolean(),
|
|
1323
|
-
|
|
1324
|
-
comment: Joi.string().allow("").allow(null),
|
|
1325
|
-
|
|
1326
|
-
pick_up_customer_details: Joi.any().allow(null),
|
|
1327
|
-
|
|
1328
|
-
_id: Joi.string().allow("").required(),
|
|
1329
|
-
|
|
1330
|
-
is_active: Joi.boolean(),
|
|
1331
|
-
|
|
1332
|
-
payment_mode: Joi.string().allow("").allow(null),
|
|
1333
|
-
|
|
1334
|
-
last_modified: Joi.string().allow("").required(),
|
|
1335
|
-
|
|
1336
|
-
cart_value: Joi.number(),
|
|
1337
|
-
|
|
1338
|
-
is_default: Joi.boolean().required(),
|
|
1339
|
-
|
|
1340
|
-
discount: Joi.number(),
|
|
1341
|
-
|
|
1342
|
-
user_id: Joi.string().allow("").required(),
|
|
1343
|
-
|
|
1344
|
-
cashback: Joi.any().required(),
|
|
1345
|
-
|
|
1346
|
-
fc_index_map: Joi.array().items(Joi.number()),
|
|
1347
|
-
|
|
1348
|
-
shipments: Joi.array().items(Joi.any()),
|
|
1349
|
-
|
|
1350
|
-
cod_charges: Joi.any(),
|
|
1351
|
-
|
|
1352
|
-
expire_at: Joi.string().allow("").required(),
|
|
1353
|
-
|
|
1354
|
-
meta: Joi.any().allow(null),
|
|
1355
|
-
|
|
1356
|
-
gstin: Joi.string().allow("").allow(null),
|
|
780
|
+
_custom_json: Joi.any(),
|
|
781
|
+
_schedule: CartModel.PromotionSchedule(),
|
|
782
|
+
application_id: Joi.string().allow("").required(),
|
|
783
|
+
apply_all_discount: Joi.boolean(),
|
|
784
|
+
apply_exclusive: Joi.string().allow("").allow(null),
|
|
785
|
+
apply_priority: Joi.number(),
|
|
786
|
+
author: CartModel.PromotionAuthor(),
|
|
787
|
+
buy_rules: Joi.object()
|
|
788
|
+
.pattern(/\S/, CartModel.ItemCriteria())
|
|
789
|
+
.required(),
|
|
790
|
+
code: Joi.string().allow(""),
|
|
791
|
+
currency: Joi.string().allow(""),
|
|
792
|
+
date_meta: CartModel.PromotionDateMeta(),
|
|
793
|
+
discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
|
|
794
|
+
display_meta: CartModel.DisplayMeta1().required(),
|
|
795
|
+
mode: Joi.string().allow("").required(),
|
|
796
|
+
ownership: CartModel.Ownership1().required(),
|
|
797
|
+
post_order_action: CartModel.PromotionAction(),
|
|
798
|
+
promo_group: Joi.string().allow("").required(),
|
|
799
|
+
promotion_type: Joi.string().allow("").required(),
|
|
800
|
+
restrictions: CartModel.Restrictions1(),
|
|
801
|
+
stackable: Joi.boolean(),
|
|
802
|
+
visiblility: CartModel.Visibility(),
|
|
1357
803
|
});
|
|
1358
804
|
}
|
|
1359
|
-
|
|
1360
|
-
static AbandonedCartResponse() {
|
|
805
|
+
static RawBreakup() {
|
|
1361
806
|
return Joi.object({
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
807
|
+
cod_charge: Joi.number(),
|
|
808
|
+
convenience_fee: Joi.number(),
|
|
809
|
+
coupon: Joi.number(),
|
|
810
|
+
delivery_charge: Joi.number(),
|
|
811
|
+
discount: Joi.number(),
|
|
812
|
+
fynd_cash: Joi.number(),
|
|
813
|
+
gst_charges: Joi.number(),
|
|
814
|
+
mrp_total: Joi.number(),
|
|
815
|
+
subtotal: Joi.number(),
|
|
816
|
+
total: Joi.number(),
|
|
817
|
+
vog: Joi.number(),
|
|
818
|
+
you_saved: Joi.number(),
|
|
1371
819
|
});
|
|
1372
820
|
}
|
|
1373
|
-
|
|
1374
|
-
static CartCurrency() {
|
|
821
|
+
static Restrictions() {
|
|
1375
822
|
return Joi.object({
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
823
|
+
bulk_bundle: CartModel.BulkBundleRestriction(),
|
|
824
|
+
coupon_allowed: Joi.boolean(),
|
|
825
|
+
ordering_stores: Joi.array().items(Joi.number()),
|
|
826
|
+
payments: Joi.object().pattern(/\S/, CartModel.PaymentModes()),
|
|
827
|
+
platforms: Joi.array().items(Joi.string().allow("")),
|
|
828
|
+
post_order: CartModel.PostOrder(),
|
|
829
|
+
price_range: CartModel.PriceRange(),
|
|
830
|
+
user_groups: Joi.array().items(Joi.number()),
|
|
831
|
+
uses: CartModel.UsesRestriction(),
|
|
1379
832
|
});
|
|
1380
833
|
}
|
|
1381
|
-
|
|
1382
|
-
static PaymentSelectionLock() {
|
|
834
|
+
static Restrictions1() {
|
|
1383
835
|
return Joi.object({
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
836
|
+
anonymous_users: Joi.boolean(),
|
|
837
|
+
order_quantity: Joi.number(),
|
|
838
|
+
payments: Joi.array().items(CartModel.PromotionPaymentModes()),
|
|
839
|
+
platforms: Joi.array().items(Joi.string().allow("")),
|
|
840
|
+
post_order: CartModel.PostOrder1(),
|
|
841
|
+
user_groups: Joi.array().items(Joi.number()),
|
|
842
|
+
user_id: Joi.array().items(Joi.string().allow("")),
|
|
843
|
+
user_registered: CartModel.UserRegistered(),
|
|
844
|
+
uses: CartModel.UsesRestriction1().required(),
|
|
1389
845
|
});
|
|
1390
846
|
}
|
|
1391
|
-
|
|
1392
|
-
static CartDetailResponse() {
|
|
847
|
+
static Rule() {
|
|
1393
848
|
return Joi.object({
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
breakup_values: CartModel.CartBreakup(),
|
|
1401
|
-
|
|
1402
|
-
buy_now: Joi.boolean(),
|
|
1403
|
-
|
|
1404
|
-
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1405
|
-
|
|
1406
|
-
message: Joi.string().allow(""),
|
|
1407
|
-
|
|
1408
|
-
delivery_charge_info: Joi.string().allow(""),
|
|
1409
|
-
|
|
1410
|
-
restrict_checkout: Joi.boolean(),
|
|
1411
|
-
|
|
1412
|
-
comment: Joi.string().allow(""),
|
|
1413
|
-
|
|
1414
|
-
delivery_promise: CartModel.ShipmentPromise(),
|
|
1415
|
-
|
|
1416
|
-
currency: CartModel.CartCurrency(),
|
|
1417
|
-
|
|
1418
|
-
is_valid: Joi.boolean(),
|
|
1419
|
-
|
|
1420
|
-
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
1421
|
-
|
|
1422
|
-
gstin: Joi.string().allow(""),
|
|
1423
|
-
|
|
1424
|
-
id: Joi.string().allow(""),
|
|
849
|
+
discount_qty: Joi.number(),
|
|
850
|
+
key: Joi.number(),
|
|
851
|
+
max: Joi.number(),
|
|
852
|
+
min: Joi.number(),
|
|
853
|
+
value: Joi.number(),
|
|
1425
854
|
});
|
|
1426
855
|
}
|
|
1427
|
-
|
|
1428
|
-
static AddProductCart() {
|
|
856
|
+
static RuleDefinition() {
|
|
1429
857
|
return Joi.object({
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
extra_meta: Joi.any(),
|
|
1439
|
-
|
|
1440
|
-
item_id: Joi.number(),
|
|
1441
|
-
|
|
1442
|
-
article_assignment: Joi.any(),
|
|
1443
|
-
|
|
1444
|
-
store_id: Joi.number(),
|
|
1445
|
-
|
|
1446
|
-
seller_id: Joi.number(),
|
|
1447
|
-
|
|
1448
|
-
article_id: Joi.string().allow(""),
|
|
1449
|
-
|
|
1450
|
-
pos: Joi.boolean(),
|
|
1451
|
-
|
|
1452
|
-
quantity: Joi.number(),
|
|
1453
|
-
|
|
1454
|
-
item_size: Joi.string().allow(""),
|
|
858
|
+
applicable_on: Joi.string().allow("").required(),
|
|
859
|
+
auto_apply: Joi.boolean(),
|
|
860
|
+
calculate_on: Joi.string().allow("").required(),
|
|
861
|
+
currency_code: Joi.string().allow(""),
|
|
862
|
+
is_exact: Joi.boolean(),
|
|
863
|
+
scope: Joi.array().items(Joi.string().allow("")),
|
|
864
|
+
type: Joi.string().allow("").required(),
|
|
865
|
+
value_type: Joi.string().allow("").required(),
|
|
1455
866
|
});
|
|
1456
867
|
}
|
|
1457
|
-
|
|
1458
|
-
static AddCartRequest() {
|
|
868
|
+
static ShipmentPromise() {
|
|
1459
869
|
return Joi.object({
|
|
1460
|
-
|
|
870
|
+
formatted: CartModel.PromiseFormatted(),
|
|
871
|
+
timestamp: CartModel.PromiseTimestamp(),
|
|
1461
872
|
});
|
|
1462
873
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
874
|
+
static ShippingAddress() {
|
|
875
|
+
return Joi.object({
|
|
876
|
+
address: Joi.string().allow(""),
|
|
877
|
+
address_type: Joi.string().allow(""),
|
|
878
|
+
area: Joi.string().allow(""),
|
|
879
|
+
area_code: Joi.string().allow("").required(),
|
|
880
|
+
area_code_slug: Joi.string().allow(""),
|
|
881
|
+
city: Joi.string().allow("").allow(null),
|
|
882
|
+
country: Joi.string().allow("").allow(null),
|
|
883
|
+
country_code: Joi.string().allow(""),
|
|
884
|
+
email: Joi.string().allow(""),
|
|
885
|
+
landmark: Joi.string().allow(""),
|
|
886
|
+
meta: Joi.any(),
|
|
887
|
+
name: Joi.string().allow(""),
|
|
888
|
+
phone: Joi.number(),
|
|
889
|
+
pincode: Joi.number(),
|
|
890
|
+
state: Joi.string().allow("").allow(null),
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
static State() {
|
|
894
|
+
return Joi.object({
|
|
895
|
+
is_archived: Joi.boolean(),
|
|
896
|
+
is_display: Joi.boolean(),
|
|
897
|
+
is_public: Joi.boolean(),
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
static SuccessMessage() {
|
|
1465
901
|
return Joi.object({
|
|
1466
902
|
message: Joi.string().allow(""),
|
|
1467
|
-
|
|
903
|
+
success: Joi.boolean(),
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
static UpdateCartDetailResponse() {
|
|
907
|
+
return Joi.object({
|
|
1468
908
|
cart: CartModel.CartDetailResponse(),
|
|
1469
|
-
|
|
909
|
+
message: Joi.string().allow(""),
|
|
1470
910
|
success: Joi.boolean(),
|
|
1471
|
-
|
|
1472
|
-
partial: Joi.boolean(),
|
|
1473
911
|
});
|
|
1474
912
|
}
|
|
1475
|
-
|
|
913
|
+
static UpdateCartRequest() {
|
|
914
|
+
return Joi.object({
|
|
915
|
+
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
916
|
+
operation: Joi.string().allow("").required(),
|
|
917
|
+
});
|
|
918
|
+
}
|
|
1476
919
|
static UpdateProductCart() {
|
|
1477
920
|
return Joi.object({
|
|
1478
|
-
parent_item_identifiers: Joi.any(),
|
|
1479
|
-
|
|
1480
921
|
_custom_json: Joi.any(),
|
|
1481
|
-
|
|
922
|
+
article_id: Joi.string().allow(""),
|
|
1482
923
|
extra_meta: Joi.any(),
|
|
1483
|
-
|
|
924
|
+
identifiers: CartModel.CartProductIdentifer().required(),
|
|
1484
925
|
item_id: Joi.number(),
|
|
1485
|
-
|
|
1486
926
|
item_index: Joi.number(),
|
|
1487
|
-
|
|
1488
|
-
article_id: Joi.string().allow(""),
|
|
1489
|
-
|
|
1490
|
-
quantity: Joi.number(),
|
|
1491
|
-
|
|
1492
927
|
item_size: Joi.string().allow(""),
|
|
1493
|
-
|
|
1494
|
-
|
|
928
|
+
parent_item_identifiers: Joi.any(),
|
|
929
|
+
quantity: Joi.number(),
|
|
1495
930
|
});
|
|
1496
931
|
}
|
|
1497
|
-
|
|
1498
|
-
static UpdateCartRequest() {
|
|
932
|
+
static UserRegistered() {
|
|
1499
933
|
return Joi.object({
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
934
|
+
end: Joi.string().allow("").allow(null),
|
|
935
|
+
start: Joi.string().allow("").allow(null),
|
|
1503
936
|
});
|
|
1504
937
|
}
|
|
1505
|
-
|
|
1506
|
-
static UpdateCartDetailResponse() {
|
|
938
|
+
static UsesRemaining() {
|
|
1507
939
|
return Joi.object({
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
940
|
+
app: Joi.number(),
|
|
941
|
+
total: Joi.number(),
|
|
942
|
+
user: Joi.number(),
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
static UsesRemaining1() {
|
|
946
|
+
return Joi.object({
|
|
947
|
+
total: Joi.number(),
|
|
948
|
+
user: Joi.number(),
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
static UsesRestriction() {
|
|
952
|
+
return Joi.object({
|
|
953
|
+
maximum: CartModel.UsesRemaining(),
|
|
954
|
+
remaining: CartModel.UsesRemaining(),
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
static UsesRestriction1() {
|
|
958
|
+
return Joi.object({
|
|
959
|
+
maximum: CartModel.UsesRemaining1(),
|
|
960
|
+
remaining: CartModel.UsesRemaining1(),
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
static Validation() {
|
|
964
|
+
return Joi.object({
|
|
965
|
+
anonymous: Joi.boolean(),
|
|
966
|
+
app_id: Joi.array().items(Joi.string().allow("")),
|
|
967
|
+
user_registered_after: Joi.string().allow("").allow(null),
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
static Validity() {
|
|
971
|
+
return Joi.object({
|
|
972
|
+
priority: Joi.number(),
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
static Visibility() {
|
|
976
|
+
return Joi.object({
|
|
977
|
+
coupon_list: Joi.boolean().required(),
|
|
978
|
+
pdp: Joi.boolean().required(),
|
|
1513
979
|
});
|
|
1514
980
|
}
|
|
1515
981
|
}
|