@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1
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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
- package/sdk/application/Cart/CartApplicationModel.js +6 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -134,11 +134,13 @@ const Joi = require("joi");
|
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @typedef Article
|
|
137
|
-
* @property {string} article_id
|
|
138
|
-
* @property {string} [code]
|
|
139
|
-
* @property {Object} [meta]
|
|
140
|
-
* @property {
|
|
141
|
-
*
|
|
137
|
+
* @property {string} article_id - Id of article
|
|
138
|
+
* @property {string} [code] - Code to identify price adjustment on article
|
|
139
|
+
* @property {Object} [meta] - Meta related to article
|
|
140
|
+
* @property {number} [quantity] - Total quantity of the article to be
|
|
141
|
+
* considered (currently used only in discount type)
|
|
142
|
+
* @property {string} [type] - Type of price adjusment
|
|
143
|
+
* @property {number} [value] - Value of price adjustment for article
|
|
142
144
|
*/
|
|
143
145
|
|
|
144
146
|
/**
|
|
@@ -180,6 +182,12 @@ const Joi = require("joi");
|
|
|
180
182
|
* @property {RawBreakup} [raw]
|
|
181
183
|
*/
|
|
182
184
|
|
|
185
|
+
/**
|
|
186
|
+
* @typedef CartCheckoutCustomMeta
|
|
187
|
+
* @property {string} key
|
|
188
|
+
* @property {string} value
|
|
189
|
+
*/
|
|
190
|
+
|
|
183
191
|
/**
|
|
184
192
|
* @typedef CartCheckoutResponse
|
|
185
193
|
* @property {string} [app_intercept_url]
|
|
@@ -525,6 +533,13 @@ const Joi = require("joi");
|
|
|
525
533
|
* @property {boolean} [valid]
|
|
526
534
|
*/
|
|
527
535
|
|
|
536
|
+
/**
|
|
537
|
+
* @typedef CustomerDetails
|
|
538
|
+
* @property {string} [email]
|
|
539
|
+
* @property {string} mobile
|
|
540
|
+
* @property {string} [name]
|
|
541
|
+
*/
|
|
542
|
+
|
|
528
543
|
/**
|
|
529
544
|
* @typedef DeleteAddressResponse
|
|
530
545
|
* @property {string} [id]
|
|
@@ -1029,6 +1044,8 @@ const Joi = require("joi");
|
|
|
1029
1044
|
* @property {string} [billing_address_id]
|
|
1030
1045
|
* @property {string} [callback_url]
|
|
1031
1046
|
* @property {string} [checkout_mode]
|
|
1047
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
1048
|
+
* @property {Object} [customer_details] - Customer details
|
|
1032
1049
|
* @property {Object} [delivery_address]
|
|
1033
1050
|
* @property {string} [device_id]
|
|
1034
1051
|
* @property {string} [employee_code]
|
|
@@ -1058,6 +1075,7 @@ const Joi = require("joi");
|
|
|
1058
1075
|
* @property {string} [callback_url]
|
|
1059
1076
|
* @property {string} [checkout_mode]
|
|
1060
1077
|
* @property {Object} [custom_meta]
|
|
1078
|
+
* @property {Object} [customer_details] - Customer details
|
|
1061
1079
|
* @property {Object} [delivery_address]
|
|
1062
1080
|
* @property {string} [device_id]
|
|
1063
1081
|
* @property {string} [employee_code]
|
|
@@ -1167,35 +1185,39 @@ const Joi = require("joi");
|
|
|
1167
1185
|
|
|
1168
1186
|
/**
|
|
1169
1187
|
* @typedef PriceAdjustment
|
|
1170
|
-
* @property {boolean} [allowed_refund]
|
|
1171
|
-
*
|
|
1172
|
-
* @property {
|
|
1173
|
-
* @property {
|
|
1174
|
-
* @property {
|
|
1175
|
-
*
|
|
1188
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
1189
|
+
* allowed (default: False)
|
|
1190
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
1191
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
1192
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
1193
|
+
* distribution should is done at the article level
|
|
1194
|
+
* @property {string} cart_id - The ID of the cart
|
|
1176
1195
|
* @property {Collection} collection
|
|
1177
1196
|
* @property {string} [id]
|
|
1178
|
-
* @property {boolean} is_authenticated
|
|
1179
|
-
*
|
|
1197
|
+
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
1198
|
+
* authenticated
|
|
1199
|
+
* @property {string} message - The message associated with the price adjustment
|
|
1180
1200
|
* @property {Object} [meta]
|
|
1181
|
-
* @property {string} type
|
|
1201
|
+
* @property {string} type - Type of price adjusment
|
|
1182
1202
|
* @property {number} value
|
|
1183
1203
|
*/
|
|
1184
1204
|
|
|
1185
1205
|
/**
|
|
1186
1206
|
* @typedef PriceAdjustmentAdd
|
|
1187
|
-
* @property {boolean} [allowed_refund]
|
|
1188
|
-
*
|
|
1189
|
-
* @property {
|
|
1190
|
-
* @property {
|
|
1191
|
-
* @property {
|
|
1192
|
-
*
|
|
1207
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
1208
|
+
* allowed (default: False)
|
|
1209
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
1210
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
1211
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
1212
|
+
* distribution should is done at the article level
|
|
1213
|
+
* @property {string} cart_id - The ID of the cart
|
|
1193
1214
|
* @property {Collection} collection
|
|
1194
|
-
* @property {string} [created_by]
|
|
1195
|
-
* @property {boolean} is_authenticated
|
|
1196
|
-
*
|
|
1215
|
+
* @property {string} [created_by] - The entity that created the field
|
|
1216
|
+
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
1217
|
+
* authenticated
|
|
1218
|
+
* @property {string} message - The message associated with the price adjustment
|
|
1197
1219
|
* @property {Object} [meta]
|
|
1198
|
-
* @property {string} type
|
|
1220
|
+
* @property {string} type - Type of price adjusment
|
|
1199
1221
|
* @property {number} value
|
|
1200
1222
|
*/
|
|
1201
1223
|
|
|
@@ -1206,18 +1228,20 @@ const Joi = require("joi");
|
|
|
1206
1228
|
|
|
1207
1229
|
/**
|
|
1208
1230
|
* @typedef PriceAdjustmentUpdate
|
|
1209
|
-
* @property {boolean} [allowed_refund]
|
|
1210
|
-
*
|
|
1211
|
-
* @property {
|
|
1212
|
-
* @property {
|
|
1213
|
-
* @property {
|
|
1214
|
-
*
|
|
1231
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
1232
|
+
* allowed (default: False)
|
|
1233
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
1234
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
1235
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
1236
|
+
* distribution should is done at the article level
|
|
1237
|
+
* @property {string} cart_id - The ID of the cart
|
|
1215
1238
|
* @property {Collection} collection
|
|
1216
|
-
* @property {boolean} is_authenticated
|
|
1217
|
-
*
|
|
1239
|
+
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
1240
|
+
* authenticated
|
|
1241
|
+
* @property {string} message - The message associated with the price adjustment
|
|
1218
1242
|
* @property {Object} [meta]
|
|
1219
|
-
* @property {string} [modified_by]
|
|
1220
|
-
* @property {string} type
|
|
1243
|
+
* @property {string} [modified_by] - The entity that modified the field
|
|
1244
|
+
* @property {string} type - Type of price adjusment
|
|
1221
1245
|
* @property {number} value
|
|
1222
1246
|
*/
|
|
1223
1247
|
|
|
@@ -1360,28 +1384,33 @@ const Joi = require("joi");
|
|
|
1360
1384
|
|
|
1361
1385
|
/**
|
|
1362
1386
|
* @typedef PromotionListItem
|
|
1363
|
-
* @property {Object} [_custom_json]
|
|
1387
|
+
* @property {Object} [_custom_json] - Custom data stored in promotion
|
|
1388
|
+
* @property {string} [_id] - Promotion id
|
|
1364
1389
|
* @property {PromotionSchedule} [_schedule]
|
|
1365
|
-
* @property {string} application_id
|
|
1366
|
-
* @property {boolean} [apply_all_discount]
|
|
1367
|
-
* @property {string} [apply_exclusive]
|
|
1368
|
-
*
|
|
1390
|
+
* @property {string} application_id - App id in which promotion will be used
|
|
1391
|
+
* @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
|
|
1392
|
+
* @property {string} [apply_exclusive] - Doesn't allow other promotion after
|
|
1393
|
+
* current promotion applied on cart or article
|
|
1394
|
+
* @property {number} [apply_priority] - Priority based on which promotion are
|
|
1395
|
+
* applied on articles
|
|
1369
1396
|
* @property {PromotionAuthor} [author]
|
|
1370
|
-
* @property {Object} buy_rules
|
|
1397
|
+
* @property {Object} buy_rules - Buy rules for the promotion
|
|
1371
1398
|
* @property {string} [calculate_on] - Only available for Contract pricing and
|
|
1372
1399
|
* Ladder pricing promotion type
|
|
1373
|
-
* @property {string} [code]
|
|
1374
|
-
* @property {string} [currency]
|
|
1400
|
+
* @property {string} [code] - Promotion code
|
|
1401
|
+
* @property {string} [currency] - Currency used for promotion
|
|
1375
1402
|
* @property {PromotionDateMeta} [date_meta]
|
|
1376
|
-
* @property {DiscountRule[]} discount_rules
|
|
1403
|
+
* @property {DiscountRule[]} discount_rules - Discount rules based on which
|
|
1404
|
+
* promotion will be applied
|
|
1377
1405
|
* @property {DisplayMeta1} display_meta
|
|
1378
|
-
* @property {string} mode
|
|
1406
|
+
* @property {string} mode - Promotion mode
|
|
1379
1407
|
* @property {Ownership1} ownership
|
|
1380
1408
|
* @property {PromotionAction} [post_order_action]
|
|
1381
|
-
* @property {string} promo_group
|
|
1382
|
-
* @property {string} promotion_type
|
|
1409
|
+
* @property {string} promo_group - Group into which promotion fall
|
|
1410
|
+
* @property {string} promotion_type - Type of the promotion
|
|
1383
1411
|
* @property {Restrictions1} [restrictions]
|
|
1384
|
-
* @property {boolean} [stackable]
|
|
1412
|
+
* @property {boolean} [stackable] - Allows more than one promotion to get
|
|
1413
|
+
* combined benefits
|
|
1385
1414
|
* @property {Visibility} [visiblility]
|
|
1386
1415
|
*/
|
|
1387
1416
|
|
|
@@ -1482,7 +1511,7 @@ const Joi = require("joi");
|
|
|
1482
1511
|
* @property {PostOrder1} [post_order]
|
|
1483
1512
|
* @property {number[]} [user_groups]
|
|
1484
1513
|
* @property {string[]} [user_id]
|
|
1485
|
-
* @property {
|
|
1514
|
+
* @property {Object} [user_registered]
|
|
1486
1515
|
* @property {UsesRestriction1} uses
|
|
1487
1516
|
*/
|
|
1488
1517
|
|
|
@@ -1942,6 +1971,7 @@ class CartPlatformModel {
|
|
|
1942
1971
|
article_id: Joi.string().allow("").required(),
|
|
1943
1972
|
code: Joi.string().allow(""),
|
|
1944
1973
|
meta: Joi.any(),
|
|
1974
|
+
quantity: Joi.number(),
|
|
1945
1975
|
type: Joi.string().allow(""),
|
|
1946
1976
|
value: Joi.number(),
|
|
1947
1977
|
});
|
|
@@ -1998,6 +2028,14 @@ class CartPlatformModel {
|
|
|
1998
2028
|
});
|
|
1999
2029
|
}
|
|
2000
2030
|
|
|
2031
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
2032
|
+
static CartCheckoutCustomMeta() {
|
|
2033
|
+
return Joi.object({
|
|
2034
|
+
key: Joi.string().allow("").required(),
|
|
2035
|
+
value: Joi.string().allow("").required(),
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2001
2039
|
/** @returns {CartCheckoutResponse} */
|
|
2002
2040
|
static CartCheckoutResponse() {
|
|
2003
2041
|
return Joi.object({
|
|
@@ -2410,6 +2448,15 @@ class CartPlatformModel {
|
|
|
2410
2448
|
});
|
|
2411
2449
|
}
|
|
2412
2450
|
|
|
2451
|
+
/** @returns {CustomerDetails} */
|
|
2452
|
+
static CustomerDetails() {
|
|
2453
|
+
return Joi.object({
|
|
2454
|
+
email: Joi.string().allow("").allow(null),
|
|
2455
|
+
mobile: Joi.string().allow("").required(),
|
|
2456
|
+
name: Joi.string().allow(""),
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2413
2460
|
/** @returns {DeleteAddressResponse} */
|
|
2414
2461
|
static DeleteAddressResponse() {
|
|
2415
2462
|
return Joi.object({
|
|
@@ -3024,6 +3071,10 @@ class CartPlatformModel {
|
|
|
3024
3071
|
billing_address_id: Joi.string().allow(""),
|
|
3025
3072
|
callback_url: Joi.string().allow("").allow(null),
|
|
3026
3073
|
checkout_mode: Joi.string().allow(""),
|
|
3074
|
+
custom_meta: Joi.array().items(
|
|
3075
|
+
CartPlatformModel.CartCheckoutCustomMeta()
|
|
3076
|
+
),
|
|
3077
|
+
customer_details: Joi.any().allow(null),
|
|
3027
3078
|
delivery_address: Joi.any(),
|
|
3028
3079
|
device_id: Joi.string().allow("").allow(null),
|
|
3029
3080
|
employee_code: Joi.string().allow("").allow(null),
|
|
@@ -3041,7 +3092,7 @@ class CartPlatformModel {
|
|
|
3041
3092
|
pick_at_store_uid: Joi.number().allow(null),
|
|
3042
3093
|
pos: Joi.boolean(),
|
|
3043
3094
|
staff: CartPlatformModel.StaffCheckout(),
|
|
3044
|
-
user_id: Joi.string().allow("").required(),
|
|
3095
|
+
user_id: Joi.string().allow("").allow(null).required(),
|
|
3045
3096
|
});
|
|
3046
3097
|
}
|
|
3047
3098
|
|
|
@@ -3055,6 +3106,7 @@ class CartPlatformModel {
|
|
|
3055
3106
|
callback_url: Joi.string().allow("").allow(null),
|
|
3056
3107
|
checkout_mode: Joi.string().allow(""),
|
|
3057
3108
|
custom_meta: Joi.any(),
|
|
3109
|
+
customer_details: Joi.any().allow(null),
|
|
3058
3110
|
delivery_address: Joi.any(),
|
|
3059
3111
|
device_id: Joi.string().allow("").allow(null),
|
|
3060
3112
|
employee_code: Joi.string().allow("").allow(null),
|
|
@@ -3075,7 +3127,7 @@ class CartPlatformModel {
|
|
|
3075
3127
|
pick_at_store_uid: Joi.number().allow(null),
|
|
3076
3128
|
pos: Joi.boolean(),
|
|
3077
3129
|
staff: CartPlatformModel.StaffCheckout(),
|
|
3078
|
-
user_id: Joi.string().allow("").required(),
|
|
3130
|
+
user_id: Joi.string().allow("").allow(null).required(),
|
|
3079
3131
|
});
|
|
3080
3132
|
}
|
|
3081
3133
|
|
|
@@ -3192,7 +3244,6 @@ class CartPlatformModel {
|
|
|
3192
3244
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3193
3245
|
article_level_distribution: Joi.boolean().required(),
|
|
3194
3246
|
cart_id: Joi.string().allow("").required(),
|
|
3195
|
-
cart_value: Joi.number(),
|
|
3196
3247
|
collection: CartPlatformModel.Collection().required(),
|
|
3197
3248
|
id: Joi.string().allow(""),
|
|
3198
3249
|
is_authenticated: Joi.boolean().required(),
|
|
@@ -3211,7 +3262,6 @@ class CartPlatformModel {
|
|
|
3211
3262
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3212
3263
|
article_level_distribution: Joi.boolean().required(),
|
|
3213
3264
|
cart_id: Joi.string().allow("").required(),
|
|
3214
|
-
cart_value: Joi.number(),
|
|
3215
3265
|
collection: CartPlatformModel.Collection().required(),
|
|
3216
3266
|
created_by: Joi.string().allow(""),
|
|
3217
3267
|
is_authenticated: Joi.boolean().required(),
|
|
@@ -3237,7 +3287,6 @@ class CartPlatformModel {
|
|
|
3237
3287
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3238
3288
|
article_level_distribution: Joi.boolean().required(),
|
|
3239
3289
|
cart_id: Joi.string().allow("").required(),
|
|
3240
|
-
cart_value: Joi.number(),
|
|
3241
3290
|
collection: CartPlatformModel.Collection().required(),
|
|
3242
3291
|
is_authenticated: Joi.boolean().required(),
|
|
3243
3292
|
message: Joi.string().allow("").required(),
|
|
@@ -3424,6 +3473,7 @@ class CartPlatformModel {
|
|
|
3424
3473
|
static PromotionListItem() {
|
|
3425
3474
|
return Joi.object({
|
|
3426
3475
|
_custom_json: Joi.any(),
|
|
3476
|
+
_id: Joi.string().allow(""),
|
|
3427
3477
|
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
3428
3478
|
application_id: Joi.string().allow("").required(),
|
|
3429
3479
|
apply_all_discount: Joi.boolean(),
|
|
@@ -3567,7 +3617,7 @@ class CartPlatformModel {
|
|
|
3567
3617
|
post_order: CartPlatformModel.PostOrder1(),
|
|
3568
3618
|
user_groups: Joi.array().items(Joi.number()),
|
|
3569
3619
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
3570
|
-
user_registered:
|
|
3620
|
+
user_registered: Joi.any().allow(null),
|
|
3571
3621
|
uses: CartPlatformModel.UsesRestriction1().required(),
|
|
3572
3622
|
});
|
|
3573
3623
|
}
|