@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const OrderApplicationValidator = require("./OrderApplicationValidator");
|
|
6
|
+
const OrderApplicationModel = require("./OrderApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -51,18 +51,24 @@ class Order {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* @param {
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @param {
|
|
59
|
-
*
|
|
60
|
-
*
|
|
54
|
+
* @param {OrderApplicationValidator.GetCustomerDetailsByShipmentIdParam} arg
|
|
55
|
+
* - Arg object.
|
|
56
|
+
*
|
|
57
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
58
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
59
|
+
* @returns {Promise<OrderApplicationModel.CustomerDetailsResponse>} -
|
|
60
|
+
* Success response
|
|
61
|
+
* @name getCustomerDetailsByShipmentId
|
|
61
62
|
* @summary: Get Customer Details by Shipment Id
|
|
62
|
-
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
|
|
63
|
+
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
63
64
|
*/
|
|
64
|
-
async getCustomerDetailsByShipmentId(
|
|
65
|
-
|
|
65
|
+
async getCustomerDetailsByShipmentId(
|
|
66
|
+
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
67
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
68
|
+
) {
|
|
69
|
+
const {
|
|
70
|
+
error,
|
|
71
|
+
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
66
72
|
{ orderId, shipmentId },
|
|
67
73
|
{ abortEarly: false, allowUnknown: true }
|
|
68
74
|
);
|
|
@@ -73,17 +79,15 @@ class Order {
|
|
|
73
79
|
// Showing warrnings if extra unknown parameters are found
|
|
74
80
|
const {
|
|
75
81
|
error: warrning,
|
|
76
|
-
} =
|
|
82
|
+
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
77
83
|
{ orderId, shipmentId },
|
|
78
84
|
{ abortEarly: false, allowUnknown: false }
|
|
79
85
|
);
|
|
80
86
|
if (warrning) {
|
|
81
87
|
Logger({
|
|
82
88
|
level: "WARN",
|
|
83
|
-
message:
|
|
84
|
-
"Parameter Validation warrnings for getCustomerDetailsByShipmentId",
|
|
89
|
+
message: `Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${warrning}`,
|
|
85
90
|
});
|
|
86
|
-
Logger({ level: "WARN", message: warrning });
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
const query_params = {};
|
|
@@ -99,12 +103,18 @@ class Order {
|
|
|
99
103
|
}),
|
|
100
104
|
query_params,
|
|
101
105
|
undefined,
|
|
102
|
-
xHeaders
|
|
106
|
+
{ ...xHeaders, ...requestHeaders },
|
|
107
|
+
{ responseHeaders }
|
|
103
108
|
);
|
|
104
109
|
|
|
110
|
+
let responseData = response;
|
|
111
|
+
if (responseHeaders) {
|
|
112
|
+
responseData = response[0];
|
|
113
|
+
}
|
|
114
|
+
|
|
105
115
|
const {
|
|
106
116
|
error: res_error,
|
|
107
|
-
} =
|
|
117
|
+
} = OrderApplicationModel.CustomerDetailsResponse().validate(responseData, {
|
|
108
118
|
abortEarly: false,
|
|
109
119
|
allowUnknown: false,
|
|
110
120
|
});
|
|
@@ -112,24 +122,30 @@ class Order {
|
|
|
112
122
|
if (res_error) {
|
|
113
123
|
Logger({
|
|
114
124
|
level: "WARN",
|
|
115
|
-
message:
|
|
116
|
-
"Response Validation Warnnings for getCustomerDetailsByShipmentId",
|
|
125
|
+
message: `Response Validation Warnnings for application > Order > getCustomerDetailsByShipmentId \n ${res_error}`,
|
|
117
126
|
});
|
|
118
|
-
Logger({ level: "WARN", message: res_error });
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
return response;
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
/**
|
|
125
|
-
* @param {
|
|
126
|
-
* @param {
|
|
127
|
-
* @
|
|
133
|
+
* @param {OrderApplicationValidator.GetInvoiceByShipmentIdParam} arg - Arg object.
|
|
134
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
135
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
136
|
+
* @returns {Promise<OrderApplicationModel.ResponseGetInvoiceShipment>} -
|
|
137
|
+
* Success response
|
|
138
|
+
* @name getInvoiceByShipmentId
|
|
128
139
|
* @summary: Get Invoice of a shipment
|
|
129
|
-
* @description: Use this API to retrieve shipment invoice.
|
|
140
|
+
* @description: Use this API to retrieve shipment invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
130
141
|
*/
|
|
131
|
-
async getInvoiceByShipmentId(
|
|
132
|
-
|
|
142
|
+
async getInvoiceByShipmentId(
|
|
143
|
+
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
144
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
145
|
+
) {
|
|
146
|
+
const {
|
|
147
|
+
error,
|
|
148
|
+
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
133
149
|
{ shipmentId },
|
|
134
150
|
{ abortEarly: false, allowUnknown: true }
|
|
135
151
|
);
|
|
@@ -140,16 +156,15 @@ class Order {
|
|
|
140
156
|
// Showing warrnings if extra unknown parameters are found
|
|
141
157
|
const {
|
|
142
158
|
error: warrning,
|
|
143
|
-
} =
|
|
159
|
+
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
144
160
|
{ shipmentId },
|
|
145
161
|
{ abortEarly: false, allowUnknown: false }
|
|
146
162
|
);
|
|
147
163
|
if (warrning) {
|
|
148
164
|
Logger({
|
|
149
165
|
level: "WARN",
|
|
150
|
-
message:
|
|
166
|
+
message: `Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${warrning}`,
|
|
151
167
|
});
|
|
152
|
-
Logger({ level: "WARN", message: warrning });
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
const query_params = {};
|
|
@@ -165,37 +180,46 @@ class Order {
|
|
|
165
180
|
}),
|
|
166
181
|
query_params,
|
|
167
182
|
undefined,
|
|
168
|
-
xHeaders
|
|
183
|
+
{ ...xHeaders, ...requestHeaders },
|
|
184
|
+
{ responseHeaders }
|
|
169
185
|
);
|
|
170
186
|
|
|
187
|
+
let responseData = response;
|
|
188
|
+
if (responseHeaders) {
|
|
189
|
+
responseData = response[0];
|
|
190
|
+
}
|
|
191
|
+
|
|
171
192
|
const {
|
|
172
193
|
error: res_error,
|
|
173
|
-
} =
|
|
174
|
-
|
|
175
|
-
allowUnknown: false
|
|
176
|
-
|
|
194
|
+
} = OrderApplicationModel.ResponseGetInvoiceShipment().validate(
|
|
195
|
+
responseData,
|
|
196
|
+
{ abortEarly: false, allowUnknown: false }
|
|
197
|
+
);
|
|
177
198
|
|
|
178
199
|
if (res_error) {
|
|
179
200
|
Logger({
|
|
180
201
|
level: "WARN",
|
|
181
|
-
message:
|
|
202
|
+
message: `Response Validation Warnnings for application > Order > getInvoiceByShipmentId \n ${res_error}`,
|
|
182
203
|
});
|
|
183
|
-
Logger({ level: "WARN", message: res_error });
|
|
184
204
|
}
|
|
185
205
|
|
|
186
206
|
return response;
|
|
187
207
|
}
|
|
188
208
|
|
|
189
209
|
/**
|
|
190
|
-
* @param {
|
|
191
|
-
* @param {
|
|
192
|
-
*
|
|
193
|
-
* @returns {Promise<OrderById>} - Success response
|
|
210
|
+
* @param {OrderApplicationValidator.GetOrderByIdParam} arg - Arg object.
|
|
211
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
212
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
213
|
+
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
214
|
+
* @name getOrderById
|
|
194
215
|
* @summary: Get details of an order
|
|
195
|
-
* @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
|
|
216
|
+
* @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
196
217
|
*/
|
|
197
|
-
async getOrderById(
|
|
198
|
-
|
|
218
|
+
async getOrderById(
|
|
219
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
220
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
221
|
+
) {
|
|
222
|
+
const { error } = OrderApplicationValidator.getOrderById().validate(
|
|
199
223
|
{ orderId },
|
|
200
224
|
{ abortEarly: false, allowUnknown: true }
|
|
201
225
|
);
|
|
@@ -204,16 +228,17 @@ class Order {
|
|
|
204
228
|
}
|
|
205
229
|
|
|
206
230
|
// Showing warrnings if extra unknown parameters are found
|
|
207
|
-
const {
|
|
231
|
+
const {
|
|
232
|
+
error: warrning,
|
|
233
|
+
} = OrderApplicationValidator.getOrderById().validate(
|
|
208
234
|
{ orderId },
|
|
209
235
|
{ abortEarly: false, allowUnknown: false }
|
|
210
236
|
);
|
|
211
237
|
if (warrning) {
|
|
212
238
|
Logger({
|
|
213
239
|
level: "WARN",
|
|
214
|
-
message:
|
|
240
|
+
message: `Parameter Validation warrnings for application > Order > getOrderById \n ${warrning}`,
|
|
215
241
|
});
|
|
216
|
-
Logger({ level: "WARN", message: warrning });
|
|
217
242
|
}
|
|
218
243
|
|
|
219
244
|
const query_params = {};
|
|
@@ -229,10 +254,18 @@ class Order {
|
|
|
229
254
|
}),
|
|
230
255
|
query_params,
|
|
231
256
|
undefined,
|
|
232
|
-
xHeaders
|
|
257
|
+
{ ...xHeaders, ...requestHeaders },
|
|
258
|
+
{ responseHeaders }
|
|
233
259
|
);
|
|
234
260
|
|
|
235
|
-
|
|
261
|
+
let responseData = response;
|
|
262
|
+
if (responseHeaders) {
|
|
263
|
+
responseData = response[0];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const {
|
|
267
|
+
error: res_error,
|
|
268
|
+
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
236
269
|
abortEarly: false,
|
|
237
270
|
allowUnknown: false,
|
|
238
271
|
});
|
|
@@ -240,40 +273,35 @@ class Order {
|
|
|
240
273
|
if (res_error) {
|
|
241
274
|
Logger({
|
|
242
275
|
level: "WARN",
|
|
243
|
-
message:
|
|
276
|
+
message: `Response Validation Warnnings for application > Order > getOrderById \n ${res_error}`,
|
|
244
277
|
});
|
|
245
|
-
Logger({ level: "WARN", message: res_error });
|
|
246
278
|
}
|
|
247
279
|
|
|
248
280
|
return response;
|
|
249
281
|
}
|
|
250
282
|
|
|
251
283
|
/**
|
|
252
|
-
* @param {
|
|
253
|
-
* @param {
|
|
254
|
-
*
|
|
255
|
-
* @
|
|
256
|
-
*
|
|
257
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
258
|
-
* page. Default value is 10.
|
|
259
|
-
* @param {string} [arg.fromDate] - The date from which the orders should be
|
|
260
|
-
* retrieved.
|
|
261
|
-
* @param {string} [arg.toDate] - The date till which the orders should be retrieved.
|
|
262
|
-
* @param {string} [arg.customMeta] - A filter and retrieve data using
|
|
263
|
-
* special fields included for special use-cases
|
|
264
|
-
* @returns {Promise<OrderList>} - Success response
|
|
284
|
+
* @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object.
|
|
285
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
286
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
287
|
+
* @returns {Promise<OrderApplicationModel.OrderList>} - Success response
|
|
288
|
+
* @name getOrders
|
|
265
289
|
* @summary: Get all orders
|
|
266
|
-
* @description: Use this API to retrieve all the orders.
|
|
290
|
+
* @description: Use this API to retrieve all the orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
|
|
267
291
|
*/
|
|
268
|
-
async getOrders(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
292
|
+
async getOrders(
|
|
293
|
+
{
|
|
294
|
+
status,
|
|
295
|
+
pageNo,
|
|
296
|
+
pageSize,
|
|
297
|
+
fromDate,
|
|
298
|
+
toDate,
|
|
299
|
+
customMeta,
|
|
300
|
+
requestHeaders,
|
|
301
|
+
} = { requestHeaders: {} },
|
|
302
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
303
|
+
) {
|
|
304
|
+
const { error } = OrderApplicationValidator.getOrders().validate(
|
|
277
305
|
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
278
306
|
{ abortEarly: false, allowUnknown: true }
|
|
279
307
|
);
|
|
@@ -282,16 +310,15 @@ class Order {
|
|
|
282
310
|
}
|
|
283
311
|
|
|
284
312
|
// Showing warrnings if extra unknown parameters are found
|
|
285
|
-
const { error: warrning } =
|
|
313
|
+
const { error: warrning } = OrderApplicationValidator.getOrders().validate(
|
|
286
314
|
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
287
315
|
{ abortEarly: false, allowUnknown: false }
|
|
288
316
|
);
|
|
289
317
|
if (warrning) {
|
|
290
318
|
Logger({
|
|
291
319
|
level: "WARN",
|
|
292
|
-
message:
|
|
320
|
+
message: `Parameter Validation warrnings for application > Order > getOrders \n ${warrning}`,
|
|
293
321
|
});
|
|
294
|
-
Logger({ level: "WARN", message: warrning });
|
|
295
322
|
}
|
|
296
323
|
|
|
297
324
|
const query_params = {};
|
|
@@ -313,10 +340,18 @@ class Order {
|
|
|
313
340
|
}),
|
|
314
341
|
query_params,
|
|
315
342
|
undefined,
|
|
316
|
-
xHeaders
|
|
343
|
+
{ ...xHeaders, ...requestHeaders },
|
|
344
|
+
{ responseHeaders }
|
|
317
345
|
);
|
|
318
346
|
|
|
319
|
-
|
|
347
|
+
let responseData = response;
|
|
348
|
+
if (responseHeaders) {
|
|
349
|
+
responseData = response[0];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const {
|
|
353
|
+
error: res_error,
|
|
354
|
+
} = OrderApplicationModel.OrderList().validate(responseData, {
|
|
320
355
|
abortEarly: false,
|
|
321
356
|
allowUnknown: false,
|
|
322
357
|
});
|
|
@@ -324,24 +359,27 @@ class Order {
|
|
|
324
359
|
if (res_error) {
|
|
325
360
|
Logger({
|
|
326
361
|
level: "WARN",
|
|
327
|
-
message:
|
|
362
|
+
message: `Response Validation Warnnings for application > Order > getOrders \n ${res_error}`,
|
|
328
363
|
});
|
|
329
|
-
Logger({ level: "WARN", message: res_error });
|
|
330
364
|
}
|
|
331
365
|
|
|
332
366
|
return response;
|
|
333
367
|
}
|
|
334
368
|
|
|
335
369
|
/**
|
|
336
|
-
* @param {
|
|
337
|
-
* @param {
|
|
338
|
-
*
|
|
339
|
-
* @returns {Promise<OrderById>} - Success response
|
|
370
|
+
* @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object.
|
|
371
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
372
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
373
|
+
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
374
|
+
* @name getPosOrderById
|
|
340
375
|
* @summary: Get POS Order
|
|
341
|
-
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
376
|
+
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
|
|
342
377
|
*/
|
|
343
|
-
async getPosOrderById(
|
|
344
|
-
|
|
378
|
+
async getPosOrderById(
|
|
379
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
380
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
381
|
+
) {
|
|
382
|
+
const { error } = OrderApplicationValidator.getPosOrderById().validate(
|
|
345
383
|
{ orderId },
|
|
346
384
|
{ abortEarly: false, allowUnknown: true }
|
|
347
385
|
);
|
|
@@ -350,16 +388,17 @@ class Order {
|
|
|
350
388
|
}
|
|
351
389
|
|
|
352
390
|
// Showing warrnings if extra unknown parameters are found
|
|
353
|
-
const {
|
|
391
|
+
const {
|
|
392
|
+
error: warrning,
|
|
393
|
+
} = OrderApplicationValidator.getPosOrderById().validate(
|
|
354
394
|
{ orderId },
|
|
355
395
|
{ abortEarly: false, allowUnknown: false }
|
|
356
396
|
);
|
|
357
397
|
if (warrning) {
|
|
358
398
|
Logger({
|
|
359
399
|
level: "WARN",
|
|
360
|
-
message:
|
|
400
|
+
message: `Parameter Validation warrnings for application > Order > getPosOrderById \n ${warrning}`,
|
|
361
401
|
});
|
|
362
|
-
Logger({ level: "WARN", message: warrning });
|
|
363
402
|
}
|
|
364
403
|
|
|
365
404
|
const query_params = {};
|
|
@@ -375,10 +414,18 @@ class Order {
|
|
|
375
414
|
}),
|
|
376
415
|
query_params,
|
|
377
416
|
undefined,
|
|
378
|
-
xHeaders
|
|
417
|
+
{ ...xHeaders, ...requestHeaders },
|
|
418
|
+
{ responseHeaders }
|
|
379
419
|
);
|
|
380
420
|
|
|
381
|
-
|
|
421
|
+
let responseData = response;
|
|
422
|
+
if (responseHeaders) {
|
|
423
|
+
responseData = response[0];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const {
|
|
427
|
+
error: res_error,
|
|
428
|
+
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
382
429
|
abortEarly: false,
|
|
383
430
|
allowUnknown: false,
|
|
384
431
|
});
|
|
@@ -386,27 +433,29 @@ class Order {
|
|
|
386
433
|
if (res_error) {
|
|
387
434
|
Logger({
|
|
388
435
|
level: "WARN",
|
|
389
|
-
message:
|
|
436
|
+
message: `Response Validation Warnnings for application > Order > getPosOrderById \n ${res_error}`,
|
|
390
437
|
});
|
|
391
|
-
Logger({ level: "WARN", message: res_error });
|
|
392
438
|
}
|
|
393
439
|
|
|
394
440
|
return response;
|
|
395
441
|
}
|
|
396
442
|
|
|
397
443
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @param {
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
* @
|
|
403
|
-
* items and may get divided into one or more shipment, each having its own ID.
|
|
404
|
-
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
444
|
+
* @param {OrderApplicationValidator.GetShipmentBagReasonsParam} arg - Arg object.
|
|
445
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
446
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
447
|
+
* @returns {Promise<OrderApplicationModel.ShipmentBagReasons>} - Success response
|
|
448
|
+
* @name getShipmentBagReasons
|
|
405
449
|
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
406
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
450
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
407
451
|
*/
|
|
408
|
-
async getShipmentBagReasons(
|
|
409
|
-
|
|
452
|
+
async getShipmentBagReasons(
|
|
453
|
+
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
454
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
455
|
+
) {
|
|
456
|
+
const {
|
|
457
|
+
error,
|
|
458
|
+
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
410
459
|
{ shipmentId, bagId },
|
|
411
460
|
{ abortEarly: false, allowUnknown: true }
|
|
412
461
|
);
|
|
@@ -415,16 +464,17 @@ class Order {
|
|
|
415
464
|
}
|
|
416
465
|
|
|
417
466
|
// Showing warrnings if extra unknown parameters are found
|
|
418
|
-
const {
|
|
467
|
+
const {
|
|
468
|
+
error: warrning,
|
|
469
|
+
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
419
470
|
{ shipmentId, bagId },
|
|
420
471
|
{ abortEarly: false, allowUnknown: false }
|
|
421
472
|
);
|
|
422
473
|
if (warrning) {
|
|
423
474
|
Logger({
|
|
424
475
|
level: "WARN",
|
|
425
|
-
message:
|
|
476
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${warrning}`,
|
|
426
477
|
});
|
|
427
|
-
Logger({ level: "WARN", message: warrning });
|
|
428
478
|
}
|
|
429
479
|
|
|
430
480
|
const query_params = {};
|
|
@@ -440,12 +490,18 @@ class Order {
|
|
|
440
490
|
}),
|
|
441
491
|
query_params,
|
|
442
492
|
undefined,
|
|
443
|
-
xHeaders
|
|
493
|
+
{ ...xHeaders, ...requestHeaders },
|
|
494
|
+
{ responseHeaders }
|
|
444
495
|
);
|
|
445
496
|
|
|
497
|
+
let responseData = response;
|
|
498
|
+
if (responseHeaders) {
|
|
499
|
+
responseData = response[0];
|
|
500
|
+
}
|
|
501
|
+
|
|
446
502
|
const {
|
|
447
503
|
error: res_error,
|
|
448
|
-
} =
|
|
504
|
+
} = OrderApplicationModel.ShipmentBagReasons().validate(responseData, {
|
|
449
505
|
abortEarly: false,
|
|
450
506
|
allowUnknown: false,
|
|
451
507
|
});
|
|
@@ -453,25 +509,27 @@ class Order {
|
|
|
453
509
|
if (res_error) {
|
|
454
510
|
Logger({
|
|
455
511
|
level: "WARN",
|
|
456
|
-
message:
|
|
512
|
+
message: `Response Validation Warnnings for application > Order > getShipmentBagReasons \n ${res_error}`,
|
|
457
513
|
});
|
|
458
|
-
Logger({ level: "WARN", message: res_error });
|
|
459
514
|
}
|
|
460
515
|
|
|
461
516
|
return response;
|
|
462
517
|
}
|
|
463
518
|
|
|
464
519
|
/**
|
|
465
|
-
* @param {
|
|
466
|
-
* @param {
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* @
|
|
520
|
+
* @param {OrderApplicationValidator.GetShipmentByIdParam} arg - Arg object.
|
|
521
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
522
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
523
|
+
* @returns {Promise<OrderApplicationModel.ShipmentById>} - Success response
|
|
524
|
+
* @name getShipmentById
|
|
470
525
|
* @summary: Get details of a shipment
|
|
471
|
-
* @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID.
|
|
526
|
+
* @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
|
|
472
527
|
*/
|
|
473
|
-
async getShipmentById(
|
|
474
|
-
|
|
528
|
+
async getShipmentById(
|
|
529
|
+
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
530
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
531
|
+
) {
|
|
532
|
+
const { error } = OrderApplicationValidator.getShipmentById().validate(
|
|
475
533
|
{ shipmentId },
|
|
476
534
|
{ abortEarly: false, allowUnknown: true }
|
|
477
535
|
);
|
|
@@ -480,16 +538,17 @@ class Order {
|
|
|
480
538
|
}
|
|
481
539
|
|
|
482
540
|
// Showing warrnings if extra unknown parameters are found
|
|
483
|
-
const {
|
|
541
|
+
const {
|
|
542
|
+
error: warrning,
|
|
543
|
+
} = OrderApplicationValidator.getShipmentById().validate(
|
|
484
544
|
{ shipmentId },
|
|
485
545
|
{ abortEarly: false, allowUnknown: false }
|
|
486
546
|
);
|
|
487
547
|
if (warrning) {
|
|
488
548
|
Logger({
|
|
489
549
|
level: "WARN",
|
|
490
|
-
message:
|
|
550
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentById \n ${warrning}`,
|
|
491
551
|
});
|
|
492
|
-
Logger({ level: "WARN", message: warrning });
|
|
493
552
|
}
|
|
494
553
|
|
|
495
554
|
const query_params = {};
|
|
@@ -505,10 +564,18 @@ class Order {
|
|
|
505
564
|
}),
|
|
506
565
|
query_params,
|
|
507
566
|
undefined,
|
|
508
|
-
xHeaders
|
|
567
|
+
{ ...xHeaders, ...requestHeaders },
|
|
568
|
+
{ responseHeaders }
|
|
509
569
|
);
|
|
510
570
|
|
|
511
|
-
|
|
571
|
+
let responseData = response;
|
|
572
|
+
if (responseHeaders) {
|
|
573
|
+
responseData = response[0];
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
const {
|
|
577
|
+
error: res_error,
|
|
578
|
+
} = OrderApplicationModel.ShipmentById().validate(responseData, {
|
|
512
579
|
abortEarly: false,
|
|
513
580
|
allowUnknown: false,
|
|
514
581
|
});
|
|
@@ -516,25 +583,27 @@ class Order {
|
|
|
516
583
|
if (res_error) {
|
|
517
584
|
Logger({
|
|
518
585
|
level: "WARN",
|
|
519
|
-
message:
|
|
586
|
+
message: `Response Validation Warnnings for application > Order > getShipmentById \n ${res_error}`,
|
|
520
587
|
});
|
|
521
|
-
Logger({ level: "WARN", message: res_error });
|
|
522
588
|
}
|
|
523
589
|
|
|
524
590
|
return response;
|
|
525
591
|
}
|
|
526
592
|
|
|
527
593
|
/**
|
|
528
|
-
* @param {
|
|
529
|
-
* @param {
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* @
|
|
594
|
+
* @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object.
|
|
595
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
596
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
597
|
+
* @returns {Promise<OrderApplicationModel.ShipmentReasons>} - Success response
|
|
598
|
+
* @name getShipmentReasons
|
|
533
599
|
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
534
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
600
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
535
601
|
*/
|
|
536
|
-
async getShipmentReasons(
|
|
537
|
-
|
|
602
|
+
async getShipmentReasons(
|
|
603
|
+
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
604
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
605
|
+
) {
|
|
606
|
+
const { error } = OrderApplicationValidator.getShipmentReasons().validate(
|
|
538
607
|
{ shipmentId },
|
|
539
608
|
{ abortEarly: false, allowUnknown: true }
|
|
540
609
|
);
|
|
@@ -543,16 +612,17 @@ class Order {
|
|
|
543
612
|
}
|
|
544
613
|
|
|
545
614
|
// Showing warrnings if extra unknown parameters are found
|
|
546
|
-
const {
|
|
615
|
+
const {
|
|
616
|
+
error: warrning,
|
|
617
|
+
} = OrderApplicationValidator.getShipmentReasons().validate(
|
|
547
618
|
{ shipmentId },
|
|
548
619
|
{ abortEarly: false, allowUnknown: false }
|
|
549
620
|
);
|
|
550
621
|
if (warrning) {
|
|
551
622
|
Logger({
|
|
552
623
|
level: "WARN",
|
|
553
|
-
message:
|
|
624
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentReasons \n ${warrning}`,
|
|
554
625
|
});
|
|
555
|
-
Logger({ level: "WARN", message: warrning });
|
|
556
626
|
}
|
|
557
627
|
|
|
558
628
|
const query_params = {};
|
|
@@ -568,38 +638,49 @@ class Order {
|
|
|
568
638
|
}),
|
|
569
639
|
query_params,
|
|
570
640
|
undefined,
|
|
571
|
-
xHeaders
|
|
641
|
+
{ ...xHeaders, ...requestHeaders },
|
|
642
|
+
{ responseHeaders }
|
|
572
643
|
);
|
|
573
644
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
645
|
+
let responseData = response;
|
|
646
|
+
if (responseHeaders) {
|
|
647
|
+
responseData = response[0];
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const {
|
|
651
|
+
error: res_error,
|
|
652
|
+
} = OrderApplicationModel.ShipmentReasons().validate(responseData, {
|
|
653
|
+
abortEarly: false,
|
|
654
|
+
allowUnknown: false,
|
|
655
|
+
});
|
|
578
656
|
|
|
579
657
|
if (res_error) {
|
|
580
658
|
Logger({
|
|
581
659
|
level: "WARN",
|
|
582
|
-
message:
|
|
660
|
+
message: `Response Validation Warnnings for application > Order > getShipmentReasons \n ${res_error}`,
|
|
583
661
|
});
|
|
584
|
-
Logger({ level: "WARN", message: res_error });
|
|
585
662
|
}
|
|
586
663
|
|
|
587
664
|
return response;
|
|
588
665
|
}
|
|
589
666
|
|
|
590
667
|
/**
|
|
591
|
-
* @param {
|
|
592
|
-
* @param {
|
|
593
|
-
*
|
|
594
|
-
* @
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
* @returns {Promise<SendOtpToCustomerResponse>} - Success response
|
|
668
|
+
* @param {OrderApplicationValidator.SendOtpToShipmentCustomerParam} arg - Arg object.
|
|
669
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
670
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
671
|
+
* @returns {Promise<OrderApplicationModel.SendOtpToCustomerResponse>} -
|
|
672
|
+
* Success response
|
|
673
|
+
* @name sendOtpToShipmentCustomer
|
|
598
674
|
* @summary: Send and Resend Otp code to Order-Shipment customer
|
|
599
|
-
* @description: Use this API to send OTP to the customer of the mapped Shipment.
|
|
675
|
+
* @description: Use this API to send OTP to the customer of the mapped Shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
600
676
|
*/
|
|
601
|
-
async sendOtpToShipmentCustomer(
|
|
602
|
-
|
|
677
|
+
async sendOtpToShipmentCustomer(
|
|
678
|
+
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
679
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
680
|
+
) {
|
|
681
|
+
const {
|
|
682
|
+
error,
|
|
683
|
+
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
603
684
|
{ orderId, shipmentId },
|
|
604
685
|
{ abortEarly: false, allowUnknown: true }
|
|
605
686
|
);
|
|
@@ -610,16 +691,15 @@ class Order {
|
|
|
610
691
|
// Showing warrnings if extra unknown parameters are found
|
|
611
692
|
const {
|
|
612
693
|
error: warrning,
|
|
613
|
-
} =
|
|
694
|
+
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
614
695
|
{ orderId, shipmentId },
|
|
615
696
|
{ abortEarly: false, allowUnknown: false }
|
|
616
697
|
);
|
|
617
698
|
if (warrning) {
|
|
618
699
|
Logger({
|
|
619
700
|
level: "WARN",
|
|
620
|
-
message:
|
|
701
|
+
message: `Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${warrning}`,
|
|
621
702
|
});
|
|
622
|
-
Logger({ level: "WARN", message: warrning });
|
|
623
703
|
}
|
|
624
704
|
|
|
625
705
|
const query_params = {};
|
|
@@ -635,38 +715,46 @@ class Order {
|
|
|
635
715
|
}),
|
|
636
716
|
query_params,
|
|
637
717
|
undefined,
|
|
638
|
-
xHeaders
|
|
718
|
+
{ ...xHeaders, ...requestHeaders },
|
|
719
|
+
{ responseHeaders }
|
|
639
720
|
);
|
|
640
721
|
|
|
722
|
+
let responseData = response;
|
|
723
|
+
if (responseHeaders) {
|
|
724
|
+
responseData = response[0];
|
|
725
|
+
}
|
|
726
|
+
|
|
641
727
|
const {
|
|
642
728
|
error: res_error,
|
|
643
|
-
} =
|
|
644
|
-
|
|
645
|
-
allowUnknown: false
|
|
646
|
-
|
|
729
|
+
} = OrderApplicationModel.SendOtpToCustomerResponse().validate(
|
|
730
|
+
responseData,
|
|
731
|
+
{ abortEarly: false, allowUnknown: false }
|
|
732
|
+
);
|
|
647
733
|
|
|
648
734
|
if (res_error) {
|
|
649
735
|
Logger({
|
|
650
736
|
level: "WARN",
|
|
651
|
-
message:
|
|
737
|
+
message: `Response Validation Warnnings for application > Order > sendOtpToShipmentCustomer \n ${res_error}`,
|
|
652
738
|
});
|
|
653
|
-
Logger({ level: "WARN", message: res_error });
|
|
654
739
|
}
|
|
655
740
|
|
|
656
741
|
return response;
|
|
657
742
|
}
|
|
658
743
|
|
|
659
744
|
/**
|
|
660
|
-
* @param {
|
|
661
|
-
* @param {
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* @
|
|
745
|
+
* @param {OrderApplicationValidator.TrackShipmentParam} arg - Arg object.
|
|
746
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
747
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
748
|
+
* @returns {Promise<OrderApplicationModel.ShipmentTrack>} - Success response
|
|
749
|
+
* @name trackShipment
|
|
665
750
|
* @summary: Track shipment
|
|
666
|
-
* @description: Track Shipment by shipment id, for application based on application Id
|
|
751
|
+
* @description: Track Shipment by shipment id, for application based on application Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
|
|
667
752
|
*/
|
|
668
|
-
async trackShipment(
|
|
669
|
-
|
|
753
|
+
async trackShipment(
|
|
754
|
+
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
755
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
756
|
+
) {
|
|
757
|
+
const { error } = OrderApplicationValidator.trackShipment().validate(
|
|
670
758
|
{ shipmentId },
|
|
671
759
|
{ abortEarly: false, allowUnknown: true }
|
|
672
760
|
);
|
|
@@ -675,16 +763,17 @@ class Order {
|
|
|
675
763
|
}
|
|
676
764
|
|
|
677
765
|
// Showing warrnings if extra unknown parameters are found
|
|
678
|
-
const {
|
|
766
|
+
const {
|
|
767
|
+
error: warrning,
|
|
768
|
+
} = OrderApplicationValidator.trackShipment().validate(
|
|
679
769
|
{ shipmentId },
|
|
680
770
|
{ abortEarly: false, allowUnknown: false }
|
|
681
771
|
);
|
|
682
772
|
if (warrning) {
|
|
683
773
|
Logger({
|
|
684
774
|
level: "WARN",
|
|
685
|
-
message:
|
|
775
|
+
message: `Parameter Validation warrnings for application > Order > trackShipment \n ${warrning}`,
|
|
686
776
|
});
|
|
687
|
-
Logger({ level: "WARN", message: warrning });
|
|
688
777
|
}
|
|
689
778
|
|
|
690
779
|
const query_params = {};
|
|
@@ -700,10 +789,18 @@ class Order {
|
|
|
700
789
|
}),
|
|
701
790
|
query_params,
|
|
702
791
|
undefined,
|
|
703
|
-
xHeaders
|
|
792
|
+
{ ...xHeaders, ...requestHeaders },
|
|
793
|
+
{ responseHeaders }
|
|
704
794
|
);
|
|
705
795
|
|
|
706
|
-
|
|
796
|
+
let responseData = response;
|
|
797
|
+
if (responseHeaders) {
|
|
798
|
+
responseData = response[0];
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
const {
|
|
802
|
+
error: res_error,
|
|
803
|
+
} = OrderApplicationModel.ShipmentTrack().validate(responseData, {
|
|
707
804
|
abortEarly: false,
|
|
708
805
|
allowUnknown: false,
|
|
709
806
|
});
|
|
@@ -711,26 +808,29 @@ class Order {
|
|
|
711
808
|
if (res_error) {
|
|
712
809
|
Logger({
|
|
713
810
|
level: "WARN",
|
|
714
|
-
message:
|
|
811
|
+
message: `Response Validation Warnnings for application > Order > trackShipment \n ${res_error}`,
|
|
715
812
|
});
|
|
716
|
-
Logger({ level: "WARN", message: res_error });
|
|
717
813
|
}
|
|
718
814
|
|
|
719
815
|
return response;
|
|
720
816
|
}
|
|
721
817
|
|
|
722
818
|
/**
|
|
723
|
-
* @param {
|
|
724
|
-
* @param {
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
819
|
+
* @param {OrderApplicationValidator.UpdateShipmentStatusParam} arg - Arg object.
|
|
820
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
821
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
822
|
+
* @returns {Promise<OrderApplicationModel.ShipmentApplicationStatusResponse>}
|
|
823
|
+
* - Success response
|
|
824
|
+
*
|
|
825
|
+
* @name updateShipmentStatus
|
|
729
826
|
* @summary: Update the shipment status
|
|
730
|
-
* @description: Use this API to update the status of a shipment using its shipment ID.
|
|
827
|
+
* @description: Use this API to update the status of a shipment using its shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
731
828
|
*/
|
|
732
|
-
async updateShipmentStatus(
|
|
733
|
-
|
|
829
|
+
async updateShipmentStatus(
|
|
830
|
+
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
831
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
832
|
+
) {
|
|
833
|
+
const { error } = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
734
834
|
{ shipmentId, body },
|
|
735
835
|
{ abortEarly: false, allowUnknown: true }
|
|
736
836
|
);
|
|
@@ -739,16 +839,17 @@ class Order {
|
|
|
739
839
|
}
|
|
740
840
|
|
|
741
841
|
// Showing warrnings if extra unknown parameters are found
|
|
742
|
-
const {
|
|
842
|
+
const {
|
|
843
|
+
error: warrning,
|
|
844
|
+
} = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
743
845
|
{ shipmentId, body },
|
|
744
846
|
{ abortEarly: false, allowUnknown: false }
|
|
745
847
|
);
|
|
746
848
|
if (warrning) {
|
|
747
849
|
Logger({
|
|
748
850
|
level: "WARN",
|
|
749
|
-
message:
|
|
851
|
+
message: `Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${warrning}`,
|
|
750
852
|
});
|
|
751
|
-
Logger({ level: "WARN", message: warrning });
|
|
752
853
|
}
|
|
753
854
|
|
|
754
855
|
const query_params = {};
|
|
@@ -764,41 +865,48 @@ class Order {
|
|
|
764
865
|
}),
|
|
765
866
|
query_params,
|
|
766
867
|
body,
|
|
767
|
-
xHeaders
|
|
868
|
+
{ ...xHeaders, ...requestHeaders },
|
|
869
|
+
{ responseHeaders }
|
|
768
870
|
);
|
|
769
871
|
|
|
872
|
+
let responseData = response;
|
|
873
|
+
if (responseHeaders) {
|
|
874
|
+
responseData = response[0];
|
|
875
|
+
}
|
|
876
|
+
|
|
770
877
|
const {
|
|
771
878
|
error: res_error,
|
|
772
|
-
} =
|
|
773
|
-
|
|
774
|
-
allowUnknown: false
|
|
775
|
-
|
|
879
|
+
} = OrderApplicationModel.ShipmentApplicationStatusResponse().validate(
|
|
880
|
+
responseData,
|
|
881
|
+
{ abortEarly: false, allowUnknown: false }
|
|
882
|
+
);
|
|
776
883
|
|
|
777
884
|
if (res_error) {
|
|
778
885
|
Logger({
|
|
779
886
|
level: "WARN",
|
|
780
|
-
message:
|
|
887
|
+
message: `Response Validation Warnnings for application > Order > updateShipmentStatus \n ${res_error}`,
|
|
781
888
|
});
|
|
782
|
-
Logger({ level: "WARN", message: res_error });
|
|
783
889
|
}
|
|
784
890
|
|
|
785
891
|
return response;
|
|
786
892
|
}
|
|
787
893
|
|
|
788
894
|
/**
|
|
789
|
-
* @param {
|
|
790
|
-
* @param {
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
*
|
|
794
|
-
* having its own ID.
|
|
795
|
-
* @param {VerifyOtp} arg.body
|
|
796
|
-
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
895
|
+
* @param {OrderApplicationValidator.VerifyOtpShipmentCustomerParam} arg - Arg object.
|
|
896
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
897
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
898
|
+
* @returns {Promise<OrderApplicationModel.VerifyOtpResponse>} - Success response
|
|
899
|
+
* @name verifyOtpShipmentCustomer
|
|
797
900
|
* @summary: Verify Otp code
|
|
798
|
-
* @description: Use this API to verify OTP and create a session token with custom payload.
|
|
901
|
+
* @description: Use this API to verify OTP and create a session token with custom payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
799
902
|
*/
|
|
800
|
-
async verifyOtpShipmentCustomer(
|
|
801
|
-
|
|
903
|
+
async verifyOtpShipmentCustomer(
|
|
904
|
+
{ orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
905
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
906
|
+
) {
|
|
907
|
+
const {
|
|
908
|
+
error,
|
|
909
|
+
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
802
910
|
{ orderId, shipmentId, body },
|
|
803
911
|
{ abortEarly: false, allowUnknown: true }
|
|
804
912
|
);
|
|
@@ -809,16 +917,15 @@ class Order {
|
|
|
809
917
|
// Showing warrnings if extra unknown parameters are found
|
|
810
918
|
const {
|
|
811
919
|
error: warrning,
|
|
812
|
-
} =
|
|
920
|
+
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
813
921
|
{ orderId, shipmentId, body },
|
|
814
922
|
{ abortEarly: false, allowUnknown: false }
|
|
815
923
|
);
|
|
816
924
|
if (warrning) {
|
|
817
925
|
Logger({
|
|
818
926
|
level: "WARN",
|
|
819
|
-
message:
|
|
927
|
+
message: `Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${warrning}`,
|
|
820
928
|
});
|
|
821
|
-
Logger({ level: "WARN", message: warrning });
|
|
822
929
|
}
|
|
823
930
|
|
|
824
931
|
const query_params = {};
|
|
@@ -834,12 +941,18 @@ class Order {
|
|
|
834
941
|
}),
|
|
835
942
|
query_params,
|
|
836
943
|
body,
|
|
837
|
-
xHeaders
|
|
944
|
+
{ ...xHeaders, ...requestHeaders },
|
|
945
|
+
{ responseHeaders }
|
|
838
946
|
);
|
|
839
947
|
|
|
948
|
+
let responseData = response;
|
|
949
|
+
if (responseHeaders) {
|
|
950
|
+
responseData = response[0];
|
|
951
|
+
}
|
|
952
|
+
|
|
840
953
|
const {
|
|
841
954
|
error: res_error,
|
|
842
|
-
} =
|
|
955
|
+
} = OrderApplicationModel.VerifyOtpResponse().validate(responseData, {
|
|
843
956
|
abortEarly: false,
|
|
844
957
|
allowUnknown: false,
|
|
845
958
|
});
|
|
@@ -847,9 +960,8 @@ class Order {
|
|
|
847
960
|
if (res_error) {
|
|
848
961
|
Logger({
|
|
849
962
|
level: "WARN",
|
|
850
|
-
message:
|
|
963
|
+
message: `Response Validation Warnnings for application > Order > verifyOtpShipmentCustomer \n ${res_error}`,
|
|
851
964
|
});
|
|
852
|
-
Logger({ level: "WARN", message: res_error });
|
|
853
965
|
}
|
|
854
966
|
|
|
855
967
|
return response;
|