@gofynd/fdk-client-javascript 1.0.1 → 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 +562 -1270
- 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 +15266 -17619
- 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 +3509 -4121
- 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 +3750 -5636
- 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/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +1058 -547
- 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 +1545 -949
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
- 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 +76 -36
- 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 +92 -31
- 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 +638 -312
- 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 +581 -213
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
- package/sdk/application/Content/ContentApplicationModel.js +468 -875
- 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 +121 -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 +230 -96
- 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 +196 -47
- 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 +86 -86
- package/sdk/application/Order/OrderApplicationClient.js +448 -215
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +357 -661
- 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 +1525 -750
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
- 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 +1137 -606
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
- package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
- 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 +253 -113
- 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 +221 -96
- 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 +115 -37
- 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 +1201 -543
- 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 +55 -47
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
- 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 +68 -56
- package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
- 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 +176 -159
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
- package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
- package/sdk/platform/Common/CommonPlatformClient.js +80 -37
- 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 +333 -293
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
- 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 +542 -461
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
- package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
- package/sdk/platform/Content/ContentPlatformModel.js +486 -867
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
- package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
- 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 +26 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
- 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 +76 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
- 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 +84 -71
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
- package/sdk/platform/Lead/LeadPlatformClient.js +434 -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/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
- package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
- package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
- package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
- package/sdk/platform/PlatformApplicationClient.js +1584 -13691
- package/sdk/platform/PlatformClient.d.ts +7918 -7666
- package/sdk/platform/PlatformClient.js +8701 -9926
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
- 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 +16 -12
- package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
- 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 +148 -124
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
- 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 +146 -67
- package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
- 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 +35 -29
- package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
- 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 +81 -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 +228 -105
- 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/WebhookPublicClient.js +51 -10
- 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
|
@@ -3,33 +3,35 @@ const constructUrl = require("../constructUrl");
|
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const OrderValidator = require("./OrderApplicationValidator");
|
|
6
|
+
const OrderModel = require("./OrderApplicationModel");
|
|
7
|
+
const { Logger } = require("./../../common/Logger");
|
|
6
8
|
|
|
7
9
|
class Order {
|
|
8
10
|
constructor(_conf) {
|
|
9
11
|
this._conf = _conf;
|
|
10
12
|
this._relativeUrls = {
|
|
11
|
-
|
|
13
|
+
getCustomerDetailsByShipmentId:
|
|
14
|
+
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",
|
|
15
|
+
getInvoiceByShipmentId:
|
|
16
|
+
"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
|
|
12
17
|
getOrderById: "/service/application/order/v1.0/orders/{order_id}",
|
|
18
|
+
getOrders: "/service/application/order/v1.0/orders",
|
|
13
19
|
getPosOrderById:
|
|
14
20
|
"/service/application/order/v1.0/orders/pos-order/{order_id}",
|
|
15
|
-
getShipmentById:
|
|
16
|
-
"/service/application/order/v1.0/orders/shipments/{shipment_id}",
|
|
17
|
-
getInvoiceByShipmentId:
|
|
18
|
-
"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
|
|
19
|
-
trackShipment:
|
|
20
|
-
"/service/application/order/v1.0/orders/shipments/{shipment_id}/track",
|
|
21
|
-
getCustomerDetailsByShipmentId:
|
|
22
|
-
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",
|
|
23
|
-
sendOtpToShipmentCustomer:
|
|
24
|
-
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",
|
|
25
|
-
verifyOtpShipmentCustomer:
|
|
26
|
-
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
|
|
27
21
|
getShipmentBagReasons:
|
|
28
22
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
|
|
23
|
+
getShipmentById:
|
|
24
|
+
"/service/application/order/v1.0/orders/shipments/{shipment_id}",
|
|
29
25
|
getShipmentReasons:
|
|
30
26
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/reasons",
|
|
27
|
+
sendOtpToShipmentCustomer:
|
|
28
|
+
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",
|
|
29
|
+
trackShipment:
|
|
30
|
+
"/service/application/order/v1.0/orders/shipments/{shipment_id}/track",
|
|
31
31
|
updateShipmentStatus:
|
|
32
32
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/status",
|
|
33
|
+
verifyOtpShipmentCustomer:
|
|
34
|
+
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
|
|
33
35
|
};
|
|
34
36
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
35
37
|
(urls, [method, relativeUrl]) => {
|
|
@@ -49,24 +51,18 @@ class Order {
|
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* @param {Object} arg - Arg object.
|
|
52
|
-
* @param {
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
-
*
|
|
60
|
-
* @param {string} [arg.toDate] - The date till which the orders should be retrieved.
|
|
61
|
-
* @param {string} [arg.customMeta] - A filter and retrieve data using
|
|
62
|
-
* special fields included for special use-cases
|
|
63
|
-
* @returns {Promise<OrderList>} - Success response
|
|
64
|
-
* @summary: Get all orders
|
|
65
|
-
* @description: Use this API to retrieve all the orders.
|
|
54
|
+
* @param {string} arg.orderId - ID of the shipment. An order may contain
|
|
55
|
+
* multiple items and may get divided into one or more shipment, each
|
|
56
|
+
* having its own ID.
|
|
57
|
+
* @param {string} arg.shipmentId - A unique number used for identifying and
|
|
58
|
+
* tracking your orders.
|
|
59
|
+
* @returns {Promise<CustomerDetailsResponse>} - Success response
|
|
60
|
+
* @summary: Get Customer Details by Shipment Id
|
|
61
|
+
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
|
|
66
62
|
*/
|
|
67
|
-
|
|
68
|
-
const { error } = OrderValidator.
|
|
69
|
-
{
|
|
63
|
+
async getCustomerDetailsByShipmentId({ orderId, shipmentId } = {}) {
|
|
64
|
+
const { error } = OrderValidator.getCustomerDetailsByShipmentId().validate(
|
|
65
|
+
{ orderId, shipmentId },
|
|
70
66
|
{ abortEarly: false, allowUnknown: true }
|
|
71
67
|
);
|
|
72
68
|
if (error) {
|
|
@@ -74,49 +70,66 @@ class Order {
|
|
|
74
70
|
}
|
|
75
71
|
|
|
76
72
|
// Showing warrnings if extra unknown parameters are found
|
|
77
|
-
const {
|
|
78
|
-
|
|
73
|
+
const {
|
|
74
|
+
error: warrning,
|
|
75
|
+
} = OrderValidator.getCustomerDetailsByShipmentId().validate(
|
|
76
|
+
{ orderId, shipmentId },
|
|
79
77
|
{ abortEarly: false, allowUnknown: false }
|
|
80
78
|
);
|
|
81
79
|
if (warrning) {
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
Logger({
|
|
81
|
+
level: "WARN",
|
|
82
|
+
message:
|
|
83
|
+
"Parameter Validation warrnings for getCustomerDetailsByShipmentId",
|
|
84
|
+
});
|
|
85
|
+
Logger({ level: "WARN", message: warrning });
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
const query_params = {};
|
|
87
|
-
query_params["status"] = status;
|
|
88
|
-
query_params["page_no"] = pageNo;
|
|
89
|
-
query_params["page_size"] = pageSize;
|
|
90
|
-
query_params["from_date"] = fromDate;
|
|
91
|
-
query_params["to_date"] = toDate;
|
|
92
|
-
query_params["custom_meta"] = customMeta;
|
|
93
89
|
|
|
94
90
|
const xHeaders = {};
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
const response = await APIClient.execute(
|
|
97
93
|
this._conf,
|
|
98
94
|
"get",
|
|
99
95
|
constructUrl({
|
|
100
|
-
url: this._urls["
|
|
101
|
-
params: {},
|
|
96
|
+
url: this._urls["getCustomerDetailsByShipmentId"],
|
|
97
|
+
params: { orderId, shipmentId },
|
|
102
98
|
}),
|
|
103
99
|
query_params,
|
|
104
100
|
undefined,
|
|
105
101
|
xHeaders
|
|
106
102
|
);
|
|
103
|
+
|
|
104
|
+
const {
|
|
105
|
+
error: res_error,
|
|
106
|
+
} = OrderModel.CustomerDetailsResponse().validate(response, {
|
|
107
|
+
abortEarly: false,
|
|
108
|
+
allowUnknown: false,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
if (res_error) {
|
|
112
|
+
Logger({
|
|
113
|
+
level: "WARN",
|
|
114
|
+
message:
|
|
115
|
+
"Response Validation Warnnings for getCustomerDetailsByShipmentId",
|
|
116
|
+
});
|
|
117
|
+
Logger({ level: "WARN", message: res_error });
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return response;
|
|
107
121
|
}
|
|
108
122
|
|
|
109
123
|
/**
|
|
110
124
|
* @param {Object} arg - Arg object.
|
|
111
|
-
* @param {string} arg.
|
|
112
|
-
*
|
|
113
|
-
* @
|
|
114
|
-
* @
|
|
115
|
-
* @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
|
|
125
|
+
* @param {string} arg.shipmentId - ID of the shipment.
|
|
126
|
+
* @returns {Promise<ResponseGetInvoiceShipment>} - Success response
|
|
127
|
+
* @summary: Get Invoice of a shipment
|
|
128
|
+
* @description: Use this API to retrieve shipment invoice.
|
|
116
129
|
*/
|
|
117
|
-
|
|
118
|
-
const { error } = OrderValidator.
|
|
119
|
-
{
|
|
130
|
+
async getInvoiceByShipmentId({ shipmentId } = {}) {
|
|
131
|
+
const { error } = OrderValidator.getInvoiceByShipmentId().validate(
|
|
132
|
+
{ shipmentId },
|
|
120
133
|
{ abortEarly: false, allowUnknown: true }
|
|
121
134
|
);
|
|
122
135
|
if (error) {
|
|
@@ -124,42 +137,64 @@ class Order {
|
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
// Showing warrnings if extra unknown parameters are found
|
|
127
|
-
const {
|
|
128
|
-
|
|
140
|
+
const {
|
|
141
|
+
error: warrning,
|
|
142
|
+
} = OrderValidator.getInvoiceByShipmentId().validate(
|
|
143
|
+
{ shipmentId },
|
|
129
144
|
{ abortEarly: false, allowUnknown: false }
|
|
130
145
|
);
|
|
131
146
|
if (warrning) {
|
|
132
|
-
|
|
133
|
-
|
|
147
|
+
Logger({
|
|
148
|
+
level: "WARN",
|
|
149
|
+
message: "Parameter Validation warrnings for getInvoiceByShipmentId",
|
|
150
|
+
});
|
|
151
|
+
Logger({ level: "WARN", message: warrning });
|
|
134
152
|
}
|
|
135
153
|
|
|
136
154
|
const query_params = {};
|
|
137
155
|
|
|
138
156
|
const xHeaders = {};
|
|
139
157
|
|
|
140
|
-
|
|
158
|
+
const response = await APIClient.execute(
|
|
141
159
|
this._conf,
|
|
142
160
|
"get",
|
|
143
161
|
constructUrl({
|
|
144
|
-
url: this._urls["
|
|
145
|
-
params: {
|
|
162
|
+
url: this._urls["getInvoiceByShipmentId"],
|
|
163
|
+
params: { shipmentId },
|
|
146
164
|
}),
|
|
147
165
|
query_params,
|
|
148
166
|
undefined,
|
|
149
167
|
xHeaders
|
|
150
168
|
);
|
|
169
|
+
|
|
170
|
+
const {
|
|
171
|
+
error: res_error,
|
|
172
|
+
} = OrderModel.ResponseGetInvoiceShipment().validate(response, {
|
|
173
|
+
abortEarly: false,
|
|
174
|
+
allowUnknown: false,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
if (res_error) {
|
|
178
|
+
Logger({
|
|
179
|
+
level: "WARN",
|
|
180
|
+
message: "Response Validation Warnnings for getInvoiceByShipmentId",
|
|
181
|
+
});
|
|
182
|
+
Logger({ level: "WARN", message: res_error });
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return response;
|
|
151
186
|
}
|
|
152
187
|
|
|
153
188
|
/**
|
|
154
189
|
* @param {Object} arg - Arg object.
|
|
155
190
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
156
191
|
* tracking your orders.
|
|
157
|
-
* @returns {Promise<
|
|
158
|
-
* @summary: Get
|
|
159
|
-
* @description: Use this API to retrieve
|
|
192
|
+
* @returns {Promise<OrderById>} - Success response
|
|
193
|
+
* @summary: Get details of an order
|
|
194
|
+
* @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
|
|
160
195
|
*/
|
|
161
|
-
|
|
162
|
-
const { error } = OrderValidator.
|
|
196
|
+
async getOrderById({ orderId } = {}) {
|
|
197
|
+
const { error } = OrderValidator.getOrderById().validate(
|
|
163
198
|
{ orderId },
|
|
164
199
|
{ abortEarly: false, allowUnknown: true }
|
|
165
200
|
);
|
|
@@ -168,44 +203,77 @@ class Order {
|
|
|
168
203
|
}
|
|
169
204
|
|
|
170
205
|
// Showing warrnings if extra unknown parameters are found
|
|
171
|
-
const { error: warrning } = OrderValidator.
|
|
206
|
+
const { error: warrning } = OrderValidator.getOrderById().validate(
|
|
172
207
|
{ orderId },
|
|
173
208
|
{ abortEarly: false, allowUnknown: false }
|
|
174
209
|
);
|
|
175
210
|
if (warrning) {
|
|
176
|
-
|
|
177
|
-
|
|
211
|
+
Logger({
|
|
212
|
+
level: "WARN",
|
|
213
|
+
message: "Parameter Validation warrnings for getOrderById",
|
|
214
|
+
});
|
|
215
|
+
Logger({ level: "WARN", message: warrning });
|
|
178
216
|
}
|
|
179
217
|
|
|
180
218
|
const query_params = {};
|
|
181
219
|
|
|
182
220
|
const xHeaders = {};
|
|
183
221
|
|
|
184
|
-
|
|
222
|
+
const response = await APIClient.execute(
|
|
185
223
|
this._conf,
|
|
186
224
|
"get",
|
|
187
225
|
constructUrl({
|
|
188
|
-
url: this._urls["
|
|
226
|
+
url: this._urls["getOrderById"],
|
|
189
227
|
params: { orderId },
|
|
190
228
|
}),
|
|
191
229
|
query_params,
|
|
192
230
|
undefined,
|
|
193
231
|
xHeaders
|
|
194
232
|
);
|
|
233
|
+
|
|
234
|
+
const { error: res_error } = OrderModel.OrderById().validate(response, {
|
|
235
|
+
abortEarly: false,
|
|
236
|
+
allowUnknown: false,
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
if (res_error) {
|
|
240
|
+
Logger({
|
|
241
|
+
level: "WARN",
|
|
242
|
+
message: "Response Validation Warnnings for getOrderById",
|
|
243
|
+
});
|
|
244
|
+
Logger({ level: "WARN", message: res_error });
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return response;
|
|
195
248
|
}
|
|
196
249
|
|
|
197
250
|
/**
|
|
198
251
|
* @param {Object} arg - Arg object.
|
|
199
|
-
* @param {
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* @
|
|
204
|
-
*
|
|
252
|
+
* @param {number} [arg.status] - A filter to retrieve orders by their
|
|
253
|
+
* current status such as _placed_, _delivered_, etc.
|
|
254
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
255
|
+
* given set of results. Default value is 1.
|
|
256
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
257
|
+
* page. Default value is 10.
|
|
258
|
+
* @param {string} [arg.fromDate] - The date from which the orders should be
|
|
259
|
+
* retrieved.
|
|
260
|
+
* @param {string} [arg.toDate] - The date till which the orders should be retrieved.
|
|
261
|
+
* @param {string} [arg.customMeta] - A filter and retrieve data using
|
|
262
|
+
* special fields included for special use-cases
|
|
263
|
+
* @returns {Promise<OrderList>} - Success response
|
|
264
|
+
* @summary: Get all orders
|
|
265
|
+
* @description: Use this API to retrieve all the orders.
|
|
205
266
|
*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
267
|
+
async getOrders({
|
|
268
|
+
status,
|
|
269
|
+
pageNo,
|
|
270
|
+
pageSize,
|
|
271
|
+
fromDate,
|
|
272
|
+
toDate,
|
|
273
|
+
customMeta,
|
|
274
|
+
} = {}) {
|
|
275
|
+
const { error } = OrderValidator.getOrders().validate(
|
|
276
|
+
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
209
277
|
{ abortEarly: false, allowUnknown: true }
|
|
210
278
|
);
|
|
211
279
|
if (error) {
|
|
@@ -213,42 +281,67 @@ class Order {
|
|
|
213
281
|
}
|
|
214
282
|
|
|
215
283
|
// Showing warrnings if extra unknown parameters are found
|
|
216
|
-
const { error: warrning } = OrderValidator.
|
|
217
|
-
{
|
|
284
|
+
const { error: warrning } = OrderValidator.getOrders().validate(
|
|
285
|
+
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
218
286
|
{ abortEarly: false, allowUnknown: false }
|
|
219
287
|
);
|
|
220
288
|
if (warrning) {
|
|
221
|
-
|
|
222
|
-
|
|
289
|
+
Logger({
|
|
290
|
+
level: "WARN",
|
|
291
|
+
message: "Parameter Validation warrnings for getOrders",
|
|
292
|
+
});
|
|
293
|
+
Logger({ level: "WARN", message: warrning });
|
|
223
294
|
}
|
|
224
295
|
|
|
225
296
|
const query_params = {};
|
|
297
|
+
query_params["status"] = status;
|
|
298
|
+
query_params["page_no"] = pageNo;
|
|
299
|
+
query_params["page_size"] = pageSize;
|
|
300
|
+
query_params["from_date"] = fromDate;
|
|
301
|
+
query_params["to_date"] = toDate;
|
|
302
|
+
query_params["custom_meta"] = customMeta;
|
|
226
303
|
|
|
227
304
|
const xHeaders = {};
|
|
228
305
|
|
|
229
|
-
|
|
306
|
+
const response = await APIClient.execute(
|
|
230
307
|
this._conf,
|
|
231
308
|
"get",
|
|
232
309
|
constructUrl({
|
|
233
|
-
url: this._urls["
|
|
234
|
-
params: {
|
|
310
|
+
url: this._urls["getOrders"],
|
|
311
|
+
params: {},
|
|
235
312
|
}),
|
|
236
313
|
query_params,
|
|
237
314
|
undefined,
|
|
238
315
|
xHeaders
|
|
239
316
|
);
|
|
317
|
+
|
|
318
|
+
const { error: res_error } = OrderModel.OrderList().validate(response, {
|
|
319
|
+
abortEarly: false,
|
|
320
|
+
allowUnknown: false,
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
if (res_error) {
|
|
324
|
+
Logger({
|
|
325
|
+
level: "WARN",
|
|
326
|
+
message: "Response Validation Warnnings for getOrders",
|
|
327
|
+
});
|
|
328
|
+
Logger({ level: "WARN", message: res_error });
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return response;
|
|
240
332
|
}
|
|
241
333
|
|
|
242
334
|
/**
|
|
243
335
|
* @param {Object} arg - Arg object.
|
|
244
|
-
* @param {string} arg.
|
|
245
|
-
*
|
|
246
|
-
* @
|
|
247
|
-
* @
|
|
336
|
+
* @param {string} arg.orderId - A unique number used for identifying and
|
|
337
|
+
* tracking your orders.
|
|
338
|
+
* @returns {Promise<OrderList>} - Success response
|
|
339
|
+
* @summary: Get POS Order
|
|
340
|
+
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
248
341
|
*/
|
|
249
|
-
|
|
250
|
-
const { error } = OrderValidator.
|
|
251
|
-
{
|
|
342
|
+
async getPosOrderById({ orderId } = {}) {
|
|
343
|
+
const { error } = OrderValidator.getPosOrderById().validate(
|
|
344
|
+
{ orderId },
|
|
252
345
|
{ abortEarly: false, allowUnknown: true }
|
|
253
346
|
);
|
|
254
347
|
if (error) {
|
|
@@ -256,46 +349,64 @@ class Order {
|
|
|
256
349
|
}
|
|
257
350
|
|
|
258
351
|
// Showing warrnings if extra unknown parameters are found
|
|
259
|
-
const {
|
|
260
|
-
|
|
261
|
-
} = OrderValidator.getInvoiceByShipmentId().validate(
|
|
262
|
-
{ shipmentId },
|
|
352
|
+
const { error: warrning } = OrderValidator.getPosOrderById().validate(
|
|
353
|
+
{ orderId },
|
|
263
354
|
{ abortEarly: false, allowUnknown: false }
|
|
264
355
|
);
|
|
265
356
|
if (warrning) {
|
|
266
|
-
|
|
267
|
-
|
|
357
|
+
Logger({
|
|
358
|
+
level: "WARN",
|
|
359
|
+
message: "Parameter Validation warrnings for getPosOrderById",
|
|
360
|
+
});
|
|
361
|
+
Logger({ level: "WARN", message: warrning });
|
|
268
362
|
}
|
|
269
363
|
|
|
270
364
|
const query_params = {};
|
|
271
365
|
|
|
272
366
|
const xHeaders = {};
|
|
273
367
|
|
|
274
|
-
|
|
368
|
+
const response = await APIClient.execute(
|
|
275
369
|
this._conf,
|
|
276
370
|
"get",
|
|
277
371
|
constructUrl({
|
|
278
|
-
url: this._urls["
|
|
279
|
-
params: {
|
|
372
|
+
url: this._urls["getPosOrderById"],
|
|
373
|
+
params: { orderId },
|
|
280
374
|
}),
|
|
281
375
|
query_params,
|
|
282
376
|
undefined,
|
|
283
377
|
xHeaders
|
|
284
378
|
);
|
|
379
|
+
|
|
380
|
+
const { error: res_error } = OrderModel.OrderList().validate(response, {
|
|
381
|
+
abortEarly: false,
|
|
382
|
+
allowUnknown: false,
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
if (res_error) {
|
|
386
|
+
Logger({
|
|
387
|
+
level: "WARN",
|
|
388
|
+
message: "Response Validation Warnnings for getPosOrderById",
|
|
389
|
+
});
|
|
390
|
+
Logger({ level: "WARN", message: res_error });
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return response;
|
|
285
394
|
}
|
|
286
395
|
|
|
287
396
|
/**
|
|
288
397
|
* @param {Object} arg - Arg object.
|
|
289
|
-
* @param {string} arg.shipmentId - ID of the
|
|
398
|
+
* @param {string} arg.shipmentId - ID of the bag. An order may contain
|
|
290
399
|
* multiple items and may get divided into one or more shipment, each
|
|
291
400
|
* having its own ID.
|
|
292
|
-
* @
|
|
293
|
-
*
|
|
294
|
-
* @
|
|
401
|
+
* @param {string} arg.bagId - ID of the bag. An order may contain multiple
|
|
402
|
+
* items and may get divided into one or more shipment, each having its own ID.
|
|
403
|
+
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
404
|
+
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
405
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
295
406
|
*/
|
|
296
|
-
|
|
297
|
-
const { error } = OrderValidator.
|
|
298
|
-
{ shipmentId },
|
|
407
|
+
async getShipmentBagReasons({ shipmentId, bagId } = {}) {
|
|
408
|
+
const { error } = OrderValidator.getShipmentBagReasons().validate(
|
|
409
|
+
{ shipmentId, bagId },
|
|
299
410
|
{ abortEarly: false, allowUnknown: true }
|
|
300
411
|
);
|
|
301
412
|
if (error) {
|
|
@@ -303,46 +414,64 @@ class Order {
|
|
|
303
414
|
}
|
|
304
415
|
|
|
305
416
|
// Showing warrnings if extra unknown parameters are found
|
|
306
|
-
const { error: warrning } = OrderValidator.
|
|
307
|
-
{ shipmentId },
|
|
417
|
+
const { error: warrning } = OrderValidator.getShipmentBagReasons().validate(
|
|
418
|
+
{ shipmentId, bagId },
|
|
308
419
|
{ abortEarly: false, allowUnknown: false }
|
|
309
420
|
);
|
|
310
421
|
if (warrning) {
|
|
311
|
-
|
|
312
|
-
|
|
422
|
+
Logger({
|
|
423
|
+
level: "WARN",
|
|
424
|
+
message: "Parameter Validation warrnings for getShipmentBagReasons",
|
|
425
|
+
});
|
|
426
|
+
Logger({ level: "WARN", message: warrning });
|
|
313
427
|
}
|
|
314
428
|
|
|
315
429
|
const query_params = {};
|
|
316
430
|
|
|
317
431
|
const xHeaders = {};
|
|
318
432
|
|
|
319
|
-
|
|
433
|
+
const response = await APIClient.execute(
|
|
320
434
|
this._conf,
|
|
321
435
|
"get",
|
|
322
436
|
constructUrl({
|
|
323
|
-
url: this._urls["
|
|
324
|
-
params: { shipmentId },
|
|
437
|
+
url: this._urls["getShipmentBagReasons"],
|
|
438
|
+
params: { shipmentId, bagId },
|
|
325
439
|
}),
|
|
326
440
|
query_params,
|
|
327
441
|
undefined,
|
|
328
442
|
xHeaders
|
|
329
443
|
);
|
|
444
|
+
|
|
445
|
+
const {
|
|
446
|
+
error: res_error,
|
|
447
|
+
} = OrderModel.ShipmentBagReasons().validate(response, {
|
|
448
|
+
abortEarly: false,
|
|
449
|
+
allowUnknown: false,
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
if (res_error) {
|
|
453
|
+
Logger({
|
|
454
|
+
level: "WARN",
|
|
455
|
+
message: "Response Validation Warnnings for getShipmentBagReasons",
|
|
456
|
+
});
|
|
457
|
+
Logger({ level: "WARN", message: res_error });
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
return response;
|
|
330
461
|
}
|
|
331
462
|
|
|
332
463
|
/**
|
|
333
464
|
* @param {Object} arg - Arg object.
|
|
334
|
-
* @param {string} arg.
|
|
465
|
+
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
335
466
|
* multiple items and may get divided into one or more shipment, each
|
|
336
467
|
* having its own ID.
|
|
337
|
-
* @
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
340
|
-
* @summary: Get Customer Details by Shipment Id
|
|
341
|
-
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
|
|
468
|
+
* @returns {Promise<ShipmentById>} - Success response
|
|
469
|
+
* @summary: Get details of a shipment
|
|
470
|
+
* @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID.
|
|
342
471
|
*/
|
|
343
|
-
|
|
344
|
-
const { error } = OrderValidator.
|
|
345
|
-
{
|
|
472
|
+
async getShipmentById({ shipmentId } = {}) {
|
|
473
|
+
const { error } = OrderValidator.getShipmentById().validate(
|
|
474
|
+
{ shipmentId },
|
|
346
475
|
{ abortEarly: false, allowUnknown: true }
|
|
347
476
|
);
|
|
348
477
|
if (error) {
|
|
@@ -350,50 +479,62 @@ class Order {
|
|
|
350
479
|
}
|
|
351
480
|
|
|
352
481
|
// Showing warrnings if extra unknown parameters are found
|
|
353
|
-
const {
|
|
354
|
-
|
|
355
|
-
} = OrderValidator.getCustomerDetailsByShipmentId().validate(
|
|
356
|
-
{ orderId, shipmentId },
|
|
482
|
+
const { error: warrning } = OrderValidator.getShipmentById().validate(
|
|
483
|
+
{ shipmentId },
|
|
357
484
|
{ abortEarly: false, allowUnknown: false }
|
|
358
485
|
);
|
|
359
486
|
if (warrning) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
487
|
+
Logger({
|
|
488
|
+
level: "WARN",
|
|
489
|
+
message: "Parameter Validation warrnings for getShipmentById",
|
|
490
|
+
});
|
|
491
|
+
Logger({ level: "WARN", message: warrning });
|
|
364
492
|
}
|
|
365
493
|
|
|
366
494
|
const query_params = {};
|
|
367
495
|
|
|
368
496
|
const xHeaders = {};
|
|
369
497
|
|
|
370
|
-
|
|
498
|
+
const response = await APIClient.execute(
|
|
371
499
|
this._conf,
|
|
372
500
|
"get",
|
|
373
501
|
constructUrl({
|
|
374
|
-
url: this._urls["
|
|
375
|
-
params: {
|
|
502
|
+
url: this._urls["getShipmentById"],
|
|
503
|
+
params: { shipmentId },
|
|
376
504
|
}),
|
|
377
505
|
query_params,
|
|
378
506
|
undefined,
|
|
379
507
|
xHeaders
|
|
380
508
|
);
|
|
509
|
+
|
|
510
|
+
const { error: res_error } = OrderModel.ShipmentById().validate(response, {
|
|
511
|
+
abortEarly: false,
|
|
512
|
+
allowUnknown: false,
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
if (res_error) {
|
|
516
|
+
Logger({
|
|
517
|
+
level: "WARN",
|
|
518
|
+
message: "Response Validation Warnnings for getShipmentById",
|
|
519
|
+
});
|
|
520
|
+
Logger({ level: "WARN", message: res_error });
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return response;
|
|
381
524
|
}
|
|
382
525
|
|
|
383
526
|
/**
|
|
384
527
|
* @param {Object} arg - Arg object.
|
|
385
|
-
* @param {string} arg.orderId - A unique number used for identifying and
|
|
386
|
-
* tracking your orders.
|
|
387
528
|
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
388
529
|
* multiple items and may get divided into one or more shipment, each
|
|
389
530
|
* having its own ID.
|
|
390
|
-
* @returns {Promise<
|
|
391
|
-
* @summary:
|
|
392
|
-
* @description: Use this API to
|
|
531
|
+
* @returns {Promise<ShipmentReasons>} - Success response
|
|
532
|
+
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
533
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
393
534
|
*/
|
|
394
|
-
|
|
395
|
-
const { error } = OrderValidator.
|
|
396
|
-
{
|
|
535
|
+
async getShipmentReasons({ shipmentId } = {}) {
|
|
536
|
+
const { error } = OrderValidator.getShipmentReasons().validate(
|
|
537
|
+
{ shipmentId },
|
|
397
538
|
{ abortEarly: false, allowUnknown: true }
|
|
398
539
|
);
|
|
399
540
|
if (error) {
|
|
@@ -401,34 +542,48 @@ class Order {
|
|
|
401
542
|
}
|
|
402
543
|
|
|
403
544
|
// Showing warrnings if extra unknown parameters are found
|
|
404
|
-
const {
|
|
405
|
-
|
|
406
|
-
} = OrderValidator.sendOtpToShipmentCustomer().validate(
|
|
407
|
-
{ orderId, shipmentId },
|
|
545
|
+
const { error: warrning } = OrderValidator.getShipmentReasons().validate(
|
|
546
|
+
{ shipmentId },
|
|
408
547
|
{ abortEarly: false, allowUnknown: false }
|
|
409
548
|
);
|
|
410
549
|
if (warrning) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
550
|
+
Logger({
|
|
551
|
+
level: "WARN",
|
|
552
|
+
message: "Parameter Validation warrnings for getShipmentReasons",
|
|
553
|
+
});
|
|
554
|
+
Logger({ level: "WARN", message: warrning });
|
|
415
555
|
}
|
|
416
556
|
|
|
417
557
|
const query_params = {};
|
|
418
558
|
|
|
419
559
|
const xHeaders = {};
|
|
420
560
|
|
|
421
|
-
|
|
561
|
+
const response = await APIClient.execute(
|
|
422
562
|
this._conf,
|
|
423
|
-
"
|
|
563
|
+
"get",
|
|
424
564
|
constructUrl({
|
|
425
|
-
url: this._urls["
|
|
426
|
-
params: {
|
|
565
|
+
url: this._urls["getShipmentReasons"],
|
|
566
|
+
params: { shipmentId },
|
|
427
567
|
}),
|
|
428
568
|
query_params,
|
|
429
569
|
undefined,
|
|
430
570
|
xHeaders
|
|
431
571
|
);
|
|
572
|
+
|
|
573
|
+
const { error: res_error } = OrderModel.ShipmentReasons().validate(
|
|
574
|
+
response,
|
|
575
|
+
{ abortEarly: false, allowUnknown: false }
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
if (res_error) {
|
|
579
|
+
Logger({
|
|
580
|
+
level: "WARN",
|
|
581
|
+
message: "Response Validation Warnnings for getShipmentReasons",
|
|
582
|
+
});
|
|
583
|
+
Logger({ level: "WARN", message: res_error });
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return response;
|
|
432
587
|
}
|
|
433
588
|
|
|
434
589
|
/**
|
|
@@ -438,14 +593,13 @@ class Order {
|
|
|
438
593
|
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
439
594
|
* multiple items and may get divided into one or more shipment, each
|
|
440
595
|
* having its own ID.
|
|
441
|
-
* @
|
|
442
|
-
* @
|
|
443
|
-
* @
|
|
444
|
-
* @description: Use this API to verify OTP and create a session token with custom payload.
|
|
596
|
+
* @returns {Promise<SendOtpToCustomerResponse>} - Success response
|
|
597
|
+
* @summary: Send and Resend Otp code to Order-Shipment customer
|
|
598
|
+
* @description: Use this API to send OTP to the customer of the mapped Shipment.
|
|
445
599
|
*/
|
|
446
|
-
|
|
447
|
-
const { error } = OrderValidator.
|
|
448
|
-
{ orderId, shipmentId
|
|
600
|
+
async sendOtpToShipmentCustomer({ orderId, shipmentId } = {}) {
|
|
601
|
+
const { error } = OrderValidator.sendOtpToShipmentCustomer().validate(
|
|
602
|
+
{ orderId, shipmentId },
|
|
449
603
|
{ abortEarly: false, allowUnknown: true }
|
|
450
604
|
);
|
|
451
605
|
if (error) {
|
|
@@ -455,48 +609,64 @@ class Order {
|
|
|
455
609
|
// Showing warrnings if extra unknown parameters are found
|
|
456
610
|
const {
|
|
457
611
|
error: warrning,
|
|
458
|
-
} = OrderValidator.
|
|
459
|
-
{ orderId, shipmentId
|
|
612
|
+
} = OrderValidator.sendOtpToShipmentCustomer().validate(
|
|
613
|
+
{ orderId, shipmentId },
|
|
460
614
|
{ abortEarly: false, allowUnknown: false }
|
|
461
615
|
);
|
|
462
616
|
if (warrning) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
617
|
+
Logger({
|
|
618
|
+
level: "WARN",
|
|
619
|
+
message: "Parameter Validation warrnings for sendOtpToShipmentCustomer",
|
|
620
|
+
});
|
|
621
|
+
Logger({ level: "WARN", message: warrning });
|
|
467
622
|
}
|
|
468
623
|
|
|
469
624
|
const query_params = {};
|
|
470
625
|
|
|
471
626
|
const xHeaders = {};
|
|
472
627
|
|
|
473
|
-
|
|
628
|
+
const response = await APIClient.execute(
|
|
474
629
|
this._conf,
|
|
475
630
|
"post",
|
|
476
631
|
constructUrl({
|
|
477
|
-
url: this._urls["
|
|
632
|
+
url: this._urls["sendOtpToShipmentCustomer"],
|
|
478
633
|
params: { orderId, shipmentId },
|
|
479
634
|
}),
|
|
480
635
|
query_params,
|
|
481
|
-
|
|
636
|
+
undefined,
|
|
482
637
|
xHeaders
|
|
483
638
|
);
|
|
639
|
+
|
|
640
|
+
const {
|
|
641
|
+
error: res_error,
|
|
642
|
+
} = OrderModel.SendOtpToCustomerResponse().validate(response, {
|
|
643
|
+
abortEarly: false,
|
|
644
|
+
allowUnknown: false,
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
if (res_error) {
|
|
648
|
+
Logger({
|
|
649
|
+
level: "WARN",
|
|
650
|
+
message: "Response Validation Warnnings for sendOtpToShipmentCustomer",
|
|
651
|
+
});
|
|
652
|
+
Logger({ level: "WARN", message: res_error });
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return response;
|
|
484
656
|
}
|
|
485
657
|
|
|
486
658
|
/**
|
|
487
659
|
* @param {Object} arg - Arg object.
|
|
488
|
-
* @param {string} arg.shipmentId - ID of the
|
|
660
|
+
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
489
661
|
* multiple items and may get divided into one or more shipment, each
|
|
490
662
|
* having its own ID.
|
|
491
|
-
* @
|
|
492
|
-
*
|
|
493
|
-
* @
|
|
494
|
-
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
495
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
663
|
+
* @returns {Promise<ShipmentTrack>} - Success response
|
|
664
|
+
* @summary: Track shipment
|
|
665
|
+
* @description: Track Shipment by shipment id, for application based on application Id
|
|
496
666
|
*/
|
|
497
|
-
|
|
498
|
-
const { error } = OrderValidator.
|
|
499
|
-
{ shipmentId
|
|
667
|
+
async trackShipment({ shipmentId } = {}) {
|
|
668
|
+
const { error } = OrderValidator.trackShipment().validate(
|
|
669
|
+
{ shipmentId },
|
|
500
670
|
{ abortEarly: false, allowUnknown: true }
|
|
501
671
|
);
|
|
502
672
|
if (error) {
|
|
@@ -504,30 +674,48 @@ class Order {
|
|
|
504
674
|
}
|
|
505
675
|
|
|
506
676
|
// Showing warrnings if extra unknown parameters are found
|
|
507
|
-
const { error: warrning } = OrderValidator.
|
|
508
|
-
{ shipmentId
|
|
677
|
+
const { error: warrning } = OrderValidator.trackShipment().validate(
|
|
678
|
+
{ shipmentId },
|
|
509
679
|
{ abortEarly: false, allowUnknown: false }
|
|
510
680
|
);
|
|
511
681
|
if (warrning) {
|
|
512
|
-
|
|
513
|
-
|
|
682
|
+
Logger({
|
|
683
|
+
level: "WARN",
|
|
684
|
+
message: "Parameter Validation warrnings for trackShipment",
|
|
685
|
+
});
|
|
686
|
+
Logger({ level: "WARN", message: warrning });
|
|
514
687
|
}
|
|
515
688
|
|
|
516
689
|
const query_params = {};
|
|
517
690
|
|
|
518
691
|
const xHeaders = {};
|
|
519
692
|
|
|
520
|
-
|
|
693
|
+
const response = await APIClient.execute(
|
|
521
694
|
this._conf,
|
|
522
695
|
"get",
|
|
523
696
|
constructUrl({
|
|
524
|
-
url: this._urls["
|
|
525
|
-
params: { shipmentId
|
|
697
|
+
url: this._urls["trackShipment"],
|
|
698
|
+
params: { shipmentId },
|
|
526
699
|
}),
|
|
527
700
|
query_params,
|
|
528
701
|
undefined,
|
|
529
702
|
xHeaders
|
|
530
703
|
);
|
|
704
|
+
|
|
705
|
+
const { error: res_error } = OrderModel.ShipmentTrack().validate(response, {
|
|
706
|
+
abortEarly: false,
|
|
707
|
+
allowUnknown: false,
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
if (res_error) {
|
|
711
|
+
Logger({
|
|
712
|
+
level: "WARN",
|
|
713
|
+
message: "Response Validation Warnnings for trackShipment",
|
|
714
|
+
});
|
|
715
|
+
Logger({ level: "WARN", message: res_error });
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
return response;
|
|
531
719
|
}
|
|
532
720
|
|
|
533
721
|
/**
|
|
@@ -535,13 +723,14 @@ class Order {
|
|
|
535
723
|
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
536
724
|
* multiple items and may get divided into one or more shipment, each
|
|
537
725
|
* having its own ID.
|
|
538
|
-
* @
|
|
539
|
-
* @
|
|
540
|
-
* @
|
|
726
|
+
* @param {UpdateShipmentStatusRequest} arg.body
|
|
727
|
+
* @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
|
|
728
|
+
* @summary: Update the shipment status
|
|
729
|
+
* @description: Use this API to update the status of a shipment using its shipment ID.
|
|
541
730
|
*/
|
|
542
|
-
|
|
543
|
-
const { error } = OrderValidator.
|
|
544
|
-
{ shipmentId },
|
|
731
|
+
async updateShipmentStatus({ shipmentId, body } = {}) {
|
|
732
|
+
const { error } = OrderValidator.updateShipmentStatus().validate(
|
|
733
|
+
{ shipmentId, body },
|
|
545
734
|
{ abortEarly: false, allowUnknown: true }
|
|
546
735
|
);
|
|
547
736
|
if (error) {
|
|
@@ -549,45 +738,67 @@ class Order {
|
|
|
549
738
|
}
|
|
550
739
|
|
|
551
740
|
// Showing warrnings if extra unknown parameters are found
|
|
552
|
-
const { error: warrning } = OrderValidator.
|
|
553
|
-
{ shipmentId },
|
|
741
|
+
const { error: warrning } = OrderValidator.updateShipmentStatus().validate(
|
|
742
|
+
{ shipmentId, body },
|
|
554
743
|
{ abortEarly: false, allowUnknown: false }
|
|
555
744
|
);
|
|
556
745
|
if (warrning) {
|
|
557
|
-
|
|
558
|
-
|
|
746
|
+
Logger({
|
|
747
|
+
level: "WARN",
|
|
748
|
+
message: "Parameter Validation warrnings for updateShipmentStatus",
|
|
749
|
+
});
|
|
750
|
+
Logger({ level: "WARN", message: warrning });
|
|
559
751
|
}
|
|
560
752
|
|
|
561
753
|
const query_params = {};
|
|
562
754
|
|
|
563
755
|
const xHeaders = {};
|
|
564
756
|
|
|
565
|
-
|
|
757
|
+
const response = await APIClient.execute(
|
|
566
758
|
this._conf,
|
|
567
|
-
"
|
|
759
|
+
"put",
|
|
568
760
|
constructUrl({
|
|
569
|
-
url: this._urls["
|
|
761
|
+
url: this._urls["updateShipmentStatus"],
|
|
570
762
|
params: { shipmentId },
|
|
571
763
|
}),
|
|
572
764
|
query_params,
|
|
573
|
-
|
|
765
|
+
body,
|
|
574
766
|
xHeaders
|
|
575
767
|
);
|
|
768
|
+
|
|
769
|
+
const {
|
|
770
|
+
error: res_error,
|
|
771
|
+
} = OrderModel.ShipmentApplicationStatusResponse().validate(response, {
|
|
772
|
+
abortEarly: false,
|
|
773
|
+
allowUnknown: false,
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
if (res_error) {
|
|
777
|
+
Logger({
|
|
778
|
+
level: "WARN",
|
|
779
|
+
message: "Response Validation Warnnings for updateShipmentStatus",
|
|
780
|
+
});
|
|
781
|
+
Logger({ level: "WARN", message: res_error });
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
return response;
|
|
576
785
|
}
|
|
577
786
|
|
|
578
787
|
/**
|
|
579
788
|
* @param {Object} arg - Arg object.
|
|
789
|
+
* @param {string} arg.orderId - A unique number used for identifying and
|
|
790
|
+
* tracking your orders.
|
|
580
791
|
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
581
792
|
* multiple items and may get divided into one or more shipment, each
|
|
582
793
|
* having its own ID.
|
|
583
|
-
* @param {
|
|
584
|
-
* @returns {Promise<
|
|
585
|
-
* @summary:
|
|
586
|
-
* @description: Use this API to
|
|
794
|
+
* @param {VerifyOtp} arg.body
|
|
795
|
+
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
796
|
+
* @summary: Verify Otp code
|
|
797
|
+
* @description: Use this API to verify OTP and create a session token with custom payload.
|
|
587
798
|
*/
|
|
588
|
-
|
|
589
|
-
const { error } = OrderValidator.
|
|
590
|
-
{ shipmentId, body },
|
|
799
|
+
async verifyOtpShipmentCustomer({ orderId, shipmentId, body } = {}) {
|
|
800
|
+
const { error } = OrderValidator.verifyOtpShipmentCustomer().validate(
|
|
801
|
+
{ orderId, shipmentId, body },
|
|
591
802
|
{ abortEarly: false, allowUnknown: true }
|
|
592
803
|
);
|
|
593
804
|
if (error) {
|
|
@@ -595,30 +806,52 @@ class Order {
|
|
|
595
806
|
}
|
|
596
807
|
|
|
597
808
|
// Showing warrnings if extra unknown parameters are found
|
|
598
|
-
const {
|
|
599
|
-
|
|
809
|
+
const {
|
|
810
|
+
error: warrning,
|
|
811
|
+
} = OrderValidator.verifyOtpShipmentCustomer().validate(
|
|
812
|
+
{ orderId, shipmentId, body },
|
|
600
813
|
{ abortEarly: false, allowUnknown: false }
|
|
601
814
|
);
|
|
602
815
|
if (warrning) {
|
|
603
|
-
|
|
604
|
-
|
|
816
|
+
Logger({
|
|
817
|
+
level: "WARN",
|
|
818
|
+
message: "Parameter Validation warrnings for verifyOtpShipmentCustomer",
|
|
819
|
+
});
|
|
820
|
+
Logger({ level: "WARN", message: warrning });
|
|
605
821
|
}
|
|
606
822
|
|
|
607
823
|
const query_params = {};
|
|
608
824
|
|
|
609
825
|
const xHeaders = {};
|
|
610
826
|
|
|
611
|
-
|
|
827
|
+
const response = await APIClient.execute(
|
|
612
828
|
this._conf,
|
|
613
|
-
"
|
|
829
|
+
"post",
|
|
614
830
|
constructUrl({
|
|
615
|
-
url: this._urls["
|
|
616
|
-
params: { shipmentId },
|
|
831
|
+
url: this._urls["verifyOtpShipmentCustomer"],
|
|
832
|
+
params: { orderId, shipmentId },
|
|
617
833
|
}),
|
|
618
834
|
query_params,
|
|
619
835
|
body,
|
|
620
836
|
xHeaders
|
|
621
837
|
);
|
|
838
|
+
|
|
839
|
+
const {
|
|
840
|
+
error: res_error,
|
|
841
|
+
} = OrderModel.VerifyOtpResponse().validate(response, {
|
|
842
|
+
abortEarly: false,
|
|
843
|
+
allowUnknown: false,
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
if (res_error) {
|
|
847
|
+
Logger({
|
|
848
|
+
level: "WARN",
|
|
849
|
+
message: "Response Validation Warnnings for verifyOtpShipmentCustomer",
|
|
850
|
+
});
|
|
851
|
+
Logger({ level: "WARN", message: res_error });
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
return response;
|
|
622
855
|
}
|
|
623
856
|
}
|
|
624
857
|
|