@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const CompanyProfilePlatformValidator = require("./CompanyProfilePlatformValidator");
|
|
5
|
+
const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,13 +12,21 @@ class CompanyProfile {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
15
|
+
* @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object
|
|
16
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse>}
|
|
19
|
+
* - Success response
|
|
20
|
+
*
|
|
21
|
+
* @name cbsOnboardGet
|
|
17
22
|
* @summary: Get company profile
|
|
18
|
-
* @description: This API allows to view the company profile of the seller account.
|
|
23
|
+
* @description: This API allows to view the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/cbsOnboardGet/).
|
|
19
24
|
*/
|
|
20
|
-
async cbsOnboardGet(
|
|
21
|
-
|
|
25
|
+
async cbsOnboardGet(
|
|
26
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
27
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
28
|
+
) {
|
|
29
|
+
const { error } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
|
|
22
30
|
{},
|
|
23
31
|
{ abortEarly: false, allowUnknown: true }
|
|
24
32
|
);
|
|
@@ -29,16 +37,15 @@ class CompanyProfile {
|
|
|
29
37
|
// Showing warrnings if extra unknown parameters are found
|
|
30
38
|
const {
|
|
31
39
|
error: warrning,
|
|
32
|
-
} =
|
|
40
|
+
} = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
|
|
33
41
|
{},
|
|
34
42
|
{ abortEarly: false, allowUnknown: false }
|
|
35
43
|
);
|
|
36
44
|
if (warrning) {
|
|
37
45
|
Logger({
|
|
38
46
|
level: "WARN",
|
|
39
|
-
message:
|
|
47
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > cbsOnboardGet \n ${warrning}`,
|
|
40
48
|
});
|
|
41
|
-
Logger({ level: "WARN", message: warrning });
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
const query_params = {};
|
|
@@ -51,36 +58,47 @@ class CompanyProfile {
|
|
|
51
58
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
52
59
|
query_params,
|
|
53
60
|
undefined,
|
|
54
|
-
xHeaders
|
|
61
|
+
{ ...xHeaders, ...requestHeaders },
|
|
62
|
+
{ responseHeaders }
|
|
55
63
|
);
|
|
56
64
|
|
|
65
|
+
let responseData = response;
|
|
66
|
+
if (responseHeaders) {
|
|
67
|
+
responseData = response[0];
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
const {
|
|
58
71
|
error: res_error,
|
|
59
|
-
} =
|
|
60
|
-
|
|
72
|
+
} = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse().validate(
|
|
73
|
+
responseData,
|
|
61
74
|
{ abortEarly: false, allowUnknown: false }
|
|
62
75
|
);
|
|
63
76
|
|
|
64
77
|
if (res_error) {
|
|
65
78
|
Logger({
|
|
66
79
|
level: "WARN",
|
|
67
|
-
message:
|
|
80
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
|
|
68
81
|
});
|
|
69
|
-
Logger({ level: "WARN", message: res_error });
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
return response;
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
/**
|
|
76
|
-
* @param {
|
|
77
|
-
* @param {
|
|
78
|
-
* @
|
|
88
|
+
* @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object
|
|
89
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
90
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
91
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
92
|
+
* Success response
|
|
93
|
+
* @name createBrand
|
|
79
94
|
* @summary: Create a Brand.
|
|
80
|
-
* @description: This API allows to create a brand associated to a company.
|
|
95
|
+
* @description: This API allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/).
|
|
81
96
|
*/
|
|
82
|
-
async createBrand(
|
|
83
|
-
|
|
97
|
+
async createBrand(
|
|
98
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
99
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
100
|
+
) {
|
|
101
|
+
const { error } = CompanyProfilePlatformValidator.createBrand().validate(
|
|
84
102
|
{
|
|
85
103
|
body,
|
|
86
104
|
},
|
|
@@ -91,7 +109,9 @@ class CompanyProfile {
|
|
|
91
109
|
}
|
|
92
110
|
|
|
93
111
|
// Showing warrnings if extra unknown parameters are found
|
|
94
|
-
const {
|
|
112
|
+
const {
|
|
113
|
+
error: warrning,
|
|
114
|
+
} = CompanyProfilePlatformValidator.createBrand().validate(
|
|
95
115
|
{
|
|
96
116
|
body,
|
|
97
117
|
},
|
|
@@ -100,9 +120,8 @@ class CompanyProfile {
|
|
|
100
120
|
if (warrning) {
|
|
101
121
|
Logger({
|
|
102
122
|
level: "WARN",
|
|
103
|
-
message:
|
|
123
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createBrand \n ${warrning}`,
|
|
104
124
|
});
|
|
105
|
-
Logger({ level: "WARN", message: warrning });
|
|
106
125
|
}
|
|
107
126
|
|
|
108
127
|
const query_params = {};
|
|
@@ -115,38 +134,51 @@ class CompanyProfile {
|
|
|
115
134
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
|
|
116
135
|
query_params,
|
|
117
136
|
body,
|
|
118
|
-
xHeaders
|
|
137
|
+
{ ...xHeaders, ...requestHeaders },
|
|
138
|
+
{ responseHeaders }
|
|
119
139
|
);
|
|
120
140
|
|
|
141
|
+
let responseData = response;
|
|
142
|
+
if (responseHeaders) {
|
|
143
|
+
responseData = response[0];
|
|
144
|
+
}
|
|
145
|
+
|
|
121
146
|
const {
|
|
122
147
|
error: res_error,
|
|
123
|
-
} =
|
|
124
|
-
|
|
125
|
-
allowUnknown: false
|
|
126
|
-
|
|
148
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
149
|
+
responseData,
|
|
150
|
+
{ abortEarly: false, allowUnknown: false }
|
|
151
|
+
);
|
|
127
152
|
|
|
128
153
|
if (res_error) {
|
|
129
154
|
Logger({
|
|
130
155
|
level: "WARN",
|
|
131
|
-
message:
|
|
156
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createBrand \n ${res_error}`,
|
|
132
157
|
});
|
|
133
|
-
Logger({ level: "WARN", message: res_error });
|
|
134
158
|
}
|
|
135
159
|
|
|
136
160
|
return response;
|
|
137
161
|
}
|
|
138
162
|
|
|
139
163
|
/**
|
|
140
|
-
* @param {
|
|
141
|
-
*
|
|
142
|
-
*
|
|
164
|
+
* @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg
|
|
165
|
+
* - Arg object
|
|
166
|
+
*
|
|
167
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
168
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
169
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
170
|
+
* Success response
|
|
171
|
+
* @name createCompanyBrandMapping
|
|
143
172
|
* @summary: Create a company brand mapping.
|
|
144
|
-
* @description: This API allows to create a company brand mapping, for a already existing brand in the system.
|
|
173
|
+
* @description: This API allows to create a company brand mapping, for a already existing brand in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/).
|
|
145
174
|
*/
|
|
146
|
-
async createCompanyBrandMapping(
|
|
175
|
+
async createCompanyBrandMapping(
|
|
176
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
177
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
178
|
+
) {
|
|
147
179
|
const {
|
|
148
180
|
error,
|
|
149
|
-
} =
|
|
181
|
+
} = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
|
|
150
182
|
{
|
|
151
183
|
body,
|
|
152
184
|
},
|
|
@@ -159,7 +191,7 @@ class CompanyProfile {
|
|
|
159
191
|
// Showing warrnings if extra unknown parameters are found
|
|
160
192
|
const {
|
|
161
193
|
error: warrning,
|
|
162
|
-
} =
|
|
194
|
+
} = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
|
|
163
195
|
{
|
|
164
196
|
body,
|
|
165
197
|
},
|
|
@@ -168,9 +200,8 @@ class CompanyProfile {
|
|
|
168
200
|
if (warrning) {
|
|
169
201
|
Logger({
|
|
170
202
|
level: "WARN",
|
|
171
|
-
message:
|
|
203
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createCompanyBrandMapping \n ${warrning}`,
|
|
172
204
|
});
|
|
173
|
-
Logger({ level: "WARN", message: warrning });
|
|
174
205
|
}
|
|
175
206
|
|
|
176
207
|
const query_params = {};
|
|
@@ -183,36 +214,47 @@ class CompanyProfile {
|
|
|
183
214
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
184
215
|
query_params,
|
|
185
216
|
body,
|
|
186
|
-
xHeaders
|
|
217
|
+
{ ...xHeaders, ...requestHeaders },
|
|
218
|
+
{ responseHeaders }
|
|
187
219
|
);
|
|
188
220
|
|
|
221
|
+
let responseData = response;
|
|
222
|
+
if (responseHeaders) {
|
|
223
|
+
responseData = response[0];
|
|
224
|
+
}
|
|
225
|
+
|
|
189
226
|
const {
|
|
190
227
|
error: res_error,
|
|
191
|
-
} =
|
|
192
|
-
|
|
193
|
-
allowUnknown: false
|
|
194
|
-
|
|
228
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
229
|
+
responseData,
|
|
230
|
+
{ abortEarly: false, allowUnknown: false }
|
|
231
|
+
);
|
|
195
232
|
|
|
196
233
|
if (res_error) {
|
|
197
234
|
Logger({
|
|
198
235
|
level: "WARN",
|
|
199
|
-
message:
|
|
236
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
|
|
200
237
|
});
|
|
201
|
-
Logger({ level: "WARN", message: res_error });
|
|
202
238
|
}
|
|
203
239
|
|
|
204
240
|
return response;
|
|
205
241
|
}
|
|
206
242
|
|
|
207
243
|
/**
|
|
208
|
-
* @param {
|
|
209
|
-
* @param {
|
|
210
|
-
* @
|
|
244
|
+
* @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object
|
|
245
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
246
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
247
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
248
|
+
* Success response
|
|
249
|
+
* @name createLocation
|
|
211
250
|
* @summary: Create a location associated to a company.
|
|
212
|
-
* @description: This API allows to edit a location associated to a company.
|
|
251
|
+
* @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/).
|
|
213
252
|
*/
|
|
214
|
-
async createLocation(
|
|
215
|
-
|
|
253
|
+
async createLocation(
|
|
254
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
255
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
256
|
+
) {
|
|
257
|
+
const { error } = CompanyProfilePlatformValidator.createLocation().validate(
|
|
216
258
|
{
|
|
217
259
|
body,
|
|
218
260
|
},
|
|
@@ -225,7 +267,7 @@ class CompanyProfile {
|
|
|
225
267
|
// Showing warrnings if extra unknown parameters are found
|
|
226
268
|
const {
|
|
227
269
|
error: warrning,
|
|
228
|
-
} =
|
|
270
|
+
} = CompanyProfilePlatformValidator.createLocation().validate(
|
|
229
271
|
{
|
|
230
272
|
body,
|
|
231
273
|
},
|
|
@@ -234,9 +276,8 @@ class CompanyProfile {
|
|
|
234
276
|
if (warrning) {
|
|
235
277
|
Logger({
|
|
236
278
|
level: "WARN",
|
|
237
|
-
message:
|
|
279
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createLocation \n ${warrning}`,
|
|
238
280
|
});
|
|
239
|
-
Logger({ level: "WARN", message: warrning });
|
|
240
281
|
}
|
|
241
282
|
|
|
242
283
|
const query_params = {};
|
|
@@ -249,36 +290,49 @@ class CompanyProfile {
|
|
|
249
290
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
250
291
|
query_params,
|
|
251
292
|
body,
|
|
252
|
-
xHeaders
|
|
293
|
+
{ ...xHeaders, ...requestHeaders },
|
|
294
|
+
{ responseHeaders }
|
|
253
295
|
);
|
|
254
296
|
|
|
297
|
+
let responseData = response;
|
|
298
|
+
if (responseHeaders) {
|
|
299
|
+
responseData = response[0];
|
|
300
|
+
}
|
|
301
|
+
|
|
255
302
|
const {
|
|
256
303
|
error: res_error,
|
|
257
|
-
} =
|
|
258
|
-
|
|
259
|
-
allowUnknown: false
|
|
260
|
-
|
|
304
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
305
|
+
responseData,
|
|
306
|
+
{ abortEarly: false, allowUnknown: false }
|
|
307
|
+
);
|
|
261
308
|
|
|
262
309
|
if (res_error) {
|
|
263
310
|
Logger({
|
|
264
311
|
level: "WARN",
|
|
265
|
-
message:
|
|
312
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createLocation \n ${res_error}`,
|
|
266
313
|
});
|
|
267
|
-
Logger({ level: "WARN", message: res_error });
|
|
268
314
|
}
|
|
269
315
|
|
|
270
316
|
return response;
|
|
271
317
|
}
|
|
272
318
|
|
|
273
319
|
/**
|
|
274
|
-
* @param {
|
|
275
|
-
* @param {
|
|
276
|
-
* @
|
|
320
|
+
* @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object
|
|
321
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
322
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
323
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
324
|
+
* Success response
|
|
325
|
+
* @name createLocationBulk
|
|
277
326
|
* @summary: Create a location asscoiated to a company in bulk.
|
|
278
|
-
* @description: This API allows to create a location associated to a company.
|
|
327
|
+
* @description: This API allows to create a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/).
|
|
279
328
|
*/
|
|
280
|
-
async createLocationBulk(
|
|
281
|
-
|
|
329
|
+
async createLocationBulk(
|
|
330
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
331
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
332
|
+
) {
|
|
333
|
+
const {
|
|
334
|
+
error,
|
|
335
|
+
} = CompanyProfilePlatformValidator.createLocationBulk().validate(
|
|
282
336
|
{
|
|
283
337
|
body,
|
|
284
338
|
},
|
|
@@ -291,7 +345,7 @@ class CompanyProfile {
|
|
|
291
345
|
// Showing warrnings if extra unknown parameters are found
|
|
292
346
|
const {
|
|
293
347
|
error: warrning,
|
|
294
|
-
} =
|
|
348
|
+
} = CompanyProfilePlatformValidator.createLocationBulk().validate(
|
|
295
349
|
{
|
|
296
350
|
body,
|
|
297
351
|
},
|
|
@@ -300,9 +354,8 @@ class CompanyProfile {
|
|
|
300
354
|
if (warrning) {
|
|
301
355
|
Logger({
|
|
302
356
|
level: "WARN",
|
|
303
|
-
message:
|
|
357
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createLocationBulk \n ${warrning}`,
|
|
304
358
|
});
|
|
305
|
-
Logger({ level: "WARN", message: warrning });
|
|
306
359
|
}
|
|
307
360
|
|
|
308
361
|
const query_params = {};
|
|
@@ -315,37 +368,47 @@ class CompanyProfile {
|
|
|
315
368
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
|
|
316
369
|
query_params,
|
|
317
370
|
body,
|
|
318
|
-
xHeaders
|
|
371
|
+
{ ...xHeaders, ...requestHeaders },
|
|
372
|
+
{ responseHeaders }
|
|
319
373
|
);
|
|
320
374
|
|
|
375
|
+
let responseData = response;
|
|
376
|
+
if (responseHeaders) {
|
|
377
|
+
responseData = response[0];
|
|
378
|
+
}
|
|
379
|
+
|
|
321
380
|
const {
|
|
322
381
|
error: res_error,
|
|
323
|
-
} =
|
|
324
|
-
|
|
325
|
-
allowUnknown: false
|
|
326
|
-
|
|
382
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
383
|
+
responseData,
|
|
384
|
+
{ abortEarly: false, allowUnknown: false }
|
|
385
|
+
);
|
|
327
386
|
|
|
328
387
|
if (res_error) {
|
|
329
388
|
Logger({
|
|
330
389
|
level: "WARN",
|
|
331
|
-
message:
|
|
390
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
|
|
332
391
|
});
|
|
333
|
-
Logger({ level: "WARN", message: res_error });
|
|
334
392
|
}
|
|
335
393
|
|
|
336
394
|
return response;
|
|
337
395
|
}
|
|
338
396
|
|
|
339
397
|
/**
|
|
340
|
-
* @param {
|
|
341
|
-
* @param {
|
|
342
|
-
* @param {
|
|
343
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
398
|
+
* @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object
|
|
399
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
400
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
401
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
402
|
+
* Success response
|
|
403
|
+
* @name editBrand
|
|
344
404
|
* @summary: Edit a brand.
|
|
345
|
-
* @description: This API allows to edit meta of a brand.
|
|
405
|
+
* @description: This API allows to edit meta of a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/).
|
|
346
406
|
*/
|
|
347
|
-
async editBrand(
|
|
348
|
-
|
|
407
|
+
async editBrand(
|
|
408
|
+
{ brandId, body, requestHeaders } = { requestHeaders: {} },
|
|
409
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
410
|
+
) {
|
|
411
|
+
const { error } = CompanyProfilePlatformValidator.editBrand().validate(
|
|
349
412
|
{
|
|
350
413
|
brandId,
|
|
351
414
|
body,
|
|
@@ -357,7 +420,9 @@ class CompanyProfile {
|
|
|
357
420
|
}
|
|
358
421
|
|
|
359
422
|
// Showing warrnings if extra unknown parameters are found
|
|
360
|
-
const {
|
|
423
|
+
const {
|
|
424
|
+
error: warrning,
|
|
425
|
+
} = CompanyProfilePlatformValidator.editBrand().validate(
|
|
361
426
|
{
|
|
362
427
|
brandId,
|
|
363
428
|
body,
|
|
@@ -367,9 +432,8 @@ class CompanyProfile {
|
|
|
367
432
|
if (warrning) {
|
|
368
433
|
Logger({
|
|
369
434
|
level: "WARN",
|
|
370
|
-
message:
|
|
435
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > editBrand \n ${warrning}`,
|
|
371
436
|
});
|
|
372
|
-
Logger({ level: "WARN", message: warrning });
|
|
373
437
|
}
|
|
374
438
|
|
|
375
439
|
const query_params = {};
|
|
@@ -382,36 +446,48 @@ class CompanyProfile {
|
|
|
382
446
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
383
447
|
query_params,
|
|
384
448
|
body,
|
|
385
|
-
xHeaders
|
|
449
|
+
{ ...xHeaders, ...requestHeaders },
|
|
450
|
+
{ responseHeaders }
|
|
386
451
|
);
|
|
387
452
|
|
|
453
|
+
let responseData = response;
|
|
454
|
+
if (responseHeaders) {
|
|
455
|
+
responseData = response[0];
|
|
456
|
+
}
|
|
457
|
+
|
|
388
458
|
const {
|
|
389
459
|
error: res_error,
|
|
390
|
-
} =
|
|
391
|
-
|
|
392
|
-
allowUnknown: false
|
|
393
|
-
|
|
460
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
461
|
+
responseData,
|
|
462
|
+
{ abortEarly: false, allowUnknown: false }
|
|
463
|
+
);
|
|
394
464
|
|
|
395
465
|
if (res_error) {
|
|
396
466
|
Logger({
|
|
397
467
|
level: "WARN",
|
|
398
|
-
message:
|
|
468
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > editBrand \n ${res_error}`,
|
|
399
469
|
});
|
|
400
|
-
Logger({ level: "WARN", message: res_error });
|
|
401
470
|
}
|
|
402
471
|
|
|
403
472
|
return response;
|
|
404
473
|
}
|
|
405
474
|
|
|
406
475
|
/**
|
|
407
|
-
* @param {
|
|
408
|
-
* @param {
|
|
409
|
-
* @
|
|
476
|
+
* @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object
|
|
477
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
478
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
479
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetBrandResponseSerializer>}
|
|
480
|
+
* - Success response
|
|
481
|
+
*
|
|
482
|
+
* @name getBrand
|
|
410
483
|
* @summary: Get a single company brand.
|
|
411
|
-
* @description: This API helps to get data associated to a particular company brand.
|
|
484
|
+
* @description: This API helps to get data associated to a particular company brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/).
|
|
412
485
|
*/
|
|
413
|
-
async getBrand(
|
|
414
|
-
|
|
486
|
+
async getBrand(
|
|
487
|
+
{ brandId, requestHeaders } = { requestHeaders: {} },
|
|
488
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
489
|
+
) {
|
|
490
|
+
const { error } = CompanyProfilePlatformValidator.getBrand().validate(
|
|
415
491
|
{
|
|
416
492
|
brandId,
|
|
417
493
|
},
|
|
@@ -422,7 +498,9 @@ class CompanyProfile {
|
|
|
422
498
|
}
|
|
423
499
|
|
|
424
500
|
// Showing warrnings if extra unknown parameters are found
|
|
425
|
-
const {
|
|
501
|
+
const {
|
|
502
|
+
error: warrning,
|
|
503
|
+
} = CompanyProfilePlatformValidator.getBrand().validate(
|
|
426
504
|
{
|
|
427
505
|
brandId,
|
|
428
506
|
},
|
|
@@ -431,9 +509,8 @@ class CompanyProfile {
|
|
|
431
509
|
if (warrning) {
|
|
432
510
|
Logger({
|
|
433
511
|
level: "WARN",
|
|
434
|
-
message:
|
|
512
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getBrand \n ${warrning}`,
|
|
435
513
|
});
|
|
436
|
-
Logger({ level: "WARN", message: warrning });
|
|
437
514
|
}
|
|
438
515
|
|
|
439
516
|
const query_params = {};
|
|
@@ -446,40 +523,48 @@ class CompanyProfile {
|
|
|
446
523
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
447
524
|
query_params,
|
|
448
525
|
undefined,
|
|
449
|
-
xHeaders
|
|
526
|
+
{ ...xHeaders, ...requestHeaders },
|
|
527
|
+
{ responseHeaders }
|
|
450
528
|
);
|
|
451
529
|
|
|
530
|
+
let responseData = response;
|
|
531
|
+
if (responseHeaders) {
|
|
532
|
+
responseData = response[0];
|
|
533
|
+
}
|
|
534
|
+
|
|
452
535
|
const {
|
|
453
536
|
error: res_error,
|
|
454
|
-
} =
|
|
455
|
-
|
|
456
|
-
allowUnknown: false
|
|
457
|
-
|
|
537
|
+
} = CompanyProfilePlatformModel.GetBrandResponseSerializer().validate(
|
|
538
|
+
responseData,
|
|
539
|
+
{ abortEarly: false, allowUnknown: false }
|
|
540
|
+
);
|
|
458
541
|
|
|
459
542
|
if (res_error) {
|
|
460
543
|
Logger({
|
|
461
544
|
level: "WARN",
|
|
462
|
-
message:
|
|
545
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getBrand \n ${res_error}`,
|
|
463
546
|
});
|
|
464
|
-
Logger({ level: "WARN", message: res_error });
|
|
465
547
|
}
|
|
466
548
|
|
|
467
549
|
return response;
|
|
468
550
|
}
|
|
469
551
|
|
|
470
552
|
/**
|
|
471
|
-
* @param {
|
|
472
|
-
* @param {
|
|
473
|
-
*
|
|
474
|
-
* @
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
* @
|
|
553
|
+
* @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object
|
|
554
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
555
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
556
|
+
* @returns {Promise<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
|
|
557
|
+
* - Success response
|
|
558
|
+
*
|
|
559
|
+
* @name getBrands
|
|
478
560
|
* @summary: Get brands associated to a company
|
|
479
|
-
* @description: This API helps to get view brands associated to a particular company.
|
|
561
|
+
* @description: This API helps to get view brands associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/).
|
|
480
562
|
*/
|
|
481
|
-
async getBrands(
|
|
482
|
-
|
|
563
|
+
async getBrands(
|
|
564
|
+
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
565
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
566
|
+
) {
|
|
567
|
+
const { error } = CompanyProfilePlatformValidator.getBrands().validate(
|
|
483
568
|
{
|
|
484
569
|
pageNo,
|
|
485
570
|
pageSize,
|
|
@@ -492,7 +577,9 @@ class CompanyProfile {
|
|
|
492
577
|
}
|
|
493
578
|
|
|
494
579
|
// Showing warrnings if extra unknown parameters are found
|
|
495
|
-
const {
|
|
580
|
+
const {
|
|
581
|
+
error: warrning,
|
|
582
|
+
} = CompanyProfilePlatformValidator.getBrands().validate(
|
|
496
583
|
{
|
|
497
584
|
pageNo,
|
|
498
585
|
pageSize,
|
|
@@ -503,9 +590,8 @@ class CompanyProfile {
|
|
|
503
590
|
if (warrning) {
|
|
504
591
|
Logger({
|
|
505
592
|
level: "WARN",
|
|
506
|
-
message:
|
|
593
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getBrands \n ${warrning}`,
|
|
507
594
|
});
|
|
508
|
-
Logger({ level: "WARN", message: warrning });
|
|
509
595
|
}
|
|
510
596
|
|
|
511
597
|
const query_params = {};
|
|
@@ -521,22 +607,27 @@ class CompanyProfile {
|
|
|
521
607
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
522
608
|
query_params,
|
|
523
609
|
undefined,
|
|
524
|
-
xHeaders
|
|
610
|
+
{ ...xHeaders, ...requestHeaders },
|
|
611
|
+
{ responseHeaders }
|
|
525
612
|
);
|
|
526
613
|
|
|
614
|
+
let responseData = response;
|
|
615
|
+
if (responseHeaders) {
|
|
616
|
+
responseData = response[0];
|
|
617
|
+
}
|
|
618
|
+
|
|
527
619
|
const {
|
|
528
620
|
error: res_error,
|
|
529
|
-
} =
|
|
530
|
-
|
|
531
|
-
allowUnknown: false
|
|
532
|
-
|
|
621
|
+
} = CompanyProfilePlatformModel.CompanyBrandListSerializer().validate(
|
|
622
|
+
responseData,
|
|
623
|
+
{ abortEarly: false, allowUnknown: false }
|
|
624
|
+
);
|
|
533
625
|
|
|
534
626
|
if (res_error) {
|
|
535
627
|
Logger({
|
|
536
628
|
level: "WARN",
|
|
537
|
-
message:
|
|
629
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getBrands \n ${res_error}`,
|
|
538
630
|
});
|
|
539
|
-
Logger({ level: "WARN", message: res_error });
|
|
540
631
|
}
|
|
541
632
|
|
|
542
633
|
return response;
|
|
@@ -547,6 +638,7 @@ class CompanyProfile {
|
|
|
547
638
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
548
639
|
* page. Default is 10.
|
|
549
640
|
* @param {string} [arg.q] - Search term for name.
|
|
641
|
+
* @returns {Paginator<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
|
|
550
642
|
* @summary: Get brands associated to a company
|
|
551
643
|
* @description: This API helps to get view brands associated to a particular company.
|
|
552
644
|
*/
|
|
@@ -572,13 +664,22 @@ class CompanyProfile {
|
|
|
572
664
|
}
|
|
573
665
|
|
|
574
666
|
/**
|
|
575
|
-
* @param {
|
|
576
|
-
* @
|
|
667
|
+
* @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object
|
|
668
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
669
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
670
|
+
* @returns {Promise<CompanyProfilePlatformModel.MetricsSerializer>} -
|
|
671
|
+
* Success response
|
|
672
|
+
* @name getCompanyMetrics
|
|
577
673
|
* @summary: Get company metrics
|
|
578
|
-
* @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
|
|
674
|
+
* @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/).
|
|
579
675
|
*/
|
|
580
|
-
async getCompanyMetrics(
|
|
581
|
-
|
|
676
|
+
async getCompanyMetrics(
|
|
677
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
678
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
679
|
+
) {
|
|
680
|
+
const {
|
|
681
|
+
error,
|
|
682
|
+
} = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
|
|
582
683
|
{},
|
|
583
684
|
{ abortEarly: false, allowUnknown: true }
|
|
584
685
|
);
|
|
@@ -589,16 +690,15 @@ class CompanyProfile {
|
|
|
589
690
|
// Showing warrnings if extra unknown parameters are found
|
|
590
691
|
const {
|
|
591
692
|
error: warrning,
|
|
592
|
-
} =
|
|
693
|
+
} = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
|
|
593
694
|
{},
|
|
594
695
|
{ abortEarly: false, allowUnknown: false }
|
|
595
696
|
);
|
|
596
697
|
if (warrning) {
|
|
597
698
|
Logger({
|
|
598
699
|
level: "WARN",
|
|
599
|
-
message:
|
|
700
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getCompanyMetrics \n ${warrning}`,
|
|
600
701
|
});
|
|
601
|
-
Logger({ level: "WARN", message: warrning });
|
|
602
702
|
}
|
|
603
703
|
|
|
604
704
|
const query_params = {};
|
|
@@ -611,12 +711,18 @@ class CompanyProfile {
|
|
|
611
711
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
|
|
612
712
|
query_params,
|
|
613
713
|
undefined,
|
|
614
|
-
xHeaders
|
|
714
|
+
{ ...xHeaders, ...requestHeaders },
|
|
715
|
+
{ responseHeaders }
|
|
615
716
|
);
|
|
616
717
|
|
|
718
|
+
let responseData = response;
|
|
719
|
+
if (responseHeaders) {
|
|
720
|
+
responseData = response[0];
|
|
721
|
+
}
|
|
722
|
+
|
|
617
723
|
const {
|
|
618
724
|
error: res_error,
|
|
619
|
-
} =
|
|
725
|
+
} = CompanyProfilePlatformModel.MetricsSerializer().validate(responseData, {
|
|
620
726
|
abortEarly: false,
|
|
621
727
|
allowUnknown: false,
|
|
622
728
|
});
|
|
@@ -624,23 +730,30 @@ class CompanyProfile {
|
|
|
624
730
|
if (res_error) {
|
|
625
731
|
Logger({
|
|
626
732
|
level: "WARN",
|
|
627
|
-
message:
|
|
733
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
|
|
628
734
|
});
|
|
629
|
-
Logger({ level: "WARN", message: res_error });
|
|
630
735
|
}
|
|
631
736
|
|
|
632
737
|
return response;
|
|
633
738
|
}
|
|
634
739
|
|
|
635
740
|
/**
|
|
636
|
-
* @param {
|
|
637
|
-
* @param {
|
|
638
|
-
* @
|
|
741
|
+
* @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object
|
|
742
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
743
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
744
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetLocationSerializer>} -
|
|
745
|
+
* Success response
|
|
746
|
+
* @name getLocationDetail
|
|
639
747
|
* @summary: Get details of a specific location.
|
|
640
|
-
* @description: This API helps to get data associated to a specific location.
|
|
748
|
+
* @description: This API helps to get data associated to a specific location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationDetail/).
|
|
641
749
|
*/
|
|
642
|
-
async getLocationDetail(
|
|
643
|
-
|
|
750
|
+
async getLocationDetail(
|
|
751
|
+
{ locationId, requestHeaders } = { requestHeaders: {} },
|
|
752
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
753
|
+
) {
|
|
754
|
+
const {
|
|
755
|
+
error,
|
|
756
|
+
} = CompanyProfilePlatformValidator.getLocationDetail().validate(
|
|
644
757
|
{
|
|
645
758
|
locationId,
|
|
646
759
|
},
|
|
@@ -653,7 +766,7 @@ class CompanyProfile {
|
|
|
653
766
|
// Showing warrnings if extra unknown parameters are found
|
|
654
767
|
const {
|
|
655
768
|
error: warrning,
|
|
656
|
-
} =
|
|
769
|
+
} = CompanyProfilePlatformValidator.getLocationDetail().validate(
|
|
657
770
|
{
|
|
658
771
|
locationId,
|
|
659
772
|
},
|
|
@@ -662,9 +775,8 @@ class CompanyProfile {
|
|
|
662
775
|
if (warrning) {
|
|
663
776
|
Logger({
|
|
664
777
|
level: "WARN",
|
|
665
|
-
message:
|
|
778
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationDetail \n ${warrning}`,
|
|
666
779
|
});
|
|
667
|
-
Logger({ level: "WARN", message: warrning });
|
|
668
780
|
}
|
|
669
781
|
|
|
670
782
|
const query_params = {};
|
|
@@ -677,52 +789,124 @@ class CompanyProfile {
|
|
|
677
789
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
678
790
|
query_params,
|
|
679
791
|
undefined,
|
|
680
|
-
xHeaders
|
|
792
|
+
{ ...xHeaders, ...requestHeaders },
|
|
793
|
+
{ responseHeaders }
|
|
681
794
|
);
|
|
682
795
|
|
|
796
|
+
let responseData = response;
|
|
797
|
+
if (responseHeaders) {
|
|
798
|
+
responseData = response[0];
|
|
799
|
+
}
|
|
800
|
+
|
|
683
801
|
const {
|
|
684
802
|
error: res_error,
|
|
685
|
-
} =
|
|
686
|
-
|
|
687
|
-
allowUnknown: false
|
|
688
|
-
|
|
803
|
+
} = CompanyProfilePlatformModel.GetLocationSerializer().validate(
|
|
804
|
+
responseData,
|
|
805
|
+
{ abortEarly: false, allowUnknown: false }
|
|
806
|
+
);
|
|
689
807
|
|
|
690
808
|
if (res_error) {
|
|
691
809
|
Logger({
|
|
692
810
|
level: "WARN",
|
|
693
|
-
message:
|
|
811
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
|
|
694
812
|
});
|
|
695
|
-
Logger({ level: "WARN", message: res_error });
|
|
696
813
|
}
|
|
697
814
|
|
|
698
815
|
return response;
|
|
699
816
|
}
|
|
700
817
|
|
|
701
818
|
/**
|
|
702
|
-
* @param {
|
|
703
|
-
* @param {
|
|
704
|
-
*
|
|
705
|
-
* @
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
* @
|
|
709
|
-
*
|
|
710
|
-
* @
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
819
|
+
* @param {CompanyProfilePlatformValidator.GetLocationTagsParam} arg - Arg object
|
|
820
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
821
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
822
|
+
* @returns {Promise<CompanyProfilePlatformModel.StoreTagsResponseSchema>}
|
|
823
|
+
* - Success response
|
|
824
|
+
*
|
|
825
|
+
* @name getLocationTags
|
|
826
|
+
* @summary: Get tags associated with locations for a company.
|
|
827
|
+
* @description: This API fetches all the tags associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationTags/).
|
|
828
|
+
*/
|
|
829
|
+
async getLocationTags(
|
|
830
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
831
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
832
|
+
) {
|
|
833
|
+
const {
|
|
834
|
+
error,
|
|
835
|
+
} = CompanyProfilePlatformValidator.getLocationTags().validate(
|
|
836
|
+
{},
|
|
837
|
+
{ abortEarly: false, allowUnknown: true }
|
|
838
|
+
);
|
|
839
|
+
if (error) {
|
|
840
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// Showing warrnings if extra unknown parameters are found
|
|
844
|
+
const {
|
|
845
|
+
error: warrning,
|
|
846
|
+
} = CompanyProfilePlatformValidator.getLocationTags().validate(
|
|
847
|
+
{},
|
|
848
|
+
{ abortEarly: false, allowUnknown: false }
|
|
849
|
+
);
|
|
850
|
+
if (warrning) {
|
|
851
|
+
Logger({
|
|
852
|
+
level: "WARN",
|
|
853
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationTags \n ${warrning}`,
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
const query_params = {};
|
|
858
|
+
|
|
859
|
+
const xHeaders = {};
|
|
860
|
+
|
|
861
|
+
const response = await PlatformAPIClient.execute(
|
|
862
|
+
this.config,
|
|
863
|
+
"get",
|
|
864
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/tags`,
|
|
865
|
+
query_params,
|
|
866
|
+
undefined,
|
|
867
|
+
{ ...xHeaders, ...requestHeaders },
|
|
868
|
+
{ responseHeaders }
|
|
869
|
+
);
|
|
870
|
+
|
|
871
|
+
let responseData = response;
|
|
872
|
+
if (responseHeaders) {
|
|
873
|
+
responseData = response[0];
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
const {
|
|
877
|
+
error: res_error,
|
|
878
|
+
} = CompanyProfilePlatformModel.StoreTagsResponseSchema().validate(
|
|
879
|
+
responseData,
|
|
880
|
+
{ abortEarly: false, allowUnknown: false }
|
|
881
|
+
);
|
|
882
|
+
|
|
883
|
+
if (res_error) {
|
|
884
|
+
Logger({
|
|
885
|
+
level: "WARN",
|
|
886
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getLocationTags \n ${res_error}`,
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
return response;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object
|
|
895
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
896
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
897
|
+
* @returns {Promise<CompanyProfilePlatformModel.LocationListSerializer>} -
|
|
898
|
+
* Success response
|
|
899
|
+
* @name getLocations
|
|
714
900
|
* @summary: Get list of locations
|
|
715
|
-
* @description: This API allows to view all the locations associated to a company.
|
|
901
|
+
* @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/).
|
|
716
902
|
*/
|
|
717
|
-
async getLocations(
|
|
718
|
-
storeType,
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
} = {}) {
|
|
725
|
-
const { error } = CompanyProfileValidator.getLocations().validate(
|
|
903
|
+
async getLocations(
|
|
904
|
+
{ storeType, q, stage, pageNo, pageSize, locationIds, requestHeaders } = {
|
|
905
|
+
requestHeaders: {},
|
|
906
|
+
},
|
|
907
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
908
|
+
) {
|
|
909
|
+
const { error } = CompanyProfilePlatformValidator.getLocations().validate(
|
|
726
910
|
{
|
|
727
911
|
storeType,
|
|
728
912
|
q,
|
|
@@ -738,7 +922,9 @@ class CompanyProfile {
|
|
|
738
922
|
}
|
|
739
923
|
|
|
740
924
|
// Showing warrnings if extra unknown parameters are found
|
|
741
|
-
const {
|
|
925
|
+
const {
|
|
926
|
+
error: warrning,
|
|
927
|
+
} = CompanyProfilePlatformValidator.getLocations().validate(
|
|
742
928
|
{
|
|
743
929
|
storeType,
|
|
744
930
|
q,
|
|
@@ -752,9 +938,8 @@ class CompanyProfile {
|
|
|
752
938
|
if (warrning) {
|
|
753
939
|
Logger({
|
|
754
940
|
level: "WARN",
|
|
755
|
-
message:
|
|
941
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getLocations \n ${warrning}`,
|
|
756
942
|
});
|
|
757
|
-
Logger({ level: "WARN", message: warrning });
|
|
758
943
|
}
|
|
759
944
|
|
|
760
945
|
const query_params = {};
|
|
@@ -773,22 +958,27 @@ class CompanyProfile {
|
|
|
773
958
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
774
959
|
query_params,
|
|
775
960
|
undefined,
|
|
776
|
-
xHeaders
|
|
961
|
+
{ ...xHeaders, ...requestHeaders },
|
|
962
|
+
{ responseHeaders }
|
|
777
963
|
);
|
|
778
964
|
|
|
965
|
+
let responseData = response;
|
|
966
|
+
if (responseHeaders) {
|
|
967
|
+
responseData = response[0];
|
|
968
|
+
}
|
|
969
|
+
|
|
779
970
|
const {
|
|
780
971
|
error: res_error,
|
|
781
|
-
} =
|
|
782
|
-
|
|
783
|
-
allowUnknown: false
|
|
784
|
-
|
|
972
|
+
} = CompanyProfilePlatformModel.LocationListSerializer().validate(
|
|
973
|
+
responseData,
|
|
974
|
+
{ abortEarly: false, allowUnknown: false }
|
|
975
|
+
);
|
|
785
976
|
|
|
786
977
|
if (res_error) {
|
|
787
978
|
Logger({
|
|
788
979
|
level: "WARN",
|
|
789
|
-
message:
|
|
980
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getLocations \n ${res_error}`,
|
|
790
981
|
});
|
|
791
|
-
Logger({ level: "WARN", message: res_error });
|
|
792
982
|
}
|
|
793
983
|
|
|
794
984
|
return response;
|
|
@@ -804,6 +994,7 @@ class CompanyProfile {
|
|
|
804
994
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
805
995
|
* page. Default is 10.
|
|
806
996
|
* @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
|
|
997
|
+
* @returns {Paginator<CompanyProfilePlatformModel.LocationListSerializer>}
|
|
807
998
|
* @summary: Get list of locations
|
|
808
999
|
* @description: This API allows to view all the locations associated to a company.
|
|
809
1000
|
*/
|
|
@@ -832,14 +1023,20 @@ class CompanyProfile {
|
|
|
832
1023
|
}
|
|
833
1024
|
|
|
834
1025
|
/**
|
|
835
|
-
* @param {
|
|
836
|
-
* @param {
|
|
837
|
-
* @
|
|
1026
|
+
* @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object
|
|
1027
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1028
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1029
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
1030
|
+
* Success response
|
|
1031
|
+
* @name updateCompany
|
|
838
1032
|
* @summary: Edit company profile
|
|
839
|
-
* @description: This API allows to edit the company profile of the seller account.
|
|
1033
|
+
* @description: This API allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/).
|
|
840
1034
|
*/
|
|
841
|
-
async updateCompany(
|
|
842
|
-
|
|
1035
|
+
async updateCompany(
|
|
1036
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1037
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1038
|
+
) {
|
|
1039
|
+
const { error } = CompanyProfilePlatformValidator.updateCompany().validate(
|
|
843
1040
|
{
|
|
844
1041
|
body,
|
|
845
1042
|
},
|
|
@@ -852,7 +1049,7 @@ class CompanyProfile {
|
|
|
852
1049
|
// Showing warrnings if extra unknown parameters are found
|
|
853
1050
|
const {
|
|
854
1051
|
error: warrning,
|
|
855
|
-
} =
|
|
1052
|
+
} = CompanyProfilePlatformValidator.updateCompany().validate(
|
|
856
1053
|
{
|
|
857
1054
|
body,
|
|
858
1055
|
},
|
|
@@ -861,9 +1058,8 @@ class CompanyProfile {
|
|
|
861
1058
|
if (warrning) {
|
|
862
1059
|
Logger({
|
|
863
1060
|
level: "WARN",
|
|
864
|
-
message:
|
|
1061
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > updateCompany \n ${warrning}`,
|
|
865
1062
|
});
|
|
866
|
-
Logger({ level: "WARN", message: warrning });
|
|
867
1063
|
}
|
|
868
1064
|
|
|
869
1065
|
const query_params = {};
|
|
@@ -876,37 +1072,47 @@ class CompanyProfile {
|
|
|
876
1072
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
877
1073
|
query_params,
|
|
878
1074
|
body,
|
|
879
|
-
xHeaders
|
|
1075
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1076
|
+
{ responseHeaders }
|
|
880
1077
|
);
|
|
881
1078
|
|
|
1079
|
+
let responseData = response;
|
|
1080
|
+
if (responseHeaders) {
|
|
1081
|
+
responseData = response[0];
|
|
1082
|
+
}
|
|
1083
|
+
|
|
882
1084
|
const {
|
|
883
1085
|
error: res_error,
|
|
884
|
-
} =
|
|
885
|
-
|
|
886
|
-
allowUnknown: false
|
|
887
|
-
|
|
1086
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
1087
|
+
responseData,
|
|
1088
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1089
|
+
);
|
|
888
1090
|
|
|
889
1091
|
if (res_error) {
|
|
890
1092
|
Logger({
|
|
891
1093
|
level: "WARN",
|
|
892
|
-
message:
|
|
1094
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
|
|
893
1095
|
});
|
|
894
|
-
Logger({ level: "WARN", message: res_error });
|
|
895
1096
|
}
|
|
896
1097
|
|
|
897
1098
|
return response;
|
|
898
1099
|
}
|
|
899
1100
|
|
|
900
1101
|
/**
|
|
901
|
-
* @param {
|
|
902
|
-
* @param {
|
|
903
|
-
* @param {
|
|
904
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
1102
|
+
* @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object
|
|
1103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1104
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1105
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
1106
|
+
* Success response
|
|
1107
|
+
* @name updateLocation
|
|
905
1108
|
* @summary: Edit a location asscoiated to a company.
|
|
906
|
-
* @description: This API allows to edit a location associated to a company.
|
|
1109
|
+
* @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/).
|
|
907
1110
|
*/
|
|
908
|
-
async updateLocation(
|
|
909
|
-
|
|
1111
|
+
async updateLocation(
|
|
1112
|
+
{ locationId, body, requestHeaders } = { requestHeaders: {} },
|
|
1113
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1114
|
+
) {
|
|
1115
|
+
const { error } = CompanyProfilePlatformValidator.updateLocation().validate(
|
|
910
1116
|
{
|
|
911
1117
|
locationId,
|
|
912
1118
|
body,
|
|
@@ -920,7 +1126,7 @@ class CompanyProfile {
|
|
|
920
1126
|
// Showing warrnings if extra unknown parameters are found
|
|
921
1127
|
const {
|
|
922
1128
|
error: warrning,
|
|
923
|
-
} =
|
|
1129
|
+
} = CompanyProfilePlatformValidator.updateLocation().validate(
|
|
924
1130
|
{
|
|
925
1131
|
locationId,
|
|
926
1132
|
body,
|
|
@@ -930,9 +1136,8 @@ class CompanyProfile {
|
|
|
930
1136
|
if (warrning) {
|
|
931
1137
|
Logger({
|
|
932
1138
|
level: "WARN",
|
|
933
|
-
message:
|
|
1139
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > updateLocation \n ${warrning}`,
|
|
934
1140
|
});
|
|
935
|
-
Logger({ level: "WARN", message: warrning });
|
|
936
1141
|
}
|
|
937
1142
|
|
|
938
1143
|
const query_params = {};
|
|
@@ -945,22 +1150,27 @@ class CompanyProfile {
|
|
|
945
1150
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
946
1151
|
query_params,
|
|
947
1152
|
body,
|
|
948
|
-
xHeaders
|
|
1153
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1154
|
+
{ responseHeaders }
|
|
949
1155
|
);
|
|
950
1156
|
|
|
1157
|
+
let responseData = response;
|
|
1158
|
+
if (responseHeaders) {
|
|
1159
|
+
responseData = response[0];
|
|
1160
|
+
}
|
|
1161
|
+
|
|
951
1162
|
const {
|
|
952
1163
|
error: res_error,
|
|
953
|
-
} =
|
|
954
|
-
|
|
955
|
-
allowUnknown: false
|
|
956
|
-
|
|
1164
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
1165
|
+
responseData,
|
|
1166
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1167
|
+
);
|
|
957
1168
|
|
|
958
1169
|
if (res_error) {
|
|
959
1170
|
Logger({
|
|
960
1171
|
level: "WARN",
|
|
961
|
-
message:
|
|
1172
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
|
|
962
1173
|
});
|
|
963
|
-
Logger({ level: "WARN", message: res_error });
|
|
964
1174
|
}
|
|
965
1175
|
|
|
966
1176
|
return response;
|