@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 LeadPlatformValidator = require("./LeadPlatformValidator");
|
|
5
|
+
const LeadPlatformModel = require("./LeadPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,15 +12,15 @@ class Lead {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
15
|
+
* @param {LeadPlatformValidator.CreateHistoryParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<LeadPlatformModel.TicketHistory>} - Success response
|
|
18
|
+
* @name createHistory
|
|
19
19
|
* @summary: Create history for specific company level ticket
|
|
20
|
-
* @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
20
|
+
* @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createHistory/).
|
|
21
21
|
*/
|
|
22
|
-
async createHistory({ id, body } = {}) {
|
|
23
|
-
const { error } =
|
|
22
|
+
async createHistory({ id, body } = {}, { headers } = { headers: false }) {
|
|
23
|
+
const { error } = LeadPlatformValidator.createHistory().validate(
|
|
24
24
|
{
|
|
25
25
|
id,
|
|
26
26
|
body,
|
|
@@ -32,7 +32,7 @@ class Lead {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// Showing warrnings if extra unknown parameters are found
|
|
35
|
-
const { error: warrning } =
|
|
35
|
+
const { error: warrning } = LeadPlatformValidator.createHistory().validate(
|
|
36
36
|
{
|
|
37
37
|
id,
|
|
38
38
|
body,
|
|
@@ -42,9 +42,8 @@ class Lead {
|
|
|
42
42
|
if (warrning) {
|
|
43
43
|
Logger({
|
|
44
44
|
level: "WARN",
|
|
45
|
-
message:
|
|
45
|
+
message: `Parameter Validation warrnings for platform > Lead > createHistory \n ${warrning}`,
|
|
46
46
|
});
|
|
47
|
-
Logger({ level: "WARN", message: warrning });
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
const query_params = {};
|
|
@@ -57,10 +56,18 @@ class Lead {
|
|
|
57
56
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
|
|
58
57
|
query_params,
|
|
59
58
|
body,
|
|
60
|
-
xHeaders
|
|
59
|
+
xHeaders,
|
|
60
|
+
{ headers }
|
|
61
61
|
);
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
let responseData = response;
|
|
64
|
+
if (headers) {
|
|
65
|
+
responseData = response[0];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const {
|
|
69
|
+
error: res_error,
|
|
70
|
+
} = LeadPlatformModel.TicketHistory().validate(responseData, {
|
|
64
71
|
abortEarly: false,
|
|
65
72
|
allowUnknown: false,
|
|
66
73
|
});
|
|
@@ -68,23 +75,23 @@ class Lead {
|
|
|
68
75
|
if (res_error) {
|
|
69
76
|
Logger({
|
|
70
77
|
level: "WARN",
|
|
71
|
-
message:
|
|
78
|
+
message: `Response Validation Warnnings for platform > Lead > createHistory \n ${res_error}`,
|
|
72
79
|
});
|
|
73
|
-
Logger({ level: "WARN", message: res_error });
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
return response;
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
/**
|
|
80
|
-
* @param {
|
|
81
|
-
* @param {
|
|
82
|
-
* @returns {Promise<Ticket>} - Success response
|
|
86
|
+
* @param {LeadPlatformValidator.CreateTicketParam} arg - Arg object
|
|
87
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
88
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
89
|
+
* @name createTicket
|
|
83
90
|
* @summary: Creates a company level ticket
|
|
84
|
-
* @description: Creates a company level ticket
|
|
91
|
+
* @description: Creates a company level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createTicket/).
|
|
85
92
|
*/
|
|
86
|
-
async createTicket({ body } = {}) {
|
|
87
|
-
const { error } =
|
|
93
|
+
async createTicket({ body } = {}, { headers } = { headers: false }) {
|
|
94
|
+
const { error } = LeadPlatformValidator.createTicket().validate(
|
|
88
95
|
{
|
|
89
96
|
body,
|
|
90
97
|
},
|
|
@@ -95,7 +102,7 @@ class Lead {
|
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
// Showing warrnings if extra unknown parameters are found
|
|
98
|
-
const { error: warrning } =
|
|
105
|
+
const { error: warrning } = LeadPlatformValidator.createTicket().validate(
|
|
99
106
|
{
|
|
100
107
|
body,
|
|
101
108
|
},
|
|
@@ -104,9 +111,8 @@ class Lead {
|
|
|
104
111
|
if (warrning) {
|
|
105
112
|
Logger({
|
|
106
113
|
level: "WARN",
|
|
107
|
-
message:
|
|
114
|
+
message: `Parameter Validation warrnings for platform > Lead > createTicket \n ${warrning}`,
|
|
108
115
|
});
|
|
109
|
-
Logger({ level: "WARN", message: warrning });
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
const query_params = {};
|
|
@@ -119,10 +125,18 @@ class Lead {
|
|
|
119
125
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
|
|
120
126
|
query_params,
|
|
121
127
|
body,
|
|
122
|
-
xHeaders
|
|
128
|
+
xHeaders,
|
|
129
|
+
{ headers }
|
|
123
130
|
);
|
|
124
131
|
|
|
125
|
-
|
|
132
|
+
let responseData = response;
|
|
133
|
+
if (headers) {
|
|
134
|
+
responseData = response[0];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const {
|
|
138
|
+
error: res_error,
|
|
139
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
126
140
|
abortEarly: false,
|
|
127
141
|
allowUnknown: false,
|
|
128
142
|
});
|
|
@@ -130,24 +144,23 @@ class Lead {
|
|
|
130
144
|
if (res_error) {
|
|
131
145
|
Logger({
|
|
132
146
|
level: "WARN",
|
|
133
|
-
message:
|
|
147
|
+
message: `Response Validation Warnnings for platform > Lead > createTicket \n ${res_error}`,
|
|
134
148
|
});
|
|
135
|
-
Logger({ level: "WARN", message: res_error });
|
|
136
149
|
}
|
|
137
150
|
|
|
138
151
|
return response;
|
|
139
152
|
}
|
|
140
153
|
|
|
141
154
|
/**
|
|
142
|
-
* @param {
|
|
143
|
-
* @param {
|
|
144
|
-
* @
|
|
145
|
-
* @
|
|
155
|
+
* @param {LeadPlatformValidator.EditTicketParam} arg - Arg object
|
|
156
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
157
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
158
|
+
* @name editTicket
|
|
146
159
|
* @summary: Edits ticket details of a company level ticket
|
|
147
|
-
* @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
160
|
+
* @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editTicket/).
|
|
148
161
|
*/
|
|
149
|
-
async editTicket({ id, body } = {}) {
|
|
150
|
-
const { error } =
|
|
162
|
+
async editTicket({ id, body } = {}, { headers } = { headers: false }) {
|
|
163
|
+
const { error } = LeadPlatformValidator.editTicket().validate(
|
|
151
164
|
{
|
|
152
165
|
id,
|
|
153
166
|
body,
|
|
@@ -159,7 +172,7 @@ class Lead {
|
|
|
159
172
|
}
|
|
160
173
|
|
|
161
174
|
// Showing warrnings if extra unknown parameters are found
|
|
162
|
-
const { error: warrning } =
|
|
175
|
+
const { error: warrning } = LeadPlatformValidator.editTicket().validate(
|
|
163
176
|
{
|
|
164
177
|
id,
|
|
165
178
|
body,
|
|
@@ -169,9 +182,8 @@ class Lead {
|
|
|
169
182
|
if (warrning) {
|
|
170
183
|
Logger({
|
|
171
184
|
level: "WARN",
|
|
172
|
-
message:
|
|
185
|
+
message: `Parameter Validation warrnings for platform > Lead > editTicket \n ${warrning}`,
|
|
173
186
|
});
|
|
174
|
-
Logger({ level: "WARN", message: warrning });
|
|
175
187
|
}
|
|
176
188
|
|
|
177
189
|
const query_params = {};
|
|
@@ -184,10 +196,18 @@ class Lead {
|
|
|
184
196
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
185
197
|
query_params,
|
|
186
198
|
body,
|
|
187
|
-
xHeaders
|
|
199
|
+
xHeaders,
|
|
200
|
+
{ headers }
|
|
188
201
|
);
|
|
189
202
|
|
|
190
|
-
|
|
203
|
+
let responseData = response;
|
|
204
|
+
if (headers) {
|
|
205
|
+
responseData = response[0];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const {
|
|
209
|
+
error: res_error,
|
|
210
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
191
211
|
abortEarly: false,
|
|
192
212
|
allowUnknown: false,
|
|
193
213
|
});
|
|
@@ -195,23 +215,23 @@ class Lead {
|
|
|
195
215
|
if (res_error) {
|
|
196
216
|
Logger({
|
|
197
217
|
level: "WARN",
|
|
198
|
-
message:
|
|
218
|
+
message: `Response Validation Warnnings for platform > Lead > editTicket \n ${res_error}`,
|
|
199
219
|
});
|
|
200
|
-
Logger({ level: "WARN", message: res_error });
|
|
201
220
|
}
|
|
202
221
|
|
|
203
222
|
return response;
|
|
204
223
|
}
|
|
205
224
|
|
|
206
225
|
/**
|
|
207
|
-
* @param {
|
|
208
|
-
* @param {
|
|
209
|
-
* @returns {Promise<TicketFeedbackList>} - Success response
|
|
226
|
+
* @param {LeadPlatformValidator.GetFeedbacksParam} arg - Arg object
|
|
227
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
228
|
+
* @returns {Promise<LeadPlatformModel.TicketFeedbackList>} - Success response
|
|
229
|
+
* @name getFeedbacks
|
|
210
230
|
* @summary: Gets a list of feedback submitted against that ticket
|
|
211
|
-
* @description: Gets a list of feedback submitted against that ticket
|
|
231
|
+
* @description: Gets a list of feedback submitted against that ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getFeedbacks/).
|
|
212
232
|
*/
|
|
213
|
-
async getFeedbacks({ id } = {}) {
|
|
214
|
-
const { error } =
|
|
233
|
+
async getFeedbacks({ id } = {}, { headers } = { headers: false }) {
|
|
234
|
+
const { error } = LeadPlatformValidator.getFeedbacks().validate(
|
|
215
235
|
{
|
|
216
236
|
id,
|
|
217
237
|
},
|
|
@@ -222,7 +242,7 @@ class Lead {
|
|
|
222
242
|
}
|
|
223
243
|
|
|
224
244
|
// Showing warrnings if extra unknown parameters are found
|
|
225
|
-
const { error: warrning } =
|
|
245
|
+
const { error: warrning } = LeadPlatformValidator.getFeedbacks().validate(
|
|
226
246
|
{
|
|
227
247
|
id,
|
|
228
248
|
},
|
|
@@ -231,9 +251,8 @@ class Lead {
|
|
|
231
251
|
if (warrning) {
|
|
232
252
|
Logger({
|
|
233
253
|
level: "WARN",
|
|
234
|
-
message:
|
|
254
|
+
message: `Parameter Validation warrnings for platform > Lead > getFeedbacks \n ${warrning}`,
|
|
235
255
|
});
|
|
236
|
-
Logger({ level: "WARN", message: warrning });
|
|
237
256
|
}
|
|
238
257
|
|
|
239
258
|
const query_params = {};
|
|
@@ -246,12 +265,18 @@ class Lead {
|
|
|
246
265
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
|
|
247
266
|
query_params,
|
|
248
267
|
undefined,
|
|
249
|
-
xHeaders
|
|
268
|
+
xHeaders,
|
|
269
|
+
{ headers }
|
|
250
270
|
);
|
|
251
271
|
|
|
272
|
+
let responseData = response;
|
|
273
|
+
if (headers) {
|
|
274
|
+
responseData = response[0];
|
|
275
|
+
}
|
|
276
|
+
|
|
252
277
|
const {
|
|
253
278
|
error: res_error,
|
|
254
|
-
} =
|
|
279
|
+
} = LeadPlatformModel.TicketFeedbackList().validate(responseData, {
|
|
255
280
|
abortEarly: false,
|
|
256
281
|
allowUnknown: false,
|
|
257
282
|
});
|
|
@@ -259,22 +284,23 @@ class Lead {
|
|
|
259
284
|
if (res_error) {
|
|
260
285
|
Logger({
|
|
261
286
|
level: "WARN",
|
|
262
|
-
message:
|
|
287
|
+
message: `Response Validation Warnnings for platform > Lead > getFeedbacks \n ${res_error}`,
|
|
263
288
|
});
|
|
264
|
-
Logger({ level: "WARN", message: res_error });
|
|
265
289
|
}
|
|
266
290
|
|
|
267
291
|
return response;
|
|
268
292
|
}
|
|
269
293
|
|
|
270
294
|
/**
|
|
271
|
-
* @param {
|
|
272
|
-
* @
|
|
295
|
+
* @param {LeadPlatformValidator.GetGeneralConfigParam} arg - Arg object
|
|
296
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
297
|
+
* @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
|
|
298
|
+
* @name getGeneralConfig
|
|
273
299
|
* @summary: Get general support configuration.
|
|
274
|
-
* @description: Get general support configuration.
|
|
300
|
+
* @description: Get general support configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getGeneralConfig/).
|
|
275
301
|
*/
|
|
276
|
-
async getGeneralConfig({} = {}) {
|
|
277
|
-
const { error } =
|
|
302
|
+
async getGeneralConfig({ headers } = { headers: false }) {
|
|
303
|
+
const { error } = LeadPlatformValidator.getGeneralConfig().validate(
|
|
278
304
|
{},
|
|
279
305
|
{ abortEarly: false, allowUnknown: true }
|
|
280
306
|
);
|
|
@@ -283,16 +309,17 @@ class Lead {
|
|
|
283
309
|
}
|
|
284
310
|
|
|
285
311
|
// Showing warrnings if extra unknown parameters are found
|
|
286
|
-
const {
|
|
312
|
+
const {
|
|
313
|
+
error: warrning,
|
|
314
|
+
} = LeadPlatformValidator.getGeneralConfig().validate(
|
|
287
315
|
{},
|
|
288
316
|
{ abortEarly: false, allowUnknown: false }
|
|
289
317
|
);
|
|
290
318
|
if (warrning) {
|
|
291
319
|
Logger({
|
|
292
320
|
level: "WARN",
|
|
293
|
-
message:
|
|
321
|
+
message: `Parameter Validation warrnings for platform > Lead > getGeneralConfig \n ${warrning}`,
|
|
294
322
|
});
|
|
295
|
-
Logger({ level: "WARN", message: warrning });
|
|
296
323
|
}
|
|
297
324
|
|
|
298
325
|
const query_params = {};
|
|
@@ -305,12 +332,18 @@ class Lead {
|
|
|
305
332
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/general-config`,
|
|
306
333
|
query_params,
|
|
307
334
|
undefined,
|
|
308
|
-
xHeaders
|
|
335
|
+
xHeaders,
|
|
336
|
+
{ headers }
|
|
309
337
|
);
|
|
310
338
|
|
|
339
|
+
let responseData = response;
|
|
340
|
+
if (headers) {
|
|
341
|
+
responseData = response[0];
|
|
342
|
+
}
|
|
343
|
+
|
|
311
344
|
const {
|
|
312
345
|
error: res_error,
|
|
313
|
-
} =
|
|
346
|
+
} = LeadPlatformModel.CloseVideoRoomResponse().validate(responseData, {
|
|
314
347
|
abortEarly: false,
|
|
315
348
|
allowUnknown: false,
|
|
316
349
|
});
|
|
@@ -318,23 +351,23 @@ class Lead {
|
|
|
318
351
|
if (res_error) {
|
|
319
352
|
Logger({
|
|
320
353
|
level: "WARN",
|
|
321
|
-
message:
|
|
354
|
+
message: `Response Validation Warnnings for platform > Lead > getGeneralConfig \n ${res_error}`,
|
|
322
355
|
});
|
|
323
|
-
Logger({ level: "WARN", message: res_error });
|
|
324
356
|
}
|
|
325
357
|
|
|
326
358
|
return response;
|
|
327
359
|
}
|
|
328
360
|
|
|
329
361
|
/**
|
|
330
|
-
* @param {
|
|
331
|
-
* @param {
|
|
332
|
-
* @returns {Promise<Ticket>} - Success response
|
|
362
|
+
* @param {LeadPlatformValidator.GetTicketParam} arg - Arg object
|
|
363
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
364
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
365
|
+
* @name getTicket
|
|
333
366
|
* @summary: Retreives ticket details of a company level ticket with ticket ID
|
|
334
|
-
* @description: Retreives ticket details of a company level ticket
|
|
367
|
+
* @description: Retreives ticket details of a company level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicket/).
|
|
335
368
|
*/
|
|
336
|
-
async getTicket({ id } = {}) {
|
|
337
|
-
const { error } =
|
|
369
|
+
async getTicket({ id } = {}, { headers } = { headers: false }) {
|
|
370
|
+
const { error } = LeadPlatformValidator.getTicket().validate(
|
|
338
371
|
{
|
|
339
372
|
id,
|
|
340
373
|
},
|
|
@@ -345,7 +378,7 @@ class Lead {
|
|
|
345
378
|
}
|
|
346
379
|
|
|
347
380
|
// Showing warrnings if extra unknown parameters are found
|
|
348
|
-
const { error: warrning } =
|
|
381
|
+
const { error: warrning } = LeadPlatformValidator.getTicket().validate(
|
|
349
382
|
{
|
|
350
383
|
id,
|
|
351
384
|
},
|
|
@@ -354,9 +387,8 @@ class Lead {
|
|
|
354
387
|
if (warrning) {
|
|
355
388
|
Logger({
|
|
356
389
|
level: "WARN",
|
|
357
|
-
message:
|
|
390
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicket \n ${warrning}`,
|
|
358
391
|
});
|
|
359
|
-
Logger({ level: "WARN", message: warrning });
|
|
360
392
|
}
|
|
361
393
|
|
|
362
394
|
const query_params = {};
|
|
@@ -369,10 +401,18 @@ class Lead {
|
|
|
369
401
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
370
402
|
query_params,
|
|
371
403
|
undefined,
|
|
372
|
-
xHeaders
|
|
404
|
+
xHeaders,
|
|
405
|
+
{ headers }
|
|
373
406
|
);
|
|
374
407
|
|
|
375
|
-
|
|
408
|
+
let responseData = response;
|
|
409
|
+
if (headers) {
|
|
410
|
+
responseData = response[0];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const {
|
|
414
|
+
error: res_error,
|
|
415
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
376
416
|
abortEarly: false,
|
|
377
417
|
allowUnknown: false,
|
|
378
418
|
});
|
|
@@ -380,23 +420,23 @@ class Lead {
|
|
|
380
420
|
if (res_error) {
|
|
381
421
|
Logger({
|
|
382
422
|
level: "WARN",
|
|
383
|
-
message:
|
|
423
|
+
message: `Response Validation Warnnings for platform > Lead > getTicket \n ${res_error}`,
|
|
384
424
|
});
|
|
385
|
-
Logger({ level: "WARN", message: res_error });
|
|
386
425
|
}
|
|
387
426
|
|
|
388
427
|
return response;
|
|
389
428
|
}
|
|
390
429
|
|
|
391
430
|
/**
|
|
392
|
-
* @param {
|
|
393
|
-
* @param {
|
|
394
|
-
* @returns {Promise<TicketHistoryList>} - Success response
|
|
431
|
+
* @param {LeadPlatformValidator.GetTicketHistoryParam} arg - Arg object
|
|
432
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
433
|
+
* @returns {Promise<LeadPlatformModel.TicketHistoryList>} - Success response
|
|
434
|
+
* @name getTicketHistory
|
|
395
435
|
* @summary: Gets history list for specific company level ticket
|
|
396
|
-
* @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
436
|
+
* @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicketHistory/).
|
|
397
437
|
*/
|
|
398
|
-
async getTicketHistory({ id } = {}) {
|
|
399
|
-
const { error } =
|
|
438
|
+
async getTicketHistory({ id } = {}, { headers } = { headers: false }) {
|
|
439
|
+
const { error } = LeadPlatformValidator.getTicketHistory().validate(
|
|
400
440
|
{
|
|
401
441
|
id,
|
|
402
442
|
},
|
|
@@ -407,7 +447,9 @@ class Lead {
|
|
|
407
447
|
}
|
|
408
448
|
|
|
409
449
|
// Showing warrnings if extra unknown parameters are found
|
|
410
|
-
const {
|
|
450
|
+
const {
|
|
451
|
+
error: warrning,
|
|
452
|
+
} = LeadPlatformValidator.getTicketHistory().validate(
|
|
411
453
|
{
|
|
412
454
|
id,
|
|
413
455
|
},
|
|
@@ -416,9 +458,8 @@ class Lead {
|
|
|
416
458
|
if (warrning) {
|
|
417
459
|
Logger({
|
|
418
460
|
level: "WARN",
|
|
419
|
-
message:
|
|
461
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicketHistory \n ${warrning}`,
|
|
420
462
|
});
|
|
421
|
-
Logger({ level: "WARN", message: warrning });
|
|
422
463
|
}
|
|
423
464
|
|
|
424
465
|
const query_params = {};
|
|
@@ -431,12 +472,18 @@ class Lead {
|
|
|
431
472
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
|
|
432
473
|
query_params,
|
|
433
474
|
undefined,
|
|
434
|
-
xHeaders
|
|
475
|
+
xHeaders,
|
|
476
|
+
{ headers }
|
|
435
477
|
);
|
|
436
478
|
|
|
479
|
+
let responseData = response;
|
|
480
|
+
if (headers) {
|
|
481
|
+
responseData = response[0];
|
|
482
|
+
}
|
|
483
|
+
|
|
437
484
|
const {
|
|
438
485
|
error: res_error,
|
|
439
|
-
} =
|
|
486
|
+
} = LeadPlatformModel.TicketHistoryList().validate(responseData, {
|
|
440
487
|
abortEarly: false,
|
|
441
488
|
allowUnknown: false,
|
|
442
489
|
});
|
|
@@ -444,43 +491,26 @@ class Lead {
|
|
|
444
491
|
if (res_error) {
|
|
445
492
|
Logger({
|
|
446
493
|
level: "WARN",
|
|
447
|
-
message:
|
|
494
|
+
message: `Response Validation Warnnings for platform > Lead > getTicketHistory \n ${res_error}`,
|
|
448
495
|
});
|
|
449
|
-
Logger({ level: "WARN", message: res_error });
|
|
450
496
|
}
|
|
451
497
|
|
|
452
498
|
return response;
|
|
453
499
|
}
|
|
454
500
|
|
|
455
501
|
/**
|
|
456
|
-
* @param {
|
|
457
|
-
* @param {
|
|
458
|
-
*
|
|
459
|
-
* @
|
|
460
|
-
* the ticket filters
|
|
461
|
-
* @param {string} [arg.q] - Search through ticket titles and description
|
|
462
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
463
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
464
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
465
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
466
|
-
* given set of results.
|
|
467
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
468
|
-
* page. Default is 12.
|
|
469
|
-
* @returns {Promise<TicketList>} - Success response
|
|
502
|
+
* @param {LeadPlatformValidator.GetTicketsParam} arg - Arg object
|
|
503
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
504
|
+
* @returns {Promise<LeadPlatformModel.TicketList>} - Success response
|
|
505
|
+
* @name getTickets
|
|
470
506
|
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
471
|
-
* @description: Gets the list of company level tickets and/or ticket filters
|
|
507
|
+
* @description: Gets the list of company level tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTickets/).
|
|
472
508
|
*/
|
|
473
|
-
async getTickets(
|
|
474
|
-
items,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
priority,
|
|
479
|
-
category,
|
|
480
|
-
pageNo,
|
|
481
|
-
pageSize,
|
|
482
|
-
} = {}) {
|
|
483
|
-
const { error } = LeadValidator.getTickets().validate(
|
|
509
|
+
async getTickets(
|
|
510
|
+
{ items, filters, q, status, priority, category, pageNo, pageSize } = {},
|
|
511
|
+
{ headers } = { headers: false }
|
|
512
|
+
) {
|
|
513
|
+
const { error } = LeadPlatformValidator.getTickets().validate(
|
|
484
514
|
{
|
|
485
515
|
items,
|
|
486
516
|
filters,
|
|
@@ -498,7 +528,7 @@ class Lead {
|
|
|
498
528
|
}
|
|
499
529
|
|
|
500
530
|
// Showing warrnings if extra unknown parameters are found
|
|
501
|
-
const { error: warrning } =
|
|
531
|
+
const { error: warrning } = LeadPlatformValidator.getTickets().validate(
|
|
502
532
|
{
|
|
503
533
|
items,
|
|
504
534
|
filters,
|
|
@@ -514,9 +544,8 @@ class Lead {
|
|
|
514
544
|
if (warrning) {
|
|
515
545
|
Logger({
|
|
516
546
|
level: "WARN",
|
|
517
|
-
message:
|
|
547
|
+
message: `Parameter Validation warrnings for platform > Lead > getTickets \n ${warrning}`,
|
|
518
548
|
});
|
|
519
|
-
Logger({ level: "WARN", message: warrning });
|
|
520
549
|
}
|
|
521
550
|
|
|
522
551
|
const query_params = {};
|
|
@@ -537,10 +566,18 @@ class Lead {
|
|
|
537
566
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
|
|
538
567
|
query_params,
|
|
539
568
|
undefined,
|
|
540
|
-
xHeaders
|
|
569
|
+
xHeaders,
|
|
570
|
+
{ headers }
|
|
541
571
|
);
|
|
542
572
|
|
|
543
|
-
|
|
573
|
+
let responseData = response;
|
|
574
|
+
if (headers) {
|
|
575
|
+
responseData = response[0];
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
const {
|
|
579
|
+
error: res_error,
|
|
580
|
+
} = LeadPlatformModel.TicketList().validate(responseData, {
|
|
544
581
|
abortEarly: false,
|
|
545
582
|
allowUnknown: false,
|
|
546
583
|
});
|
|
@@ -548,9 +585,8 @@ class Lead {
|
|
|
548
585
|
if (res_error) {
|
|
549
586
|
Logger({
|
|
550
587
|
level: "WARN",
|
|
551
|
-
message:
|
|
588
|
+
message: `Response Validation Warnnings for platform > Lead > getTickets \n ${res_error}`,
|
|
552
589
|
});
|
|
553
|
-
Logger({ level: "WARN", message: res_error });
|
|
554
590
|
}
|
|
555
591
|
|
|
556
592
|
return response;
|
|
@@ -564,10 +600,11 @@ class Lead {
|
|
|
564
600
|
* the ticket filters
|
|
565
601
|
* @param {string} [arg.q] - Search through ticket titles and description
|
|
566
602
|
* @param {string} [arg.status] - Filter tickets on status
|
|
567
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
603
|
+
* @param {LeadPlatformModel.PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
568
604
|
* @param {string} [arg.category] - Filter tickets on category
|
|
569
605
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
570
606
|
* page. Default is 12.
|
|
607
|
+
* @returns {Paginator<LeadPlatformModel.TicketList>}
|
|
571
608
|
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
572
609
|
* @description: Gets the list of company level tickets and/or ticket filters
|
|
573
610
|
*/
|
|
@@ -606,14 +643,19 @@ class Lead {
|
|
|
606
643
|
}
|
|
607
644
|
|
|
608
645
|
/**
|
|
609
|
-
* @param {
|
|
610
|
-
* @param {
|
|
611
|
-
* @returns {Promise<GetTokenForVideoRoomResponse>} -
|
|
646
|
+
* @param {LeadPlatformValidator.GetTokenForVideoRoomParam} arg - Arg object
|
|
647
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
648
|
+
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
649
|
+
* Success response
|
|
650
|
+
* @name getTokenForVideoRoom
|
|
612
651
|
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
613
|
-
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
|
|
652
|
+
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTokenForVideoRoom/).
|
|
614
653
|
*/
|
|
615
|
-
async getTokenForVideoRoom(
|
|
616
|
-
|
|
654
|
+
async getTokenForVideoRoom(
|
|
655
|
+
{ uniqueName } = {},
|
|
656
|
+
{ headers } = { headers: false }
|
|
657
|
+
) {
|
|
658
|
+
const { error } = LeadPlatformValidator.getTokenForVideoRoom().validate(
|
|
617
659
|
{
|
|
618
660
|
uniqueName,
|
|
619
661
|
},
|
|
@@ -624,7 +666,9 @@ class Lead {
|
|
|
624
666
|
}
|
|
625
667
|
|
|
626
668
|
// Showing warrnings if extra unknown parameters are found
|
|
627
|
-
const {
|
|
669
|
+
const {
|
|
670
|
+
error: warrning,
|
|
671
|
+
} = LeadPlatformValidator.getTokenForVideoRoom().validate(
|
|
628
672
|
{
|
|
629
673
|
uniqueName,
|
|
630
674
|
},
|
|
@@ -633,9 +677,8 @@ class Lead {
|
|
|
633
677
|
if (warrning) {
|
|
634
678
|
Logger({
|
|
635
679
|
level: "WARN",
|
|
636
|
-
message:
|
|
680
|
+
message: `Parameter Validation warrnings for platform > Lead > getTokenForVideoRoom \n ${warrning}`,
|
|
637
681
|
});
|
|
638
|
-
Logger({ level: "WARN", message: warrning });
|
|
639
682
|
}
|
|
640
683
|
|
|
641
684
|
const query_params = {};
|
|
@@ -648,36 +691,47 @@ class Lead {
|
|
|
648
691
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/token`,
|
|
649
692
|
query_params,
|
|
650
693
|
undefined,
|
|
651
|
-
xHeaders
|
|
694
|
+
xHeaders,
|
|
695
|
+
{ headers }
|
|
652
696
|
);
|
|
653
697
|
|
|
698
|
+
let responseData = response;
|
|
699
|
+
if (headers) {
|
|
700
|
+
responseData = response[0];
|
|
701
|
+
}
|
|
702
|
+
|
|
654
703
|
const {
|
|
655
704
|
error: res_error,
|
|
656
|
-
} =
|
|
657
|
-
|
|
658
|
-
allowUnknown: false
|
|
659
|
-
|
|
705
|
+
} = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
|
|
706
|
+
responseData,
|
|
707
|
+
{ abortEarly: false, allowUnknown: false }
|
|
708
|
+
);
|
|
660
709
|
|
|
661
710
|
if (res_error) {
|
|
662
711
|
Logger({
|
|
663
712
|
level: "WARN",
|
|
664
|
-
message:
|
|
713
|
+
message: `Response Validation Warnnings for platform > Lead > getTokenForVideoRoom \n ${res_error}`,
|
|
665
714
|
});
|
|
666
|
-
Logger({ level: "WARN", message: res_error });
|
|
667
715
|
}
|
|
668
716
|
|
|
669
717
|
return response;
|
|
670
718
|
}
|
|
671
719
|
|
|
672
720
|
/**
|
|
673
|
-
* @param {
|
|
674
|
-
* @param {
|
|
675
|
-
* @returns {Promise<GetParticipantsInsideVideoRoomResponse>}
|
|
721
|
+
* @param {LeadPlatformValidator.GetVideoParticipantsParam} arg - Arg object
|
|
722
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
723
|
+
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
724
|
+
* - Success response
|
|
725
|
+
*
|
|
726
|
+
* @name getVideoParticipants
|
|
676
727
|
* @summary: Get participants of a specific Video Room using it's unique name
|
|
677
|
-
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
|
|
728
|
+
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getVideoParticipants/).
|
|
678
729
|
*/
|
|
679
|
-
async getVideoParticipants(
|
|
680
|
-
|
|
730
|
+
async getVideoParticipants(
|
|
731
|
+
{ uniqueName } = {},
|
|
732
|
+
{ headers } = { headers: false }
|
|
733
|
+
) {
|
|
734
|
+
const { error } = LeadPlatformValidator.getVideoParticipants().validate(
|
|
681
735
|
{
|
|
682
736
|
uniqueName,
|
|
683
737
|
},
|
|
@@ -688,7 +742,9 @@ class Lead {
|
|
|
688
742
|
}
|
|
689
743
|
|
|
690
744
|
// Showing warrnings if extra unknown parameters are found
|
|
691
|
-
const {
|
|
745
|
+
const {
|
|
746
|
+
error: warrning,
|
|
747
|
+
} = LeadPlatformValidator.getVideoParticipants().validate(
|
|
692
748
|
{
|
|
693
749
|
uniqueName,
|
|
694
750
|
},
|
|
@@ -697,9 +753,8 @@ class Lead {
|
|
|
697
753
|
if (warrning) {
|
|
698
754
|
Logger({
|
|
699
755
|
level: "WARN",
|
|
700
|
-
message:
|
|
756
|
+
message: `Parameter Validation warrnings for platform > Lead > getVideoParticipants \n ${warrning}`,
|
|
701
757
|
});
|
|
702
|
-
Logger({ level: "WARN", message: warrning });
|
|
703
758
|
}
|
|
704
759
|
|
|
705
760
|
const query_params = {};
|
|
@@ -712,37 +767,42 @@ class Lead {
|
|
|
712
767
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/participants`,
|
|
713
768
|
query_params,
|
|
714
769
|
undefined,
|
|
715
|
-
xHeaders
|
|
770
|
+
xHeaders,
|
|
771
|
+
{ headers }
|
|
716
772
|
);
|
|
717
773
|
|
|
774
|
+
let responseData = response;
|
|
775
|
+
if (headers) {
|
|
776
|
+
responseData = response[0];
|
|
777
|
+
}
|
|
778
|
+
|
|
718
779
|
const {
|
|
719
780
|
error: res_error,
|
|
720
|
-
} =
|
|
721
|
-
|
|
722
|
-
allowUnknown: false
|
|
723
|
-
|
|
781
|
+
} = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
|
|
782
|
+
responseData,
|
|
783
|
+
{ abortEarly: false, allowUnknown: false }
|
|
784
|
+
);
|
|
724
785
|
|
|
725
786
|
if (res_error) {
|
|
726
787
|
Logger({
|
|
727
788
|
level: "WARN",
|
|
728
|
-
message:
|
|
789
|
+
message: `Response Validation Warnnings for platform > Lead > getVideoParticipants \n ${res_error}`,
|
|
729
790
|
});
|
|
730
|
-
Logger({ level: "WARN", message: res_error });
|
|
731
791
|
}
|
|
732
792
|
|
|
733
793
|
return response;
|
|
734
794
|
}
|
|
735
795
|
|
|
736
796
|
/**
|
|
737
|
-
* @param {
|
|
738
|
-
* @param {
|
|
739
|
-
* @
|
|
740
|
-
* @
|
|
797
|
+
* @param {LeadPlatformValidator.SubmitFeedbackParam} arg - Arg object
|
|
798
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
799
|
+
* @returns {Promise<LeadPlatformModel.TicketFeedback>} - Success response
|
|
800
|
+
* @name submitFeedback
|
|
741
801
|
* @summary: Submit a response for feeback form against that ticket
|
|
742
|
-
* @description: Submit a response for feeback form against that ticket
|
|
802
|
+
* @description: Submit a response for feeback form against that ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/submitFeedback/).
|
|
743
803
|
*/
|
|
744
|
-
async submitFeedback({ id, body } = {}) {
|
|
745
|
-
const { error } =
|
|
804
|
+
async submitFeedback({ id, body } = {}, { headers } = { headers: false }) {
|
|
805
|
+
const { error } = LeadPlatformValidator.submitFeedback().validate(
|
|
746
806
|
{
|
|
747
807
|
id,
|
|
748
808
|
body,
|
|
@@ -754,7 +814,7 @@ class Lead {
|
|
|
754
814
|
}
|
|
755
815
|
|
|
756
816
|
// Showing warrnings if extra unknown parameters are found
|
|
757
|
-
const { error: warrning } =
|
|
817
|
+
const { error: warrning } = LeadPlatformValidator.submitFeedback().validate(
|
|
758
818
|
{
|
|
759
819
|
id,
|
|
760
820
|
body,
|
|
@@ -764,9 +824,8 @@ class Lead {
|
|
|
764
824
|
if (warrning) {
|
|
765
825
|
Logger({
|
|
766
826
|
level: "WARN",
|
|
767
|
-
message:
|
|
827
|
+
message: `Parameter Validation warrnings for platform > Lead > submitFeedback \n ${warrning}`,
|
|
768
828
|
});
|
|
769
|
-
Logger({ level: "WARN", message: warrning });
|
|
770
829
|
}
|
|
771
830
|
|
|
772
831
|
const query_params = {};
|
|
@@ -779,10 +838,18 @@ class Lead {
|
|
|
779
838
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
|
|
780
839
|
query_params,
|
|
781
840
|
body,
|
|
782
|
-
xHeaders
|
|
841
|
+
xHeaders,
|
|
842
|
+
{ headers }
|
|
783
843
|
);
|
|
784
844
|
|
|
785
|
-
|
|
845
|
+
let responseData = response;
|
|
846
|
+
if (headers) {
|
|
847
|
+
responseData = response[0];
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
const {
|
|
851
|
+
error: res_error,
|
|
852
|
+
} = LeadPlatformModel.TicketFeedback().validate(responseData, {
|
|
786
853
|
abortEarly: false,
|
|
787
854
|
allowUnknown: false,
|
|
788
855
|
});
|
|
@@ -790,9 +857,8 @@ class Lead {
|
|
|
790
857
|
if (res_error) {
|
|
791
858
|
Logger({
|
|
792
859
|
level: "WARN",
|
|
793
|
-
message:
|
|
860
|
+
message: `Response Validation Warnnings for platform > Lead > submitFeedback \n ${res_error}`,
|
|
794
861
|
});
|
|
795
|
-
Logger({ level: "WARN", message: res_error });
|
|
796
862
|
}
|
|
797
863
|
|
|
798
864
|
return response;
|