@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- 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/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -6,26 +6,25 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Logistic {
|
|
11
12
|
constructor(_conf) {
|
|
12
13
|
this._conf = _conf;
|
|
13
14
|
this._relativeUrls = {
|
|
14
|
-
createShipments:
|
|
15
|
-
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipments",
|
|
16
15
|
getAllCountries: "/service/application/logistics/v1.0/country-list",
|
|
17
16
|
getCountries: "/service/application/logistics/v2.0/countries",
|
|
18
17
|
getCountry:
|
|
19
18
|
"/service/application/logistics/v1.0/countries/{country_iso_code}",
|
|
20
|
-
|
|
21
|
-
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/
|
|
19
|
+
getCourierPartners:
|
|
20
|
+
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
|
|
21
|
+
getDeliveryPromise:
|
|
22
|
+
"/service/application/logistics/v1.0/delivery-promise",
|
|
22
23
|
getLocalities:
|
|
23
24
|
"/service/application/logistics/v1.0/localities/{locality_type}",
|
|
24
25
|
getLocality:
|
|
25
26
|
"/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
|
|
26
27
|
getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
|
|
27
|
-
getZones:
|
|
28
|
-
"/service/application/logistics/v2.0/company/{company_id}/application/{application_id}/zones",
|
|
29
28
|
validateAddress:
|
|
30
29
|
"/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate",
|
|
31
30
|
};
|
|
@@ -48,49 +47,28 @@ class Logistic {
|
|
|
48
47
|
/**
|
|
49
48
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
50
49
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
51
|
-
* @returns {Promise<
|
|
52
|
-
* @name
|
|
53
|
-
* @summary:
|
|
54
|
-
* @description:
|
|
50
|
+
* @returns {Promise<CountryResult>} - Success response
|
|
51
|
+
* @name getAllCountries
|
|
52
|
+
* @summary: Get deliverable countries
|
|
53
|
+
* @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/).
|
|
55
54
|
*/
|
|
56
|
-
async
|
|
57
|
-
{
|
|
55
|
+
async getAllCountries(
|
|
56
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
58
57
|
{ responseHeaders } = { responseHeaders: false }
|
|
59
58
|
) {
|
|
60
|
-
let invalidInput = [];
|
|
61
|
-
|
|
62
|
-
if (!companyId) {
|
|
63
|
-
invalidInput.push({
|
|
64
|
-
message: `The 'companyId' field is required.`,
|
|
65
|
-
path: ["companyId"],
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
if (!applicationId) {
|
|
69
|
-
invalidInput.push({
|
|
70
|
-
message: `The 'applicationId' field is required.`,
|
|
71
|
-
path: ["applicationId"],
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (invalidInput.length) {
|
|
75
|
-
const error = new Error();
|
|
76
|
-
error.message = "Missing required field";
|
|
77
|
-
error.details = invalidInput;
|
|
78
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
59
|
const query_params = {};
|
|
82
60
|
|
|
83
61
|
const xHeaders = {};
|
|
84
62
|
|
|
85
63
|
const response = await ApplicationAPIClient.execute(
|
|
86
64
|
this._conf,
|
|
87
|
-
"
|
|
65
|
+
"get",
|
|
88
66
|
constructUrl({
|
|
89
|
-
url: this._urls["
|
|
90
|
-
params: {
|
|
67
|
+
url: this._urls["getAllCountries"],
|
|
68
|
+
params: {},
|
|
91
69
|
}),
|
|
92
70
|
query_params,
|
|
93
|
-
|
|
71
|
+
undefined,
|
|
94
72
|
{ ...xHeaders, ...requestHeaders },
|
|
95
73
|
{ responseHeaders }
|
|
96
74
|
);
|
|
@@ -106,24 +84,30 @@ class Logistic {
|
|
|
106
84
|
/**
|
|
107
85
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
108
86
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
109
|
-
* @returns {Promise<
|
|
110
|
-
* @name
|
|
111
|
-
* @summary: Get
|
|
112
|
-
* @description:
|
|
87
|
+
* @returns {Promise<GetCountries>} - Success response
|
|
88
|
+
* @name getCountries
|
|
89
|
+
* @summary: Get countries
|
|
90
|
+
* @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
|
|
113
91
|
*/
|
|
114
|
-
async
|
|
115
|
-
{
|
|
92
|
+
async getCountries(
|
|
93
|
+
{
|
|
94
|
+
onboarding,
|
|
95
|
+
pageNo,
|
|
96
|
+
pageSize,
|
|
97
|
+
q,
|
|
98
|
+
hierarchy,
|
|
99
|
+
phoneCode,
|
|
100
|
+
requestHeaders,
|
|
101
|
+
} = { requestHeaders: {} },
|
|
116
102
|
{ responseHeaders } = { responseHeaders: false }
|
|
117
103
|
) {
|
|
118
|
-
let invalidInput = [];
|
|
119
|
-
if (invalidInput.length) {
|
|
120
|
-
const error = new Error();
|
|
121
|
-
error.message = "Missing required field";
|
|
122
|
-
error.details = invalidInput;
|
|
123
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
104
|
const query_params = {};
|
|
105
|
+
query_params["onboarding"] = onboarding;
|
|
106
|
+
query_params["page_no"] = pageNo;
|
|
107
|
+
query_params["page_size"] = pageSize;
|
|
108
|
+
query_params["q"] = q;
|
|
109
|
+
query_params["hierarchy"] = hierarchy;
|
|
110
|
+
query_params["phone_code"] = phoneCode;
|
|
127
111
|
|
|
128
112
|
const xHeaders = {};
|
|
129
113
|
|
|
@@ -131,7 +115,7 @@ class Logistic {
|
|
|
131
115
|
this._conf,
|
|
132
116
|
"get",
|
|
133
117
|
constructUrl({
|
|
134
|
-
url: this._urls["
|
|
118
|
+
url: this._urls["getCountries"],
|
|
135
119
|
params: {},
|
|
136
120
|
}),
|
|
137
121
|
query_params,
|
|
@@ -151,31 +135,25 @@ class Logistic {
|
|
|
151
135
|
/**
|
|
152
136
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
153
137
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
154
|
-
* @returns {Promise<
|
|
155
|
-
* @name
|
|
156
|
-
* @summary: Get
|
|
157
|
-
* @description:
|
|
138
|
+
* @returns {Promise<GetCountry>} - Success response
|
|
139
|
+
* @name getCountry
|
|
140
|
+
* @summary: Get country details
|
|
141
|
+
* @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/).
|
|
158
142
|
*/
|
|
159
|
-
async
|
|
160
|
-
{
|
|
161
|
-
requestHeaders: {},
|
|
162
|
-
},
|
|
143
|
+
async getCountry(
|
|
144
|
+
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
163
145
|
{ responseHeaders } = { responseHeaders: false }
|
|
164
146
|
) {
|
|
165
|
-
|
|
166
|
-
if (
|
|
167
|
-
const error = new
|
|
168
|
-
|
|
169
|
-
|
|
147
|
+
const errors = validateRequiredParams(arguments[0], ["countryIsoCode"]);
|
|
148
|
+
if (errors.length > 0) {
|
|
149
|
+
const error = new FDKClientValidationError({
|
|
150
|
+
message: "Missing required field",
|
|
151
|
+
details: errors,
|
|
152
|
+
});
|
|
170
153
|
return Promise.reject(new FDKClientValidationError(error));
|
|
171
154
|
}
|
|
172
155
|
|
|
173
156
|
const query_params = {};
|
|
174
|
-
query_params["onboard"] = onboard;
|
|
175
|
-
query_params["page_no"] = pageNo;
|
|
176
|
-
query_params["page_size"] = pageSize;
|
|
177
|
-
query_params["q"] = q;
|
|
178
|
-
query_params["hierarchy"] = hierarchy;
|
|
179
157
|
|
|
180
158
|
const xHeaders = {};
|
|
181
159
|
|
|
@@ -183,8 +161,8 @@ class Logistic {
|
|
|
183
161
|
this._conf,
|
|
184
162
|
"get",
|
|
185
163
|
constructUrl({
|
|
186
|
-
url: this._urls["
|
|
187
|
-
params: {},
|
|
164
|
+
url: this._urls["getCountry"],
|
|
165
|
+
params: { countryIsoCode },
|
|
188
166
|
}),
|
|
189
167
|
query_params,
|
|
190
168
|
undefined,
|
|
@@ -200,67 +178,27 @@ class Logistic {
|
|
|
200
178
|
return response;
|
|
201
179
|
}
|
|
202
180
|
|
|
203
|
-
/**
|
|
204
|
-
* @param {Object} arg - Arg object.
|
|
205
|
-
* @param {boolean} [arg.onboard] - Only fetch countries which allowed for
|
|
206
|
-
* onboard on Platform.
|
|
207
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
208
|
-
* page. Default value is 12
|
|
209
|
-
* @param {string} [arg.q] - The search string to search in the list of
|
|
210
|
-
* countries by name.
|
|
211
|
-
* @param {string} [arg.hierarchy] - The search filter to filter countries
|
|
212
|
-
* based on their available hierarchy.
|
|
213
|
-
* @returns {Paginator<GetCountries>}
|
|
214
|
-
* @summary: Get all countries and associated data.
|
|
215
|
-
* @description: Retrieve a list of countries for logistical purposes.
|
|
216
|
-
*/
|
|
217
|
-
getCountriesPaginator({ onboard, pageSize, q, hierarchy } = {}) {
|
|
218
|
-
const paginator = new Paginator();
|
|
219
|
-
const callback = async () => {
|
|
220
|
-
const pageId = paginator.nextId;
|
|
221
|
-
const pageNo = paginator.pageNo;
|
|
222
|
-
const pageType = "number";
|
|
223
|
-
const data = await this.getCountries({
|
|
224
|
-
onboard: onboard,
|
|
225
|
-
pageNo: pageNo,
|
|
226
|
-
pageSize: pageSize,
|
|
227
|
-
q: q,
|
|
228
|
-
hierarchy: hierarchy,
|
|
229
|
-
});
|
|
230
|
-
paginator.setPaginator({
|
|
231
|
-
hasNext: data.page.has_next ? true : false,
|
|
232
|
-
nextId: data.page.next_id,
|
|
233
|
-
});
|
|
234
|
-
return data;
|
|
235
|
-
};
|
|
236
|
-
paginator.setCallback(callback.bind(this));
|
|
237
|
-
return paginator;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
181
|
/**
|
|
241
182
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
242
183
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
243
|
-
* @returns {Promise<
|
|
244
|
-
* @name
|
|
245
|
-
* @summary:
|
|
246
|
-
* @description: Get
|
|
184
|
+
* @returns {Promise<ShipmentCourierPartnerResult>} - Success response
|
|
185
|
+
* @name getCourierPartners
|
|
186
|
+
* @summary: Serviceable Courier Partners
|
|
187
|
+
* @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/).
|
|
247
188
|
*/
|
|
248
|
-
async
|
|
249
|
-
{
|
|
189
|
+
async getCourierPartners(
|
|
190
|
+
{ companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
|
|
250
191
|
{ responseHeaders } = { responseHeaders: false }
|
|
251
192
|
) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
193
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
194
|
+
"companyId",
|
|
195
|
+
"applicationId",
|
|
196
|
+
]);
|
|
197
|
+
if (errors.length > 0) {
|
|
198
|
+
const error = new FDKClientValidationError({
|
|
199
|
+
message: "Missing required field",
|
|
200
|
+
details: errors,
|
|
258
201
|
});
|
|
259
|
-
}
|
|
260
|
-
if (invalidInput.length) {
|
|
261
|
-
const error = new Error();
|
|
262
|
-
error.message = "Missing required field";
|
|
263
|
-
error.details = invalidInput;
|
|
264
202
|
return Promise.reject(new FDKClientValidationError(error));
|
|
265
203
|
}
|
|
266
204
|
|
|
@@ -270,13 +208,13 @@ class Logistic {
|
|
|
270
208
|
|
|
271
209
|
const response = await ApplicationAPIClient.execute(
|
|
272
210
|
this._conf,
|
|
273
|
-
"
|
|
211
|
+
"post",
|
|
274
212
|
constructUrl({
|
|
275
|
-
url: this._urls["
|
|
276
|
-
params: {
|
|
213
|
+
url: this._urls["getCourierPartners"],
|
|
214
|
+
params: { companyId, applicationId },
|
|
277
215
|
}),
|
|
278
216
|
query_params,
|
|
279
|
-
|
|
217
|
+
body,
|
|
280
218
|
{ ...xHeaders, ...requestHeaders },
|
|
281
219
|
{ responseHeaders }
|
|
282
220
|
);
|
|
@@ -292,70 +230,31 @@ class Logistic {
|
|
|
292
230
|
/**
|
|
293
231
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
294
232
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
295
|
-
* @returns {Promise<
|
|
296
|
-
* @name
|
|
297
|
-
* @summary: Get
|
|
298
|
-
* @description:
|
|
233
|
+
* @returns {Promise<GetPromiseDetails>} - Success response
|
|
234
|
+
* @name getDeliveryPromise
|
|
235
|
+
* @summary: Get delivery promise
|
|
236
|
+
* @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/).
|
|
299
237
|
*/
|
|
300
|
-
async
|
|
301
|
-
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
pageSize,
|
|
305
|
-
pageNo,
|
|
306
|
-
type,
|
|
307
|
-
isActive,
|
|
308
|
-
q,
|
|
309
|
-
countryIsoCode,
|
|
310
|
-
state,
|
|
311
|
-
city,
|
|
312
|
-
pincode,
|
|
313
|
-
sector,
|
|
314
|
-
requestHeaders,
|
|
315
|
-
} = { requestHeaders: {} },
|
|
238
|
+
async getDeliveryPromise(
|
|
239
|
+
{ xLocationDetail, xApplicationData, pageNo, pageSize, requestHeaders } = {
|
|
240
|
+
requestHeaders: {},
|
|
241
|
+
},
|
|
316
242
|
{ responseHeaders } = { responseHeaders: false }
|
|
317
243
|
) {
|
|
318
|
-
let invalidInput = [];
|
|
319
|
-
|
|
320
|
-
if (!applicationId) {
|
|
321
|
-
invalidInput.push({
|
|
322
|
-
message: `The 'applicationId' field is required.`,
|
|
323
|
-
path: ["applicationId"],
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
if (!companyId) {
|
|
327
|
-
invalidInput.push({
|
|
328
|
-
message: `The 'companyId' field is required.`,
|
|
329
|
-
path: ["companyId"],
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
if (invalidInput.length) {
|
|
333
|
-
const error = new Error();
|
|
334
|
-
error.message = "Missing required field";
|
|
335
|
-
error.details = invalidInput;
|
|
336
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
337
|
-
}
|
|
338
|
-
|
|
339
244
|
const query_params = {};
|
|
340
|
-
query_params["page_size"] = pageSize;
|
|
341
245
|
query_params["page_no"] = pageNo;
|
|
342
|
-
query_params["
|
|
343
|
-
query_params["is_active"] = isActive;
|
|
344
|
-
query_params["q"] = q;
|
|
345
|
-
query_params["country_iso_code"] = countryIsoCode;
|
|
346
|
-
query_params["state"] = state;
|
|
347
|
-
query_params["city"] = city;
|
|
348
|
-
query_params["pincode"] = pincode;
|
|
349
|
-
query_params["sector"] = sector;
|
|
246
|
+
query_params["page_size"] = pageSize;
|
|
350
247
|
|
|
351
248
|
const xHeaders = {};
|
|
249
|
+
xHeaders["x-location-detail"] = xLocationDetail;
|
|
250
|
+
xHeaders["x-application-data"] = xApplicationData;
|
|
352
251
|
|
|
353
252
|
const response = await ApplicationAPIClient.execute(
|
|
354
253
|
this._conf,
|
|
355
254
|
"get",
|
|
356
255
|
constructUrl({
|
|
357
|
-
url: this._urls["
|
|
358
|
-
params: {
|
|
256
|
+
url: this._urls["getDeliveryPromise"],
|
|
257
|
+
params: {},
|
|
359
258
|
}),
|
|
360
259
|
query_params,
|
|
361
260
|
undefined,
|
|
@@ -374,10 +273,10 @@ class Logistic {
|
|
|
374
273
|
/**
|
|
375
274
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
376
275
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
377
|
-
* @returns {Promise<
|
|
276
|
+
* @returns {Promise<GetLocalitiesApp>} - Success response
|
|
378
277
|
* @name getLocalities
|
|
379
278
|
* @summary: Get Localities
|
|
380
|
-
* @description: Get
|
|
279
|
+
* @description: Get Localities data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
|
|
381
280
|
*/
|
|
382
281
|
async getLocalities(
|
|
383
282
|
{
|
|
@@ -388,23 +287,17 @@ class Logistic {
|
|
|
388
287
|
pageNo,
|
|
389
288
|
pageSize,
|
|
390
289
|
q,
|
|
391
|
-
|
|
290
|
+
sector,
|
|
392
291
|
requestHeaders,
|
|
393
292
|
} = { requestHeaders: {} },
|
|
394
293
|
{ responseHeaders } = { responseHeaders: false }
|
|
395
294
|
) {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
path: ["localityType"],
|
|
295
|
+
const errors = validateRequiredParams(arguments[0], ["localityType"]);
|
|
296
|
+
if (errors.length > 0) {
|
|
297
|
+
const error = new FDKClientValidationError({
|
|
298
|
+
message: "Missing required field",
|
|
299
|
+
details: errors,
|
|
402
300
|
});
|
|
403
|
-
}
|
|
404
|
-
if (invalidInput.length) {
|
|
405
|
-
const error = new Error();
|
|
406
|
-
error.message = "Missing required field";
|
|
407
|
-
error.details = invalidInput;
|
|
408
301
|
return Promise.reject(new FDKClientValidationError(error));
|
|
409
302
|
}
|
|
410
303
|
|
|
@@ -415,7 +308,7 @@ class Logistic {
|
|
|
415
308
|
query_params["page_no"] = pageNo;
|
|
416
309
|
query_params["page_size"] = pageSize;
|
|
417
310
|
query_params["q"] = q;
|
|
418
|
-
query_params["
|
|
311
|
+
query_params["sector"] = sector;
|
|
419
312
|
|
|
420
313
|
const xHeaders = {};
|
|
421
314
|
|
|
@@ -440,87 +333,35 @@ class Logistic {
|
|
|
440
333
|
return response;
|
|
441
334
|
}
|
|
442
335
|
|
|
443
|
-
/**
|
|
444
|
-
* @param {Object} arg - Arg object.
|
|
445
|
-
* @param {string} arg.localityType - Unique geographical division.
|
|
446
|
-
* @param {string} [arg.country] - Country name.
|
|
447
|
-
* @param {string} [arg.state] - State or the province.
|
|
448
|
-
* @param {string} [arg.city] - City.
|
|
449
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
450
|
-
* page. Default value is 12.
|
|
451
|
-
* @param {string} [arg.q] - This parameter is used to filter or search the records.
|
|
452
|
-
* @param {string} [arg.name] - Search for localities. Either provide a full
|
|
453
|
-
* name or a search term.
|
|
454
|
-
* @returns {Paginator<GetLocalities>}
|
|
455
|
-
* @summary: Get Localities
|
|
456
|
-
* @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.
|
|
457
|
-
*/
|
|
458
|
-
getLocalitiesPaginator({
|
|
459
|
-
localityType,
|
|
460
|
-
country,
|
|
461
|
-
state,
|
|
462
|
-
city,
|
|
463
|
-
pageSize,
|
|
464
|
-
q,
|
|
465
|
-
name,
|
|
466
|
-
} = {}) {
|
|
467
|
-
const paginator = new Paginator();
|
|
468
|
-
const callback = async () => {
|
|
469
|
-
const pageId = paginator.nextId;
|
|
470
|
-
const pageNo = paginator.pageNo;
|
|
471
|
-
const pageType = "number";
|
|
472
|
-
const data = await this.getLocalities({
|
|
473
|
-
localityType: localityType,
|
|
474
|
-
country: country,
|
|
475
|
-
state: state,
|
|
476
|
-
city: city,
|
|
477
|
-
pageNo: pageNo,
|
|
478
|
-
pageSize: pageSize,
|
|
479
|
-
q: q,
|
|
480
|
-
name: name,
|
|
481
|
-
});
|
|
482
|
-
paginator.setPaginator({
|
|
483
|
-
hasNext: data.page.has_next ? true : false,
|
|
484
|
-
nextId: data.page.next_id,
|
|
485
|
-
});
|
|
486
|
-
return data;
|
|
487
|
-
};
|
|
488
|
-
paginator.setCallback(callback.bind(this));
|
|
489
|
-
return paginator;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
336
|
/**
|
|
493
337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
494
338
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
495
|
-
* @returns {Promise<
|
|
339
|
+
* @returns {Promise<GetLocalityApp>} - Success response
|
|
496
340
|
* @name getLocality
|
|
497
|
-
* @summary: Get
|
|
341
|
+
* @summary: Get Locality API
|
|
498
342
|
* @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/).
|
|
499
343
|
*/
|
|
500
344
|
async getLocality(
|
|
501
|
-
{
|
|
502
|
-
|
|
503
|
-
|
|
345
|
+
{
|
|
346
|
+
localityType,
|
|
347
|
+
localityValue,
|
|
348
|
+
country,
|
|
349
|
+
state,
|
|
350
|
+
city,
|
|
351
|
+
sector,
|
|
352
|
+
requestHeaders,
|
|
353
|
+
} = { requestHeaders: {} },
|
|
504
354
|
{ responseHeaders } = { responseHeaders: false }
|
|
505
355
|
) {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
if (!localityValue) {
|
|
515
|
-
invalidInput.push({
|
|
516
|
-
message: `The 'localityValue' field is required.`,
|
|
517
|
-
path: ["localityValue"],
|
|
356
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
357
|
+
"localityType",
|
|
358
|
+
"localityValue",
|
|
359
|
+
]);
|
|
360
|
+
if (errors.length > 0) {
|
|
361
|
+
const error = new FDKClientValidationError({
|
|
362
|
+
message: "Missing required field",
|
|
363
|
+
details: errors,
|
|
518
364
|
});
|
|
519
|
-
}
|
|
520
|
-
if (invalidInput.length) {
|
|
521
|
-
const error = new Error();
|
|
522
|
-
error.message = "Missing required field";
|
|
523
|
-
error.details = invalidInput;
|
|
524
365
|
return Promise.reject(new FDKClientValidationError(error));
|
|
525
366
|
}
|
|
526
367
|
|
|
@@ -528,6 +369,7 @@ class Logistic {
|
|
|
528
369
|
query_params["country"] = country;
|
|
529
370
|
query_params["state"] = state;
|
|
530
371
|
query_params["city"] = city;
|
|
372
|
+
query_params["sector"] = sector;
|
|
531
373
|
|
|
532
374
|
const xHeaders = {};
|
|
533
375
|
|
|
@@ -555,27 +397,21 @@ class Logistic {
|
|
|
555
397
|
/**
|
|
556
398
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
557
399
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
558
|
-
* @returns {Promise<
|
|
400
|
+
* @returns {Promise<PincodeDetailsResult>} - Success response
|
|
559
401
|
* @name getPincodeCity
|
|
560
|
-
* @summary: Get
|
|
402
|
+
* @summary: Get pincode details
|
|
561
403
|
* @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/).
|
|
562
404
|
*/
|
|
563
405
|
async getPincodeCity(
|
|
564
406
|
{ pincode, requestHeaders } = { requestHeaders: {} },
|
|
565
407
|
{ responseHeaders } = { responseHeaders: false }
|
|
566
408
|
) {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
path: ["pincode"],
|
|
409
|
+
const errors = validateRequiredParams(arguments[0], ["pincode"]);
|
|
410
|
+
if (errors.length > 0) {
|
|
411
|
+
const error = new FDKClientValidationError({
|
|
412
|
+
message: "Missing required field",
|
|
413
|
+
details: errors,
|
|
573
414
|
});
|
|
574
|
-
}
|
|
575
|
-
if (invalidInput.length) {
|
|
576
|
-
const error = new Error();
|
|
577
|
-
error.message = "Missing required field";
|
|
578
|
-
error.details = invalidInput;
|
|
579
415
|
return Promise.reject(new FDKClientValidationError(error));
|
|
580
416
|
}
|
|
581
417
|
|
|
@@ -607,91 +443,7 @@ class Logistic {
|
|
|
607
443
|
/**
|
|
608
444
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
609
445
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
610
|
-
* @returns {Promise<
|
|
611
|
-
* @name getZones
|
|
612
|
-
* @summary: Shows zones defined at the application level
|
|
613
|
-
* @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/).
|
|
614
|
-
*/
|
|
615
|
-
async getZones(
|
|
616
|
-
{
|
|
617
|
-
companyId,
|
|
618
|
-
applicationId,
|
|
619
|
-
stage,
|
|
620
|
-
type,
|
|
621
|
-
pageSize,
|
|
622
|
-
pageNo,
|
|
623
|
-
isActive,
|
|
624
|
-
q,
|
|
625
|
-
countryIsoCode,
|
|
626
|
-
pincode,
|
|
627
|
-
state,
|
|
628
|
-
city,
|
|
629
|
-
sector,
|
|
630
|
-
requestHeaders,
|
|
631
|
-
} = { requestHeaders: {} },
|
|
632
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
633
|
-
) {
|
|
634
|
-
let invalidInput = [];
|
|
635
|
-
|
|
636
|
-
if (!companyId) {
|
|
637
|
-
invalidInput.push({
|
|
638
|
-
message: `The 'companyId' field is required.`,
|
|
639
|
-
path: ["companyId"],
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
if (!applicationId) {
|
|
643
|
-
invalidInput.push({
|
|
644
|
-
message: `The 'applicationId' field is required.`,
|
|
645
|
-
path: ["applicationId"],
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
if (invalidInput.length) {
|
|
649
|
-
const error = new Error();
|
|
650
|
-
error.message = "Missing required field";
|
|
651
|
-
error.details = invalidInput;
|
|
652
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
const query_params = {};
|
|
656
|
-
query_params["stage"] = stage;
|
|
657
|
-
query_params["type"] = type;
|
|
658
|
-
query_params["page_size"] = pageSize;
|
|
659
|
-
query_params["page_no"] = pageNo;
|
|
660
|
-
query_params["is_active"] = isActive;
|
|
661
|
-
query_params["q"] = q;
|
|
662
|
-
query_params["country_iso_code"] = countryIsoCode;
|
|
663
|
-
query_params["pincode"] = pincode;
|
|
664
|
-
query_params["state"] = state;
|
|
665
|
-
query_params["city"] = city;
|
|
666
|
-
query_params["sector"] = sector;
|
|
667
|
-
|
|
668
|
-
const xHeaders = {};
|
|
669
|
-
|
|
670
|
-
const response = await ApplicationAPIClient.execute(
|
|
671
|
-
this._conf,
|
|
672
|
-
"get",
|
|
673
|
-
constructUrl({
|
|
674
|
-
url: this._urls["getZones"],
|
|
675
|
-
params: { companyId, applicationId },
|
|
676
|
-
}),
|
|
677
|
-
query_params,
|
|
678
|
-
undefined,
|
|
679
|
-
{ ...xHeaders, ...requestHeaders },
|
|
680
|
-
{ responseHeaders }
|
|
681
|
-
);
|
|
682
|
-
|
|
683
|
-
let responseData = response;
|
|
684
|
-
if (responseHeaders) {
|
|
685
|
-
responseData = response[0];
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
return response;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
693
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
694
|
-
* @returns {Promise<ValidateAddressRequest>} - Success response
|
|
446
|
+
* @returns {Promise<ValidateAddressDetails>} - Success response
|
|
695
447
|
* @name validateAddress
|
|
696
448
|
* @summary: Validate address
|
|
697
449
|
* @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/).
|
|
@@ -702,24 +454,15 @@ class Logistic {
|
|
|
702
454
|
},
|
|
703
455
|
{ responseHeaders } = { responseHeaders: false }
|
|
704
456
|
) {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
457
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
458
|
+
"countryIsoCode",
|
|
459
|
+
"templateName",
|
|
460
|
+
]);
|
|
461
|
+
if (errors.length > 0) {
|
|
462
|
+
const error = new FDKClientValidationError({
|
|
463
|
+
message: "Missing required field",
|
|
464
|
+
details: errors,
|
|
711
465
|
});
|
|
712
|
-
}
|
|
713
|
-
if (!templateName) {
|
|
714
|
-
invalidInput.push({
|
|
715
|
-
message: `The 'templateName' field is required.`,
|
|
716
|
-
path: ["templateName"],
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
if (invalidInput.length) {
|
|
720
|
-
const error = new Error();
|
|
721
|
-
error.message = "Missing required field";
|
|
722
|
-
error.details = invalidInput;
|
|
723
466
|
return Promise.reject(new FDKClientValidationError(error));
|
|
724
467
|
}
|
|
725
468
|
|