@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 LeadPlatformApplicationValidator = require("./LeadPlatformApplicationValidator");
|
|
5
|
+
const LeadPlatformModel = require("./LeadPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -13,14 +13,17 @@ class Lead {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @returns {Promise<CloseVideoRoomResponse>} - Success response
|
|
16
|
+
* @param {LeadPlatformApplicationValidator.CloseVideoRoomParam} arg - Arg object
|
|
17
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
|
+
* @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
|
|
19
|
+
* @name closeVideoRoom
|
|
19
20
|
* @summary: Close the video room and force all participants to leave.
|
|
20
|
-
* @description: Close the video room and force all participants to leave.
|
|
21
|
+
* @description: Close the video room and force all participants to leave. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/closeVideoRoom/).
|
|
21
22
|
*/
|
|
22
|
-
async closeVideoRoom({ uniqueName } = {}) {
|
|
23
|
-
const {
|
|
23
|
+
async closeVideoRoom({ uniqueName } = {}, { headers } = { headers: false }) {
|
|
24
|
+
const {
|
|
25
|
+
error,
|
|
26
|
+
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
24
27
|
{
|
|
25
28
|
uniqueName,
|
|
26
29
|
},
|
|
@@ -31,7 +34,9 @@ class Lead {
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
// Showing warrnings if extra unknown parameters are found
|
|
34
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
error: warrning,
|
|
39
|
+
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
35
40
|
{
|
|
36
41
|
uniqueName,
|
|
37
42
|
},
|
|
@@ -40,9 +45,8 @@ class Lead {
|
|
|
40
45
|
if (warrning) {
|
|
41
46
|
Logger({
|
|
42
47
|
level: "WARN",
|
|
43
|
-
message:
|
|
48
|
+
message: `Parameter Validation warrnings for platform > Lead > closeVideoRoom \n ${warrning}`,
|
|
44
49
|
});
|
|
45
|
-
Logger({ level: "WARN", message: warrning });
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
const query_params = {};
|
|
@@ -52,12 +56,19 @@ class Lead {
|
|
|
52
56
|
"delete",
|
|
53
57
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
54
58
|
query_params,
|
|
55
|
-
undefined
|
|
59
|
+
undefined,
|
|
60
|
+
undefined,
|
|
61
|
+
{ headers }
|
|
56
62
|
);
|
|
57
63
|
|
|
64
|
+
let responseData = response;
|
|
65
|
+
if (headers) {
|
|
66
|
+
responseData = response[0];
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
const {
|
|
59
70
|
error: res_error,
|
|
60
|
-
} =
|
|
71
|
+
} = LeadPlatformModel.CloseVideoRoomResponse().validate(responseData, {
|
|
61
72
|
abortEarly: false,
|
|
62
73
|
allowUnknown: false,
|
|
63
74
|
});
|
|
@@ -65,23 +76,25 @@ class Lead {
|
|
|
65
76
|
if (res_error) {
|
|
66
77
|
Logger({
|
|
67
78
|
level: "WARN",
|
|
68
|
-
message:
|
|
79
|
+
message: `Response Validation Warnnings for platform > Lead > closeVideoRoom \n ${res_error}`,
|
|
69
80
|
});
|
|
70
|
-
Logger({ level: "WARN", message: res_error });
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
return response;
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
/**
|
|
77
|
-
* @param {
|
|
78
|
-
* @param {
|
|
79
|
-
* @returns {Promise<CustomForm>} - Success response
|
|
87
|
+
* @param {LeadPlatformApplicationValidator.CreateCustomFormParam} arg - Arg object
|
|
88
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
89
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
90
|
+
* @name createCustomForm
|
|
80
91
|
* @summary: Creates a new custom form
|
|
81
|
-
* @description: Creates a new custom form for given application
|
|
92
|
+
* @description: Creates a new custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createCustomForm/).
|
|
82
93
|
*/
|
|
83
|
-
async createCustomForm({ body } = {}) {
|
|
84
|
-
const {
|
|
94
|
+
async createCustomForm({ body } = {}, { headers } = { headers: false }) {
|
|
95
|
+
const {
|
|
96
|
+
error,
|
|
97
|
+
} = LeadPlatformApplicationValidator.createCustomForm().validate(
|
|
85
98
|
{
|
|
86
99
|
body,
|
|
87
100
|
},
|
|
@@ -92,7 +105,9 @@ class Lead {
|
|
|
92
105
|
}
|
|
93
106
|
|
|
94
107
|
// Showing warrnings if extra unknown parameters are found
|
|
95
|
-
const {
|
|
108
|
+
const {
|
|
109
|
+
error: warrning,
|
|
110
|
+
} = LeadPlatformApplicationValidator.createCustomForm().validate(
|
|
96
111
|
{
|
|
97
112
|
body,
|
|
98
113
|
},
|
|
@@ -101,9 +116,8 @@ class Lead {
|
|
|
101
116
|
if (warrning) {
|
|
102
117
|
Logger({
|
|
103
118
|
level: "WARN",
|
|
104
|
-
message:
|
|
119
|
+
message: `Parameter Validation warrnings for platform > Lead > createCustomForm \n ${warrning}`,
|
|
105
120
|
});
|
|
106
|
-
Logger({ level: "WARN", message: warrning });
|
|
107
121
|
}
|
|
108
122
|
|
|
109
123
|
const query_params = {};
|
|
@@ -113,10 +127,19 @@ class Lead {
|
|
|
113
127
|
"post",
|
|
114
128
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
115
129
|
query_params,
|
|
116
|
-
body
|
|
130
|
+
body,
|
|
131
|
+
undefined,
|
|
132
|
+
{ headers }
|
|
117
133
|
);
|
|
118
134
|
|
|
119
|
-
|
|
135
|
+
let responseData = response;
|
|
136
|
+
if (headers) {
|
|
137
|
+
responseData = response[0];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const {
|
|
141
|
+
error: res_error,
|
|
142
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
120
143
|
abortEarly: false,
|
|
121
144
|
allowUnknown: false,
|
|
122
145
|
});
|
|
@@ -124,24 +147,23 @@ class Lead {
|
|
|
124
147
|
if (res_error) {
|
|
125
148
|
Logger({
|
|
126
149
|
level: "WARN",
|
|
127
|
-
message:
|
|
150
|
+
message: `Response Validation Warnnings for platform > Lead > createCustomForm \n ${res_error}`,
|
|
128
151
|
});
|
|
129
|
-
Logger({ level: "WARN", message: res_error });
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
return response;
|
|
133
155
|
}
|
|
134
156
|
|
|
135
157
|
/**
|
|
136
|
-
* @param {
|
|
137
|
-
* @param {
|
|
138
|
-
* @
|
|
139
|
-
* @
|
|
158
|
+
* @param {LeadPlatformApplicationValidator.CreateHistoryParam} arg - Arg object
|
|
159
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
160
|
+
* @returns {Promise<LeadPlatformModel.TicketHistory>} - Success response
|
|
161
|
+
* @name createHistory
|
|
140
162
|
* @summary: Create history for specific application level ticket
|
|
141
|
-
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
163
|
+
* @description: Create history for specific application 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/).
|
|
142
164
|
*/
|
|
143
|
-
async createHistory({ id, body } = {}) {
|
|
144
|
-
const { error } =
|
|
165
|
+
async createHistory({ id, body } = {}, { headers } = { headers: false }) {
|
|
166
|
+
const { error } = LeadPlatformApplicationValidator.createHistory().validate(
|
|
145
167
|
{
|
|
146
168
|
id,
|
|
147
169
|
body,
|
|
@@ -153,7 +175,9 @@ class Lead {
|
|
|
153
175
|
}
|
|
154
176
|
|
|
155
177
|
// Showing warrnings if extra unknown parameters are found
|
|
156
|
-
const {
|
|
178
|
+
const {
|
|
179
|
+
error: warrning,
|
|
180
|
+
} = LeadPlatformApplicationValidator.createHistory().validate(
|
|
157
181
|
{
|
|
158
182
|
id,
|
|
159
183
|
body,
|
|
@@ -163,9 +187,8 @@ class Lead {
|
|
|
163
187
|
if (warrning) {
|
|
164
188
|
Logger({
|
|
165
189
|
level: "WARN",
|
|
166
|
-
message:
|
|
190
|
+
message: `Parameter Validation warrnings for platform > Lead > createHistory \n ${warrning}`,
|
|
167
191
|
});
|
|
168
|
-
Logger({ level: "WARN", message: warrning });
|
|
169
192
|
}
|
|
170
193
|
|
|
171
194
|
const query_params = {};
|
|
@@ -175,10 +198,19 @@ class Lead {
|
|
|
175
198
|
"post",
|
|
176
199
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
177
200
|
query_params,
|
|
178
|
-
body
|
|
201
|
+
body,
|
|
202
|
+
undefined,
|
|
203
|
+
{ headers }
|
|
179
204
|
);
|
|
180
205
|
|
|
181
|
-
|
|
206
|
+
let responseData = response;
|
|
207
|
+
if (headers) {
|
|
208
|
+
responseData = response[0];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const {
|
|
212
|
+
error: res_error,
|
|
213
|
+
} = LeadPlatformModel.TicketHistory().validate(responseData, {
|
|
182
214
|
abortEarly: false,
|
|
183
215
|
allowUnknown: false,
|
|
184
216
|
});
|
|
@@ -186,24 +218,25 @@ class Lead {
|
|
|
186
218
|
if (res_error) {
|
|
187
219
|
Logger({
|
|
188
220
|
level: "WARN",
|
|
189
|
-
message:
|
|
221
|
+
message: `Response Validation Warnnings for platform > Lead > createHistory \n ${res_error}`,
|
|
190
222
|
});
|
|
191
|
-
Logger({ level: "WARN", message: res_error });
|
|
192
223
|
}
|
|
193
224
|
|
|
194
225
|
return response;
|
|
195
226
|
}
|
|
196
227
|
|
|
197
228
|
/**
|
|
198
|
-
* @param {
|
|
199
|
-
* @param {
|
|
200
|
-
* @
|
|
201
|
-
* @
|
|
229
|
+
* @param {LeadPlatformApplicationValidator.EditCustomFormParam} arg - Arg object
|
|
230
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
231
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
232
|
+
* @name editCustomForm
|
|
202
233
|
* @summary: Edit the given custom form
|
|
203
|
-
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
234
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editCustomForm/).
|
|
204
235
|
*/
|
|
205
|
-
async editCustomForm({ slug, body } = {}) {
|
|
206
|
-
const {
|
|
236
|
+
async editCustomForm({ slug, body } = {}, { headers } = { headers: false }) {
|
|
237
|
+
const {
|
|
238
|
+
error,
|
|
239
|
+
} = LeadPlatformApplicationValidator.editCustomForm().validate(
|
|
207
240
|
{
|
|
208
241
|
slug,
|
|
209
242
|
body,
|
|
@@ -215,7 +248,9 @@ class Lead {
|
|
|
215
248
|
}
|
|
216
249
|
|
|
217
250
|
// Showing warrnings if extra unknown parameters are found
|
|
218
|
-
const {
|
|
251
|
+
const {
|
|
252
|
+
error: warrning,
|
|
253
|
+
} = LeadPlatformApplicationValidator.editCustomForm().validate(
|
|
219
254
|
{
|
|
220
255
|
slug,
|
|
221
256
|
body,
|
|
@@ -225,9 +260,8 @@ class Lead {
|
|
|
225
260
|
if (warrning) {
|
|
226
261
|
Logger({
|
|
227
262
|
level: "WARN",
|
|
228
|
-
message:
|
|
263
|
+
message: `Parameter Validation warrnings for platform > Lead > editCustomForm \n ${warrning}`,
|
|
229
264
|
});
|
|
230
|
-
Logger({ level: "WARN", message: warrning });
|
|
231
265
|
}
|
|
232
266
|
|
|
233
267
|
const query_params = {};
|
|
@@ -237,10 +271,19 @@ class Lead {
|
|
|
237
271
|
"put",
|
|
238
272
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
239
273
|
query_params,
|
|
240
|
-
body
|
|
274
|
+
body,
|
|
275
|
+
undefined,
|
|
276
|
+
{ headers }
|
|
241
277
|
);
|
|
242
278
|
|
|
243
|
-
|
|
279
|
+
let responseData = response;
|
|
280
|
+
if (headers) {
|
|
281
|
+
responseData = response[0];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const {
|
|
285
|
+
error: res_error,
|
|
286
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
244
287
|
abortEarly: false,
|
|
245
288
|
allowUnknown: false,
|
|
246
289
|
});
|
|
@@ -248,24 +291,23 @@ class Lead {
|
|
|
248
291
|
if (res_error) {
|
|
249
292
|
Logger({
|
|
250
293
|
level: "WARN",
|
|
251
|
-
message:
|
|
294
|
+
message: `Response Validation Warnnings for platform > Lead > editCustomForm \n ${res_error}`,
|
|
252
295
|
});
|
|
253
|
-
Logger({ level: "WARN", message: res_error });
|
|
254
296
|
}
|
|
255
297
|
|
|
256
298
|
return response;
|
|
257
299
|
}
|
|
258
300
|
|
|
259
301
|
/**
|
|
260
|
-
* @param {
|
|
261
|
-
* @param {
|
|
262
|
-
* @
|
|
263
|
-
* @
|
|
302
|
+
* @param {LeadPlatformApplicationValidator.EditTicketParam} arg - Arg object
|
|
303
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
304
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
305
|
+
* @name editTicket
|
|
264
306
|
* @summary: Edits ticket details of a application level ticket
|
|
265
|
-
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
307
|
+
* @description: Edits ticket details of a application 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/).
|
|
266
308
|
*/
|
|
267
|
-
async editTicket({ id, body } = {}) {
|
|
268
|
-
const { error } =
|
|
309
|
+
async editTicket({ id, body } = {}, { headers } = { headers: false }) {
|
|
310
|
+
const { error } = LeadPlatformApplicationValidator.editTicket().validate(
|
|
269
311
|
{
|
|
270
312
|
id,
|
|
271
313
|
body,
|
|
@@ -277,7 +319,9 @@ class Lead {
|
|
|
277
319
|
}
|
|
278
320
|
|
|
279
321
|
// Showing warrnings if extra unknown parameters are found
|
|
280
|
-
const {
|
|
322
|
+
const {
|
|
323
|
+
error: warrning,
|
|
324
|
+
} = LeadPlatformApplicationValidator.editTicket().validate(
|
|
281
325
|
{
|
|
282
326
|
id,
|
|
283
327
|
body,
|
|
@@ -287,9 +331,8 @@ class Lead {
|
|
|
287
331
|
if (warrning) {
|
|
288
332
|
Logger({
|
|
289
333
|
level: "WARN",
|
|
290
|
-
message:
|
|
334
|
+
message: `Parameter Validation warrnings for platform > Lead > editTicket \n ${warrning}`,
|
|
291
335
|
});
|
|
292
|
-
Logger({ level: "WARN", message: warrning });
|
|
293
336
|
}
|
|
294
337
|
|
|
295
338
|
const query_params = {};
|
|
@@ -299,10 +342,19 @@ class Lead {
|
|
|
299
342
|
"put",
|
|
300
343
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
301
344
|
query_params,
|
|
302
|
-
body
|
|
345
|
+
body,
|
|
346
|
+
undefined,
|
|
347
|
+
{ headers }
|
|
303
348
|
);
|
|
304
349
|
|
|
305
|
-
|
|
350
|
+
let responseData = response;
|
|
351
|
+
if (headers) {
|
|
352
|
+
responseData = response[0];
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const {
|
|
356
|
+
error: res_error,
|
|
357
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
306
358
|
abortEarly: false,
|
|
307
359
|
allowUnknown: false,
|
|
308
360
|
});
|
|
@@ -310,23 +362,23 @@ class Lead {
|
|
|
310
362
|
if (res_error) {
|
|
311
363
|
Logger({
|
|
312
364
|
level: "WARN",
|
|
313
|
-
message:
|
|
365
|
+
message: `Response Validation Warnnings for platform > Lead > editTicket \n ${res_error}`,
|
|
314
366
|
});
|
|
315
|
-
Logger({ level: "WARN", message: res_error });
|
|
316
367
|
}
|
|
317
368
|
|
|
318
369
|
return response;
|
|
319
370
|
}
|
|
320
371
|
|
|
321
372
|
/**
|
|
322
|
-
* @param {
|
|
323
|
-
* @param {
|
|
324
|
-
* @returns {Promise<CustomForm>} - Success response
|
|
373
|
+
* @param {LeadPlatformApplicationValidator.GetCustomFormParam} arg - Arg object
|
|
374
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
375
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
376
|
+
* @name getCustomForm
|
|
325
377
|
* @summary: Get specific custom form using it's slug
|
|
326
|
-
* @description: Get specific custom form using it's slug, this is used to view the form.
|
|
378
|
+
* @description: Get specific custom form using it's slug, this is used to view the form. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getCustomForm/).
|
|
327
379
|
*/
|
|
328
|
-
async getCustomForm({ slug } = {}) {
|
|
329
|
-
const { error } =
|
|
380
|
+
async getCustomForm({ slug } = {}, { headers } = { headers: false }) {
|
|
381
|
+
const { error } = LeadPlatformApplicationValidator.getCustomForm().validate(
|
|
330
382
|
{
|
|
331
383
|
slug,
|
|
332
384
|
},
|
|
@@ -337,7 +389,9 @@ class Lead {
|
|
|
337
389
|
}
|
|
338
390
|
|
|
339
391
|
// Showing warrnings if extra unknown parameters are found
|
|
340
|
-
const {
|
|
392
|
+
const {
|
|
393
|
+
error: warrning,
|
|
394
|
+
} = LeadPlatformApplicationValidator.getCustomForm().validate(
|
|
341
395
|
{
|
|
342
396
|
slug,
|
|
343
397
|
},
|
|
@@ -346,9 +400,8 @@ class Lead {
|
|
|
346
400
|
if (warrning) {
|
|
347
401
|
Logger({
|
|
348
402
|
level: "WARN",
|
|
349
|
-
message:
|
|
403
|
+
message: `Parameter Validation warrnings for platform > Lead > getCustomForm \n ${warrning}`,
|
|
350
404
|
});
|
|
351
|
-
Logger({ level: "WARN", message: warrning });
|
|
352
405
|
}
|
|
353
406
|
|
|
354
407
|
const query_params = {};
|
|
@@ -358,10 +411,19 @@ class Lead {
|
|
|
358
411
|
"get",
|
|
359
412
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
360
413
|
query_params,
|
|
361
|
-
undefined
|
|
414
|
+
undefined,
|
|
415
|
+
undefined,
|
|
416
|
+
{ headers }
|
|
362
417
|
);
|
|
363
418
|
|
|
364
|
-
|
|
419
|
+
let responseData = response;
|
|
420
|
+
if (headers) {
|
|
421
|
+
responseData = response[0];
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const {
|
|
425
|
+
error: res_error,
|
|
426
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
365
427
|
abortEarly: false,
|
|
366
428
|
allowUnknown: false,
|
|
367
429
|
});
|
|
@@ -369,22 +431,24 @@ class Lead {
|
|
|
369
431
|
if (res_error) {
|
|
370
432
|
Logger({
|
|
371
433
|
level: "WARN",
|
|
372
|
-
message:
|
|
434
|
+
message: `Response Validation Warnnings for platform > Lead > getCustomForm \n ${res_error}`,
|
|
373
435
|
});
|
|
374
|
-
Logger({ level: "WARN", message: res_error });
|
|
375
436
|
}
|
|
376
437
|
|
|
377
438
|
return response;
|
|
378
439
|
}
|
|
379
440
|
|
|
380
441
|
/**
|
|
381
|
-
* @param {
|
|
382
|
-
* @returns {Promise<CustomFormList>} - Success response
|
|
442
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
443
|
+
* @returns {Promise<LeadPlatformModel.CustomFormList>} - Success response
|
|
444
|
+
* @name getCustomForms
|
|
383
445
|
* @summary: Get list of custom form
|
|
384
|
-
* @description: Get list of custom form for given application
|
|
446
|
+
* @description: Get list of custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getCustomForms/).
|
|
385
447
|
*/
|
|
386
|
-
async getCustomForms({} = {}) {
|
|
387
|
-
const {
|
|
448
|
+
async getCustomForms({ headers } = { headers: false }) {
|
|
449
|
+
const {
|
|
450
|
+
error,
|
|
451
|
+
} = LeadPlatformApplicationValidator.getCustomForms().validate(
|
|
388
452
|
{},
|
|
389
453
|
{ abortEarly: false, allowUnknown: true }
|
|
390
454
|
);
|
|
@@ -393,16 +457,17 @@ class Lead {
|
|
|
393
457
|
}
|
|
394
458
|
|
|
395
459
|
// Showing warrnings if extra unknown parameters are found
|
|
396
|
-
const {
|
|
460
|
+
const {
|
|
461
|
+
error: warrning,
|
|
462
|
+
} = LeadPlatformApplicationValidator.getCustomForms().validate(
|
|
397
463
|
{},
|
|
398
464
|
{ abortEarly: false, allowUnknown: false }
|
|
399
465
|
);
|
|
400
466
|
if (warrning) {
|
|
401
467
|
Logger({
|
|
402
468
|
level: "WARN",
|
|
403
|
-
message:
|
|
469
|
+
message: `Parameter Validation warrnings for platform > Lead > getCustomForms \n ${warrning}`,
|
|
404
470
|
});
|
|
405
|
-
Logger({ level: "WARN", message: warrning });
|
|
406
471
|
}
|
|
407
472
|
|
|
408
473
|
const query_params = {};
|
|
@@ -412,10 +477,19 @@ class Lead {
|
|
|
412
477
|
"get",
|
|
413
478
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
414
479
|
query_params,
|
|
415
|
-
undefined
|
|
480
|
+
undefined,
|
|
481
|
+
undefined,
|
|
482
|
+
{ headers }
|
|
416
483
|
);
|
|
417
484
|
|
|
418
|
-
|
|
485
|
+
let responseData = response;
|
|
486
|
+
if (headers) {
|
|
487
|
+
responseData = response[0];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const {
|
|
491
|
+
error: res_error,
|
|
492
|
+
} = LeadPlatformModel.CustomFormList().validate(responseData, {
|
|
419
493
|
abortEarly: false,
|
|
420
494
|
allowUnknown: false,
|
|
421
495
|
});
|
|
@@ -423,23 +497,23 @@ class Lead {
|
|
|
423
497
|
if (res_error) {
|
|
424
498
|
Logger({
|
|
425
499
|
level: "WARN",
|
|
426
|
-
message:
|
|
500
|
+
message: `Response Validation Warnnings for platform > Lead > getCustomForms \n ${res_error}`,
|
|
427
501
|
});
|
|
428
|
-
Logger({ level: "WARN", message: res_error });
|
|
429
502
|
}
|
|
430
503
|
|
|
431
504
|
return response;
|
|
432
505
|
}
|
|
433
506
|
|
|
434
507
|
/**
|
|
435
|
-
* @param {
|
|
436
|
-
* @param {
|
|
437
|
-
* @returns {Promise<Ticket>} - Success response
|
|
508
|
+
* @param {LeadPlatformApplicationValidator.GetTicketParam} arg - Arg object
|
|
509
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
510
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
511
|
+
* @name getTicket
|
|
438
512
|
* @summary: Retreives ticket details of a application level ticket
|
|
439
|
-
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
513
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicket/).
|
|
440
514
|
*/
|
|
441
|
-
async getTicket({ id } = {}) {
|
|
442
|
-
const { error } =
|
|
515
|
+
async getTicket({ id } = {}, { headers } = { headers: false }) {
|
|
516
|
+
const { error } = LeadPlatformApplicationValidator.getTicket().validate(
|
|
443
517
|
{
|
|
444
518
|
id,
|
|
445
519
|
},
|
|
@@ -450,7 +524,9 @@ class Lead {
|
|
|
450
524
|
}
|
|
451
525
|
|
|
452
526
|
// Showing warrnings if extra unknown parameters are found
|
|
453
|
-
const {
|
|
527
|
+
const {
|
|
528
|
+
error: warrning,
|
|
529
|
+
} = LeadPlatformApplicationValidator.getTicket().validate(
|
|
454
530
|
{
|
|
455
531
|
id,
|
|
456
532
|
},
|
|
@@ -459,9 +535,8 @@ class Lead {
|
|
|
459
535
|
if (warrning) {
|
|
460
536
|
Logger({
|
|
461
537
|
level: "WARN",
|
|
462
|
-
message:
|
|
538
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicket \n ${warrning}`,
|
|
463
539
|
});
|
|
464
|
-
Logger({ level: "WARN", message: warrning });
|
|
465
540
|
}
|
|
466
541
|
|
|
467
542
|
const query_params = {};
|
|
@@ -471,10 +546,19 @@ class Lead {
|
|
|
471
546
|
"get",
|
|
472
547
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
473
548
|
query_params,
|
|
474
|
-
undefined
|
|
549
|
+
undefined,
|
|
550
|
+
undefined,
|
|
551
|
+
{ headers }
|
|
475
552
|
);
|
|
476
553
|
|
|
477
|
-
|
|
554
|
+
let responseData = response;
|
|
555
|
+
if (headers) {
|
|
556
|
+
responseData = response[0];
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const {
|
|
560
|
+
error: res_error,
|
|
561
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
478
562
|
abortEarly: false,
|
|
479
563
|
allowUnknown: false,
|
|
480
564
|
});
|
|
@@ -482,23 +566,25 @@ class Lead {
|
|
|
482
566
|
if (res_error) {
|
|
483
567
|
Logger({
|
|
484
568
|
level: "WARN",
|
|
485
|
-
message:
|
|
569
|
+
message: `Response Validation Warnnings for platform > Lead > getTicket \n ${res_error}`,
|
|
486
570
|
});
|
|
487
|
-
Logger({ level: "WARN", message: res_error });
|
|
488
571
|
}
|
|
489
572
|
|
|
490
573
|
return response;
|
|
491
574
|
}
|
|
492
575
|
|
|
493
576
|
/**
|
|
494
|
-
* @param {
|
|
495
|
-
* @param {
|
|
496
|
-
* @returns {Promise<TicketHistoryList>} - Success response
|
|
577
|
+
* @param {LeadPlatformApplicationValidator.GetTicketHistoryParam} arg - Arg object
|
|
578
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
579
|
+
* @returns {Promise<LeadPlatformModel.TicketHistoryList>} - Success response
|
|
580
|
+
* @name getTicketHistory
|
|
497
581
|
* @summary: Gets history list for specific application level ticket
|
|
498
|
-
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
582
|
+
* @description: Gets history list for specific application 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/).
|
|
499
583
|
*/
|
|
500
|
-
async getTicketHistory({ id } = {}) {
|
|
501
|
-
const {
|
|
584
|
+
async getTicketHistory({ id } = {}, { headers } = { headers: false }) {
|
|
585
|
+
const {
|
|
586
|
+
error,
|
|
587
|
+
} = LeadPlatformApplicationValidator.getTicketHistory().validate(
|
|
502
588
|
{
|
|
503
589
|
id,
|
|
504
590
|
},
|
|
@@ -509,7 +595,9 @@ class Lead {
|
|
|
509
595
|
}
|
|
510
596
|
|
|
511
597
|
// Showing warrnings if extra unknown parameters are found
|
|
512
|
-
const {
|
|
598
|
+
const {
|
|
599
|
+
error: warrning,
|
|
600
|
+
} = LeadPlatformApplicationValidator.getTicketHistory().validate(
|
|
513
601
|
{
|
|
514
602
|
id,
|
|
515
603
|
},
|
|
@@ -518,9 +606,8 @@ class Lead {
|
|
|
518
606
|
if (warrning) {
|
|
519
607
|
Logger({
|
|
520
608
|
level: "WARN",
|
|
521
|
-
message:
|
|
609
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicketHistory \n ${warrning}`,
|
|
522
610
|
});
|
|
523
|
-
Logger({ level: "WARN", message: warrning });
|
|
524
611
|
}
|
|
525
612
|
|
|
526
613
|
const query_params = {};
|
|
@@ -530,12 +617,19 @@ class Lead {
|
|
|
530
617
|
"get",
|
|
531
618
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
532
619
|
query_params,
|
|
533
|
-
undefined
|
|
620
|
+
undefined,
|
|
621
|
+
undefined,
|
|
622
|
+
{ headers }
|
|
534
623
|
);
|
|
535
624
|
|
|
625
|
+
let responseData = response;
|
|
626
|
+
if (headers) {
|
|
627
|
+
responseData = response[0];
|
|
628
|
+
}
|
|
629
|
+
|
|
536
630
|
const {
|
|
537
631
|
error: res_error,
|
|
538
|
-
} =
|
|
632
|
+
} = LeadPlatformModel.TicketHistoryList().validate(responseData, {
|
|
539
633
|
abortEarly: false,
|
|
540
634
|
allowUnknown: false,
|
|
541
635
|
});
|
|
@@ -543,30 +637,26 @@ class Lead {
|
|
|
543
637
|
if (res_error) {
|
|
544
638
|
Logger({
|
|
545
639
|
level: "WARN",
|
|
546
|
-
message:
|
|
640
|
+
message: `Response Validation Warnnings for platform > Lead > getTicketHistory \n ${res_error}`,
|
|
547
641
|
});
|
|
548
|
-
Logger({ level: "WARN", message: res_error });
|
|
549
642
|
}
|
|
550
643
|
|
|
551
644
|
return response;
|
|
552
645
|
}
|
|
553
646
|
|
|
554
647
|
/**
|
|
555
|
-
* @param {
|
|
556
|
-
* @param {
|
|
557
|
-
*
|
|
558
|
-
* @
|
|
559
|
-
* the ticket filters
|
|
560
|
-
* @param {string} [arg.q] - Search through ticket titles and description
|
|
561
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
562
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
563
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
564
|
-
* @returns {Promise<TicketList>} - Success response
|
|
648
|
+
* @param {LeadPlatformApplicationValidator.GetTicketsParam} arg - Arg object
|
|
649
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
650
|
+
* @returns {Promise<LeadPlatformModel.TicketList>} - Success response
|
|
651
|
+
* @name getTickets
|
|
565
652
|
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
566
|
-
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
653
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTickets/).
|
|
567
654
|
*/
|
|
568
|
-
async getTickets(
|
|
569
|
-
|
|
655
|
+
async getTickets(
|
|
656
|
+
{ items, filters, q, status, priority, category } = {},
|
|
657
|
+
{ headers } = { headers: false }
|
|
658
|
+
) {
|
|
659
|
+
const { error } = LeadPlatformApplicationValidator.getTickets().validate(
|
|
570
660
|
{
|
|
571
661
|
items,
|
|
572
662
|
filters,
|
|
@@ -582,7 +672,9 @@ class Lead {
|
|
|
582
672
|
}
|
|
583
673
|
|
|
584
674
|
// Showing warrnings if extra unknown parameters are found
|
|
585
|
-
const {
|
|
675
|
+
const {
|
|
676
|
+
error: warrning,
|
|
677
|
+
} = LeadPlatformApplicationValidator.getTickets().validate(
|
|
586
678
|
{
|
|
587
679
|
items,
|
|
588
680
|
filters,
|
|
@@ -596,9 +688,8 @@ class Lead {
|
|
|
596
688
|
if (warrning) {
|
|
597
689
|
Logger({
|
|
598
690
|
level: "WARN",
|
|
599
|
-
message:
|
|
691
|
+
message: `Parameter Validation warrnings for platform > Lead > getTickets \n ${warrning}`,
|
|
600
692
|
});
|
|
601
|
-
Logger({ level: "WARN", message: warrning });
|
|
602
693
|
}
|
|
603
694
|
|
|
604
695
|
const query_params = {};
|
|
@@ -614,10 +705,19 @@ class Lead {
|
|
|
614
705
|
"get",
|
|
615
706
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
616
707
|
query_params,
|
|
617
|
-
undefined
|
|
708
|
+
undefined,
|
|
709
|
+
undefined,
|
|
710
|
+
{ headers }
|
|
618
711
|
);
|
|
619
712
|
|
|
620
|
-
|
|
713
|
+
let responseData = response;
|
|
714
|
+
if (headers) {
|
|
715
|
+
responseData = response[0];
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
const {
|
|
719
|
+
error: res_error,
|
|
720
|
+
} = LeadPlatformModel.TicketList().validate(responseData, {
|
|
621
721
|
abortEarly: false,
|
|
622
722
|
allowUnknown: false,
|
|
623
723
|
});
|
|
@@ -625,23 +725,31 @@ class Lead {
|
|
|
625
725
|
if (res_error) {
|
|
626
726
|
Logger({
|
|
627
727
|
level: "WARN",
|
|
628
|
-
message:
|
|
728
|
+
message: `Response Validation Warnnings for platform > Lead > getTickets \n ${res_error}`,
|
|
629
729
|
});
|
|
630
|
-
Logger({ level: "WARN", message: res_error });
|
|
631
730
|
}
|
|
632
731
|
|
|
633
732
|
return response;
|
|
634
733
|
}
|
|
635
734
|
|
|
636
735
|
/**
|
|
637
|
-
* @param {
|
|
638
|
-
*
|
|
639
|
-
*
|
|
736
|
+
* @param {LeadPlatformApplicationValidator.GetTokenForVideoRoomParam} arg
|
|
737
|
+
* - Arg object
|
|
738
|
+
*
|
|
739
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
740
|
+
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
741
|
+
* Success response
|
|
742
|
+
* @name getTokenForVideoRoom
|
|
640
743
|
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
641
|
-
* @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.
|
|
744
|
+
* @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/).
|
|
642
745
|
*/
|
|
643
|
-
async getTokenForVideoRoom(
|
|
644
|
-
|
|
746
|
+
async getTokenForVideoRoom(
|
|
747
|
+
{ uniqueName } = {},
|
|
748
|
+
{ headers } = { headers: false }
|
|
749
|
+
) {
|
|
750
|
+
const {
|
|
751
|
+
error,
|
|
752
|
+
} = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
|
|
645
753
|
{
|
|
646
754
|
uniqueName,
|
|
647
755
|
},
|
|
@@ -652,7 +760,9 @@ class Lead {
|
|
|
652
760
|
}
|
|
653
761
|
|
|
654
762
|
// Showing warrnings if extra unknown parameters are found
|
|
655
|
-
const {
|
|
763
|
+
const {
|
|
764
|
+
error: warrning,
|
|
765
|
+
} = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
|
|
656
766
|
{
|
|
657
767
|
uniqueName,
|
|
658
768
|
},
|
|
@@ -661,9 +771,8 @@ class Lead {
|
|
|
661
771
|
if (warrning) {
|
|
662
772
|
Logger({
|
|
663
773
|
level: "WARN",
|
|
664
|
-
message:
|
|
774
|
+
message: `Parameter Validation warrnings for platform > Lead > getTokenForVideoRoom \n ${warrning}`,
|
|
665
775
|
});
|
|
666
|
-
Logger({ level: "WARN", message: warrning });
|
|
667
776
|
}
|
|
668
777
|
|
|
669
778
|
const query_params = {};
|
|
@@ -673,36 +782,52 @@ class Lead {
|
|
|
673
782
|
"get",
|
|
674
783
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
675
784
|
query_params,
|
|
676
|
-
undefined
|
|
785
|
+
undefined,
|
|
786
|
+
undefined,
|
|
787
|
+
{ headers }
|
|
677
788
|
);
|
|
678
789
|
|
|
790
|
+
let responseData = response;
|
|
791
|
+
if (headers) {
|
|
792
|
+
responseData = response[0];
|
|
793
|
+
}
|
|
794
|
+
|
|
679
795
|
const {
|
|
680
796
|
error: res_error,
|
|
681
|
-
} =
|
|
682
|
-
|
|
683
|
-
allowUnknown: false
|
|
684
|
-
|
|
797
|
+
} = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
|
|
798
|
+
responseData,
|
|
799
|
+
{ abortEarly: false, allowUnknown: false }
|
|
800
|
+
);
|
|
685
801
|
|
|
686
802
|
if (res_error) {
|
|
687
803
|
Logger({
|
|
688
804
|
level: "WARN",
|
|
689
|
-
message:
|
|
805
|
+
message: `Response Validation Warnnings for platform > Lead > getTokenForVideoRoom \n ${res_error}`,
|
|
690
806
|
});
|
|
691
|
-
Logger({ level: "WARN", message: res_error });
|
|
692
807
|
}
|
|
693
808
|
|
|
694
809
|
return response;
|
|
695
810
|
}
|
|
696
811
|
|
|
697
812
|
/**
|
|
698
|
-
* @param {
|
|
699
|
-
*
|
|
700
|
-
*
|
|
813
|
+
* @param {LeadPlatformApplicationValidator.GetVideoParticipantsParam} arg
|
|
814
|
+
* - Arg object
|
|
815
|
+
*
|
|
816
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
817
|
+
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
818
|
+
* - Success response
|
|
819
|
+
*
|
|
820
|
+
* @name getVideoParticipants
|
|
701
821
|
* @summary: Get participants of a specific Video Room using it's unique name
|
|
702
|
-
* @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.
|
|
822
|
+
* @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/).
|
|
703
823
|
*/
|
|
704
|
-
async getVideoParticipants(
|
|
705
|
-
|
|
824
|
+
async getVideoParticipants(
|
|
825
|
+
{ uniqueName } = {},
|
|
826
|
+
{ headers } = { headers: false }
|
|
827
|
+
) {
|
|
828
|
+
const {
|
|
829
|
+
error,
|
|
830
|
+
} = LeadPlatformApplicationValidator.getVideoParticipants().validate(
|
|
706
831
|
{
|
|
707
832
|
uniqueName,
|
|
708
833
|
},
|
|
@@ -713,7 +838,9 @@ class Lead {
|
|
|
713
838
|
}
|
|
714
839
|
|
|
715
840
|
// Showing warrnings if extra unknown parameters are found
|
|
716
|
-
const {
|
|
841
|
+
const {
|
|
842
|
+
error: warrning,
|
|
843
|
+
} = LeadPlatformApplicationValidator.getVideoParticipants().validate(
|
|
717
844
|
{
|
|
718
845
|
uniqueName,
|
|
719
846
|
},
|
|
@@ -722,9 +849,8 @@ class Lead {
|
|
|
722
849
|
if (warrning) {
|
|
723
850
|
Logger({
|
|
724
851
|
level: "WARN",
|
|
725
|
-
message:
|
|
852
|
+
message: `Parameter Validation warrnings for platform > Lead > getVideoParticipants \n ${warrning}`,
|
|
726
853
|
});
|
|
727
|
-
Logger({ level: "WARN", message: warrning });
|
|
728
854
|
}
|
|
729
855
|
|
|
730
856
|
const query_params = {};
|
|
@@ -734,36 +860,43 @@ class Lead {
|
|
|
734
860
|
"get",
|
|
735
861
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
736
862
|
query_params,
|
|
737
|
-
undefined
|
|
863
|
+
undefined,
|
|
864
|
+
undefined,
|
|
865
|
+
{ headers }
|
|
738
866
|
);
|
|
739
867
|
|
|
868
|
+
let responseData = response;
|
|
869
|
+
if (headers) {
|
|
870
|
+
responseData = response[0];
|
|
871
|
+
}
|
|
872
|
+
|
|
740
873
|
const {
|
|
741
874
|
error: res_error,
|
|
742
|
-
} =
|
|
743
|
-
|
|
744
|
-
allowUnknown: false
|
|
745
|
-
|
|
875
|
+
} = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
|
|
876
|
+
responseData,
|
|
877
|
+
{ abortEarly: false, allowUnknown: false }
|
|
878
|
+
);
|
|
746
879
|
|
|
747
880
|
if (res_error) {
|
|
748
881
|
Logger({
|
|
749
882
|
level: "WARN",
|
|
750
|
-
message:
|
|
883
|
+
message: `Response Validation Warnnings for platform > Lead > getVideoParticipants \n ${res_error}`,
|
|
751
884
|
});
|
|
752
|
-
Logger({ level: "WARN", message: res_error });
|
|
753
885
|
}
|
|
754
886
|
|
|
755
887
|
return response;
|
|
756
888
|
}
|
|
757
889
|
|
|
758
890
|
/**
|
|
759
|
-
* @param {
|
|
760
|
-
* @param {
|
|
761
|
-
* @returns {Promise<CreateVideoRoomResponse>} - Success response
|
|
891
|
+
* @param {LeadPlatformApplicationValidator.OpenVideoRoomParam} arg - Arg object
|
|
892
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
893
|
+
* @returns {Promise<LeadPlatformModel.CreateVideoRoomResponse>} - Success response
|
|
894
|
+
* @name openVideoRoom
|
|
762
895
|
* @summary: Open a video room.
|
|
763
|
-
* @description: Open a video room.
|
|
896
|
+
* @description: Open a video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/openVideoRoom/).
|
|
764
897
|
*/
|
|
765
|
-
async openVideoRoom({ body } = {}) {
|
|
766
|
-
const { error } =
|
|
898
|
+
async openVideoRoom({ body } = {}, { headers } = { headers: false }) {
|
|
899
|
+
const { error } = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
767
900
|
{
|
|
768
901
|
body,
|
|
769
902
|
},
|
|
@@ -774,7 +907,9 @@ class Lead {
|
|
|
774
907
|
}
|
|
775
908
|
|
|
776
909
|
// Showing warrnings if extra unknown parameters are found
|
|
777
|
-
const {
|
|
910
|
+
const {
|
|
911
|
+
error: warrning,
|
|
912
|
+
} = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
778
913
|
{
|
|
779
914
|
body,
|
|
780
915
|
},
|
|
@@ -783,9 +918,8 @@ class Lead {
|
|
|
783
918
|
if (warrning) {
|
|
784
919
|
Logger({
|
|
785
920
|
level: "WARN",
|
|
786
|
-
message:
|
|
921
|
+
message: `Parameter Validation warrnings for platform > Lead > openVideoRoom \n ${warrning}`,
|
|
787
922
|
});
|
|
788
|
-
Logger({ level: "WARN", message: warrning });
|
|
789
923
|
}
|
|
790
924
|
|
|
791
925
|
const query_params = {};
|
|
@@ -795,12 +929,19 @@ class Lead {
|
|
|
795
929
|
"post",
|
|
796
930
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
797
931
|
query_params,
|
|
798
|
-
body
|
|
932
|
+
body,
|
|
933
|
+
undefined,
|
|
934
|
+
{ headers }
|
|
799
935
|
);
|
|
800
936
|
|
|
937
|
+
let responseData = response;
|
|
938
|
+
if (headers) {
|
|
939
|
+
responseData = response[0];
|
|
940
|
+
}
|
|
941
|
+
|
|
801
942
|
const {
|
|
802
943
|
error: res_error,
|
|
803
|
-
} =
|
|
944
|
+
} = LeadPlatformModel.CreateVideoRoomResponse().validate(responseData, {
|
|
804
945
|
abortEarly: false,
|
|
805
946
|
allowUnknown: false,
|
|
806
947
|
});
|
|
@@ -808,9 +949,8 @@ class Lead {
|
|
|
808
949
|
if (res_error) {
|
|
809
950
|
Logger({
|
|
810
951
|
level: "WARN",
|
|
811
|
-
message:
|
|
952
|
+
message: `Response Validation Warnnings for platform > Lead > openVideoRoom \n ${res_error}`,
|
|
812
953
|
});
|
|
813
|
-
Logger({ level: "WARN", message: res_error });
|
|
814
954
|
}
|
|
815
955
|
|
|
816
956
|
return response;
|