@gofynd/fdk-client-javascript 1.1.6 → 1.2.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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -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 +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -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 +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -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 +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -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 +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -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 +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -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 +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -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 +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -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 +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -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 +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -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 +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -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 +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -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 +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -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 +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -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 +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -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 +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -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 +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- 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 +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -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/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -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 SharePlatformApplicationValidator = require("./SharePlatformApplicationValidator");
|
|
5
|
+
const SharePlatformModel = require("./SharePlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -13,14 +13,17 @@ class Share {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @returns {Promise<ShortLinkRes>} - Success response
|
|
16
|
+
* @param {SharePlatformApplicationValidator.CreateShortLinkParam} arg - Arg object
|
|
17
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
|
+
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
19
|
+
* @name createShortLink
|
|
19
20
|
* @summary: Create short link
|
|
20
|
-
* @description: Create short link
|
|
21
|
+
* @description: Create short link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/createShortLink/).
|
|
21
22
|
*/
|
|
22
|
-
async createShortLink({ body } = {}) {
|
|
23
|
-
const {
|
|
23
|
+
async createShortLink({ body } = {}, { headers } = { headers: false }) {
|
|
24
|
+
const {
|
|
25
|
+
error,
|
|
26
|
+
} = SharePlatformApplicationValidator.createShortLink().validate(
|
|
24
27
|
{
|
|
25
28
|
body,
|
|
26
29
|
},
|
|
@@ -31,7 +34,9 @@ class Share {
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
// Showing warrnings if extra unknown parameters are found
|
|
34
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
error: warrning,
|
|
39
|
+
} = SharePlatformApplicationValidator.createShortLink().validate(
|
|
35
40
|
{
|
|
36
41
|
body,
|
|
37
42
|
},
|
|
@@ -40,9 +45,8 @@ class Share {
|
|
|
40
45
|
if (warrning) {
|
|
41
46
|
Logger({
|
|
42
47
|
level: "WARN",
|
|
43
|
-
message:
|
|
48
|
+
message: `Parameter Validation warrnings for platform > Share > createShortLink \n ${warrning}`,
|
|
44
49
|
});
|
|
45
|
-
Logger({ level: "WARN", message: warrning });
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
const query_params = {};
|
|
@@ -52,10 +56,19 @@ class Share {
|
|
|
52
56
|
"post",
|
|
53
57
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/`,
|
|
54
58
|
query_params,
|
|
55
|
-
body
|
|
59
|
+
body,
|
|
60
|
+
undefined,
|
|
61
|
+
{ headers }
|
|
56
62
|
);
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
let responseData = response;
|
|
65
|
+
if (headers) {
|
|
66
|
+
responseData = response[0];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const {
|
|
70
|
+
error: res_error,
|
|
71
|
+
} = SharePlatformModel.ShortLinkRes().validate(responseData, {
|
|
59
72
|
abortEarly: false,
|
|
60
73
|
allowUnknown: false,
|
|
61
74
|
});
|
|
@@ -63,23 +76,25 @@ class Share {
|
|
|
63
76
|
if (res_error) {
|
|
64
77
|
Logger({
|
|
65
78
|
level: "WARN",
|
|
66
|
-
message:
|
|
79
|
+
message: `Response Validation Warnnings for platform > Share > createShortLink \n ${res_error}`,
|
|
67
80
|
});
|
|
68
|
-
Logger({ level: "WARN", message: res_error });
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
return response;
|
|
72
84
|
}
|
|
73
85
|
|
|
74
86
|
/**
|
|
75
|
-
* @param {
|
|
76
|
-
* @param {
|
|
77
|
-
* @returns {Promise<ShortLinkRes>} - Success response
|
|
87
|
+
* @param {SharePlatformApplicationValidator.GetShortLinkByHashParam} arg - Arg object
|
|
88
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
89
|
+
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
90
|
+
* @name getShortLinkByHash
|
|
78
91
|
* @summary: Get short link by hash
|
|
79
|
-
* @description: Get short link by hash
|
|
92
|
+
* @description: Get short link by hash - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkByHash/).
|
|
80
93
|
*/
|
|
81
|
-
async getShortLinkByHash({ hash } = {}) {
|
|
82
|
-
const {
|
|
94
|
+
async getShortLinkByHash({ hash } = {}, { headers } = { headers: false }) {
|
|
95
|
+
const {
|
|
96
|
+
error,
|
|
97
|
+
} = SharePlatformApplicationValidator.getShortLinkByHash().validate(
|
|
83
98
|
{
|
|
84
99
|
hash,
|
|
85
100
|
},
|
|
@@ -90,7 +105,9 @@ class Share {
|
|
|
90
105
|
}
|
|
91
106
|
|
|
92
107
|
// Showing warrnings if extra unknown parameters are found
|
|
93
|
-
const {
|
|
108
|
+
const {
|
|
109
|
+
error: warrning,
|
|
110
|
+
} = SharePlatformApplicationValidator.getShortLinkByHash().validate(
|
|
94
111
|
{
|
|
95
112
|
hash,
|
|
96
113
|
},
|
|
@@ -99,9 +116,8 @@ class Share {
|
|
|
99
116
|
if (warrning) {
|
|
100
117
|
Logger({
|
|
101
118
|
level: "WARN",
|
|
102
|
-
message:
|
|
119
|
+
message: `Parameter Validation warrnings for platform > Share > getShortLinkByHash \n ${warrning}`,
|
|
103
120
|
});
|
|
104
|
-
Logger({ level: "WARN", message: warrning });
|
|
105
121
|
}
|
|
106
122
|
|
|
107
123
|
const query_params = {};
|
|
@@ -111,10 +127,19 @@ class Share {
|
|
|
111
127
|
"get",
|
|
112
128
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${hash}/`,
|
|
113
129
|
query_params,
|
|
114
|
-
undefined
|
|
130
|
+
undefined,
|
|
131
|
+
undefined,
|
|
132
|
+
{ headers }
|
|
115
133
|
);
|
|
116
134
|
|
|
117
|
-
|
|
135
|
+
let responseData = response;
|
|
136
|
+
if (headers) {
|
|
137
|
+
responseData = response[0];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const {
|
|
141
|
+
error: res_error,
|
|
142
|
+
} = SharePlatformModel.ShortLinkRes().validate(responseData, {
|
|
118
143
|
abortEarly: false,
|
|
119
144
|
allowUnknown: false,
|
|
120
145
|
});
|
|
@@ -122,24 +147,30 @@ class Share {
|
|
|
122
147
|
if (res_error) {
|
|
123
148
|
Logger({
|
|
124
149
|
level: "WARN",
|
|
125
|
-
message:
|
|
150
|
+
message: `Response Validation Warnnings for platform > Share > getShortLinkByHash \n ${res_error}`,
|
|
126
151
|
});
|
|
127
|
-
Logger({ level: "WARN", message: res_error });
|
|
128
152
|
}
|
|
129
153
|
|
|
130
154
|
return response;
|
|
131
155
|
}
|
|
132
156
|
|
|
133
157
|
/**
|
|
134
|
-
* @param {
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* @
|
|
158
|
+
* @param {SharePlatformApplicationValidator.GetShortLinkClickStatsParam} arg
|
|
159
|
+
* - Arg object
|
|
160
|
+
*
|
|
161
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
162
|
+
* @returns {Promise<SharePlatformModel.ClickStatsResponse>} - Success response
|
|
163
|
+
* @name getShortLinkClickStats
|
|
138
164
|
* @summary: Get click statistics for a short link
|
|
139
|
-
* @description: Retrieve click statistics for a given short link ID.
|
|
165
|
+
* @description: Retrieve click statistics for a given short link ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkClickStats/).
|
|
140
166
|
*/
|
|
141
|
-
async getShortLinkClickStats(
|
|
142
|
-
|
|
167
|
+
async getShortLinkClickStats(
|
|
168
|
+
{ surlId } = {},
|
|
169
|
+
{ headers } = { headers: false }
|
|
170
|
+
) {
|
|
171
|
+
const {
|
|
172
|
+
error,
|
|
173
|
+
} = SharePlatformApplicationValidator.getShortLinkClickStats().validate(
|
|
143
174
|
{ surlId },
|
|
144
175
|
{ abortEarly: false, allowUnknown: true }
|
|
145
176
|
);
|
|
@@ -150,16 +181,15 @@ class Share {
|
|
|
150
181
|
// Showing warrnings if extra unknown parameters are found
|
|
151
182
|
const {
|
|
152
183
|
error: warrning,
|
|
153
|
-
} =
|
|
184
|
+
} = SharePlatformApplicationValidator.getShortLinkClickStats().validate(
|
|
154
185
|
{ surlId },
|
|
155
186
|
{ abortEarly: false, allowUnknown: false }
|
|
156
187
|
);
|
|
157
188
|
if (warrning) {
|
|
158
189
|
Logger({
|
|
159
190
|
level: "WARN",
|
|
160
|
-
message:
|
|
191
|
+
message: `Parameter Validation warrnings for platform > Share > getShortLinkClickStats \n ${warrning}`,
|
|
161
192
|
});
|
|
162
|
-
Logger({ level: "WARN", message: warrning });
|
|
163
193
|
}
|
|
164
194
|
|
|
165
195
|
const query_params = {};
|
|
@@ -170,12 +200,19 @@ class Share {
|
|
|
170
200
|
"get",
|
|
171
201
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/click-stats`,
|
|
172
202
|
query_params,
|
|
173
|
-
undefined
|
|
203
|
+
undefined,
|
|
204
|
+
undefined,
|
|
205
|
+
{ headers }
|
|
174
206
|
);
|
|
175
207
|
|
|
208
|
+
let responseData = response;
|
|
209
|
+
if (headers) {
|
|
210
|
+
responseData = response[0];
|
|
211
|
+
}
|
|
212
|
+
|
|
176
213
|
const {
|
|
177
214
|
error: res_error,
|
|
178
|
-
} =
|
|
215
|
+
} = SharePlatformModel.ClickStatsResponse().validate(responseData, {
|
|
179
216
|
abortEarly: false,
|
|
180
217
|
allowUnknown: false,
|
|
181
218
|
});
|
|
@@ -183,27 +220,28 @@ class Share {
|
|
|
183
220
|
if (res_error) {
|
|
184
221
|
Logger({
|
|
185
222
|
level: "WARN",
|
|
186
|
-
message:
|
|
223
|
+
message: `Response Validation Warnnings for platform > Share > getShortLinkClickStats \n ${res_error}`,
|
|
187
224
|
});
|
|
188
|
-
Logger({ level: "WARN", message: res_error });
|
|
189
225
|
}
|
|
190
226
|
|
|
191
227
|
return response;
|
|
192
228
|
}
|
|
193
229
|
|
|
194
230
|
/**
|
|
195
|
-
* @param {
|
|
196
|
-
* @param {
|
|
197
|
-
* @
|
|
198
|
-
* @
|
|
199
|
-
* @param {string} [arg.active] - Short link active status
|
|
200
|
-
* @param {string} [arg.q] - Search text for original and short url
|
|
201
|
-
* @returns {Promise<ShortLinkList>} - Success response
|
|
231
|
+
* @param {SharePlatformApplicationValidator.GetShortLinksParam} arg - Arg object
|
|
232
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
233
|
+
* @returns {Promise<SharePlatformModel.ShortLinkList>} - Success response
|
|
234
|
+
* @name getShortLinks
|
|
202
235
|
* @summary: Get short links
|
|
203
|
-
* @description: Get short links
|
|
236
|
+
* @description: Get short links - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinks/).
|
|
204
237
|
*/
|
|
205
|
-
async getShortLinks(
|
|
206
|
-
|
|
238
|
+
async getShortLinks(
|
|
239
|
+
{ pageNo, pageSize, createdBy, active, q } = {},
|
|
240
|
+
{ headers } = { headers: false }
|
|
241
|
+
) {
|
|
242
|
+
const {
|
|
243
|
+
error,
|
|
244
|
+
} = SharePlatformApplicationValidator.getShortLinks().validate(
|
|
207
245
|
{
|
|
208
246
|
pageNo,
|
|
209
247
|
pageSize,
|
|
@@ -218,7 +256,9 @@ class Share {
|
|
|
218
256
|
}
|
|
219
257
|
|
|
220
258
|
// Showing warrnings if extra unknown parameters are found
|
|
221
|
-
const {
|
|
259
|
+
const {
|
|
260
|
+
error: warrning,
|
|
261
|
+
} = SharePlatformApplicationValidator.getShortLinks().validate(
|
|
222
262
|
{
|
|
223
263
|
pageNo,
|
|
224
264
|
pageSize,
|
|
@@ -231,9 +271,8 @@ class Share {
|
|
|
231
271
|
if (warrning) {
|
|
232
272
|
Logger({
|
|
233
273
|
level: "WARN",
|
|
234
|
-
message:
|
|
274
|
+
message: `Parameter Validation warrnings for platform > Share > getShortLinks \n ${warrning}`,
|
|
235
275
|
});
|
|
236
|
-
Logger({ level: "WARN", message: warrning });
|
|
237
276
|
}
|
|
238
277
|
|
|
239
278
|
const query_params = {};
|
|
@@ -248,10 +287,19 @@ class Share {
|
|
|
248
287
|
"get",
|
|
249
288
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/`,
|
|
250
289
|
query_params,
|
|
251
|
-
undefined
|
|
290
|
+
undefined,
|
|
291
|
+
undefined,
|
|
292
|
+
{ headers }
|
|
252
293
|
);
|
|
253
294
|
|
|
254
|
-
|
|
295
|
+
let responseData = response;
|
|
296
|
+
if (headers) {
|
|
297
|
+
responseData = response[0];
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const {
|
|
301
|
+
error: res_error,
|
|
302
|
+
} = SharePlatformModel.ShortLinkList().validate(responseData, {
|
|
255
303
|
abortEarly: false,
|
|
256
304
|
allowUnknown: false,
|
|
257
305
|
});
|
|
@@ -259,9 +307,8 @@ class Share {
|
|
|
259
307
|
if (res_error) {
|
|
260
308
|
Logger({
|
|
261
309
|
level: "WARN",
|
|
262
|
-
message:
|
|
310
|
+
message: `Response Validation Warnnings for platform > Share > getShortLinks \n ${res_error}`,
|
|
263
311
|
});
|
|
264
|
-
Logger({ level: "WARN", message: res_error });
|
|
265
312
|
}
|
|
266
313
|
|
|
267
314
|
return response;
|
|
@@ -275,6 +322,7 @@ class Share {
|
|
|
275
322
|
* @param {string} [arg.createdBy] - Short link creator
|
|
276
323
|
* @param {string} [arg.active] - Short link active status
|
|
277
324
|
* @param {string} [arg.q] - Search text for original and short url
|
|
325
|
+
* @returns {Paginator<SharePlatformModel.ShortLinkList>}
|
|
278
326
|
* @summary: Get short links
|
|
279
327
|
* @description: Get short links
|
|
280
328
|
*/
|
|
@@ -311,15 +359,22 @@ class Share {
|
|
|
311
359
|
}
|
|
312
360
|
|
|
313
361
|
/**
|
|
314
|
-
* @param {
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* @
|
|
362
|
+
* @param {SharePlatformApplicationValidator.UpdateShortLinkByIdParam} arg
|
|
363
|
+
* - Arg object
|
|
364
|
+
*
|
|
365
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
366
|
+
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
367
|
+
* @name updateShortLinkById
|
|
318
368
|
* @summary: Update short link by id
|
|
319
|
-
* @description: Update short link by id
|
|
369
|
+
* @description: Update short link by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/updateShortLinkById/).
|
|
320
370
|
*/
|
|
321
|
-
async updateShortLinkById(
|
|
322
|
-
|
|
371
|
+
async updateShortLinkById(
|
|
372
|
+
{ id, body } = {},
|
|
373
|
+
{ headers } = { headers: false }
|
|
374
|
+
) {
|
|
375
|
+
const {
|
|
376
|
+
error,
|
|
377
|
+
} = SharePlatformApplicationValidator.updateShortLinkById().validate(
|
|
323
378
|
{
|
|
324
379
|
id,
|
|
325
380
|
body,
|
|
@@ -331,7 +386,9 @@ class Share {
|
|
|
331
386
|
}
|
|
332
387
|
|
|
333
388
|
// Showing warrnings if extra unknown parameters are found
|
|
334
|
-
const {
|
|
389
|
+
const {
|
|
390
|
+
error: warrning,
|
|
391
|
+
} = SharePlatformApplicationValidator.updateShortLinkById().validate(
|
|
335
392
|
{
|
|
336
393
|
id,
|
|
337
394
|
body,
|
|
@@ -341,9 +398,8 @@ class Share {
|
|
|
341
398
|
if (warrning) {
|
|
342
399
|
Logger({
|
|
343
400
|
level: "WARN",
|
|
344
|
-
message:
|
|
401
|
+
message: `Parameter Validation warrnings for platform > Share > updateShortLinkById \n ${warrning}`,
|
|
345
402
|
});
|
|
346
|
-
Logger({ level: "WARN", message: warrning });
|
|
347
403
|
}
|
|
348
404
|
|
|
349
405
|
const query_params = {};
|
|
@@ -353,10 +409,19 @@ class Share {
|
|
|
353
409
|
"patch",
|
|
354
410
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${id}/`,
|
|
355
411
|
query_params,
|
|
356
|
-
body
|
|
412
|
+
body,
|
|
413
|
+
undefined,
|
|
414
|
+
{ headers }
|
|
357
415
|
);
|
|
358
416
|
|
|
359
|
-
|
|
417
|
+
let responseData = response;
|
|
418
|
+
if (headers) {
|
|
419
|
+
responseData = response[0];
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const {
|
|
423
|
+
error: res_error,
|
|
424
|
+
} = SharePlatformModel.ShortLinkRes().validate(responseData, {
|
|
360
425
|
abortEarly: false,
|
|
361
426
|
allowUnknown: false,
|
|
362
427
|
});
|
|
@@ -364,9 +429,8 @@ class Share {
|
|
|
364
429
|
if (res_error) {
|
|
365
430
|
Logger({
|
|
366
431
|
level: "WARN",
|
|
367
|
-
message:
|
|
432
|
+
message: `Response Validation Warnnings for platform > Share > updateShortLinkById \n ${res_error}`,
|
|
368
433
|
});
|
|
369
|
-
Logger({ level: "WARN", message: res_error });
|
|
370
434
|
}
|
|
371
435
|
|
|
372
436
|
return response;
|
|
@@ -1,8 +1,88 @@
|
|
|
1
|
-
export =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export = SharePlatformApplicationValidator;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef CreateShortLinkParam
|
|
4
|
+
* @property {SharePlatformModel.ShortLinkReq} body
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @typedef GetShortLinkByHashParam
|
|
8
|
+
* @property {string} hash - Hash of short url
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @typedef GetShortLinkClickStatsParam
|
|
12
|
+
* @property {string} surlId - Short link ID for which click statistics are to
|
|
13
|
+
* be retrieved.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @typedef GetShortLinksParam
|
|
17
|
+
* @property {number} [pageNo] - Current page number
|
|
18
|
+
* @property {number} [pageSize] - Current page size
|
|
19
|
+
* @property {string} [createdBy] - Short link creator
|
|
20
|
+
* @property {string} [active] - Short link active status
|
|
21
|
+
* @property {string} [q] - Search text for original and short url
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* @typedef UpdateShortLinkByIdParam
|
|
25
|
+
* @property {string} id - Short link document identifier
|
|
26
|
+
* @property {SharePlatformModel.ShortLinkReq} body
|
|
27
|
+
*/
|
|
28
|
+
declare class SharePlatformApplicationValidator {
|
|
29
|
+
/** @returns {CreateShortLinkParam} */
|
|
30
|
+
static createShortLink(): CreateShortLinkParam;
|
|
31
|
+
/** @returns {GetShortLinkByHashParam} */
|
|
32
|
+
static getShortLinkByHash(): GetShortLinkByHashParam;
|
|
33
|
+
/** @returns {GetShortLinkClickStatsParam} */
|
|
34
|
+
static getShortLinkClickStats(): GetShortLinkClickStatsParam;
|
|
35
|
+
/** @returns {GetShortLinksParam} */
|
|
36
|
+
static getShortLinks(): GetShortLinksParam;
|
|
37
|
+
/** @returns {UpdateShortLinkByIdParam} */
|
|
38
|
+
static updateShortLinkById(): UpdateShortLinkByIdParam;
|
|
8
39
|
}
|
|
40
|
+
declare namespace SharePlatformApplicationValidator {
|
|
41
|
+
export { CreateShortLinkParam, GetShortLinkByHashParam, GetShortLinkClickStatsParam, GetShortLinksParam, UpdateShortLinkByIdParam };
|
|
42
|
+
}
|
|
43
|
+
type CreateShortLinkParam = {
|
|
44
|
+
body: SharePlatformModel.ShortLinkReq;
|
|
45
|
+
};
|
|
46
|
+
type GetShortLinkByHashParam = {
|
|
47
|
+
/**
|
|
48
|
+
* - Hash of short url
|
|
49
|
+
*/
|
|
50
|
+
hash: string;
|
|
51
|
+
};
|
|
52
|
+
type GetShortLinkClickStatsParam = {
|
|
53
|
+
/**
|
|
54
|
+
* - Short link ID for which click statistics are to
|
|
55
|
+
* be retrieved.
|
|
56
|
+
*/
|
|
57
|
+
surlId: string;
|
|
58
|
+
};
|
|
59
|
+
type GetShortLinksParam = {
|
|
60
|
+
/**
|
|
61
|
+
* - Current page number
|
|
62
|
+
*/
|
|
63
|
+
pageNo?: number;
|
|
64
|
+
/**
|
|
65
|
+
* - Current page size
|
|
66
|
+
*/
|
|
67
|
+
pageSize?: number;
|
|
68
|
+
/**
|
|
69
|
+
* - Short link creator
|
|
70
|
+
*/
|
|
71
|
+
createdBy?: string;
|
|
72
|
+
/**
|
|
73
|
+
* - Short link active status
|
|
74
|
+
*/
|
|
75
|
+
active?: string;
|
|
76
|
+
/**
|
|
77
|
+
* - Search text for original and short url
|
|
78
|
+
*/
|
|
79
|
+
q?: string;
|
|
80
|
+
};
|
|
81
|
+
type UpdateShortLinkByIdParam = {
|
|
82
|
+
/**
|
|
83
|
+
* - Short link document identifier
|
|
84
|
+
*/
|
|
85
|
+
id: string;
|
|
86
|
+
body: SharePlatformModel.ShortLinkReq;
|
|
87
|
+
};
|
|
88
|
+
import SharePlatformModel = require("./SharePlatformModel");
|
|
@@ -1,25 +1,61 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const SharePlatformModel = require("./SharePlatformModel");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef CreateShortLinkParam
|
|
7
|
+
* @property {SharePlatformModel.ShortLinkReq} body
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef GetShortLinkByHashParam
|
|
12
|
+
* @property {string} hash - Hash of short url
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef GetShortLinkClickStatsParam
|
|
17
|
+
* @property {string} surlId - Short link ID for which click statistics are to
|
|
18
|
+
* be retrieved.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef GetShortLinksParam
|
|
23
|
+
* @property {number} [pageNo] - Current page number
|
|
24
|
+
* @property {number} [pageSize] - Current page size
|
|
25
|
+
* @property {string} [createdBy] - Short link creator
|
|
26
|
+
* @property {string} [active] - Short link active status
|
|
27
|
+
* @property {string} [q] - Search text for original and short url
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef UpdateShortLinkByIdParam
|
|
32
|
+
* @property {string} id - Short link document identifier
|
|
33
|
+
* @property {SharePlatformModel.ShortLinkReq} body
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
class SharePlatformApplicationValidator {
|
|
37
|
+
/** @returns {CreateShortLinkParam} */
|
|
5
38
|
static createShortLink() {
|
|
6
39
|
return Joi.object({
|
|
7
|
-
body:
|
|
40
|
+
body: SharePlatformModel.ShortLinkReq().required(),
|
|
8
41
|
}).required();
|
|
9
42
|
}
|
|
10
43
|
|
|
44
|
+
/** @returns {GetShortLinkByHashParam} */
|
|
11
45
|
static getShortLinkByHash() {
|
|
12
46
|
return Joi.object({
|
|
13
47
|
hash: Joi.string().allow("").required(),
|
|
14
48
|
}).required();
|
|
15
49
|
}
|
|
16
50
|
|
|
51
|
+
/** @returns {GetShortLinkClickStatsParam} */
|
|
17
52
|
static getShortLinkClickStats() {
|
|
18
53
|
return Joi.object({
|
|
19
54
|
surlId: Joi.string().allow("").required(),
|
|
20
55
|
}).required();
|
|
21
56
|
}
|
|
22
57
|
|
|
58
|
+
/** @returns {GetShortLinksParam} */
|
|
23
59
|
static getShortLinks() {
|
|
24
60
|
return Joi.object({
|
|
25
61
|
pageNo: Joi.number(),
|
|
@@ -30,12 +66,13 @@ class ShareValidator {
|
|
|
30
66
|
}).required();
|
|
31
67
|
}
|
|
32
68
|
|
|
69
|
+
/** @returns {UpdateShortLinkByIdParam} */
|
|
33
70
|
static updateShortLinkById() {
|
|
34
71
|
return Joi.object({
|
|
35
72
|
id: Joi.string().allow("").required(),
|
|
36
|
-
body:
|
|
73
|
+
body: SharePlatformModel.ShortLinkReq().required(),
|
|
37
74
|
}).required();
|
|
38
75
|
}
|
|
39
76
|
}
|
|
40
77
|
|
|
41
|
-
module.exports =
|
|
78
|
+
module.exports = SharePlatformApplicationValidator;
|