@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const ShareApplicationValidator = require("./ShareApplicationValidator");
|
|
6
|
+
const ShareApplicationModel = require("./ShareApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -40,14 +40,19 @@ class Share {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @param {
|
|
44
|
-
* @param {
|
|
45
|
-
* @
|
|
43
|
+
* @param {ShareApplicationValidator.CreateShortLinkParam} arg - Arg object.
|
|
44
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
45
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
46
|
+
* @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
|
|
47
|
+
* @name createShortLink
|
|
46
48
|
* @summary: Create a short link
|
|
47
|
-
* @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs.
|
|
49
|
+
* @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/createShortLink/).
|
|
48
50
|
*/
|
|
49
|
-
async createShortLink(
|
|
50
|
-
|
|
51
|
+
async createShortLink(
|
|
52
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
53
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
54
|
+
) {
|
|
55
|
+
const { error } = ShareApplicationValidator.createShortLink().validate(
|
|
51
56
|
{ body },
|
|
52
57
|
{ abortEarly: false, allowUnknown: true }
|
|
53
58
|
);
|
|
@@ -56,16 +61,17 @@ class Share {
|
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
// Showing warrnings if extra unknown parameters are found
|
|
59
|
-
const {
|
|
64
|
+
const {
|
|
65
|
+
error: warrning,
|
|
66
|
+
} = ShareApplicationValidator.createShortLink().validate(
|
|
60
67
|
{ body },
|
|
61
68
|
{ abortEarly: false, allowUnknown: false }
|
|
62
69
|
);
|
|
63
70
|
if (warrning) {
|
|
64
71
|
Logger({
|
|
65
72
|
level: "WARN",
|
|
66
|
-
message:
|
|
73
|
+
message: `Parameter Validation warrnings for application > Share > createShortLink \n ${warrning}`,
|
|
67
74
|
});
|
|
68
|
-
Logger({ level: "WARN", message: warrning });
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
const query_params = {};
|
|
@@ -81,10 +87,18 @@ class Share {
|
|
|
81
87
|
}),
|
|
82
88
|
query_params,
|
|
83
89
|
body,
|
|
84
|
-
xHeaders
|
|
90
|
+
{ ...xHeaders, ...requestHeaders },
|
|
91
|
+
{ responseHeaders }
|
|
85
92
|
);
|
|
86
93
|
|
|
87
|
-
|
|
94
|
+
let responseData = response;
|
|
95
|
+
if (responseHeaders) {
|
|
96
|
+
responseData = response[0];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const {
|
|
100
|
+
error: res_error,
|
|
101
|
+
} = ShareApplicationModel.ShortLinkRes().validate(responseData, {
|
|
88
102
|
abortEarly: false,
|
|
89
103
|
allowUnknown: false,
|
|
90
104
|
});
|
|
@@ -92,22 +106,27 @@ class Share {
|
|
|
92
106
|
if (res_error) {
|
|
93
107
|
Logger({
|
|
94
108
|
level: "WARN",
|
|
95
|
-
message:
|
|
109
|
+
message: `Response Validation Warnnings for application > Share > createShortLink \n ${res_error}`,
|
|
96
110
|
});
|
|
97
|
-
Logger({ level: "WARN", message: res_error });
|
|
98
111
|
}
|
|
99
112
|
|
|
100
113
|
return response;
|
|
101
114
|
}
|
|
102
115
|
|
|
103
116
|
/**
|
|
104
|
-
* @param {
|
|
105
|
-
* @
|
|
117
|
+
* @param {ShareApplicationValidator.GetApplicationQRCodeParam} arg - Arg object.
|
|
118
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
119
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
120
|
+
* @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
|
|
121
|
+
* @name getApplicationQRCode
|
|
106
122
|
* @summary: Create QR Code of an app
|
|
107
|
-
* @description: Use this API to create a QR code of an app for sharing it with users who want to use the app.
|
|
123
|
+
* @description: Use this API to create a QR code of an app for sharing it with users who want to use the app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getApplicationQRCode/).
|
|
108
124
|
*/
|
|
109
|
-
async getApplicationQRCode(
|
|
110
|
-
|
|
125
|
+
async getApplicationQRCode(
|
|
126
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
127
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
128
|
+
) {
|
|
129
|
+
const { error } = ShareApplicationValidator.getApplicationQRCode().validate(
|
|
111
130
|
{},
|
|
112
131
|
{ abortEarly: false, allowUnknown: true }
|
|
113
132
|
);
|
|
@@ -116,16 +135,17 @@ class Share {
|
|
|
116
135
|
}
|
|
117
136
|
|
|
118
137
|
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
138
|
+
const {
|
|
139
|
+
error: warrning,
|
|
140
|
+
} = ShareApplicationValidator.getApplicationQRCode().validate(
|
|
120
141
|
{},
|
|
121
142
|
{ abortEarly: false, allowUnknown: false }
|
|
122
143
|
);
|
|
123
144
|
if (warrning) {
|
|
124
145
|
Logger({
|
|
125
146
|
level: "WARN",
|
|
126
|
-
message:
|
|
147
|
+
message: `Parameter Validation warrnings for application > Share > getApplicationQRCode \n ${warrning}`,
|
|
127
148
|
});
|
|
128
|
-
Logger({ level: "WARN", message: warrning });
|
|
129
149
|
}
|
|
130
150
|
|
|
131
151
|
const query_params = {};
|
|
@@ -141,10 +161,18 @@ class Share {
|
|
|
141
161
|
}),
|
|
142
162
|
query_params,
|
|
143
163
|
undefined,
|
|
144
|
-
xHeaders
|
|
164
|
+
{ ...xHeaders, ...requestHeaders },
|
|
165
|
+
{ responseHeaders }
|
|
145
166
|
);
|
|
146
167
|
|
|
147
|
-
|
|
168
|
+
let responseData = response;
|
|
169
|
+
if (responseHeaders) {
|
|
170
|
+
responseData = response[0];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const {
|
|
174
|
+
error: res_error,
|
|
175
|
+
} = ShareApplicationModel.QRCodeResp().validate(responseData, {
|
|
148
176
|
abortEarly: false,
|
|
149
177
|
allowUnknown: false,
|
|
150
178
|
});
|
|
@@ -152,24 +180,29 @@ class Share {
|
|
|
152
180
|
if (res_error) {
|
|
153
181
|
Logger({
|
|
154
182
|
level: "WARN",
|
|
155
|
-
message:
|
|
183
|
+
message: `Response Validation Warnnings for application > Share > getApplicationQRCode \n ${res_error}`,
|
|
156
184
|
});
|
|
157
|
-
Logger({ level: "WARN", message: res_error });
|
|
158
185
|
}
|
|
159
186
|
|
|
160
187
|
return response;
|
|
161
188
|
}
|
|
162
189
|
|
|
163
190
|
/**
|
|
164
|
-
* @param {
|
|
165
|
-
* @param {
|
|
166
|
-
*
|
|
167
|
-
* @returns {Promise<QRCodeResp>} - Success response
|
|
191
|
+
* @param {ShareApplicationValidator.GetCollectionQRCodeBySlugParam} arg - Arg object.
|
|
192
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
193
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
194
|
+
* @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
|
|
195
|
+
* @name getCollectionQRCodeBySlug
|
|
168
196
|
* @summary: Create QR Code of a collection
|
|
169
|
-
* @description: Use this API to create a QR code of a collection of products for sharing it with users who want to view/purchase the collection.
|
|
197
|
+
* @description: Use this API to create a QR code of a collection of products for sharing it with users who want to view/purchase the collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getCollectionQRCodeBySlug/).
|
|
170
198
|
*/
|
|
171
|
-
async getCollectionQRCodeBySlug(
|
|
172
|
-
|
|
199
|
+
async getCollectionQRCodeBySlug(
|
|
200
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
201
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
202
|
+
) {
|
|
203
|
+
const {
|
|
204
|
+
error,
|
|
205
|
+
} = ShareApplicationValidator.getCollectionQRCodeBySlug().validate(
|
|
173
206
|
{ slug },
|
|
174
207
|
{ abortEarly: false, allowUnknown: true }
|
|
175
208
|
);
|
|
@@ -180,16 +213,15 @@ class Share {
|
|
|
180
213
|
// Showing warrnings if extra unknown parameters are found
|
|
181
214
|
const {
|
|
182
215
|
error: warrning,
|
|
183
|
-
} =
|
|
216
|
+
} = ShareApplicationValidator.getCollectionQRCodeBySlug().validate(
|
|
184
217
|
{ slug },
|
|
185
218
|
{ abortEarly: false, allowUnknown: false }
|
|
186
219
|
);
|
|
187
220
|
if (warrning) {
|
|
188
221
|
Logger({
|
|
189
222
|
level: "WARN",
|
|
190
|
-
message:
|
|
223
|
+
message: `Parameter Validation warrnings for application > Share > getCollectionQRCodeBySlug \n ${warrning}`,
|
|
191
224
|
});
|
|
192
|
-
Logger({ level: "WARN", message: warrning });
|
|
193
225
|
}
|
|
194
226
|
|
|
195
227
|
const query_params = {};
|
|
@@ -205,10 +237,18 @@ class Share {
|
|
|
205
237
|
}),
|
|
206
238
|
query_params,
|
|
207
239
|
undefined,
|
|
208
|
-
xHeaders
|
|
240
|
+
{ ...xHeaders, ...requestHeaders },
|
|
241
|
+
{ responseHeaders }
|
|
209
242
|
);
|
|
210
243
|
|
|
211
|
-
|
|
244
|
+
let responseData = response;
|
|
245
|
+
if (responseHeaders) {
|
|
246
|
+
responseData = response[0];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const {
|
|
250
|
+
error: res_error,
|
|
251
|
+
} = ShareApplicationModel.QRCodeResp().validate(responseData, {
|
|
212
252
|
abortEarly: false,
|
|
213
253
|
allowUnknown: false,
|
|
214
254
|
});
|
|
@@ -216,24 +256,30 @@ class Share {
|
|
|
216
256
|
if (res_error) {
|
|
217
257
|
Logger({
|
|
218
258
|
level: "WARN",
|
|
219
|
-
message:
|
|
259
|
+
message: `Response Validation Warnnings for application > Share > getCollectionQRCodeBySlug \n ${res_error}`,
|
|
220
260
|
});
|
|
221
|
-
Logger({ level: "WARN", message: res_error });
|
|
222
261
|
}
|
|
223
262
|
|
|
224
263
|
return response;
|
|
225
264
|
}
|
|
226
265
|
|
|
227
266
|
/**
|
|
228
|
-
* @param {
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* @
|
|
267
|
+
* @param {ShareApplicationValidator.GetOriginalShortLinkByHashParam} arg -
|
|
268
|
+
* Arg object.
|
|
269
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
270
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
271
|
+
* @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
|
|
272
|
+
* @name getOriginalShortLinkByHash
|
|
232
273
|
* @summary: Get original link by hash
|
|
233
|
-
* @description: Use this API to retrieve the original link from a short-link by using a hash value.
|
|
274
|
+
* @description: Use this API to retrieve the original link from a short-link by using a hash value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getOriginalShortLinkByHash/).
|
|
234
275
|
*/
|
|
235
|
-
async getOriginalShortLinkByHash(
|
|
236
|
-
|
|
276
|
+
async getOriginalShortLinkByHash(
|
|
277
|
+
{ hash, requestHeaders } = { requestHeaders: {} },
|
|
278
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
279
|
+
) {
|
|
280
|
+
const {
|
|
281
|
+
error,
|
|
282
|
+
} = ShareApplicationValidator.getOriginalShortLinkByHash().validate(
|
|
237
283
|
{ hash },
|
|
238
284
|
{ abortEarly: false, allowUnknown: true }
|
|
239
285
|
);
|
|
@@ -244,17 +290,15 @@ class Share {
|
|
|
244
290
|
// Showing warrnings if extra unknown parameters are found
|
|
245
291
|
const {
|
|
246
292
|
error: warrning,
|
|
247
|
-
} =
|
|
293
|
+
} = ShareApplicationValidator.getOriginalShortLinkByHash().validate(
|
|
248
294
|
{ hash },
|
|
249
295
|
{ abortEarly: false, allowUnknown: false }
|
|
250
296
|
);
|
|
251
297
|
if (warrning) {
|
|
252
298
|
Logger({
|
|
253
299
|
level: "WARN",
|
|
254
|
-
message:
|
|
255
|
-
"Parameter Validation warrnings for getOriginalShortLinkByHash",
|
|
300
|
+
message: `Parameter Validation warrnings for application > Share > getOriginalShortLinkByHash \n ${warrning}`,
|
|
256
301
|
});
|
|
257
|
-
Logger({ level: "WARN", message: warrning });
|
|
258
302
|
}
|
|
259
303
|
|
|
260
304
|
const query_params = {};
|
|
@@ -270,10 +314,18 @@ class Share {
|
|
|
270
314
|
}),
|
|
271
315
|
query_params,
|
|
272
316
|
undefined,
|
|
273
|
-
xHeaders
|
|
317
|
+
{ ...xHeaders, ...requestHeaders },
|
|
318
|
+
{ responseHeaders }
|
|
274
319
|
);
|
|
275
320
|
|
|
276
|
-
|
|
321
|
+
let responseData = response;
|
|
322
|
+
if (responseHeaders) {
|
|
323
|
+
responseData = response[0];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const {
|
|
327
|
+
error: res_error,
|
|
328
|
+
} = ShareApplicationModel.ShortLinkRes().validate(responseData, {
|
|
277
329
|
abortEarly: false,
|
|
278
330
|
allowUnknown: false,
|
|
279
331
|
});
|
|
@@ -281,24 +333,29 @@ class Share {
|
|
|
281
333
|
if (res_error) {
|
|
282
334
|
Logger({
|
|
283
335
|
level: "WARN",
|
|
284
|
-
message:
|
|
336
|
+
message: `Response Validation Warnnings for application > Share > getOriginalShortLinkByHash \n ${res_error}`,
|
|
285
337
|
});
|
|
286
|
-
Logger({ level: "WARN", message: res_error });
|
|
287
338
|
}
|
|
288
339
|
|
|
289
340
|
return response;
|
|
290
341
|
}
|
|
291
342
|
|
|
292
343
|
/**
|
|
293
|
-
* @param {
|
|
294
|
-
* @param {
|
|
295
|
-
*
|
|
296
|
-
* @returns {Promise<QRCodeResp>} - Success response
|
|
344
|
+
* @param {ShareApplicationValidator.GetProductQRCodeBySlugParam} arg - Arg object.
|
|
345
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
346
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
347
|
+
* @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
|
|
348
|
+
* @name getProductQRCodeBySlug
|
|
297
349
|
* @summary: Create QR Code of a product
|
|
298
|
-
* @description: Use this API to create a QR code of a product for sharing it with users who want to view/purchase the product.
|
|
350
|
+
* @description: Use this API to create a QR code of a product for sharing it with users who want to view/purchase the product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getProductQRCodeBySlug/).
|
|
299
351
|
*/
|
|
300
|
-
async getProductQRCodeBySlug(
|
|
301
|
-
|
|
352
|
+
async getProductQRCodeBySlug(
|
|
353
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
354
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
355
|
+
) {
|
|
356
|
+
const {
|
|
357
|
+
error,
|
|
358
|
+
} = ShareApplicationValidator.getProductQRCodeBySlug().validate(
|
|
302
359
|
{ slug },
|
|
303
360
|
{ abortEarly: false, allowUnknown: true }
|
|
304
361
|
);
|
|
@@ -309,16 +366,15 @@ class Share {
|
|
|
309
366
|
// Showing warrnings if extra unknown parameters are found
|
|
310
367
|
const {
|
|
311
368
|
error: warrning,
|
|
312
|
-
} =
|
|
369
|
+
} = ShareApplicationValidator.getProductQRCodeBySlug().validate(
|
|
313
370
|
{ slug },
|
|
314
371
|
{ abortEarly: false, allowUnknown: false }
|
|
315
372
|
);
|
|
316
373
|
if (warrning) {
|
|
317
374
|
Logger({
|
|
318
375
|
level: "WARN",
|
|
319
|
-
message:
|
|
376
|
+
message: `Parameter Validation warrnings for application > Share > getProductQRCodeBySlug \n ${warrning}`,
|
|
320
377
|
});
|
|
321
|
-
Logger({ level: "WARN", message: warrning });
|
|
322
378
|
}
|
|
323
379
|
|
|
324
380
|
const query_params = {};
|
|
@@ -334,10 +390,18 @@ class Share {
|
|
|
334
390
|
}),
|
|
335
391
|
query_params,
|
|
336
392
|
undefined,
|
|
337
|
-
xHeaders
|
|
393
|
+
{ ...xHeaders, ...requestHeaders },
|
|
394
|
+
{ responseHeaders }
|
|
338
395
|
);
|
|
339
396
|
|
|
340
|
-
|
|
397
|
+
let responseData = response;
|
|
398
|
+
if (responseHeaders) {
|
|
399
|
+
responseData = response[0];
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const {
|
|
403
|
+
error: res_error,
|
|
404
|
+
} = ShareApplicationModel.QRCodeResp().validate(responseData, {
|
|
341
405
|
abortEarly: false,
|
|
342
406
|
allowUnknown: false,
|
|
343
407
|
});
|
|
@@ -345,24 +409,27 @@ class Share {
|
|
|
345
409
|
if (res_error) {
|
|
346
410
|
Logger({
|
|
347
411
|
level: "WARN",
|
|
348
|
-
message:
|
|
412
|
+
message: `Response Validation Warnnings for application > Share > getProductQRCodeBySlug \n ${res_error}`,
|
|
349
413
|
});
|
|
350
|
-
Logger({ level: "WARN", message: res_error });
|
|
351
414
|
}
|
|
352
415
|
|
|
353
416
|
return response;
|
|
354
417
|
}
|
|
355
418
|
|
|
356
419
|
/**
|
|
357
|
-
* @param {
|
|
358
|
-
* @param {
|
|
359
|
-
*
|
|
360
|
-
* @returns {Promise<ShortLinkRes>} - Success response
|
|
420
|
+
* @param {ShareApplicationValidator.GetShortLinkByHashParam} arg - Arg object.
|
|
421
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
422
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
423
|
+
* @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
|
|
424
|
+
* @name getShortLinkByHash
|
|
361
425
|
* @summary: Get short link by hash
|
|
362
|
-
* @description: Use this API to get a short link by using a hash value.
|
|
426
|
+
* @description: Use this API to get a short link by using a hash value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getShortLinkByHash/).
|
|
363
427
|
*/
|
|
364
|
-
async getShortLinkByHash(
|
|
365
|
-
|
|
428
|
+
async getShortLinkByHash(
|
|
429
|
+
{ hash, requestHeaders } = { requestHeaders: {} },
|
|
430
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
431
|
+
) {
|
|
432
|
+
const { error } = ShareApplicationValidator.getShortLinkByHash().validate(
|
|
366
433
|
{ hash },
|
|
367
434
|
{ abortEarly: false, allowUnknown: true }
|
|
368
435
|
);
|
|
@@ -371,16 +438,17 @@ class Share {
|
|
|
371
438
|
}
|
|
372
439
|
|
|
373
440
|
// Showing warrnings if extra unknown parameters are found
|
|
374
|
-
const {
|
|
441
|
+
const {
|
|
442
|
+
error: warrning,
|
|
443
|
+
} = ShareApplicationValidator.getShortLinkByHash().validate(
|
|
375
444
|
{ hash },
|
|
376
445
|
{ abortEarly: false, allowUnknown: false }
|
|
377
446
|
);
|
|
378
447
|
if (warrning) {
|
|
379
448
|
Logger({
|
|
380
449
|
level: "WARN",
|
|
381
|
-
message:
|
|
450
|
+
message: `Parameter Validation warrnings for application > Share > getShortLinkByHash \n ${warrning}`,
|
|
382
451
|
});
|
|
383
|
-
Logger({ level: "WARN", message: warrning });
|
|
384
452
|
}
|
|
385
453
|
|
|
386
454
|
const query_params = {};
|
|
@@ -396,10 +464,18 @@ class Share {
|
|
|
396
464
|
}),
|
|
397
465
|
query_params,
|
|
398
466
|
undefined,
|
|
399
|
-
xHeaders
|
|
467
|
+
{ ...xHeaders, ...requestHeaders },
|
|
468
|
+
{ responseHeaders }
|
|
400
469
|
);
|
|
401
470
|
|
|
402
|
-
|
|
471
|
+
let responseData = response;
|
|
472
|
+
if (responseHeaders) {
|
|
473
|
+
responseData = response[0];
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
const {
|
|
477
|
+
error: res_error,
|
|
478
|
+
} = ShareApplicationModel.ShortLinkRes().validate(responseData, {
|
|
403
479
|
abortEarly: false,
|
|
404
480
|
allowUnknown: false,
|
|
405
481
|
});
|
|
@@ -407,23 +483,27 @@ class Share {
|
|
|
407
483
|
if (res_error) {
|
|
408
484
|
Logger({
|
|
409
485
|
level: "WARN",
|
|
410
|
-
message:
|
|
486
|
+
message: `Response Validation Warnnings for application > Share > getShortLinkByHash \n ${res_error}`,
|
|
411
487
|
});
|
|
412
|
-
Logger({ level: "WARN", message: res_error });
|
|
413
488
|
}
|
|
414
489
|
|
|
415
490
|
return response;
|
|
416
491
|
}
|
|
417
492
|
|
|
418
493
|
/**
|
|
419
|
-
* @param {
|
|
420
|
-
* @param {
|
|
421
|
-
* @
|
|
494
|
+
* @param {ShareApplicationValidator.GetUrlQRCodeParam} arg - Arg object.
|
|
495
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
496
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
497
|
+
* @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
|
|
498
|
+
* @name getUrlQRCode
|
|
422
499
|
* @summary: Create QR Code of a URL
|
|
423
|
-
* @description: Use this API to create a QR code of a URL for sharing it with users who want to visit the link.
|
|
500
|
+
* @description: Use this API to create a QR code of a URL for sharing it with users who want to visit the link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getUrlQRCode/).
|
|
424
501
|
*/
|
|
425
|
-
async getUrlQRCode(
|
|
426
|
-
|
|
502
|
+
async getUrlQRCode(
|
|
503
|
+
{ url, requestHeaders } = { requestHeaders: {} },
|
|
504
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
505
|
+
) {
|
|
506
|
+
const { error } = ShareApplicationValidator.getUrlQRCode().validate(
|
|
427
507
|
{ url },
|
|
428
508
|
{ abortEarly: false, allowUnknown: true }
|
|
429
509
|
);
|
|
@@ -432,16 +512,17 @@ class Share {
|
|
|
432
512
|
}
|
|
433
513
|
|
|
434
514
|
// Showing warrnings if extra unknown parameters are found
|
|
435
|
-
const {
|
|
515
|
+
const {
|
|
516
|
+
error: warrning,
|
|
517
|
+
} = ShareApplicationValidator.getUrlQRCode().validate(
|
|
436
518
|
{ url },
|
|
437
519
|
{ abortEarly: false, allowUnknown: false }
|
|
438
520
|
);
|
|
439
521
|
if (warrning) {
|
|
440
522
|
Logger({
|
|
441
523
|
level: "WARN",
|
|
442
|
-
message:
|
|
524
|
+
message: `Parameter Validation warrnings for application > Share > getUrlQRCode \n ${warrning}`,
|
|
443
525
|
});
|
|
444
|
-
Logger({ level: "WARN", message: warrning });
|
|
445
526
|
}
|
|
446
527
|
|
|
447
528
|
const query_params = {};
|
|
@@ -458,10 +539,18 @@ class Share {
|
|
|
458
539
|
}),
|
|
459
540
|
query_params,
|
|
460
541
|
undefined,
|
|
461
|
-
xHeaders
|
|
542
|
+
{ ...xHeaders, ...requestHeaders },
|
|
543
|
+
{ responseHeaders }
|
|
462
544
|
);
|
|
463
545
|
|
|
464
|
-
|
|
546
|
+
let responseData = response;
|
|
547
|
+
if (responseHeaders) {
|
|
548
|
+
responseData = response[0];
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
const {
|
|
552
|
+
error: res_error,
|
|
553
|
+
} = ShareApplicationModel.QRCodeResp().validate(responseData, {
|
|
465
554
|
abortEarly: false,
|
|
466
555
|
allowUnknown: false,
|
|
467
556
|
});
|
|
@@ -469,9 +558,8 @@ class Share {
|
|
|
469
558
|
if (res_error) {
|
|
470
559
|
Logger({
|
|
471
560
|
level: "WARN",
|
|
472
|
-
message:
|
|
561
|
+
message: `Response Validation Warnnings for application > Share > getUrlQRCode \n ${res_error}`,
|
|
473
562
|
});
|
|
474
|
-
Logger({ level: "WARN", message: res_error });
|
|
475
563
|
}
|
|
476
564
|
|
|
477
565
|
return response;
|