@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
- package/sdk/application/Cart/CartApplicationClient.js +108 -1199
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +2 -92
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
- package/sdk/application/Content/ContentApplicationClient.d.ts +48 -111
- package/sdk/application/Content/ContentApplicationClient.js +43 -1065
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +5 -217
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +91 -493
- package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
- package/sdk/application/Order/OrderApplicationClient.js +52 -507
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +103 -213
- package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +7 -309
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +44 -1820
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +157 -30
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
- package/sdk/platform/Cart/CartPlatformModel.js +1985 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +178 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +122 -191
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
- package/sdk/platform/Content/ContentPlatformModel.js +514 -487
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +424 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
- package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +145 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +132 -44
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +795 -7
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Partner/PartnerPublicClient.js +4 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +12 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -18,7 +18,7 @@ class Logistics {
|
|
|
18
18
|
* @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object.
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
21
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData>}
|
|
22
22
|
* - Success response
|
|
23
23
|
*
|
|
24
24
|
* @name sampleFileServiceability
|
|
@@ -76,7 +76,7 @@ class Logistics {
|
|
|
76
76
|
|
|
77
77
|
const {
|
|
78
78
|
error: res_error,
|
|
79
|
-
} = LogisticsPartnerModel.
|
|
79
|
+
} = LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData().validate(
|
|
80
80
|
responseData,
|
|
81
81
|
{ abortEarly: false, allowUnknown: true }
|
|
82
82
|
);
|
|
@@ -101,7 +101,7 @@ class Logistics {
|
|
|
101
101
|
*
|
|
102
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
103
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
104
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
104
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionServiceabilityTatResult>}
|
|
105
105
|
* - Success response
|
|
106
106
|
*
|
|
107
107
|
* @name getSampleFileServiceabilityStatus
|
|
@@ -166,7 +166,7 @@ class Logistics {
|
|
|
166
166
|
|
|
167
167
|
const {
|
|
168
168
|
error: res_error,
|
|
169
|
-
} = LogisticsPartnerModel.
|
|
169
|
+
} = LogisticsPartnerModel.BulkRegionServiceabilityTatResult().validate(
|
|
170
170
|
responseData,
|
|
171
171
|
{ abortEarly: false, allowUnknown: true }
|
|
172
172
|
);
|
|
@@ -189,7 +189,7 @@ class Logistics {
|
|
|
189
189
|
* @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object.
|
|
190
190
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
191
191
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
192
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
192
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResultItemData>} -
|
|
193
193
|
* Success response
|
|
194
194
|
* @name bulkTat
|
|
195
195
|
* @summary: Region TAT Import or Export
|
|
@@ -246,7 +246,7 @@ class Logistics {
|
|
|
246
246
|
|
|
247
247
|
const {
|
|
248
248
|
error: res_error,
|
|
249
|
-
} = LogisticsPartnerModel.
|
|
249
|
+
} = LogisticsPartnerModel.BulkRegionResultItemData().validate(
|
|
250
250
|
responseData,
|
|
251
251
|
{ abortEarly: false, allowUnknown: true }
|
|
252
252
|
);
|
|
@@ -269,7 +269,7 @@ class Logistics {
|
|
|
269
269
|
* @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object.
|
|
270
270
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
271
271
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
272
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
272
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResult>} - Success response
|
|
273
273
|
* @name getBulkTat
|
|
274
274
|
* @summary: Get region tat bulk history
|
|
275
275
|
* @description: Get region tat bulk history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkTat/).
|
|
@@ -363,7 +363,7 @@ class Logistics {
|
|
|
363
363
|
|
|
364
364
|
const {
|
|
365
365
|
error: res_error,
|
|
366
|
-
} = LogisticsPartnerModel.
|
|
366
|
+
} = LogisticsPartnerModel.BulkRegionResult().validate(responseData, {
|
|
367
367
|
abortEarly: false,
|
|
368
368
|
allowUnknown: true,
|
|
369
369
|
});
|
|
@@ -382,11 +382,961 @@ class Logistics {
|
|
|
382
382
|
return response;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
+
/**
|
|
386
|
+
* @param {LogisticsPartnerValidator.CreateDeliveryTimeParam} arg - Arg object.
|
|
387
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
388
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
389
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
390
|
+
* @name createDeliveryTime
|
|
391
|
+
* @summary: Region based delivery time insert
|
|
392
|
+
* @description: Insert the region based delivery time for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createDeliveryTime/).
|
|
393
|
+
*/
|
|
394
|
+
async createDeliveryTime(
|
|
395
|
+
{
|
|
396
|
+
partnerOrgId,
|
|
397
|
+
courierPartnerExtensionId,
|
|
398
|
+
schemeId,
|
|
399
|
+
body,
|
|
400
|
+
requestHeaders,
|
|
401
|
+
} = { requestHeaders: {} },
|
|
402
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
403
|
+
) {
|
|
404
|
+
const { error } = LogisticsPartnerValidator.createDeliveryTime().validate(
|
|
405
|
+
{
|
|
406
|
+
partnerOrgId,
|
|
407
|
+
courierPartnerExtensionId,
|
|
408
|
+
schemeId,
|
|
409
|
+
body,
|
|
410
|
+
},
|
|
411
|
+
{ abortEarly: false, allowUnknown: true }
|
|
412
|
+
);
|
|
413
|
+
if (error) {
|
|
414
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// Showing warrnings if extra unknown parameters are found
|
|
418
|
+
const {
|
|
419
|
+
error: warrning,
|
|
420
|
+
} = LogisticsPartnerValidator.createDeliveryTime().validate(
|
|
421
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, body },
|
|
422
|
+
{ abortEarly: false, allowUnknown: false }
|
|
423
|
+
);
|
|
424
|
+
if (warrning) {
|
|
425
|
+
Logger({
|
|
426
|
+
level: "WARN",
|
|
427
|
+
message: `Parameter Validation warrnings for partner > Logistics > createDeliveryTime \n ${warrning}`,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const query_params = {};
|
|
432
|
+
|
|
433
|
+
const response = await PartnerAPIClient.execute(
|
|
434
|
+
this.config,
|
|
435
|
+
"post",
|
|
436
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`,
|
|
437
|
+
query_params,
|
|
438
|
+
body,
|
|
439
|
+
requestHeaders,
|
|
440
|
+
{ responseHeaders }
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
let responseData = response;
|
|
444
|
+
if (responseHeaders) {
|
|
445
|
+
responseData = response[0];
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const {
|
|
449
|
+
error: res_error,
|
|
450
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
451
|
+
abortEarly: false,
|
|
452
|
+
allowUnknown: true,
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
if (res_error) {
|
|
456
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
457
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
458
|
+
} else {
|
|
459
|
+
Logger({
|
|
460
|
+
level: "WARN",
|
|
461
|
+
message: `Response Validation Warnings for partner > Logistics > createDeliveryTime \n ${res_error}`,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return response;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @param {LogisticsPartnerValidator.GetDeliveryTimesParam} arg - Arg object.
|
|
471
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
472
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
473
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatItemResult>} - Success response
|
|
474
|
+
* @name getDeliveryTimes
|
|
475
|
+
* @summary: Get region based delivery time list
|
|
476
|
+
* @description: Retrieve a list of delivery time for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTimes/).
|
|
477
|
+
*/
|
|
478
|
+
async getDeliveryTimes(
|
|
479
|
+
{
|
|
480
|
+
partnerOrgId,
|
|
481
|
+
courierPartnerExtensionId,
|
|
482
|
+
schemeId,
|
|
483
|
+
pageNo,
|
|
484
|
+
pageSize,
|
|
485
|
+
fromCountryCode,
|
|
486
|
+
fromStateCode,
|
|
487
|
+
fromCityCode,
|
|
488
|
+
fromSectorCode,
|
|
489
|
+
fromPincode,
|
|
490
|
+
toCountryCode,
|
|
491
|
+
toStateCode,
|
|
492
|
+
toCityCode,
|
|
493
|
+
toSectorCode,
|
|
494
|
+
toPincode,
|
|
495
|
+
requestHeaders,
|
|
496
|
+
} = { requestHeaders: {} },
|
|
497
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
498
|
+
) {
|
|
499
|
+
const { error } = LogisticsPartnerValidator.getDeliveryTimes().validate(
|
|
500
|
+
{
|
|
501
|
+
partnerOrgId,
|
|
502
|
+
courierPartnerExtensionId,
|
|
503
|
+
schemeId,
|
|
504
|
+
pageNo,
|
|
505
|
+
pageSize,
|
|
506
|
+
fromCountryCode,
|
|
507
|
+
fromStateCode,
|
|
508
|
+
fromCityCode,
|
|
509
|
+
fromSectorCode,
|
|
510
|
+
fromPincode,
|
|
511
|
+
toCountryCode,
|
|
512
|
+
toStateCode,
|
|
513
|
+
toCityCode,
|
|
514
|
+
toSectorCode,
|
|
515
|
+
toPincode,
|
|
516
|
+
},
|
|
517
|
+
{ abortEarly: false, allowUnknown: true }
|
|
518
|
+
);
|
|
519
|
+
if (error) {
|
|
520
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Showing warrnings if extra unknown parameters are found
|
|
524
|
+
const {
|
|
525
|
+
error: warrning,
|
|
526
|
+
} = LogisticsPartnerValidator.getDeliveryTimes().validate(
|
|
527
|
+
{
|
|
528
|
+
partnerOrgId,
|
|
529
|
+
courierPartnerExtensionId,
|
|
530
|
+
schemeId,
|
|
531
|
+
pageNo,
|
|
532
|
+
pageSize,
|
|
533
|
+
fromCountryCode,
|
|
534
|
+
fromStateCode,
|
|
535
|
+
fromCityCode,
|
|
536
|
+
fromSectorCode,
|
|
537
|
+
fromPincode,
|
|
538
|
+
toCountryCode,
|
|
539
|
+
toStateCode,
|
|
540
|
+
toCityCode,
|
|
541
|
+
toSectorCode,
|
|
542
|
+
toPincode,
|
|
543
|
+
},
|
|
544
|
+
{ abortEarly: false, allowUnknown: false }
|
|
545
|
+
);
|
|
546
|
+
if (warrning) {
|
|
547
|
+
Logger({
|
|
548
|
+
level: "WARN",
|
|
549
|
+
message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTimes \n ${warrning}`,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const query_params = {};
|
|
554
|
+
query_params["page_no"] = pageNo;
|
|
555
|
+
query_params["page_size"] = pageSize;
|
|
556
|
+
query_params["from_country_code"] = fromCountryCode;
|
|
557
|
+
query_params["from_state_code"] = fromStateCode;
|
|
558
|
+
query_params["from_city_code"] = fromCityCode;
|
|
559
|
+
query_params["from_sector_code"] = fromSectorCode;
|
|
560
|
+
query_params["from_pincode"] = fromPincode;
|
|
561
|
+
query_params["to_country_code"] = toCountryCode;
|
|
562
|
+
query_params["to_state_code"] = toStateCode;
|
|
563
|
+
query_params["to_city_code"] = toCityCode;
|
|
564
|
+
query_params["to_sector_code"] = toSectorCode;
|
|
565
|
+
query_params["to_pincode"] = toPincode;
|
|
566
|
+
|
|
567
|
+
const response = await PartnerAPIClient.execute(
|
|
568
|
+
this.config,
|
|
569
|
+
"get",
|
|
570
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`,
|
|
571
|
+
query_params,
|
|
572
|
+
undefined,
|
|
573
|
+
requestHeaders,
|
|
574
|
+
{ responseHeaders }
|
|
575
|
+
);
|
|
576
|
+
|
|
577
|
+
let responseData = response;
|
|
578
|
+
if (responseHeaders) {
|
|
579
|
+
responseData = response[0];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const {
|
|
583
|
+
error: res_error,
|
|
584
|
+
} = LogisticsPartnerModel.RegionTatItemResult().validate(responseData, {
|
|
585
|
+
abortEarly: false,
|
|
586
|
+
allowUnknown: true,
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
if (res_error) {
|
|
590
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
591
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
592
|
+
} else {
|
|
593
|
+
Logger({
|
|
594
|
+
level: "WARN",
|
|
595
|
+
message: `Response Validation Warnings for partner > Logistics > getDeliveryTimes \n ${res_error}`,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
return response;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* @param {LogisticsPartnerValidator.GetDeliveryTimeParam} arg - Arg object.
|
|
605
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
606
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
607
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
608
|
+
* @name getDeliveryTime
|
|
609
|
+
* @summary: Get region based delivery time for a given identifier
|
|
610
|
+
* @description: Retrieve the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTime/).
|
|
611
|
+
*/
|
|
612
|
+
async getDeliveryTime(
|
|
613
|
+
{
|
|
614
|
+
partnerOrgId,
|
|
615
|
+
courierPartnerExtensionId,
|
|
616
|
+
schemeId,
|
|
617
|
+
id,
|
|
618
|
+
requestHeaders,
|
|
619
|
+
} = { requestHeaders: {} },
|
|
620
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
621
|
+
) {
|
|
622
|
+
const { error } = LogisticsPartnerValidator.getDeliveryTime().validate(
|
|
623
|
+
{
|
|
624
|
+
partnerOrgId,
|
|
625
|
+
courierPartnerExtensionId,
|
|
626
|
+
schemeId,
|
|
627
|
+
id,
|
|
628
|
+
},
|
|
629
|
+
{ abortEarly: false, allowUnknown: true }
|
|
630
|
+
);
|
|
631
|
+
if (error) {
|
|
632
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// Showing warrnings if extra unknown parameters are found
|
|
636
|
+
const {
|
|
637
|
+
error: warrning,
|
|
638
|
+
} = LogisticsPartnerValidator.getDeliveryTime().validate(
|
|
639
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
640
|
+
{ abortEarly: false, allowUnknown: false }
|
|
641
|
+
);
|
|
642
|
+
if (warrning) {
|
|
643
|
+
Logger({
|
|
644
|
+
level: "WARN",
|
|
645
|
+
message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTime \n ${warrning}`,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const query_params = {};
|
|
650
|
+
|
|
651
|
+
const response = await PartnerAPIClient.execute(
|
|
652
|
+
this.config,
|
|
653
|
+
"get",
|
|
654
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
655
|
+
query_params,
|
|
656
|
+
undefined,
|
|
657
|
+
requestHeaders,
|
|
658
|
+
{ responseHeaders }
|
|
659
|
+
);
|
|
660
|
+
|
|
661
|
+
let responseData = response;
|
|
662
|
+
if (responseHeaders) {
|
|
663
|
+
responseData = response[0];
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const {
|
|
667
|
+
error: res_error,
|
|
668
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
669
|
+
abortEarly: false,
|
|
670
|
+
allowUnknown: true,
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
if (res_error) {
|
|
674
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
675
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
676
|
+
} else {
|
|
677
|
+
Logger({
|
|
678
|
+
level: "WARN",
|
|
679
|
+
message: `Response Validation Warnings for partner > Logistics > getDeliveryTime \n ${res_error}`,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
return response;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* @param {LogisticsPartnerValidator.UpdateDeliveryTimeParam} arg - Arg object.
|
|
689
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
690
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
691
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
692
|
+
* @name updateDeliveryTime
|
|
693
|
+
* @summary: Region based delivery time update
|
|
694
|
+
* @description: Update the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateDeliveryTime/).
|
|
695
|
+
*/
|
|
696
|
+
async updateDeliveryTime(
|
|
697
|
+
{
|
|
698
|
+
partnerOrgId,
|
|
699
|
+
courierPartnerExtensionId,
|
|
700
|
+
schemeId,
|
|
701
|
+
id,
|
|
702
|
+
body,
|
|
703
|
+
requestHeaders,
|
|
704
|
+
} = { requestHeaders: {} },
|
|
705
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
706
|
+
) {
|
|
707
|
+
const { error } = LogisticsPartnerValidator.updateDeliveryTime().validate(
|
|
708
|
+
{
|
|
709
|
+
partnerOrgId,
|
|
710
|
+
courierPartnerExtensionId,
|
|
711
|
+
schemeId,
|
|
712
|
+
id,
|
|
713
|
+
body,
|
|
714
|
+
},
|
|
715
|
+
{ abortEarly: false, allowUnknown: true }
|
|
716
|
+
);
|
|
717
|
+
if (error) {
|
|
718
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// Showing warrnings if extra unknown parameters are found
|
|
722
|
+
const {
|
|
723
|
+
error: warrning,
|
|
724
|
+
} = LogisticsPartnerValidator.updateDeliveryTime().validate(
|
|
725
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id, body },
|
|
726
|
+
{ abortEarly: false, allowUnknown: false }
|
|
727
|
+
);
|
|
728
|
+
if (warrning) {
|
|
729
|
+
Logger({
|
|
730
|
+
level: "WARN",
|
|
731
|
+
message: `Parameter Validation warrnings for partner > Logistics > updateDeliveryTime \n ${warrning}`,
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
const query_params = {};
|
|
736
|
+
|
|
737
|
+
const response = await PartnerAPIClient.execute(
|
|
738
|
+
this.config,
|
|
739
|
+
"put",
|
|
740
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
741
|
+
query_params,
|
|
742
|
+
body,
|
|
743
|
+
requestHeaders,
|
|
744
|
+
{ responseHeaders }
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
let responseData = response;
|
|
748
|
+
if (responseHeaders) {
|
|
749
|
+
responseData = response[0];
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
const {
|
|
753
|
+
error: res_error,
|
|
754
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
755
|
+
abortEarly: false,
|
|
756
|
+
allowUnknown: true,
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
if (res_error) {
|
|
760
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
761
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
762
|
+
} else {
|
|
763
|
+
Logger({
|
|
764
|
+
level: "WARN",
|
|
765
|
+
message: `Response Validation Warnings for partner > Logistics > updateDeliveryTime \n ${res_error}`,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return response;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @param {LogisticsPartnerValidator.DeleteDeliveryTimeParam} arg - Arg object.
|
|
775
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
776
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
777
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
778
|
+
* @name deleteDeliveryTime
|
|
779
|
+
* @summary: Region based delivery time delete
|
|
780
|
+
* @description: Delete the delivery time record for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteDeliveryTime/).
|
|
781
|
+
*/
|
|
782
|
+
async deleteDeliveryTime(
|
|
783
|
+
{
|
|
784
|
+
partnerOrgId,
|
|
785
|
+
courierPartnerExtensionId,
|
|
786
|
+
schemeId,
|
|
787
|
+
id,
|
|
788
|
+
requestHeaders,
|
|
789
|
+
} = { requestHeaders: {} },
|
|
790
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
791
|
+
) {
|
|
792
|
+
const { error } = LogisticsPartnerValidator.deleteDeliveryTime().validate(
|
|
793
|
+
{
|
|
794
|
+
partnerOrgId,
|
|
795
|
+
courierPartnerExtensionId,
|
|
796
|
+
schemeId,
|
|
797
|
+
id,
|
|
798
|
+
},
|
|
799
|
+
{ abortEarly: false, allowUnknown: true }
|
|
800
|
+
);
|
|
801
|
+
if (error) {
|
|
802
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// Showing warrnings if extra unknown parameters are found
|
|
806
|
+
const {
|
|
807
|
+
error: warrning,
|
|
808
|
+
} = LogisticsPartnerValidator.deleteDeliveryTime().validate(
|
|
809
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
810
|
+
{ abortEarly: false, allowUnknown: false }
|
|
811
|
+
);
|
|
812
|
+
if (warrning) {
|
|
813
|
+
Logger({
|
|
814
|
+
level: "WARN",
|
|
815
|
+
message: `Parameter Validation warrnings for partner > Logistics > deleteDeliveryTime \n ${warrning}`,
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
const query_params = {};
|
|
820
|
+
|
|
821
|
+
const response = await PartnerAPIClient.execute(
|
|
822
|
+
this.config,
|
|
823
|
+
"delete",
|
|
824
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
825
|
+
query_params,
|
|
826
|
+
undefined,
|
|
827
|
+
requestHeaders,
|
|
828
|
+
{ responseHeaders }
|
|
829
|
+
);
|
|
830
|
+
|
|
831
|
+
let responseData = response;
|
|
832
|
+
if (responseHeaders) {
|
|
833
|
+
responseData = response[0];
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
const {
|
|
837
|
+
error: res_error,
|
|
838
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
839
|
+
abortEarly: false,
|
|
840
|
+
allowUnknown: true,
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
if (res_error) {
|
|
844
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
845
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
846
|
+
} else {
|
|
847
|
+
Logger({
|
|
848
|
+
level: "WARN",
|
|
849
|
+
message: `Response Validation Warnings for partner > Logistics > deleteDeliveryTime \n ${res_error}`,
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
return response;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* @param {LogisticsPartnerValidator.CreateServiceabilityParam} arg - Arg object.
|
|
859
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
860
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
861
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
862
|
+
* Success response
|
|
863
|
+
* @name createServiceability
|
|
864
|
+
* @summary: Serviceability insert
|
|
865
|
+
* @description: Insert the serviceability for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createServiceability/).
|
|
866
|
+
*/
|
|
867
|
+
async createServiceability(
|
|
868
|
+
{
|
|
869
|
+
partnerOrgId,
|
|
870
|
+
courierPartnerExtensionId,
|
|
871
|
+
schemeId,
|
|
872
|
+
body,
|
|
873
|
+
requestHeaders,
|
|
874
|
+
} = { requestHeaders: {} },
|
|
875
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
876
|
+
) {
|
|
877
|
+
const { error } = LogisticsPartnerValidator.createServiceability().validate(
|
|
878
|
+
{
|
|
879
|
+
partnerOrgId,
|
|
880
|
+
courierPartnerExtensionId,
|
|
881
|
+
schemeId,
|
|
882
|
+
body,
|
|
883
|
+
},
|
|
884
|
+
{ abortEarly: false, allowUnknown: true }
|
|
885
|
+
);
|
|
886
|
+
if (error) {
|
|
887
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// Showing warrnings if extra unknown parameters are found
|
|
891
|
+
const {
|
|
892
|
+
error: warrning,
|
|
893
|
+
} = LogisticsPartnerValidator.createServiceability().validate(
|
|
894
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, body },
|
|
895
|
+
{ abortEarly: false, allowUnknown: false }
|
|
896
|
+
);
|
|
897
|
+
if (warrning) {
|
|
898
|
+
Logger({
|
|
899
|
+
level: "WARN",
|
|
900
|
+
message: `Parameter Validation warrnings for partner > Logistics > createServiceability \n ${warrning}`,
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const query_params = {};
|
|
905
|
+
|
|
906
|
+
const response = await PartnerAPIClient.execute(
|
|
907
|
+
this.config,
|
|
908
|
+
"post",
|
|
909
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`,
|
|
910
|
+
query_params,
|
|
911
|
+
body,
|
|
912
|
+
requestHeaders,
|
|
913
|
+
{ responseHeaders }
|
|
914
|
+
);
|
|
915
|
+
|
|
916
|
+
let responseData = response;
|
|
917
|
+
if (responseHeaders) {
|
|
918
|
+
responseData = response[0];
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
const {
|
|
922
|
+
error: res_error,
|
|
923
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
924
|
+
responseData,
|
|
925
|
+
{ abortEarly: false, allowUnknown: true }
|
|
926
|
+
);
|
|
927
|
+
|
|
928
|
+
if (res_error) {
|
|
929
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
930
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
931
|
+
} else {
|
|
932
|
+
Logger({
|
|
933
|
+
level: "WARN",
|
|
934
|
+
message: `Response Validation Warnings for partner > Logistics > createServiceability \n ${res_error}`,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
return response;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* @param {LogisticsPartnerValidator.GetServiceabilitiesParam} arg - Arg object.
|
|
944
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
945
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
946
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityItemResult>}
|
|
947
|
+
* - Success response
|
|
948
|
+
*
|
|
949
|
+
* @name getServiceabilities
|
|
950
|
+
* @summary: Get region serviceability list
|
|
951
|
+
* @description: Retrieve a list of serviceability for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceabilities/).
|
|
952
|
+
*/
|
|
953
|
+
async getServiceabilities(
|
|
954
|
+
{
|
|
955
|
+
partnerOrgId,
|
|
956
|
+
courierPartnerExtensionId,
|
|
957
|
+
schemeId,
|
|
958
|
+
pageNo,
|
|
959
|
+
pageSize,
|
|
960
|
+
countryCode,
|
|
961
|
+
stateCode,
|
|
962
|
+
cityCode,
|
|
963
|
+
sectorCode,
|
|
964
|
+
pincode,
|
|
965
|
+
firstMile,
|
|
966
|
+
lastMile,
|
|
967
|
+
doorstepReturn,
|
|
968
|
+
doorstepQc,
|
|
969
|
+
installation,
|
|
970
|
+
requestHeaders,
|
|
971
|
+
} = { requestHeaders: {} },
|
|
972
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
973
|
+
) {
|
|
974
|
+
const { error } = LogisticsPartnerValidator.getServiceabilities().validate(
|
|
975
|
+
{
|
|
976
|
+
partnerOrgId,
|
|
977
|
+
courierPartnerExtensionId,
|
|
978
|
+
schemeId,
|
|
979
|
+
pageNo,
|
|
980
|
+
pageSize,
|
|
981
|
+
countryCode,
|
|
982
|
+
stateCode,
|
|
983
|
+
cityCode,
|
|
984
|
+
sectorCode,
|
|
985
|
+
pincode,
|
|
986
|
+
firstMile,
|
|
987
|
+
lastMile,
|
|
988
|
+
doorstepReturn,
|
|
989
|
+
doorstepQc,
|
|
990
|
+
installation,
|
|
991
|
+
},
|
|
992
|
+
{ abortEarly: false, allowUnknown: true }
|
|
993
|
+
);
|
|
994
|
+
if (error) {
|
|
995
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// Showing warrnings if extra unknown parameters are found
|
|
999
|
+
const {
|
|
1000
|
+
error: warrning,
|
|
1001
|
+
} = LogisticsPartnerValidator.getServiceabilities().validate(
|
|
1002
|
+
{
|
|
1003
|
+
partnerOrgId,
|
|
1004
|
+
courierPartnerExtensionId,
|
|
1005
|
+
schemeId,
|
|
1006
|
+
pageNo,
|
|
1007
|
+
pageSize,
|
|
1008
|
+
countryCode,
|
|
1009
|
+
stateCode,
|
|
1010
|
+
cityCode,
|
|
1011
|
+
sectorCode,
|
|
1012
|
+
pincode,
|
|
1013
|
+
firstMile,
|
|
1014
|
+
lastMile,
|
|
1015
|
+
doorstepReturn,
|
|
1016
|
+
doorstepQc,
|
|
1017
|
+
installation,
|
|
1018
|
+
},
|
|
1019
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1020
|
+
);
|
|
1021
|
+
if (warrning) {
|
|
1022
|
+
Logger({
|
|
1023
|
+
level: "WARN",
|
|
1024
|
+
message: `Parameter Validation warrnings for partner > Logistics > getServiceabilities \n ${warrning}`,
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
const query_params = {};
|
|
1029
|
+
query_params["page_no"] = pageNo;
|
|
1030
|
+
query_params["page_size"] = pageSize;
|
|
1031
|
+
query_params["country_code"] = countryCode;
|
|
1032
|
+
query_params["state_code"] = stateCode;
|
|
1033
|
+
query_params["city_code"] = cityCode;
|
|
1034
|
+
query_params["sector_code"] = sectorCode;
|
|
1035
|
+
query_params["pincode"] = pincode;
|
|
1036
|
+
query_params["first_mile"] = firstMile;
|
|
1037
|
+
query_params["last_mile"] = lastMile;
|
|
1038
|
+
query_params["doorstep_return"] = doorstepReturn;
|
|
1039
|
+
query_params["doorstep_qc"] = doorstepQc;
|
|
1040
|
+
query_params["installation"] = installation;
|
|
1041
|
+
|
|
1042
|
+
const response = await PartnerAPIClient.execute(
|
|
1043
|
+
this.config,
|
|
1044
|
+
"get",
|
|
1045
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`,
|
|
1046
|
+
query_params,
|
|
1047
|
+
undefined,
|
|
1048
|
+
requestHeaders,
|
|
1049
|
+
{ responseHeaders }
|
|
1050
|
+
);
|
|
1051
|
+
|
|
1052
|
+
let responseData = response;
|
|
1053
|
+
if (responseHeaders) {
|
|
1054
|
+
responseData = response[0];
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const {
|
|
1058
|
+
error: res_error,
|
|
1059
|
+
} = LogisticsPartnerModel.RegionServiceabilityItemResult().validate(
|
|
1060
|
+
responseData,
|
|
1061
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1062
|
+
);
|
|
1063
|
+
|
|
1064
|
+
if (res_error) {
|
|
1065
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1066
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1067
|
+
} else {
|
|
1068
|
+
Logger({
|
|
1069
|
+
level: "WARN",
|
|
1070
|
+
message: `Response Validation Warnings for partner > Logistics > getServiceabilities \n ${res_error}`,
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
return response;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* @param {LogisticsPartnerValidator.GetServiceabilityParam} arg - Arg object.
|
|
1080
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1081
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1082
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
1083
|
+
* Success response
|
|
1084
|
+
* @name getServiceability
|
|
1085
|
+
* @summary: Get region serviceability
|
|
1086
|
+
* @description: Retrieve serviceability for specific region within a courier partner scheme for a given identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceability/).
|
|
1087
|
+
*/
|
|
1088
|
+
async getServiceability(
|
|
1089
|
+
{
|
|
1090
|
+
partnerOrgId,
|
|
1091
|
+
courierPartnerExtensionId,
|
|
1092
|
+
schemeId,
|
|
1093
|
+
id,
|
|
1094
|
+
requestHeaders,
|
|
1095
|
+
} = { requestHeaders: {} },
|
|
1096
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1097
|
+
) {
|
|
1098
|
+
const { error } = LogisticsPartnerValidator.getServiceability().validate(
|
|
1099
|
+
{
|
|
1100
|
+
partnerOrgId,
|
|
1101
|
+
courierPartnerExtensionId,
|
|
1102
|
+
schemeId,
|
|
1103
|
+
id,
|
|
1104
|
+
},
|
|
1105
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1106
|
+
);
|
|
1107
|
+
if (error) {
|
|
1108
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1112
|
+
const {
|
|
1113
|
+
error: warrning,
|
|
1114
|
+
} = LogisticsPartnerValidator.getServiceability().validate(
|
|
1115
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
1116
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1117
|
+
);
|
|
1118
|
+
if (warrning) {
|
|
1119
|
+
Logger({
|
|
1120
|
+
level: "WARN",
|
|
1121
|
+
message: `Parameter Validation warrnings for partner > Logistics > getServiceability \n ${warrning}`,
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
const query_params = {};
|
|
1126
|
+
|
|
1127
|
+
const response = await PartnerAPIClient.execute(
|
|
1128
|
+
this.config,
|
|
1129
|
+
"get",
|
|
1130
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1131
|
+
query_params,
|
|
1132
|
+
undefined,
|
|
1133
|
+
requestHeaders,
|
|
1134
|
+
{ responseHeaders }
|
|
1135
|
+
);
|
|
1136
|
+
|
|
1137
|
+
let responseData = response;
|
|
1138
|
+
if (responseHeaders) {
|
|
1139
|
+
responseData = response[0];
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
const {
|
|
1143
|
+
error: res_error,
|
|
1144
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
1145
|
+
responseData,
|
|
1146
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1147
|
+
);
|
|
1148
|
+
|
|
1149
|
+
if (res_error) {
|
|
1150
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1151
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1152
|
+
} else {
|
|
1153
|
+
Logger({
|
|
1154
|
+
level: "WARN",
|
|
1155
|
+
message: `Response Validation Warnings for partner > Logistics > getServiceability \n ${res_error}`,
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
return response;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* @param {LogisticsPartnerValidator.UpdateServiceabilityParam} arg - Arg object.
|
|
1165
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1166
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1167
|
+
* @returns {Promise<LogisticsPartnerModel.ServiceabilityDetailsResult>} -
|
|
1168
|
+
* Success response
|
|
1169
|
+
* @name updateServiceability
|
|
1170
|
+
* @summary: Serviceability update
|
|
1171
|
+
* @description: Update the serviceability for a specific region within a courier partner scheme based on unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateServiceability/).
|
|
1172
|
+
*/
|
|
1173
|
+
async updateServiceability(
|
|
1174
|
+
{
|
|
1175
|
+
partnerOrgId,
|
|
1176
|
+
courierPartnerExtensionId,
|
|
1177
|
+
schemeId,
|
|
1178
|
+
id,
|
|
1179
|
+
body,
|
|
1180
|
+
requestHeaders,
|
|
1181
|
+
} = { requestHeaders: {} },
|
|
1182
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1183
|
+
) {
|
|
1184
|
+
const { error } = LogisticsPartnerValidator.updateServiceability().validate(
|
|
1185
|
+
{
|
|
1186
|
+
partnerOrgId,
|
|
1187
|
+
courierPartnerExtensionId,
|
|
1188
|
+
schemeId,
|
|
1189
|
+
id,
|
|
1190
|
+
body,
|
|
1191
|
+
},
|
|
1192
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1193
|
+
);
|
|
1194
|
+
if (error) {
|
|
1195
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1199
|
+
const {
|
|
1200
|
+
error: warrning,
|
|
1201
|
+
} = LogisticsPartnerValidator.updateServiceability().validate(
|
|
1202
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id, body },
|
|
1203
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1204
|
+
);
|
|
1205
|
+
if (warrning) {
|
|
1206
|
+
Logger({
|
|
1207
|
+
level: "WARN",
|
|
1208
|
+
message: `Parameter Validation warrnings for partner > Logistics > updateServiceability \n ${warrning}`,
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
const query_params = {};
|
|
1213
|
+
|
|
1214
|
+
const response = await PartnerAPIClient.execute(
|
|
1215
|
+
this.config,
|
|
1216
|
+
"put",
|
|
1217
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1218
|
+
query_params,
|
|
1219
|
+
body,
|
|
1220
|
+
requestHeaders,
|
|
1221
|
+
{ responseHeaders }
|
|
1222
|
+
);
|
|
1223
|
+
|
|
1224
|
+
let responseData = response;
|
|
1225
|
+
if (responseHeaders) {
|
|
1226
|
+
responseData = response[0];
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
const {
|
|
1230
|
+
error: res_error,
|
|
1231
|
+
} = LogisticsPartnerModel.ServiceabilityDetailsResult().validate(
|
|
1232
|
+
responseData,
|
|
1233
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1234
|
+
);
|
|
1235
|
+
|
|
1236
|
+
if (res_error) {
|
|
1237
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1238
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1239
|
+
} else {
|
|
1240
|
+
Logger({
|
|
1241
|
+
level: "WARN",
|
|
1242
|
+
message: `Response Validation Warnings for partner > Logistics > updateServiceability \n ${res_error}`,
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
return response;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* @param {LogisticsPartnerValidator.DeleteServiceabilityParam} arg - Arg object.
|
|
1252
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1253
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1254
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
1255
|
+
* Success response
|
|
1256
|
+
* @name deleteServiceability
|
|
1257
|
+
* @summary: Serviceability delete
|
|
1258
|
+
* @description: Delete the serviceability for a specific region within a courier partner scheme based on a unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteServiceability/).
|
|
1259
|
+
*/
|
|
1260
|
+
async deleteServiceability(
|
|
1261
|
+
{
|
|
1262
|
+
partnerOrgId,
|
|
1263
|
+
courierPartnerExtensionId,
|
|
1264
|
+
schemeId,
|
|
1265
|
+
id,
|
|
1266
|
+
requestHeaders,
|
|
1267
|
+
} = { requestHeaders: {} },
|
|
1268
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1269
|
+
) {
|
|
1270
|
+
const { error } = LogisticsPartnerValidator.deleteServiceability().validate(
|
|
1271
|
+
{
|
|
1272
|
+
partnerOrgId,
|
|
1273
|
+
courierPartnerExtensionId,
|
|
1274
|
+
schemeId,
|
|
1275
|
+
id,
|
|
1276
|
+
},
|
|
1277
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1278
|
+
);
|
|
1279
|
+
if (error) {
|
|
1280
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1284
|
+
const {
|
|
1285
|
+
error: warrning,
|
|
1286
|
+
} = LogisticsPartnerValidator.deleteServiceability().validate(
|
|
1287
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
1288
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1289
|
+
);
|
|
1290
|
+
if (warrning) {
|
|
1291
|
+
Logger({
|
|
1292
|
+
level: "WARN",
|
|
1293
|
+
message: `Parameter Validation warrnings for partner > Logistics > deleteServiceability \n ${warrning}`,
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
const query_params = {};
|
|
1298
|
+
|
|
1299
|
+
const response = await PartnerAPIClient.execute(
|
|
1300
|
+
this.config,
|
|
1301
|
+
"delete",
|
|
1302
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1303
|
+
query_params,
|
|
1304
|
+
undefined,
|
|
1305
|
+
requestHeaders,
|
|
1306
|
+
{ responseHeaders }
|
|
1307
|
+
);
|
|
1308
|
+
|
|
1309
|
+
let responseData = response;
|
|
1310
|
+
if (responseHeaders) {
|
|
1311
|
+
responseData = response[0];
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
const {
|
|
1315
|
+
error: res_error,
|
|
1316
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
1317
|
+
responseData,
|
|
1318
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1319
|
+
);
|
|
1320
|
+
|
|
1321
|
+
if (res_error) {
|
|
1322
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1323
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1324
|
+
} else {
|
|
1325
|
+
Logger({
|
|
1326
|
+
level: "WARN",
|
|
1327
|
+
message: `Response Validation Warnings for partner > Logistics > deleteServiceability \n ${res_error}`,
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
return response;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
385
1335
|
/**
|
|
386
1336
|
* @param {LogisticsPartnerValidator.BulkServiceabilityParam} arg - Arg object.
|
|
387
1337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
388
1338
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
389
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1339
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResultItemData>} -
|
|
390
1340
|
* Success response
|
|
391
1341
|
* @name bulkServiceability
|
|
392
1342
|
* @summary: Serviceability Import or Export
|
|
@@ -445,7 +1395,7 @@ class Logistics {
|
|
|
445
1395
|
|
|
446
1396
|
const {
|
|
447
1397
|
error: res_error,
|
|
448
|
-
} = LogisticsPartnerModel.
|
|
1398
|
+
} = LogisticsPartnerModel.BulkRegionResultItemData().validate(
|
|
449
1399
|
responseData,
|
|
450
1400
|
{ abortEarly: false, allowUnknown: true }
|
|
451
1401
|
);
|
|
@@ -468,7 +1418,7 @@ class Logistics {
|
|
|
468
1418
|
* @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object.
|
|
469
1419
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
470
1420
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
471
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1421
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResult>} - Success response
|
|
472
1422
|
* @name getBulkServiceability
|
|
473
1423
|
* @summary: Get Region Serviceability Bulk History
|
|
474
1424
|
* @description: Get Region Serviceability Bulk History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkServiceability/).
|
|
@@ -566,7 +1516,7 @@ class Logistics {
|
|
|
566
1516
|
|
|
567
1517
|
const {
|
|
568
1518
|
error: res_error,
|
|
569
|
-
} = LogisticsPartnerModel.
|
|
1519
|
+
} = LogisticsPartnerModel.BulkRegionResult().validate(responseData, {
|
|
570
1520
|
abortEarly: false,
|
|
571
1521
|
allowUnknown: true,
|
|
572
1522
|
});
|
|
@@ -672,7 +1622,7 @@ class Logistics {
|
|
|
672
1622
|
* @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object.
|
|
673
1623
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
674
1624
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
675
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1625
|
+
* @returns {Promise<LogisticsPartnerModel.CompanyCourierPartnerAccountListResult>}
|
|
676
1626
|
* - Success response
|
|
677
1627
|
*
|
|
678
1628
|
* @name getCourierPartnerAccounts
|
|
@@ -753,7 +1703,7 @@ class Logistics {
|
|
|
753
1703
|
|
|
754
1704
|
const {
|
|
755
1705
|
error: res_error,
|
|
756
|
-
} = LogisticsPartnerModel.
|
|
1706
|
+
} = LogisticsPartnerModel.CompanyCourierPartnerAccountListResult().validate(
|
|
757
1707
|
responseData,
|
|
758
1708
|
{ abortEarly: false, allowUnknown: true }
|
|
759
1709
|
);
|
|
@@ -778,7 +1728,7 @@ class Logistics {
|
|
|
778
1728
|
*
|
|
779
1729
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
780
1730
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
781
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1731
|
+
* @returns {Promise<LogisticsPartnerModel.CourierAccountResult>} - Success response
|
|
782
1732
|
* @name updateCourierPartnerAccount
|
|
783
1733
|
* @summary: Update Courier Account in database
|
|
784
1734
|
* @description: Updates Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerAccount/).
|
|
@@ -838,7 +1788,7 @@ class Logistics {
|
|
|
838
1788
|
|
|
839
1789
|
const {
|
|
840
1790
|
error: res_error,
|
|
841
|
-
} = LogisticsPartnerModel.
|
|
1791
|
+
} = LogisticsPartnerModel.CourierAccountResult().validate(responseData, {
|
|
842
1792
|
abortEarly: false,
|
|
843
1793
|
allowUnknown: true,
|
|
844
1794
|
});
|
|
@@ -861,7 +1811,7 @@ class Logistics {
|
|
|
861
1811
|
* @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object.
|
|
862
1812
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
863
1813
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
864
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1814
|
+
* @returns {Promise<LogisticsPartnerModel.CourierAccountResult>} - Success response
|
|
865
1815
|
* @name getCourierPartnerAccount
|
|
866
1816
|
* @summary: Getting Courier Account of a company from database
|
|
867
1817
|
* @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerAccount/).
|
|
@@ -919,7 +1869,7 @@ class Logistics {
|
|
|
919
1869
|
|
|
920
1870
|
const {
|
|
921
1871
|
error: res_error,
|
|
922
|
-
} = LogisticsPartnerModel.
|
|
1872
|
+
} = LogisticsPartnerModel.CourierAccountResult().validate(responseData, {
|
|
923
1873
|
abortEarly: false,
|
|
924
1874
|
allowUnknown: true,
|
|
925
1875
|
});
|
|
@@ -938,12 +1888,101 @@ class Logistics {
|
|
|
938
1888
|
return response;
|
|
939
1889
|
}
|
|
940
1890
|
|
|
1891
|
+
/**
|
|
1892
|
+
* @param {LogisticsPartnerValidator.GetCountriesParam} arg - Arg object.
|
|
1893
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1894
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1895
|
+
* @returns {Promise<LogisticsPartnerModel.GetCountries>} - Success response
|
|
1896
|
+
* @name getCountries
|
|
1897
|
+
* @summary: Get all countries and associated data
|
|
1898
|
+
* @description: Retrieve of all countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCountries/).
|
|
1899
|
+
*/
|
|
1900
|
+
async getCountries(
|
|
1901
|
+
{ onboarding, pageNo, pageSize, q, requestHeaders } = {
|
|
1902
|
+
requestHeaders: {},
|
|
1903
|
+
},
|
|
1904
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1905
|
+
) {
|
|
1906
|
+
const { error } = LogisticsPartnerValidator.getCountries().validate(
|
|
1907
|
+
{
|
|
1908
|
+
onboarding,
|
|
1909
|
+
pageNo,
|
|
1910
|
+
pageSize,
|
|
1911
|
+
q,
|
|
1912
|
+
},
|
|
1913
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1914
|
+
);
|
|
1915
|
+
if (error) {
|
|
1916
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1920
|
+
const {
|
|
1921
|
+
error: warrning,
|
|
1922
|
+
} = LogisticsPartnerValidator.getCountries().validate(
|
|
1923
|
+
{
|
|
1924
|
+
onboarding,
|
|
1925
|
+
pageNo,
|
|
1926
|
+
pageSize,
|
|
1927
|
+
q,
|
|
1928
|
+
},
|
|
1929
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1930
|
+
);
|
|
1931
|
+
if (warrning) {
|
|
1932
|
+
Logger({
|
|
1933
|
+
level: "WARN",
|
|
1934
|
+
message: `Parameter Validation warrnings for partner > Logistics > getCountries \n ${warrning}`,
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
const query_params = {};
|
|
1939
|
+
query_params["onboarding"] = onboarding;
|
|
1940
|
+
query_params["page_no"] = pageNo;
|
|
1941
|
+
query_params["page_size"] = pageSize;
|
|
1942
|
+
query_params["q"] = q;
|
|
1943
|
+
|
|
1944
|
+
const response = await PartnerAPIClient.execute(
|
|
1945
|
+
this.config,
|
|
1946
|
+
"get",
|
|
1947
|
+
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/countries`,
|
|
1948
|
+
query_params,
|
|
1949
|
+
undefined,
|
|
1950
|
+
requestHeaders,
|
|
1951
|
+
{ responseHeaders }
|
|
1952
|
+
);
|
|
1953
|
+
|
|
1954
|
+
let responseData = response;
|
|
1955
|
+
if (responseHeaders) {
|
|
1956
|
+
responseData = response[0];
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
const {
|
|
1960
|
+
error: res_error,
|
|
1961
|
+
} = LogisticsPartnerModel.GetCountries().validate(responseData, {
|
|
1962
|
+
abortEarly: false,
|
|
1963
|
+
allowUnknown: true,
|
|
1964
|
+
});
|
|
1965
|
+
|
|
1966
|
+
if (res_error) {
|
|
1967
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1968
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1969
|
+
} else {
|
|
1970
|
+
Logger({
|
|
1971
|
+
level: "WARN",
|
|
1972
|
+
message: `Response Validation Warnings for partner > Logistics > getCountries \n ${res_error}`,
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
return response;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
941
1980
|
/**
|
|
942
1981
|
* @param {LogisticsPartnerValidator.CreateCourierPartnerSchemeParam} arg -
|
|
943
1982
|
* Arg object.
|
|
944
1983
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
945
1984
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
946
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1985
|
+
* @returns {Promise<LogisticsPartnerModel.CourierPartnerV2SchemeModel>} -
|
|
947
1986
|
* Success response
|
|
948
1987
|
* @name createCourierPartnerScheme
|
|
949
1988
|
* @summary: Create Scheme for courier partner extension
|
|
@@ -986,7 +2025,7 @@ class Logistics {
|
|
|
986
2025
|
const response = await PartnerAPIClient.execute(
|
|
987
2026
|
this.config,
|
|
988
2027
|
"post",
|
|
989
|
-
`/service/partner/logistics/
|
|
2028
|
+
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/courier-partner/scheme`,
|
|
990
2029
|
query_params,
|
|
991
2030
|
body,
|
|
992
2031
|
requestHeaders,
|
|
@@ -1000,7 +2039,7 @@ class Logistics {
|
|
|
1000
2039
|
|
|
1001
2040
|
const {
|
|
1002
2041
|
error: res_error,
|
|
1003
|
-
} = LogisticsPartnerModel.
|
|
2042
|
+
} = LogisticsPartnerModel.CourierPartnerV2SchemeModel().validate(
|
|
1004
2043
|
responseData,
|
|
1005
2044
|
{ abortEarly: false, allowUnknown: true }
|
|
1006
2045
|
);
|
|
@@ -1019,14 +2058,105 @@ class Logistics {
|
|
|
1019
2058
|
return response;
|
|
1020
2059
|
}
|
|
1021
2060
|
|
|
2061
|
+
/**
|
|
2062
|
+
* @param {LogisticsPartnerValidator.GetCourierPartnerSchemesParam} arg - Arg object.
|
|
2063
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2064
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
2065
|
+
* @returns {Promise<LogisticsPartnerModel.courierPartnerSchemeV2List>} -
|
|
2066
|
+
* Success response
|
|
2067
|
+
* @name getCourierPartnerSchemes
|
|
2068
|
+
* @summary: Get created Schemes for courier partner
|
|
2069
|
+
* @description: Get created Schemes for courier partner - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerSchemes/).
|
|
2070
|
+
*/
|
|
2071
|
+
async getCourierPartnerSchemes(
|
|
2072
|
+
{ schemeType, paymentMode, capabilities, schemeIds, requestHeaders } = {
|
|
2073
|
+
requestHeaders: {},
|
|
2074
|
+
},
|
|
2075
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2076
|
+
) {
|
|
2077
|
+
const {
|
|
2078
|
+
error,
|
|
2079
|
+
} = LogisticsPartnerValidator.getCourierPartnerSchemes().validate(
|
|
2080
|
+
{
|
|
2081
|
+
schemeType,
|
|
2082
|
+
paymentMode,
|
|
2083
|
+
capabilities,
|
|
2084
|
+
schemeIds,
|
|
2085
|
+
},
|
|
2086
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2087
|
+
);
|
|
2088
|
+
if (error) {
|
|
2089
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2093
|
+
const {
|
|
2094
|
+
error: warrning,
|
|
2095
|
+
} = LogisticsPartnerValidator.getCourierPartnerSchemes().validate(
|
|
2096
|
+
{
|
|
2097
|
+
schemeType,
|
|
2098
|
+
paymentMode,
|
|
2099
|
+
capabilities,
|
|
2100
|
+
schemeIds,
|
|
2101
|
+
},
|
|
2102
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2103
|
+
);
|
|
2104
|
+
if (warrning) {
|
|
2105
|
+
Logger({
|
|
2106
|
+
level: "WARN",
|
|
2107
|
+
message: `Parameter Validation warrnings for partner > Logistics > getCourierPartnerSchemes \n ${warrning}`,
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
const query_params = {};
|
|
2112
|
+
query_params["scheme_type"] = schemeType;
|
|
2113
|
+
query_params["payment_mode"] = paymentMode;
|
|
2114
|
+
query_params["capabilities"] = capabilities;
|
|
2115
|
+
query_params["scheme_ids"] = schemeIds;
|
|
2116
|
+
|
|
2117
|
+
const response = await PartnerAPIClient.execute(
|
|
2118
|
+
this.config,
|
|
2119
|
+
"get",
|
|
2120
|
+
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/courier-partner/scheme`,
|
|
2121
|
+
query_params,
|
|
2122
|
+
undefined,
|
|
2123
|
+
requestHeaders,
|
|
2124
|
+
{ responseHeaders }
|
|
2125
|
+
);
|
|
2126
|
+
|
|
2127
|
+
let responseData = response;
|
|
2128
|
+
if (responseHeaders) {
|
|
2129
|
+
responseData = response[0];
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
const {
|
|
2133
|
+
error: res_error,
|
|
2134
|
+
} = LogisticsPartnerModel.courierPartnerSchemeV2List().validate(
|
|
2135
|
+
responseData,
|
|
2136
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2137
|
+
);
|
|
2138
|
+
|
|
2139
|
+
if (res_error) {
|
|
2140
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2141
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2142
|
+
} else {
|
|
2143
|
+
Logger({
|
|
2144
|
+
level: "WARN",
|
|
2145
|
+
message: `Response Validation Warnings for partner > Logistics > getCourierPartnerSchemes \n ${res_error}`,
|
|
2146
|
+
});
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
return response;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
1022
2153
|
/**
|
|
1023
2154
|
* @param {LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam} arg -
|
|
1024
2155
|
* Arg object.
|
|
1025
2156
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1026
2157
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1027
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
2158
|
+
* @returns {Promise<LogisticsPartnerModel.CourierPartnerV2SchemeModel>} -
|
|
2159
|
+
* Success response
|
|
1030
2160
|
* @name updateCourierPartnerScheme
|
|
1031
2161
|
* @summary: Update Scheme for courier partner extension
|
|
1032
2162
|
* @description: Update Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerScheme/).
|
|
@@ -1070,7 +2200,7 @@ class Logistics {
|
|
|
1070
2200
|
const response = await PartnerAPIClient.execute(
|
|
1071
2201
|
this.config,
|
|
1072
2202
|
"put",
|
|
1073
|
-
`/service/partner/logistics/
|
|
2203
|
+
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/courier-partner/scheme/${schemeId}`,
|
|
1074
2204
|
query_params,
|
|
1075
2205
|
body,
|
|
1076
2206
|
requestHeaders,
|
|
@@ -1084,7 +2214,7 @@ class Logistics {
|
|
|
1084
2214
|
|
|
1085
2215
|
const {
|
|
1086
2216
|
error: res_error,
|
|
1087
|
-
} = LogisticsPartnerModel.
|
|
2217
|
+
} = LogisticsPartnerModel.CourierPartnerV2SchemeModel().validate(
|
|
1088
2218
|
responseData,
|
|
1089
2219
|
{ abortEarly: false, allowUnknown: true }
|
|
1090
2220
|
);
|
|
@@ -1104,26 +2234,24 @@ class Logistics {
|
|
|
1104
2234
|
}
|
|
1105
2235
|
|
|
1106
2236
|
/**
|
|
1107
|
-
* @param {LogisticsPartnerValidator.
|
|
2237
|
+
* @param {LogisticsPartnerValidator.GetCourierPartnerSchemeParam} arg - Arg object.
|
|
1108
2238
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1109
2239
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1110
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1111
|
-
*
|
|
1112
|
-
* @
|
|
1113
|
-
* @
|
|
2240
|
+
* @returns {Promise<LogisticsPartnerModel.CourierPartnerV2SchemeModel>} -
|
|
2241
|
+
* Success response
|
|
2242
|
+
* @name getCourierPartnerScheme
|
|
2243
|
+
* @summary: Get Scheme for courier partner extension by Id
|
|
2244
|
+
* @description: Update Scheme for courier partner extension by Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerScheme/).
|
|
1114
2245
|
*/
|
|
1115
|
-
async
|
|
1116
|
-
{
|
|
1117
|
-
requestHeaders: {},
|
|
1118
|
-
},
|
|
2246
|
+
async getCourierPartnerScheme(
|
|
2247
|
+
{ schemeId, requestHeaders } = { requestHeaders: {} },
|
|
1119
2248
|
{ responseHeaders } = { responseHeaders: false }
|
|
1120
2249
|
) {
|
|
1121
|
-
const {
|
|
2250
|
+
const {
|
|
2251
|
+
error,
|
|
2252
|
+
} = LogisticsPartnerValidator.getCourierPartnerScheme().validate(
|
|
1122
2253
|
{
|
|
1123
|
-
|
|
1124
|
-
pageNo,
|
|
1125
|
-
pageSize,
|
|
1126
|
-
q,
|
|
2254
|
+
schemeId,
|
|
1127
2255
|
},
|
|
1128
2256
|
{ abortEarly: false, allowUnknown: true }
|
|
1129
2257
|
);
|
|
@@ -1134,32 +2262,25 @@ class Logistics {
|
|
|
1134
2262
|
// Showing warrnings if extra unknown parameters are found
|
|
1135
2263
|
const {
|
|
1136
2264
|
error: warrning,
|
|
1137
|
-
} = LogisticsPartnerValidator.
|
|
2265
|
+
} = LogisticsPartnerValidator.getCourierPartnerScheme().validate(
|
|
1138
2266
|
{
|
|
1139
|
-
|
|
1140
|
-
pageNo,
|
|
1141
|
-
pageSize,
|
|
1142
|
-
q,
|
|
2267
|
+
schemeId,
|
|
1143
2268
|
},
|
|
1144
2269
|
{ abortEarly: false, allowUnknown: false }
|
|
1145
2270
|
);
|
|
1146
2271
|
if (warrning) {
|
|
1147
2272
|
Logger({
|
|
1148
2273
|
level: "WARN",
|
|
1149
|
-
message: `Parameter Validation warrnings for partner > Logistics >
|
|
2274
|
+
message: `Parameter Validation warrnings for partner > Logistics > getCourierPartnerScheme \n ${warrning}`,
|
|
1150
2275
|
});
|
|
1151
2276
|
}
|
|
1152
2277
|
|
|
1153
2278
|
const query_params = {};
|
|
1154
|
-
query_params["onboarding"] = onboarding;
|
|
1155
|
-
query_params["page_no"] = pageNo;
|
|
1156
|
-
query_params["page_size"] = pageSize;
|
|
1157
|
-
query_params["q"] = q;
|
|
1158
2279
|
|
|
1159
2280
|
const response = await PartnerAPIClient.execute(
|
|
1160
2281
|
this.config,
|
|
1161
2282
|
"get",
|
|
1162
|
-
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/
|
|
2283
|
+
`/service/partner/logistics/v2.0/organization/${this.config.organizationId}/courier-partner/scheme/${schemeId}`,
|
|
1163
2284
|
query_params,
|
|
1164
2285
|
undefined,
|
|
1165
2286
|
requestHeaders,
|
|
@@ -1173,10 +2294,10 @@ class Logistics {
|
|
|
1173
2294
|
|
|
1174
2295
|
const {
|
|
1175
2296
|
error: res_error,
|
|
1176
|
-
} = LogisticsPartnerModel.
|
|
1177
|
-
|
|
1178
|
-
allowUnknown: true
|
|
1179
|
-
|
|
2297
|
+
} = LogisticsPartnerModel.CourierPartnerV2SchemeModel().validate(
|
|
2298
|
+
responseData,
|
|
2299
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2300
|
+
);
|
|
1180
2301
|
|
|
1181
2302
|
if (res_error) {
|
|
1182
2303
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1184,7 +2305,7 @@ class Logistics {
|
|
|
1184
2305
|
} else {
|
|
1185
2306
|
Logger({
|
|
1186
2307
|
level: "WARN",
|
|
1187
|
-
message: `Response Validation Warnings for partner > Logistics >
|
|
2308
|
+
message: `Response Validation Warnings for partner > Logistics > getCourierPartnerScheme \n ${res_error}`,
|
|
1188
2309
|
});
|
|
1189
2310
|
}
|
|
1190
2311
|
}
|