@gofynd/fdk-client-javascript 1.6.4 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +100 -80
- package/sdk/application/Cart/CartApplicationClient.js +257 -126
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -21
- package/sdk/application/Content/ContentApplicationClient.js +250 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +106 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +326 -208
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +0 -10
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +0 -75
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +1 -54
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -43
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -6
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +251 -172
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +639 -521
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3150 -4468
- package/sdk/platform/Cart/CartPlatformModel.js +2858 -1867
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +976 -380
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6475 -2015
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1083 -162
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +884 -80
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +325 -568
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1162 -1562
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6008 -7688
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9522 -6892
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +234 -227
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +183 -177
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -238
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +876 -588
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +506 -270
- package/sdk/platform/Communication/CommunicationPlatformModel.js +611 -313
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +78 -77
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +97 -91
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1206 -459
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1011 -320
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +255 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1095 -464
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +871 -1315
- package/sdk/platform/Content/ContentPlatformModel.js +940 -599
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +486 -277
- package/sdk/platform/Order/OrderPlatformClient.js +1491 -938
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4560 -8636
- package/sdk/platform/Order/OrderPlatformModel.js +3604 -4056
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3531 -1292
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1504
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- 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 +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2188 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +394 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +342 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +150 -212
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +589 -1238
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3581 -2960
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3730 -1779
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +230 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +164 -287
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +11 -50
- package/sdk/platform/Share/SharePlatformModel.js +5 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +36 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +201 -58
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +28 -17
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +33 -16
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -11,24 +11,24 @@ class Logistic {
|
|
|
11
11
|
constructor(_conf) {
|
|
12
12
|
this._conf = _conf;
|
|
13
13
|
this._relativeUrls = {
|
|
14
|
+
createShipments:
|
|
15
|
+
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipments",
|
|
14
16
|
getAllCountries: "/service/application/logistics/v1.0/country-list",
|
|
15
17
|
getCountries: "/service/application/logistics/v2.0/countries",
|
|
16
18
|
getCountry:
|
|
17
19
|
"/service/application/logistics/v1.0/countries/{country_iso_code}",
|
|
18
|
-
getCourierPartners:
|
|
19
|
-
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
|
|
20
20
|
getDeliveryPromise:
|
|
21
21
|
"/service/application/logistics/v1.0/delivery-promise",
|
|
22
|
+
getGeoAreas:
|
|
23
|
+
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/geoareas",
|
|
22
24
|
getLocalities:
|
|
23
25
|
"/service/application/logistics/v1.0/localities/{locality_type}",
|
|
26
|
+
getLocalitiesByPrefix: "/service/application/logistics/v1.0/localities",
|
|
24
27
|
getLocality:
|
|
25
28
|
"/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
|
|
26
|
-
getLocations: "/service/application/logistics/v1.0/locations",
|
|
27
|
-
getOptimalLocations:
|
|
28
|
-
"/service/application/logistics/v1.0/reassign_stores",
|
|
29
29
|
getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
getZones:
|
|
31
|
+
"/service/application/logistics/v2.0/company/{company_id}/application/{application_id}/zones",
|
|
32
32
|
validateAddress:
|
|
33
33
|
"/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate",
|
|
34
34
|
};
|
|
@@ -51,16 +51,29 @@ class Logistic {
|
|
|
51
51
|
/**
|
|
52
52
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
53
53
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
54
|
-
* @returns {Promise<
|
|
55
|
-
* @name
|
|
56
|
-
* @summary:
|
|
57
|
-
* @description:
|
|
54
|
+
* @returns {Promise<GenerateShipmentsAndCourierPartnerResponse>} - Success response
|
|
55
|
+
* @name createShipments
|
|
56
|
+
* @summary: Create and return shipments.
|
|
57
|
+
* @description: Create and return shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/createShipments/).
|
|
58
58
|
*/
|
|
59
|
-
async
|
|
60
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
59
|
+
async createShipments(
|
|
60
|
+
{ companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
|
|
61
61
|
{ responseHeaders } = { responseHeaders: false }
|
|
62
62
|
) {
|
|
63
63
|
let invalidInput = [];
|
|
64
|
+
|
|
65
|
+
if (!companyId) {
|
|
66
|
+
invalidInput.push({
|
|
67
|
+
message: `The 'companyId' field is required.`,
|
|
68
|
+
path: ["companyId"],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (!applicationId) {
|
|
72
|
+
invalidInput.push({
|
|
73
|
+
message: `The 'applicationId' field is required.`,
|
|
74
|
+
path: ["applicationId"],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
64
77
|
if (invalidInput.length) {
|
|
65
78
|
const error = new Error();
|
|
66
79
|
error.message = "Missing required field";
|
|
@@ -74,13 +87,13 @@ class Logistic {
|
|
|
74
87
|
|
|
75
88
|
const response = await ApplicationAPIClient.execute(
|
|
76
89
|
this._conf,
|
|
77
|
-
"
|
|
90
|
+
"post",
|
|
78
91
|
constructUrl({
|
|
79
|
-
url: this._urls["
|
|
80
|
-
params: {},
|
|
92
|
+
url: this._urls["createShipments"],
|
|
93
|
+
params: { companyId, applicationId },
|
|
81
94
|
}),
|
|
82
95
|
query_params,
|
|
83
|
-
|
|
96
|
+
body,
|
|
84
97
|
{ ...xHeaders, ...requestHeaders },
|
|
85
98
|
{ responseHeaders }
|
|
86
99
|
);
|
|
@@ -96,21 +109,13 @@ class Logistic {
|
|
|
96
109
|
/**
|
|
97
110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
98
111
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
99
|
-
* @returns {Promise<
|
|
100
|
-
* @name
|
|
101
|
-
* @summary: Get countries
|
|
102
|
-
* @description:
|
|
112
|
+
* @returns {Promise<CountryListResponse>} - Success response
|
|
113
|
+
* @name getAllCountries
|
|
114
|
+
* @summary: Get deliverable countries
|
|
115
|
+
* @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/).
|
|
103
116
|
*/
|
|
104
|
-
async
|
|
105
|
-
{
|
|
106
|
-
onboarding,
|
|
107
|
-
pageNo,
|
|
108
|
-
pageSize,
|
|
109
|
-
q,
|
|
110
|
-
hierarchy,
|
|
111
|
-
phoneCode,
|
|
112
|
-
requestHeaders,
|
|
113
|
-
} = { requestHeaders: {} },
|
|
117
|
+
async getAllCountries(
|
|
118
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
114
119
|
{ responseHeaders } = { responseHeaders: false }
|
|
115
120
|
) {
|
|
116
121
|
let invalidInput = [];
|
|
@@ -122,12 +127,6 @@ class Logistic {
|
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
const query_params = {};
|
|
125
|
-
query_params["onboarding"] = onboarding;
|
|
126
|
-
query_params["page_no"] = pageNo;
|
|
127
|
-
query_params["page_size"] = pageSize;
|
|
128
|
-
query_params["q"] = q;
|
|
129
|
-
query_params["hierarchy"] = hierarchy;
|
|
130
|
-
query_params["phone_code"] = phoneCode;
|
|
131
130
|
|
|
132
131
|
const xHeaders = {};
|
|
133
132
|
|
|
@@ -135,7 +134,7 @@ class Logistic {
|
|
|
135
134
|
this._conf,
|
|
136
135
|
"get",
|
|
137
136
|
constructUrl({
|
|
138
|
-
url: this._urls["
|
|
137
|
+
url: this._urls["getAllCountries"],
|
|
139
138
|
params: {},
|
|
140
139
|
}),
|
|
141
140
|
query_params,
|
|
@@ -155,23 +154,18 @@ class Logistic {
|
|
|
155
154
|
/**
|
|
156
155
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
157
156
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
158
|
-
* @returns {Promise<
|
|
159
|
-
* @name
|
|
160
|
-
* @summary: Get
|
|
161
|
-
* @description:
|
|
157
|
+
* @returns {Promise<GetCountries>} - Success response
|
|
158
|
+
* @name getCountries
|
|
159
|
+
* @summary: Get all countries and associated data.
|
|
160
|
+
* @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
|
|
162
161
|
*/
|
|
163
|
-
async
|
|
164
|
-
{
|
|
162
|
+
async getCountries(
|
|
163
|
+
{ onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
164
|
+
requestHeaders: {},
|
|
165
|
+
},
|
|
165
166
|
{ responseHeaders } = { responseHeaders: false }
|
|
166
167
|
) {
|
|
167
168
|
let invalidInput = [];
|
|
168
|
-
|
|
169
|
-
if (!countryIsoCode) {
|
|
170
|
-
invalidInput.push({
|
|
171
|
-
message: `The 'countryIsoCode' field is required.`,
|
|
172
|
-
path: ["countryIsoCode"],
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
169
|
if (invalidInput.length) {
|
|
176
170
|
const error = new Error();
|
|
177
171
|
error.message = "Missing required field";
|
|
@@ -180,6 +174,11 @@ class Logistic {
|
|
|
180
174
|
}
|
|
181
175
|
|
|
182
176
|
const query_params = {};
|
|
177
|
+
query_params["onboard"] = onboard;
|
|
178
|
+
query_params["page_no"] = pageNo;
|
|
179
|
+
query_params["page_size"] = pageSize;
|
|
180
|
+
query_params["q"] = q;
|
|
181
|
+
query_params["hierarchy"] = hierarchy;
|
|
183
182
|
|
|
184
183
|
const xHeaders = {};
|
|
185
184
|
|
|
@@ -187,8 +186,8 @@ class Logistic {
|
|
|
187
186
|
this._conf,
|
|
188
187
|
"get",
|
|
189
188
|
constructUrl({
|
|
190
|
-
url: this._urls["
|
|
191
|
-
params: {
|
|
189
|
+
url: this._urls["getCountries"],
|
|
190
|
+
params: {},
|
|
192
191
|
}),
|
|
193
192
|
query_params,
|
|
194
193
|
undefined,
|
|
@@ -204,30 +203,61 @@ class Logistic {
|
|
|
204
203
|
return response;
|
|
205
204
|
}
|
|
206
205
|
|
|
206
|
+
/**
|
|
207
|
+
* @param {Object} arg - Arg object.
|
|
208
|
+
* @param {boolean} [arg.onboard] - Only fetch countries which allowed for
|
|
209
|
+
* onboard on Platform.
|
|
210
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
211
|
+
* page. Default value is 12
|
|
212
|
+
* @param {string} [arg.q] - The search string to search in the list of
|
|
213
|
+
* countries by name.
|
|
214
|
+
* @param {string} [arg.hierarchy] - The search filter to filter countries
|
|
215
|
+
* based on their available hierarchy.
|
|
216
|
+
* @returns {Paginator<GetCountries>}
|
|
217
|
+
* @summary: Get all countries and associated data.
|
|
218
|
+
* @description: Retrieve a list of countries for logistical purposes.
|
|
219
|
+
*/
|
|
220
|
+
getCountriesPaginator({ onboard, pageSize, q, hierarchy } = {}) {
|
|
221
|
+
const paginator = new Paginator();
|
|
222
|
+
const callback = async () => {
|
|
223
|
+
const pageId = paginator.nextId;
|
|
224
|
+
const pageNo = paginator.pageNo;
|
|
225
|
+
const pageType = "number";
|
|
226
|
+
const data = await this.getCountries({
|
|
227
|
+
onboard: onboard,
|
|
228
|
+
pageNo: pageNo,
|
|
229
|
+
pageSize: pageSize,
|
|
230
|
+
q: q,
|
|
231
|
+
hierarchy: hierarchy,
|
|
232
|
+
});
|
|
233
|
+
paginator.setPaginator({
|
|
234
|
+
hasNext: data.page.has_next ? true : false,
|
|
235
|
+
nextId: data.page.next_id,
|
|
236
|
+
});
|
|
237
|
+
return data;
|
|
238
|
+
};
|
|
239
|
+
paginator.setCallback(callback.bind(this));
|
|
240
|
+
return paginator;
|
|
241
|
+
}
|
|
242
|
+
|
|
207
243
|
/**
|
|
208
244
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
209
245
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
210
|
-
* @returns {Promise<
|
|
211
|
-
* @name
|
|
212
|
-
* @summary:
|
|
213
|
-
* @description: Get
|
|
246
|
+
* @returns {Promise<GetCountry>} - Success response
|
|
247
|
+
* @name getCountry
|
|
248
|
+
* @summary: Get country details
|
|
249
|
+
* @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
|
|
214
250
|
*/
|
|
215
|
-
async
|
|
216
|
-
{
|
|
251
|
+
async getCountry(
|
|
252
|
+
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
217
253
|
{ responseHeaders } = { responseHeaders: false }
|
|
218
254
|
) {
|
|
219
255
|
let invalidInput = [];
|
|
220
256
|
|
|
221
|
-
if (!
|
|
222
|
-
invalidInput.push({
|
|
223
|
-
message: `The 'companyId' field is required.`,
|
|
224
|
-
path: ["companyId"],
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
if (!applicationId) {
|
|
257
|
+
if (!countryIsoCode) {
|
|
228
258
|
invalidInput.push({
|
|
229
|
-
message: `The '
|
|
230
|
-
path: ["
|
|
259
|
+
message: `The 'countryIsoCode' field is required.`,
|
|
260
|
+
path: ["countryIsoCode"],
|
|
231
261
|
});
|
|
232
262
|
}
|
|
233
263
|
if (invalidInput.length) {
|
|
@@ -243,13 +273,13 @@ class Logistic {
|
|
|
243
273
|
|
|
244
274
|
const response = await ApplicationAPIClient.execute(
|
|
245
275
|
this._conf,
|
|
246
|
-
"
|
|
276
|
+
"get",
|
|
247
277
|
constructUrl({
|
|
248
|
-
url: this._urls["
|
|
249
|
-
params: {
|
|
278
|
+
url: this._urls["getCountry"],
|
|
279
|
+
params: { countryIsoCode },
|
|
250
280
|
}),
|
|
251
281
|
query_params,
|
|
252
|
-
|
|
282
|
+
undefined,
|
|
253
283
|
{ ...xHeaders, ...requestHeaders },
|
|
254
284
|
{ responseHeaders }
|
|
255
285
|
);
|
|
@@ -312,20 +342,24 @@ class Logistic {
|
|
|
312
342
|
/**
|
|
313
343
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
314
344
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
315
|
-
* @returns {Promise<
|
|
316
|
-
* @name
|
|
317
|
-
* @summary: Get
|
|
318
|
-
* @description:
|
|
345
|
+
* @returns {Promise<GeoAreaGetResponseBody>} - Success response
|
|
346
|
+
* @name getGeoAreas
|
|
347
|
+
* @summary: Get all geoareas in the current application.
|
|
348
|
+
* @description: Retrieves a listing view of created GeoAreas. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getGeoAreas/).
|
|
319
349
|
*/
|
|
320
|
-
async
|
|
350
|
+
async getGeoAreas(
|
|
321
351
|
{
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
state,
|
|
325
|
-
city,
|
|
326
|
-
pageNo,
|
|
352
|
+
applicationId,
|
|
353
|
+
companyId,
|
|
327
354
|
pageSize,
|
|
355
|
+
pageNo,
|
|
356
|
+
type,
|
|
357
|
+
isActive,
|
|
328
358
|
q,
|
|
359
|
+
countryIsoCode,
|
|
360
|
+
state,
|
|
361
|
+
city,
|
|
362
|
+
pincode,
|
|
329
363
|
sector,
|
|
330
364
|
requestHeaders,
|
|
331
365
|
} = { requestHeaders: {} },
|
|
@@ -333,10 +367,16 @@ class Logistic {
|
|
|
333
367
|
) {
|
|
334
368
|
let invalidInput = [];
|
|
335
369
|
|
|
336
|
-
if (!
|
|
370
|
+
if (!applicationId) {
|
|
337
371
|
invalidInput.push({
|
|
338
|
-
message: `The '
|
|
339
|
-
path: ["
|
|
372
|
+
message: `The 'applicationId' field is required.`,
|
|
373
|
+
path: ["applicationId"],
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
if (!companyId) {
|
|
377
|
+
invalidInput.push({
|
|
378
|
+
message: `The 'companyId' field is required.`,
|
|
379
|
+
path: ["companyId"],
|
|
340
380
|
});
|
|
341
381
|
}
|
|
342
382
|
if (invalidInput.length) {
|
|
@@ -347,12 +387,15 @@ class Logistic {
|
|
|
347
387
|
}
|
|
348
388
|
|
|
349
389
|
const query_params = {};
|
|
350
|
-
query_params["country"] = country;
|
|
351
|
-
query_params["state"] = state;
|
|
352
|
-
query_params["city"] = city;
|
|
353
|
-
query_params["page_no"] = pageNo;
|
|
354
390
|
query_params["page_size"] = pageSize;
|
|
391
|
+
query_params["page_no"] = pageNo;
|
|
392
|
+
query_params["type"] = type;
|
|
393
|
+
query_params["is_active"] = isActive;
|
|
355
394
|
query_params["q"] = q;
|
|
395
|
+
query_params["country_iso_code"] = countryIsoCode;
|
|
396
|
+
query_params["state"] = state;
|
|
397
|
+
query_params["city"] = city;
|
|
398
|
+
query_params["pincode"] = pincode;
|
|
356
399
|
query_params["sector"] = sector;
|
|
357
400
|
|
|
358
401
|
const xHeaders = {};
|
|
@@ -361,8 +404,8 @@ class Logistic {
|
|
|
361
404
|
this._conf,
|
|
362
405
|
"get",
|
|
363
406
|
constructUrl({
|
|
364
|
-
url: this._urls["
|
|
365
|
-
params: {
|
|
407
|
+
url: this._urls["getGeoAreas"],
|
|
408
|
+
params: { applicationId, companyId },
|
|
366
409
|
}),
|
|
367
410
|
query_params,
|
|
368
411
|
undefined,
|
|
@@ -381,15 +424,23 @@ class Logistic {
|
|
|
381
424
|
/**
|
|
382
425
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
383
426
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
384
|
-
* @returns {Promise<
|
|
385
|
-
* @name
|
|
386
|
-
* @summary: Get
|
|
387
|
-
* @description: Get
|
|
427
|
+
* @returns {Promise<GetLocalities>} - Success response
|
|
428
|
+
* @name getLocalities
|
|
429
|
+
* @summary: Get Localities
|
|
430
|
+
* @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
|
|
388
431
|
*/
|
|
389
|
-
async
|
|
390
|
-
{
|
|
391
|
-
|
|
392
|
-
|
|
432
|
+
async getLocalities(
|
|
433
|
+
{
|
|
434
|
+
localityType,
|
|
435
|
+
country,
|
|
436
|
+
state,
|
|
437
|
+
city,
|
|
438
|
+
pageNo,
|
|
439
|
+
pageSize,
|
|
440
|
+
q,
|
|
441
|
+
name,
|
|
442
|
+
requestHeaders,
|
|
443
|
+
} = { requestHeaders: {} },
|
|
393
444
|
{ responseHeaders } = { responseHeaders: false }
|
|
394
445
|
) {
|
|
395
446
|
let invalidInput = [];
|
|
@@ -400,12 +451,6 @@ class Logistic {
|
|
|
400
451
|
path: ["localityType"],
|
|
401
452
|
});
|
|
402
453
|
}
|
|
403
|
-
if (!localityValue) {
|
|
404
|
-
invalidInput.push({
|
|
405
|
-
message: `The 'localityValue' field is required.`,
|
|
406
|
-
path: ["localityValue"],
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
454
|
if (invalidInput.length) {
|
|
410
455
|
const error = new Error();
|
|
411
456
|
error.message = "Missing required field";
|
|
@@ -417,6 +462,10 @@ class Logistic {
|
|
|
417
462
|
query_params["country"] = country;
|
|
418
463
|
query_params["state"] = state;
|
|
419
464
|
query_params["city"] = city;
|
|
465
|
+
query_params["page_no"] = pageNo;
|
|
466
|
+
query_params["page_size"] = pageSize;
|
|
467
|
+
query_params["q"] = q;
|
|
468
|
+
query_params["name"] = name;
|
|
420
469
|
|
|
421
470
|
const xHeaders = {};
|
|
422
471
|
|
|
@@ -424,8 +473,8 @@ class Logistic {
|
|
|
424
473
|
this._conf,
|
|
425
474
|
"get",
|
|
426
475
|
constructUrl({
|
|
427
|
-
url: this._urls["
|
|
428
|
-
params: { localityType
|
|
476
|
+
url: this._urls["getLocalities"],
|
|
477
|
+
params: { localityType },
|
|
429
478
|
}),
|
|
430
479
|
query_params,
|
|
431
480
|
undefined,
|
|
@@ -441,41 +490,73 @@ class Logistic {
|
|
|
441
490
|
return response;
|
|
442
491
|
}
|
|
443
492
|
|
|
493
|
+
/**
|
|
494
|
+
* @param {Object} arg - Arg object.
|
|
495
|
+
* @param {string} arg.localityType - Unique geographical division.
|
|
496
|
+
* @param {string} [arg.country] - Country name.
|
|
497
|
+
* @param {string} [arg.state] - State or the province.
|
|
498
|
+
* @param {string} [arg.city] - City.
|
|
499
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
500
|
+
* page. Default value is 12.
|
|
501
|
+
* @param {string} [arg.q] - This parameter is used to filter or search the records.
|
|
502
|
+
* @param {string} [arg.name] - Search for localities. Either provide a full
|
|
503
|
+
* name or a search term.
|
|
504
|
+
* @returns {Paginator<GetLocalities>}
|
|
505
|
+
* @summary: Get Localities
|
|
506
|
+
* @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state.
|
|
507
|
+
*/
|
|
508
|
+
getLocalitiesPaginator({
|
|
509
|
+
localityType,
|
|
510
|
+
country,
|
|
511
|
+
state,
|
|
512
|
+
city,
|
|
513
|
+
pageSize,
|
|
514
|
+
q,
|
|
515
|
+
name,
|
|
516
|
+
} = {}) {
|
|
517
|
+
const paginator = new Paginator();
|
|
518
|
+
const callback = async () => {
|
|
519
|
+
const pageId = paginator.nextId;
|
|
520
|
+
const pageNo = paginator.pageNo;
|
|
521
|
+
const pageType = "number";
|
|
522
|
+
const data = await this.getLocalities({
|
|
523
|
+
localityType: localityType,
|
|
524
|
+
country: country,
|
|
525
|
+
state: state,
|
|
526
|
+
city: city,
|
|
527
|
+
pageNo: pageNo,
|
|
528
|
+
pageSize: pageSize,
|
|
529
|
+
q: q,
|
|
530
|
+
name: name,
|
|
531
|
+
});
|
|
532
|
+
paginator.setPaginator({
|
|
533
|
+
hasNext: data.page.has_next ? true : false,
|
|
534
|
+
nextId: data.page.next_id,
|
|
535
|
+
});
|
|
536
|
+
return data;
|
|
537
|
+
};
|
|
538
|
+
paginator.setCallback(callback.bind(this));
|
|
539
|
+
return paginator;
|
|
540
|
+
}
|
|
541
|
+
|
|
444
542
|
/**
|
|
445
543
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
446
544
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
447
|
-
* @returns {Promise<
|
|
448
|
-
* @name
|
|
449
|
-
* @summary: Get
|
|
450
|
-
* @description: Get
|
|
545
|
+
* @returns {Promise<GetLocalities>} - Success response
|
|
546
|
+
* @name getLocalitiesByPrefix
|
|
547
|
+
* @summary: Get Localities by Name Prefix
|
|
548
|
+
* @description: Get localities that start with a specified prefix. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalitiesByPrefix/).
|
|
451
549
|
*/
|
|
452
|
-
async
|
|
453
|
-
{
|
|
454
|
-
xApplicationId,
|
|
455
|
-
xApplicationData,
|
|
456
|
-
country,
|
|
457
|
-
state,
|
|
458
|
-
city,
|
|
459
|
-
pincode,
|
|
460
|
-
sector,
|
|
461
|
-
pageNo,
|
|
462
|
-
pageSize,
|
|
463
|
-
requestHeaders,
|
|
464
|
-
} = { requestHeaders: {} },
|
|
550
|
+
async getLocalitiesByPrefix(
|
|
551
|
+
{ companyId, pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
465
552
|
{ responseHeaders } = { responseHeaders: false }
|
|
466
553
|
) {
|
|
467
554
|
let invalidInput = [];
|
|
468
555
|
|
|
469
|
-
if (!
|
|
470
|
-
invalidInput.push({
|
|
471
|
-
message: `The 'xApplicationId' field is required.`,
|
|
472
|
-
path: ["xApplicationId"],
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
if (!xApplicationData) {
|
|
556
|
+
if (!companyId) {
|
|
476
557
|
invalidInput.push({
|
|
477
|
-
message: `The '
|
|
478
|
-
path: ["
|
|
558
|
+
message: `The 'companyId' field is required.`,
|
|
559
|
+
path: ["companyId"],
|
|
479
560
|
});
|
|
480
561
|
}
|
|
481
562
|
if (invalidInput.length) {
|
|
@@ -486,15 +567,9 @@ class Logistic {
|
|
|
486
567
|
}
|
|
487
568
|
|
|
488
569
|
const query_params = {};
|
|
489
|
-
query_params["x-application-id"] = xApplicationId;
|
|
490
|
-
query_params["x-application-data"] = xApplicationData;
|
|
491
|
-
query_params["country"] = country;
|
|
492
|
-
query_params["state"] = state;
|
|
493
|
-
query_params["city"] = city;
|
|
494
|
-
query_params["pincode"] = pincode;
|
|
495
|
-
query_params["sector"] = sector;
|
|
496
570
|
query_params["page_no"] = pageNo;
|
|
497
571
|
query_params["page_size"] = pageSize;
|
|
572
|
+
query_params["q"] = q;
|
|
498
573
|
|
|
499
574
|
const xHeaders = {};
|
|
500
575
|
|
|
@@ -502,8 +577,8 @@ class Logistic {
|
|
|
502
577
|
this._conf,
|
|
503
578
|
"get",
|
|
504
579
|
constructUrl({
|
|
505
|
-
url: this._urls["
|
|
506
|
-
params: {},
|
|
580
|
+
url: this._urls["getLocalitiesByPrefix"],
|
|
581
|
+
params: { companyId },
|
|
507
582
|
}),
|
|
508
583
|
query_params,
|
|
509
584
|
undefined,
|
|
@@ -519,19 +594,65 @@ class Logistic {
|
|
|
519
594
|
return response;
|
|
520
595
|
}
|
|
521
596
|
|
|
597
|
+
/**
|
|
598
|
+
* @param {Object} arg - Arg object.
|
|
599
|
+
* @param {number} arg.companyId - The unique identifier of the company.
|
|
600
|
+
* @param {number} [arg.pageSize] - Number of items per page.
|
|
601
|
+
* @param {string} [arg.q] - Localities starting with the specified prefix.
|
|
602
|
+
* @returns {Paginator<GetLocalities>}
|
|
603
|
+
* @summary: Get Localities by Name Prefix
|
|
604
|
+
* @description: Get localities that start with a specified prefix.
|
|
605
|
+
*/
|
|
606
|
+
getLocalitiesByPrefixPaginator({ companyId, pageSize, q } = {}) {
|
|
607
|
+
const paginator = new Paginator();
|
|
608
|
+
const callback = async () => {
|
|
609
|
+
const pageId = paginator.nextId;
|
|
610
|
+
const pageNo = paginator.pageNo;
|
|
611
|
+
const pageType = "number";
|
|
612
|
+
const data = await this.getLocalitiesByPrefix({
|
|
613
|
+
companyId: companyId,
|
|
614
|
+
pageNo: pageNo,
|
|
615
|
+
pageSize: pageSize,
|
|
616
|
+
q: q,
|
|
617
|
+
});
|
|
618
|
+
paginator.setPaginator({
|
|
619
|
+
hasNext: data.page.has_next ? true : false,
|
|
620
|
+
nextId: data.page.next_id,
|
|
621
|
+
});
|
|
622
|
+
return data;
|
|
623
|
+
};
|
|
624
|
+
paginator.setCallback(callback.bind(this));
|
|
625
|
+
return paginator;
|
|
626
|
+
}
|
|
627
|
+
|
|
522
628
|
/**
|
|
523
629
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
524
630
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
525
|
-
* @returns {Promise<
|
|
526
|
-
* @name
|
|
527
|
-
* @summary: Get
|
|
528
|
-
* @description: Get
|
|
631
|
+
* @returns {Promise<GetLocality>} - Success response
|
|
632
|
+
* @name getLocality
|
|
633
|
+
* @summary: Get locality detail
|
|
634
|
+
* @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
|
|
529
635
|
*/
|
|
530
|
-
async
|
|
531
|
-
{
|
|
636
|
+
async getLocality(
|
|
637
|
+
{ localityType, localityValue, country, state, city, requestHeaders } = {
|
|
638
|
+
requestHeaders: {},
|
|
639
|
+
},
|
|
532
640
|
{ responseHeaders } = { responseHeaders: false }
|
|
533
641
|
) {
|
|
534
642
|
let invalidInput = [];
|
|
643
|
+
|
|
644
|
+
if (!localityType) {
|
|
645
|
+
invalidInput.push({
|
|
646
|
+
message: `The 'localityType' field is required.`,
|
|
647
|
+
path: ["localityType"],
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
if (!localityValue) {
|
|
651
|
+
invalidInput.push({
|
|
652
|
+
message: `The 'localityValue' field is required.`,
|
|
653
|
+
path: ["localityValue"],
|
|
654
|
+
});
|
|
655
|
+
}
|
|
535
656
|
if (invalidInput.length) {
|
|
536
657
|
const error = new Error();
|
|
537
658
|
error.message = "Missing required field";
|
|
@@ -540,18 +661,21 @@ class Logistic {
|
|
|
540
661
|
}
|
|
541
662
|
|
|
542
663
|
const query_params = {};
|
|
664
|
+
query_params["country"] = country;
|
|
665
|
+
query_params["state"] = state;
|
|
666
|
+
query_params["city"] = city;
|
|
543
667
|
|
|
544
668
|
const xHeaders = {};
|
|
545
669
|
|
|
546
670
|
const response = await ApplicationAPIClient.execute(
|
|
547
671
|
this._conf,
|
|
548
|
-
"
|
|
672
|
+
"get",
|
|
549
673
|
constructUrl({
|
|
550
|
-
url: this._urls["
|
|
551
|
-
params: {},
|
|
674
|
+
url: this._urls["getLocality"],
|
|
675
|
+
params: { localityType, localityValue },
|
|
552
676
|
}),
|
|
553
677
|
query_params,
|
|
554
|
-
|
|
678
|
+
undefined,
|
|
555
679
|
{ ...xHeaders, ...requestHeaders },
|
|
556
680
|
{ responseHeaders }
|
|
557
681
|
);
|
|
@@ -567,9 +691,9 @@ class Logistic {
|
|
|
567
691
|
/**
|
|
568
692
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
569
693
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
570
|
-
* @returns {Promise<
|
|
694
|
+
* @returns {Promise<PincodeApiResponse>} - Success response
|
|
571
695
|
* @name getPincodeCity
|
|
572
|
-
* @summary: Get
|
|
696
|
+
* @summary: Get Pincode API
|
|
573
697
|
* @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
|
|
574
698
|
*/
|
|
575
699
|
async getPincodeCity(
|
|
@@ -619,61 +743,44 @@ class Logistic {
|
|
|
619
743
|
/**
|
|
620
744
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
621
745
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
622
|
-
* @returns {Promise<
|
|
623
|
-
* @name
|
|
624
|
-
* @summary:
|
|
625
|
-
* @description:
|
|
746
|
+
* @returns {Promise<ListViewResponseV2>} - Success response
|
|
747
|
+
* @name getZones
|
|
748
|
+
* @summary: Shows zones defined at the application level
|
|
749
|
+
* @description: Displays the list of zones defined at the application level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getZones/).
|
|
626
750
|
*/
|
|
627
|
-
async
|
|
628
|
-
{
|
|
751
|
+
async getZones(
|
|
752
|
+
{
|
|
753
|
+
companyId,
|
|
754
|
+
applicationId,
|
|
755
|
+
stage,
|
|
756
|
+
type,
|
|
757
|
+
pageSize,
|
|
758
|
+
pageNo,
|
|
759
|
+
isActive,
|
|
760
|
+
q,
|
|
761
|
+
countryIsoCode,
|
|
762
|
+
pincode,
|
|
763
|
+
state,
|
|
764
|
+
city,
|
|
765
|
+
sector,
|
|
766
|
+
requestHeaders,
|
|
767
|
+
} = { requestHeaders: {} },
|
|
629
768
|
{ responseHeaders } = { responseHeaders: false }
|
|
630
769
|
) {
|
|
631
770
|
let invalidInput = [];
|
|
632
|
-
if (invalidInput.length) {
|
|
633
|
-
const error = new Error();
|
|
634
|
-
error.message = "Missing required field";
|
|
635
|
-
error.details = invalidInput;
|
|
636
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
const query_params = {};
|
|
640
|
-
|
|
641
|
-
const xHeaders = {};
|
|
642
|
-
|
|
643
|
-
const response = await ApplicationAPIClient.execute(
|
|
644
|
-
this._conf,
|
|
645
|
-
"post",
|
|
646
|
-
constructUrl({
|
|
647
|
-
url: this._urls["getPincodeZones"],
|
|
648
|
-
params: {},
|
|
649
|
-
}),
|
|
650
|
-
query_params,
|
|
651
|
-
body,
|
|
652
|
-
{ ...xHeaders, ...requestHeaders },
|
|
653
|
-
{ responseHeaders }
|
|
654
|
-
);
|
|
655
771
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
772
|
+
if (!companyId) {
|
|
773
|
+
invalidInput.push({
|
|
774
|
+
message: `The 'companyId' field is required.`,
|
|
775
|
+
path: ["companyId"],
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
if (!applicationId) {
|
|
779
|
+
invalidInput.push({
|
|
780
|
+
message: `The 'applicationId' field is required.`,
|
|
781
|
+
path: ["applicationId"],
|
|
782
|
+
});
|
|
659
783
|
}
|
|
660
|
-
|
|
661
|
-
return response;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
666
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
667
|
-
* @returns {Promise<TATViewResult>} - Success response
|
|
668
|
-
* @name getTatProduct
|
|
669
|
-
* @summary: Get product's turnaround time
|
|
670
|
-
* @description: Get the estimated delivery time frame for a specific product from a designated store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/).
|
|
671
|
-
*/
|
|
672
|
-
async getTatProduct(
|
|
673
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
674
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
675
|
-
) {
|
|
676
|
-
let invalidInput = [];
|
|
677
784
|
if (invalidInput.length) {
|
|
678
785
|
const error = new Error();
|
|
679
786
|
error.message = "Missing required field";
|
|
@@ -682,18 +789,29 @@ class Logistic {
|
|
|
682
789
|
}
|
|
683
790
|
|
|
684
791
|
const query_params = {};
|
|
792
|
+
query_params["stage"] = stage;
|
|
793
|
+
query_params["type"] = type;
|
|
794
|
+
query_params["page_size"] = pageSize;
|
|
795
|
+
query_params["page_no"] = pageNo;
|
|
796
|
+
query_params["is_active"] = isActive;
|
|
797
|
+
query_params["q"] = q;
|
|
798
|
+
query_params["country_iso_code"] = countryIsoCode;
|
|
799
|
+
query_params["pincode"] = pincode;
|
|
800
|
+
query_params["state"] = state;
|
|
801
|
+
query_params["city"] = city;
|
|
802
|
+
query_params["sector"] = sector;
|
|
685
803
|
|
|
686
804
|
const xHeaders = {};
|
|
687
805
|
|
|
688
806
|
const response = await ApplicationAPIClient.execute(
|
|
689
807
|
this._conf,
|
|
690
|
-
"
|
|
808
|
+
"get",
|
|
691
809
|
constructUrl({
|
|
692
|
-
url: this._urls["
|
|
693
|
-
params: {},
|
|
810
|
+
url: this._urls["getZones"],
|
|
811
|
+
params: { companyId, applicationId },
|
|
694
812
|
}),
|
|
695
813
|
query_params,
|
|
696
|
-
|
|
814
|
+
undefined,
|
|
697
815
|
{ ...xHeaders, ...requestHeaders },
|
|
698
816
|
{ responseHeaders }
|
|
699
817
|
);
|
|
@@ -709,7 +827,7 @@ class Logistic {
|
|
|
709
827
|
/**
|
|
710
828
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
711
829
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
712
|
-
* @returns {Promise<
|
|
830
|
+
* @returns {Promise<ValidateAddressRequest>} - Success response
|
|
713
831
|
* @name validateAddress
|
|
714
832
|
* @summary: Validate address
|
|
715
833
|
* @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
|