@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const 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,21 @@ class Lead {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @
|
|
16
|
+
* @param {LeadPlatformApplicationValidator.CloseVideoRoomParam} arg - Arg object
|
|
17
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
18
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
19
|
+
* @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
|
|
20
|
+
* @name closeVideoRoom
|
|
19
21
|
* @summary: Close the video room and force all participants to leave.
|
|
20
|
-
* @description: Close the video room and force all participants to leave.
|
|
22
|
+
* @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
23
|
*/
|
|
22
|
-
async closeVideoRoom(
|
|
23
|
-
|
|
24
|
+
async closeVideoRoom(
|
|
25
|
+
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
26
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
27
|
+
) {
|
|
28
|
+
const {
|
|
29
|
+
error,
|
|
30
|
+
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
24
31
|
{
|
|
25
32
|
uniqueName,
|
|
26
33
|
},
|
|
@@ -31,7 +38,9 @@ class Lead {
|
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
// Showing warrnings if extra unknown parameters are found
|
|
34
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
error: warrning,
|
|
43
|
+
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
35
44
|
{
|
|
36
45
|
uniqueName,
|
|
37
46
|
},
|
|
@@ -40,9 +49,8 @@ class Lead {
|
|
|
40
49
|
if (warrning) {
|
|
41
50
|
Logger({
|
|
42
51
|
level: "WARN",
|
|
43
|
-
message:
|
|
52
|
+
message: `Parameter Validation warrnings for platform > Lead > closeVideoRoom \n ${warrning}`,
|
|
44
53
|
});
|
|
45
|
-
Logger({ level: "WARN", message: warrning });
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
const query_params = {};
|
|
@@ -52,12 +60,19 @@ class Lead {
|
|
|
52
60
|
"delete",
|
|
53
61
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
54
62
|
query_params,
|
|
55
|
-
undefined
|
|
63
|
+
undefined,
|
|
64
|
+
requestHeaders,
|
|
65
|
+
{ responseHeaders }
|
|
56
66
|
);
|
|
57
67
|
|
|
68
|
+
let responseData = response;
|
|
69
|
+
if (responseHeaders) {
|
|
70
|
+
responseData = response[0];
|
|
71
|
+
}
|
|
72
|
+
|
|
58
73
|
const {
|
|
59
74
|
error: res_error,
|
|
60
|
-
} =
|
|
75
|
+
} = LeadPlatformModel.CloseVideoRoomResponse().validate(responseData, {
|
|
61
76
|
abortEarly: false,
|
|
62
77
|
allowUnknown: false,
|
|
63
78
|
});
|
|
@@ -65,23 +80,29 @@ class Lead {
|
|
|
65
80
|
if (res_error) {
|
|
66
81
|
Logger({
|
|
67
82
|
level: "WARN",
|
|
68
|
-
message:
|
|
83
|
+
message: `Response Validation Warnnings for platform > Lead > closeVideoRoom \n ${res_error}`,
|
|
69
84
|
});
|
|
70
|
-
Logger({ level: "WARN", message: res_error });
|
|
71
85
|
}
|
|
72
86
|
|
|
73
87
|
return response;
|
|
74
88
|
}
|
|
75
89
|
|
|
76
90
|
/**
|
|
77
|
-
* @param {
|
|
78
|
-
* @param {
|
|
79
|
-
* @
|
|
91
|
+
* @param {LeadPlatformApplicationValidator.CreateCustomFormParam} arg - Arg object
|
|
92
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
93
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
94
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
95
|
+
* @name createCustomForm
|
|
80
96
|
* @summary: Creates a new custom form
|
|
81
|
-
* @description: Creates a new custom form for given application
|
|
97
|
+
* @description: Creates a new custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createCustomForm/).
|
|
82
98
|
*/
|
|
83
|
-
async createCustomForm(
|
|
84
|
-
|
|
99
|
+
async createCustomForm(
|
|
100
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
101
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
102
|
+
) {
|
|
103
|
+
const {
|
|
104
|
+
error,
|
|
105
|
+
} = LeadPlatformApplicationValidator.createCustomForm().validate(
|
|
85
106
|
{
|
|
86
107
|
body,
|
|
87
108
|
},
|
|
@@ -92,7 +113,9 @@ class Lead {
|
|
|
92
113
|
}
|
|
93
114
|
|
|
94
115
|
// Showing warrnings if extra unknown parameters are found
|
|
95
|
-
const {
|
|
116
|
+
const {
|
|
117
|
+
error: warrning,
|
|
118
|
+
} = LeadPlatformApplicationValidator.createCustomForm().validate(
|
|
96
119
|
{
|
|
97
120
|
body,
|
|
98
121
|
},
|
|
@@ -101,9 +124,8 @@ class Lead {
|
|
|
101
124
|
if (warrning) {
|
|
102
125
|
Logger({
|
|
103
126
|
level: "WARN",
|
|
104
|
-
message:
|
|
127
|
+
message: `Parameter Validation warrnings for platform > Lead > createCustomForm \n ${warrning}`,
|
|
105
128
|
});
|
|
106
|
-
Logger({ level: "WARN", message: warrning });
|
|
107
129
|
}
|
|
108
130
|
|
|
109
131
|
const query_params = {};
|
|
@@ -113,10 +135,19 @@ class Lead {
|
|
|
113
135
|
"post",
|
|
114
136
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
115
137
|
query_params,
|
|
116
|
-
body
|
|
138
|
+
body,
|
|
139
|
+
requestHeaders,
|
|
140
|
+
{ responseHeaders }
|
|
117
141
|
);
|
|
118
142
|
|
|
119
|
-
|
|
143
|
+
let responseData = response;
|
|
144
|
+
if (responseHeaders) {
|
|
145
|
+
responseData = response[0];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const {
|
|
149
|
+
error: res_error,
|
|
150
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
120
151
|
abortEarly: false,
|
|
121
152
|
allowUnknown: false,
|
|
122
153
|
});
|
|
@@ -124,24 +155,27 @@ class Lead {
|
|
|
124
155
|
if (res_error) {
|
|
125
156
|
Logger({
|
|
126
157
|
level: "WARN",
|
|
127
|
-
message:
|
|
158
|
+
message: `Response Validation Warnnings for platform > Lead > createCustomForm \n ${res_error}`,
|
|
128
159
|
});
|
|
129
|
-
Logger({ level: "WARN", message: res_error });
|
|
130
160
|
}
|
|
131
161
|
|
|
132
162
|
return response;
|
|
133
163
|
}
|
|
134
164
|
|
|
135
165
|
/**
|
|
136
|
-
* @param {
|
|
137
|
-
* @param {
|
|
138
|
-
* @param {
|
|
139
|
-
* @returns {Promise<TicketHistory>} - Success response
|
|
166
|
+
* @param {LeadPlatformApplicationValidator.CreateHistoryParam} arg - Arg object
|
|
167
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
168
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
169
|
+
* @returns {Promise<LeadPlatformModel.TicketHistory>} - Success response
|
|
170
|
+
* @name createHistory
|
|
140
171
|
* @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.
|
|
172
|
+
* @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
173
|
*/
|
|
143
|
-
async createHistory(
|
|
144
|
-
|
|
174
|
+
async createHistory(
|
|
175
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
176
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
177
|
+
) {
|
|
178
|
+
const { error } = LeadPlatformApplicationValidator.createHistory().validate(
|
|
145
179
|
{
|
|
146
180
|
id,
|
|
147
181
|
body,
|
|
@@ -153,7 +187,9 @@ class Lead {
|
|
|
153
187
|
}
|
|
154
188
|
|
|
155
189
|
// Showing warrnings if extra unknown parameters are found
|
|
156
|
-
const {
|
|
190
|
+
const {
|
|
191
|
+
error: warrning,
|
|
192
|
+
} = LeadPlatformApplicationValidator.createHistory().validate(
|
|
157
193
|
{
|
|
158
194
|
id,
|
|
159
195
|
body,
|
|
@@ -163,9 +199,8 @@ class Lead {
|
|
|
163
199
|
if (warrning) {
|
|
164
200
|
Logger({
|
|
165
201
|
level: "WARN",
|
|
166
|
-
message:
|
|
202
|
+
message: `Parameter Validation warrnings for platform > Lead > createHistory \n ${warrning}`,
|
|
167
203
|
});
|
|
168
|
-
Logger({ level: "WARN", message: warrning });
|
|
169
204
|
}
|
|
170
205
|
|
|
171
206
|
const query_params = {};
|
|
@@ -175,10 +210,19 @@ class Lead {
|
|
|
175
210
|
"post",
|
|
176
211
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
177
212
|
query_params,
|
|
178
|
-
body
|
|
213
|
+
body,
|
|
214
|
+
requestHeaders,
|
|
215
|
+
{ responseHeaders }
|
|
179
216
|
);
|
|
180
217
|
|
|
181
|
-
|
|
218
|
+
let responseData = response;
|
|
219
|
+
if (responseHeaders) {
|
|
220
|
+
responseData = response[0];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const {
|
|
224
|
+
error: res_error,
|
|
225
|
+
} = LeadPlatformModel.TicketHistory().validate(responseData, {
|
|
182
226
|
abortEarly: false,
|
|
183
227
|
allowUnknown: false,
|
|
184
228
|
});
|
|
@@ -186,24 +230,29 @@ class Lead {
|
|
|
186
230
|
if (res_error) {
|
|
187
231
|
Logger({
|
|
188
232
|
level: "WARN",
|
|
189
|
-
message:
|
|
233
|
+
message: `Response Validation Warnnings for platform > Lead > createHistory \n ${res_error}`,
|
|
190
234
|
});
|
|
191
|
-
Logger({ level: "WARN", message: res_error });
|
|
192
235
|
}
|
|
193
236
|
|
|
194
237
|
return response;
|
|
195
238
|
}
|
|
196
239
|
|
|
197
240
|
/**
|
|
198
|
-
* @param {
|
|
199
|
-
* @param {
|
|
200
|
-
* @param {
|
|
201
|
-
* @returns {Promise<CustomForm>} - Success response
|
|
241
|
+
* @param {LeadPlatformApplicationValidator.EditCustomFormParam} arg - Arg object
|
|
242
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
243
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
244
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
245
|
+
* @name editCustomForm
|
|
202
246
|
* @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.
|
|
247
|
+
* @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
248
|
*/
|
|
205
|
-
async editCustomForm(
|
|
206
|
-
|
|
249
|
+
async editCustomForm(
|
|
250
|
+
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
251
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
252
|
+
) {
|
|
253
|
+
const {
|
|
254
|
+
error,
|
|
255
|
+
} = LeadPlatformApplicationValidator.editCustomForm().validate(
|
|
207
256
|
{
|
|
208
257
|
slug,
|
|
209
258
|
body,
|
|
@@ -215,7 +264,9 @@ class Lead {
|
|
|
215
264
|
}
|
|
216
265
|
|
|
217
266
|
// Showing warrnings if extra unknown parameters are found
|
|
218
|
-
const {
|
|
267
|
+
const {
|
|
268
|
+
error: warrning,
|
|
269
|
+
} = LeadPlatformApplicationValidator.editCustomForm().validate(
|
|
219
270
|
{
|
|
220
271
|
slug,
|
|
221
272
|
body,
|
|
@@ -225,9 +276,8 @@ class Lead {
|
|
|
225
276
|
if (warrning) {
|
|
226
277
|
Logger({
|
|
227
278
|
level: "WARN",
|
|
228
|
-
message:
|
|
279
|
+
message: `Parameter Validation warrnings for platform > Lead > editCustomForm \n ${warrning}`,
|
|
229
280
|
});
|
|
230
|
-
Logger({ level: "WARN", message: warrning });
|
|
231
281
|
}
|
|
232
282
|
|
|
233
283
|
const query_params = {};
|
|
@@ -237,10 +287,19 @@ class Lead {
|
|
|
237
287
|
"put",
|
|
238
288
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
239
289
|
query_params,
|
|
240
|
-
body
|
|
290
|
+
body,
|
|
291
|
+
requestHeaders,
|
|
292
|
+
{ responseHeaders }
|
|
241
293
|
);
|
|
242
294
|
|
|
243
|
-
|
|
295
|
+
let responseData = response;
|
|
296
|
+
if (responseHeaders) {
|
|
297
|
+
responseData = response[0];
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const {
|
|
301
|
+
error: res_error,
|
|
302
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
244
303
|
abortEarly: false,
|
|
245
304
|
allowUnknown: false,
|
|
246
305
|
});
|
|
@@ -248,24 +307,27 @@ class Lead {
|
|
|
248
307
|
if (res_error) {
|
|
249
308
|
Logger({
|
|
250
309
|
level: "WARN",
|
|
251
|
-
message:
|
|
310
|
+
message: `Response Validation Warnnings for platform > Lead > editCustomForm \n ${res_error}`,
|
|
252
311
|
});
|
|
253
|
-
Logger({ level: "WARN", message: res_error });
|
|
254
312
|
}
|
|
255
313
|
|
|
256
314
|
return response;
|
|
257
315
|
}
|
|
258
316
|
|
|
259
317
|
/**
|
|
260
|
-
* @param {
|
|
261
|
-
* @param {
|
|
262
|
-
* @param {
|
|
263
|
-
* @returns {Promise<Ticket>} - Success response
|
|
318
|
+
* @param {LeadPlatformApplicationValidator.EditTicketParam} arg - Arg object
|
|
319
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
320
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
321
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
322
|
+
* @name editTicket
|
|
264
323
|
* @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
|
|
324
|
+
* @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
325
|
*/
|
|
267
|
-
async editTicket(
|
|
268
|
-
|
|
326
|
+
async editTicket(
|
|
327
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
328
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
329
|
+
) {
|
|
330
|
+
const { error } = LeadPlatformApplicationValidator.editTicket().validate(
|
|
269
331
|
{
|
|
270
332
|
id,
|
|
271
333
|
body,
|
|
@@ -277,7 +339,9 @@ class Lead {
|
|
|
277
339
|
}
|
|
278
340
|
|
|
279
341
|
// Showing warrnings if extra unknown parameters are found
|
|
280
|
-
const {
|
|
342
|
+
const {
|
|
343
|
+
error: warrning,
|
|
344
|
+
} = LeadPlatformApplicationValidator.editTicket().validate(
|
|
281
345
|
{
|
|
282
346
|
id,
|
|
283
347
|
body,
|
|
@@ -287,9 +351,8 @@ class Lead {
|
|
|
287
351
|
if (warrning) {
|
|
288
352
|
Logger({
|
|
289
353
|
level: "WARN",
|
|
290
|
-
message:
|
|
354
|
+
message: `Parameter Validation warrnings for platform > Lead > editTicket \n ${warrning}`,
|
|
291
355
|
});
|
|
292
|
-
Logger({ level: "WARN", message: warrning });
|
|
293
356
|
}
|
|
294
357
|
|
|
295
358
|
const query_params = {};
|
|
@@ -299,10 +362,19 @@ class Lead {
|
|
|
299
362
|
"put",
|
|
300
363
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
301
364
|
query_params,
|
|
302
|
-
body
|
|
365
|
+
body,
|
|
366
|
+
requestHeaders,
|
|
367
|
+
{ responseHeaders }
|
|
303
368
|
);
|
|
304
369
|
|
|
305
|
-
|
|
370
|
+
let responseData = response;
|
|
371
|
+
if (responseHeaders) {
|
|
372
|
+
responseData = response[0];
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const {
|
|
376
|
+
error: res_error,
|
|
377
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
306
378
|
abortEarly: false,
|
|
307
379
|
allowUnknown: false,
|
|
308
380
|
});
|
|
@@ -310,23 +382,27 @@ class Lead {
|
|
|
310
382
|
if (res_error) {
|
|
311
383
|
Logger({
|
|
312
384
|
level: "WARN",
|
|
313
|
-
message:
|
|
385
|
+
message: `Response Validation Warnnings for platform > Lead > editTicket \n ${res_error}`,
|
|
314
386
|
});
|
|
315
|
-
Logger({ level: "WARN", message: res_error });
|
|
316
387
|
}
|
|
317
388
|
|
|
318
389
|
return response;
|
|
319
390
|
}
|
|
320
391
|
|
|
321
392
|
/**
|
|
322
|
-
* @param {
|
|
323
|
-
* @param {
|
|
324
|
-
* @
|
|
393
|
+
* @param {LeadPlatformApplicationValidator.GetCustomFormParam} arg - Arg object
|
|
394
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
395
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
396
|
+
* @returns {Promise<LeadPlatformModel.CustomForm>} - Success response
|
|
397
|
+
* @name getCustomForm
|
|
325
398
|
* @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.
|
|
399
|
+
* @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
400
|
*/
|
|
328
|
-
async getCustomForm(
|
|
329
|
-
|
|
401
|
+
async getCustomForm(
|
|
402
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
403
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
404
|
+
) {
|
|
405
|
+
const { error } = LeadPlatformApplicationValidator.getCustomForm().validate(
|
|
330
406
|
{
|
|
331
407
|
slug,
|
|
332
408
|
},
|
|
@@ -337,7 +413,9 @@ class Lead {
|
|
|
337
413
|
}
|
|
338
414
|
|
|
339
415
|
// Showing warrnings if extra unknown parameters are found
|
|
340
|
-
const {
|
|
416
|
+
const {
|
|
417
|
+
error: warrning,
|
|
418
|
+
} = LeadPlatformApplicationValidator.getCustomForm().validate(
|
|
341
419
|
{
|
|
342
420
|
slug,
|
|
343
421
|
},
|
|
@@ -346,9 +424,8 @@ class Lead {
|
|
|
346
424
|
if (warrning) {
|
|
347
425
|
Logger({
|
|
348
426
|
level: "WARN",
|
|
349
|
-
message:
|
|
427
|
+
message: `Parameter Validation warrnings for platform > Lead > getCustomForm \n ${warrning}`,
|
|
350
428
|
});
|
|
351
|
-
Logger({ level: "WARN", message: warrning });
|
|
352
429
|
}
|
|
353
430
|
|
|
354
431
|
const query_params = {};
|
|
@@ -358,10 +435,19 @@ class Lead {
|
|
|
358
435
|
"get",
|
|
359
436
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
360
437
|
query_params,
|
|
361
|
-
undefined
|
|
438
|
+
undefined,
|
|
439
|
+
requestHeaders,
|
|
440
|
+
{ responseHeaders }
|
|
362
441
|
);
|
|
363
442
|
|
|
364
|
-
|
|
443
|
+
let responseData = response;
|
|
444
|
+
if (responseHeaders) {
|
|
445
|
+
responseData = response[0];
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const {
|
|
449
|
+
error: res_error,
|
|
450
|
+
} = LeadPlatformModel.CustomForm().validate(responseData, {
|
|
365
451
|
abortEarly: false,
|
|
366
452
|
allowUnknown: false,
|
|
367
453
|
});
|
|
@@ -369,22 +455,29 @@ class Lead {
|
|
|
369
455
|
if (res_error) {
|
|
370
456
|
Logger({
|
|
371
457
|
level: "WARN",
|
|
372
|
-
message:
|
|
458
|
+
message: `Response Validation Warnnings for platform > Lead > getCustomForm \n ${res_error}`,
|
|
373
459
|
});
|
|
374
|
-
Logger({ level: "WARN", message: res_error });
|
|
375
460
|
}
|
|
376
461
|
|
|
377
462
|
return response;
|
|
378
463
|
}
|
|
379
464
|
|
|
380
465
|
/**
|
|
381
|
-
* @param {
|
|
382
|
-
* @
|
|
466
|
+
* @param {LeadPlatformApplicationValidator.GetCustomFormsParam} arg - Arg object
|
|
467
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
468
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
469
|
+
* @returns {Promise<LeadPlatformModel.CustomFormList>} - Success response
|
|
470
|
+
* @name getCustomForms
|
|
383
471
|
* @summary: Get list of custom form
|
|
384
|
-
* @description: Get list of custom form for given application
|
|
472
|
+
* @description: Get list of custom form for given application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getCustomForms/).
|
|
385
473
|
*/
|
|
386
|
-
async getCustomForms(
|
|
387
|
-
|
|
474
|
+
async getCustomForms(
|
|
475
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
476
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
477
|
+
) {
|
|
478
|
+
const {
|
|
479
|
+
error,
|
|
480
|
+
} = LeadPlatformApplicationValidator.getCustomForms().validate(
|
|
388
481
|
{},
|
|
389
482
|
{ abortEarly: false, allowUnknown: true }
|
|
390
483
|
);
|
|
@@ -393,16 +486,17 @@ class Lead {
|
|
|
393
486
|
}
|
|
394
487
|
|
|
395
488
|
// Showing warrnings if extra unknown parameters are found
|
|
396
|
-
const {
|
|
489
|
+
const {
|
|
490
|
+
error: warrning,
|
|
491
|
+
} = LeadPlatformApplicationValidator.getCustomForms().validate(
|
|
397
492
|
{},
|
|
398
493
|
{ abortEarly: false, allowUnknown: false }
|
|
399
494
|
);
|
|
400
495
|
if (warrning) {
|
|
401
496
|
Logger({
|
|
402
497
|
level: "WARN",
|
|
403
|
-
message:
|
|
498
|
+
message: `Parameter Validation warrnings for platform > Lead > getCustomForms \n ${warrning}`,
|
|
404
499
|
});
|
|
405
|
-
Logger({ level: "WARN", message: warrning });
|
|
406
500
|
}
|
|
407
501
|
|
|
408
502
|
const query_params = {};
|
|
@@ -412,10 +506,19 @@ class Lead {
|
|
|
412
506
|
"get",
|
|
413
507
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
414
508
|
query_params,
|
|
415
|
-
undefined
|
|
509
|
+
undefined,
|
|
510
|
+
requestHeaders,
|
|
511
|
+
{ responseHeaders }
|
|
416
512
|
);
|
|
417
513
|
|
|
418
|
-
|
|
514
|
+
let responseData = response;
|
|
515
|
+
if (responseHeaders) {
|
|
516
|
+
responseData = response[0];
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
const {
|
|
520
|
+
error: res_error,
|
|
521
|
+
} = LeadPlatformModel.CustomFormList().validate(responseData, {
|
|
419
522
|
abortEarly: false,
|
|
420
523
|
allowUnknown: false,
|
|
421
524
|
});
|
|
@@ -423,23 +526,27 @@ class Lead {
|
|
|
423
526
|
if (res_error) {
|
|
424
527
|
Logger({
|
|
425
528
|
level: "WARN",
|
|
426
|
-
message:
|
|
529
|
+
message: `Response Validation Warnnings for platform > Lead > getCustomForms \n ${res_error}`,
|
|
427
530
|
});
|
|
428
|
-
Logger({ level: "WARN", message: res_error });
|
|
429
531
|
}
|
|
430
532
|
|
|
431
533
|
return response;
|
|
432
534
|
}
|
|
433
535
|
|
|
434
536
|
/**
|
|
435
|
-
* @param {
|
|
436
|
-
* @param {
|
|
437
|
-
* @
|
|
537
|
+
* @param {LeadPlatformApplicationValidator.GetTicketParam} arg - Arg object
|
|
538
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
539
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
540
|
+
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
541
|
+
* @name getTicket
|
|
438
542
|
* @summary: Retreives ticket details of a application level ticket
|
|
439
|
-
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
543
|
+
* @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
544
|
*/
|
|
441
|
-
async getTicket(
|
|
442
|
-
|
|
545
|
+
async getTicket(
|
|
546
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
547
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
548
|
+
) {
|
|
549
|
+
const { error } = LeadPlatformApplicationValidator.getTicket().validate(
|
|
443
550
|
{
|
|
444
551
|
id,
|
|
445
552
|
},
|
|
@@ -450,7 +557,9 @@ class Lead {
|
|
|
450
557
|
}
|
|
451
558
|
|
|
452
559
|
// Showing warrnings if extra unknown parameters are found
|
|
453
|
-
const {
|
|
560
|
+
const {
|
|
561
|
+
error: warrning,
|
|
562
|
+
} = LeadPlatformApplicationValidator.getTicket().validate(
|
|
454
563
|
{
|
|
455
564
|
id,
|
|
456
565
|
},
|
|
@@ -459,9 +568,8 @@ class Lead {
|
|
|
459
568
|
if (warrning) {
|
|
460
569
|
Logger({
|
|
461
570
|
level: "WARN",
|
|
462
|
-
message:
|
|
571
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicket \n ${warrning}`,
|
|
463
572
|
});
|
|
464
|
-
Logger({ level: "WARN", message: warrning });
|
|
465
573
|
}
|
|
466
574
|
|
|
467
575
|
const query_params = {};
|
|
@@ -471,10 +579,19 @@ class Lead {
|
|
|
471
579
|
"get",
|
|
472
580
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
473
581
|
query_params,
|
|
474
|
-
undefined
|
|
582
|
+
undefined,
|
|
583
|
+
requestHeaders,
|
|
584
|
+
{ responseHeaders }
|
|
475
585
|
);
|
|
476
586
|
|
|
477
|
-
|
|
587
|
+
let responseData = response;
|
|
588
|
+
if (responseHeaders) {
|
|
589
|
+
responseData = response[0];
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
const {
|
|
593
|
+
error: res_error,
|
|
594
|
+
} = LeadPlatformModel.Ticket().validate(responseData, {
|
|
478
595
|
abortEarly: false,
|
|
479
596
|
allowUnknown: false,
|
|
480
597
|
});
|
|
@@ -482,23 +599,29 @@ class Lead {
|
|
|
482
599
|
if (res_error) {
|
|
483
600
|
Logger({
|
|
484
601
|
level: "WARN",
|
|
485
|
-
message:
|
|
602
|
+
message: `Response Validation Warnnings for platform > Lead > getTicket \n ${res_error}`,
|
|
486
603
|
});
|
|
487
|
-
Logger({ level: "WARN", message: res_error });
|
|
488
604
|
}
|
|
489
605
|
|
|
490
606
|
return response;
|
|
491
607
|
}
|
|
492
608
|
|
|
493
609
|
/**
|
|
494
|
-
* @param {
|
|
495
|
-
* @param {
|
|
496
|
-
* @
|
|
610
|
+
* @param {LeadPlatformApplicationValidator.GetTicketHistoryParam} arg - Arg object
|
|
611
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
612
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
613
|
+
* @returns {Promise<LeadPlatformModel.TicketHistoryList>} - Success response
|
|
614
|
+
* @name getTicketHistory
|
|
497
615
|
* @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.
|
|
616
|
+
* @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
617
|
*/
|
|
500
|
-
async getTicketHistory(
|
|
501
|
-
|
|
618
|
+
async getTicketHistory(
|
|
619
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
620
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
621
|
+
) {
|
|
622
|
+
const {
|
|
623
|
+
error,
|
|
624
|
+
} = LeadPlatformApplicationValidator.getTicketHistory().validate(
|
|
502
625
|
{
|
|
503
626
|
id,
|
|
504
627
|
},
|
|
@@ -509,7 +632,9 @@ class Lead {
|
|
|
509
632
|
}
|
|
510
633
|
|
|
511
634
|
// Showing warrnings if extra unknown parameters are found
|
|
512
|
-
const {
|
|
635
|
+
const {
|
|
636
|
+
error: warrning,
|
|
637
|
+
} = LeadPlatformApplicationValidator.getTicketHistory().validate(
|
|
513
638
|
{
|
|
514
639
|
id,
|
|
515
640
|
},
|
|
@@ -518,9 +643,8 @@ class Lead {
|
|
|
518
643
|
if (warrning) {
|
|
519
644
|
Logger({
|
|
520
645
|
level: "WARN",
|
|
521
|
-
message:
|
|
646
|
+
message: `Parameter Validation warrnings for platform > Lead > getTicketHistory \n ${warrning}`,
|
|
522
647
|
});
|
|
523
|
-
Logger({ level: "WARN", message: warrning });
|
|
524
648
|
}
|
|
525
649
|
|
|
526
650
|
const query_params = {};
|
|
@@ -530,12 +654,19 @@ class Lead {
|
|
|
530
654
|
"get",
|
|
531
655
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
532
656
|
query_params,
|
|
533
|
-
undefined
|
|
657
|
+
undefined,
|
|
658
|
+
requestHeaders,
|
|
659
|
+
{ responseHeaders }
|
|
534
660
|
);
|
|
535
661
|
|
|
662
|
+
let responseData = response;
|
|
663
|
+
if (responseHeaders) {
|
|
664
|
+
responseData = response[0];
|
|
665
|
+
}
|
|
666
|
+
|
|
536
667
|
const {
|
|
537
668
|
error: res_error,
|
|
538
|
-
} =
|
|
669
|
+
} = LeadPlatformModel.TicketHistoryList().validate(responseData, {
|
|
539
670
|
abortEarly: false,
|
|
540
671
|
allowUnknown: false,
|
|
541
672
|
});
|
|
@@ -543,30 +674,29 @@ class Lead {
|
|
|
543
674
|
if (res_error) {
|
|
544
675
|
Logger({
|
|
545
676
|
level: "WARN",
|
|
546
|
-
message:
|
|
677
|
+
message: `Response Validation Warnnings for platform > Lead > getTicketHistory \n ${res_error}`,
|
|
547
678
|
});
|
|
548
|
-
Logger({ level: "WARN", message: res_error });
|
|
549
679
|
}
|
|
550
680
|
|
|
551
681
|
return response;
|
|
552
682
|
}
|
|
553
683
|
|
|
554
684
|
/**
|
|
555
|
-
* @param {
|
|
556
|
-
* @param {
|
|
557
|
-
*
|
|
558
|
-
* @
|
|
559
|
-
*
|
|
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
|
|
685
|
+
* @param {LeadPlatformApplicationValidator.GetTicketsParam} arg - Arg object
|
|
686
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
687
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
688
|
+
* @returns {Promise<LeadPlatformModel.TicketList>} - Success response
|
|
689
|
+
* @name getTickets
|
|
565
690
|
* @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
|
|
691
|
+
* @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
692
|
*/
|
|
568
|
-
async getTickets(
|
|
569
|
-
|
|
693
|
+
async getTickets(
|
|
694
|
+
{ items, filters, q, status, priority, category, requestHeaders } = {
|
|
695
|
+
requestHeaders: {},
|
|
696
|
+
},
|
|
697
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
698
|
+
) {
|
|
699
|
+
const { error } = LeadPlatformApplicationValidator.getTickets().validate(
|
|
570
700
|
{
|
|
571
701
|
items,
|
|
572
702
|
filters,
|
|
@@ -582,7 +712,9 @@ class Lead {
|
|
|
582
712
|
}
|
|
583
713
|
|
|
584
714
|
// Showing warrnings if extra unknown parameters are found
|
|
585
|
-
const {
|
|
715
|
+
const {
|
|
716
|
+
error: warrning,
|
|
717
|
+
} = LeadPlatformApplicationValidator.getTickets().validate(
|
|
586
718
|
{
|
|
587
719
|
items,
|
|
588
720
|
filters,
|
|
@@ -596,9 +728,8 @@ class Lead {
|
|
|
596
728
|
if (warrning) {
|
|
597
729
|
Logger({
|
|
598
730
|
level: "WARN",
|
|
599
|
-
message:
|
|
731
|
+
message: `Parameter Validation warrnings for platform > Lead > getTickets \n ${warrning}`,
|
|
600
732
|
});
|
|
601
|
-
Logger({ level: "WARN", message: warrning });
|
|
602
733
|
}
|
|
603
734
|
|
|
604
735
|
const query_params = {};
|
|
@@ -614,10 +745,19 @@ class Lead {
|
|
|
614
745
|
"get",
|
|
615
746
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
616
747
|
query_params,
|
|
617
|
-
undefined
|
|
748
|
+
undefined,
|
|
749
|
+
requestHeaders,
|
|
750
|
+
{ responseHeaders }
|
|
618
751
|
);
|
|
619
752
|
|
|
620
|
-
|
|
753
|
+
let responseData = response;
|
|
754
|
+
if (responseHeaders) {
|
|
755
|
+
responseData = response[0];
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
const {
|
|
759
|
+
error: res_error,
|
|
760
|
+
} = LeadPlatformModel.TicketList().validate(responseData, {
|
|
621
761
|
abortEarly: false,
|
|
622
762
|
allowUnknown: false,
|
|
623
763
|
});
|
|
@@ -625,23 +765,32 @@ class Lead {
|
|
|
625
765
|
if (res_error) {
|
|
626
766
|
Logger({
|
|
627
767
|
level: "WARN",
|
|
628
|
-
message:
|
|
768
|
+
message: `Response Validation Warnnings for platform > Lead > getTickets \n ${res_error}`,
|
|
629
769
|
});
|
|
630
|
-
Logger({ level: "WARN", message: res_error });
|
|
631
770
|
}
|
|
632
771
|
|
|
633
772
|
return response;
|
|
634
773
|
}
|
|
635
774
|
|
|
636
775
|
/**
|
|
637
|
-
* @param {
|
|
638
|
-
*
|
|
639
|
-
*
|
|
776
|
+
* @param {LeadPlatformApplicationValidator.GetTokenForVideoRoomParam} arg
|
|
777
|
+
* - Arg object
|
|
778
|
+
*
|
|
779
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
780
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
781
|
+
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
782
|
+
* Success response
|
|
783
|
+
* @name getTokenForVideoRoom
|
|
640
784
|
* @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.
|
|
785
|
+
* @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
786
|
*/
|
|
643
|
-
async getTokenForVideoRoom(
|
|
644
|
-
|
|
787
|
+
async getTokenForVideoRoom(
|
|
788
|
+
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
789
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
790
|
+
) {
|
|
791
|
+
const {
|
|
792
|
+
error,
|
|
793
|
+
} = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
|
|
645
794
|
{
|
|
646
795
|
uniqueName,
|
|
647
796
|
},
|
|
@@ -652,7 +801,9 @@ class Lead {
|
|
|
652
801
|
}
|
|
653
802
|
|
|
654
803
|
// Showing warrnings if extra unknown parameters are found
|
|
655
|
-
const {
|
|
804
|
+
const {
|
|
805
|
+
error: warrning,
|
|
806
|
+
} = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate(
|
|
656
807
|
{
|
|
657
808
|
uniqueName,
|
|
658
809
|
},
|
|
@@ -661,9 +812,8 @@ class Lead {
|
|
|
661
812
|
if (warrning) {
|
|
662
813
|
Logger({
|
|
663
814
|
level: "WARN",
|
|
664
|
-
message:
|
|
815
|
+
message: `Parameter Validation warrnings for platform > Lead > getTokenForVideoRoom \n ${warrning}`,
|
|
665
816
|
});
|
|
666
|
-
Logger({ level: "WARN", message: warrning });
|
|
667
817
|
}
|
|
668
818
|
|
|
669
819
|
const query_params = {};
|
|
@@ -673,36 +823,53 @@ class Lead {
|
|
|
673
823
|
"get",
|
|
674
824
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
675
825
|
query_params,
|
|
676
|
-
undefined
|
|
826
|
+
undefined,
|
|
827
|
+
requestHeaders,
|
|
828
|
+
{ responseHeaders }
|
|
677
829
|
);
|
|
678
830
|
|
|
831
|
+
let responseData = response;
|
|
832
|
+
if (responseHeaders) {
|
|
833
|
+
responseData = response[0];
|
|
834
|
+
}
|
|
835
|
+
|
|
679
836
|
const {
|
|
680
837
|
error: res_error,
|
|
681
|
-
} =
|
|
682
|
-
|
|
683
|
-
allowUnknown: false
|
|
684
|
-
|
|
838
|
+
} = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
|
|
839
|
+
responseData,
|
|
840
|
+
{ abortEarly: false, allowUnknown: false }
|
|
841
|
+
);
|
|
685
842
|
|
|
686
843
|
if (res_error) {
|
|
687
844
|
Logger({
|
|
688
845
|
level: "WARN",
|
|
689
|
-
message:
|
|
846
|
+
message: `Response Validation Warnnings for platform > Lead > getTokenForVideoRoom \n ${res_error}`,
|
|
690
847
|
});
|
|
691
|
-
Logger({ level: "WARN", message: res_error });
|
|
692
848
|
}
|
|
693
849
|
|
|
694
850
|
return response;
|
|
695
851
|
}
|
|
696
852
|
|
|
697
853
|
/**
|
|
698
|
-
* @param {
|
|
699
|
-
*
|
|
700
|
-
*
|
|
854
|
+
* @param {LeadPlatformApplicationValidator.GetVideoParticipantsParam} arg
|
|
855
|
+
* - Arg object
|
|
856
|
+
*
|
|
857
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
858
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
859
|
+
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
860
|
+
* - Success response
|
|
861
|
+
*
|
|
862
|
+
* @name getVideoParticipants
|
|
701
863
|
* @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.
|
|
864
|
+
* @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
865
|
*/
|
|
704
|
-
async getVideoParticipants(
|
|
705
|
-
|
|
866
|
+
async getVideoParticipants(
|
|
867
|
+
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
868
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
869
|
+
) {
|
|
870
|
+
const {
|
|
871
|
+
error,
|
|
872
|
+
} = LeadPlatformApplicationValidator.getVideoParticipants().validate(
|
|
706
873
|
{
|
|
707
874
|
uniqueName,
|
|
708
875
|
},
|
|
@@ -713,7 +880,9 @@ class Lead {
|
|
|
713
880
|
}
|
|
714
881
|
|
|
715
882
|
// Showing warrnings if extra unknown parameters are found
|
|
716
|
-
const {
|
|
883
|
+
const {
|
|
884
|
+
error: warrning,
|
|
885
|
+
} = LeadPlatformApplicationValidator.getVideoParticipants().validate(
|
|
717
886
|
{
|
|
718
887
|
uniqueName,
|
|
719
888
|
},
|
|
@@ -722,9 +891,8 @@ class Lead {
|
|
|
722
891
|
if (warrning) {
|
|
723
892
|
Logger({
|
|
724
893
|
level: "WARN",
|
|
725
|
-
message:
|
|
894
|
+
message: `Parameter Validation warrnings for platform > Lead > getVideoParticipants \n ${warrning}`,
|
|
726
895
|
});
|
|
727
|
-
Logger({ level: "WARN", message: warrning });
|
|
728
896
|
}
|
|
729
897
|
|
|
730
898
|
const query_params = {};
|
|
@@ -734,36 +902,47 @@ class Lead {
|
|
|
734
902
|
"get",
|
|
735
903
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
736
904
|
query_params,
|
|
737
|
-
undefined
|
|
905
|
+
undefined,
|
|
906
|
+
requestHeaders,
|
|
907
|
+
{ responseHeaders }
|
|
738
908
|
);
|
|
739
909
|
|
|
910
|
+
let responseData = response;
|
|
911
|
+
if (responseHeaders) {
|
|
912
|
+
responseData = response[0];
|
|
913
|
+
}
|
|
914
|
+
|
|
740
915
|
const {
|
|
741
916
|
error: res_error,
|
|
742
|
-
} =
|
|
743
|
-
|
|
744
|
-
allowUnknown: false
|
|
745
|
-
|
|
917
|
+
} = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
|
|
918
|
+
responseData,
|
|
919
|
+
{ abortEarly: false, allowUnknown: false }
|
|
920
|
+
);
|
|
746
921
|
|
|
747
922
|
if (res_error) {
|
|
748
923
|
Logger({
|
|
749
924
|
level: "WARN",
|
|
750
|
-
message:
|
|
925
|
+
message: `Response Validation Warnnings for platform > Lead > getVideoParticipants \n ${res_error}`,
|
|
751
926
|
});
|
|
752
|
-
Logger({ level: "WARN", message: res_error });
|
|
753
927
|
}
|
|
754
928
|
|
|
755
929
|
return response;
|
|
756
930
|
}
|
|
757
931
|
|
|
758
932
|
/**
|
|
759
|
-
* @param {
|
|
760
|
-
* @param {
|
|
761
|
-
* @
|
|
933
|
+
* @param {LeadPlatformApplicationValidator.OpenVideoRoomParam} arg - Arg object
|
|
934
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
935
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
936
|
+
* @returns {Promise<LeadPlatformModel.CreateVideoRoomResponse>} - Success response
|
|
937
|
+
* @name openVideoRoom
|
|
762
938
|
* @summary: Open a video room.
|
|
763
|
-
* @description: Open a video room.
|
|
939
|
+
* @description: Open a video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/openVideoRoom/).
|
|
764
940
|
*/
|
|
765
|
-
async openVideoRoom(
|
|
766
|
-
|
|
941
|
+
async openVideoRoom(
|
|
942
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
943
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
944
|
+
) {
|
|
945
|
+
const { error } = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
767
946
|
{
|
|
768
947
|
body,
|
|
769
948
|
},
|
|
@@ -774,7 +953,9 @@ class Lead {
|
|
|
774
953
|
}
|
|
775
954
|
|
|
776
955
|
// Showing warrnings if extra unknown parameters are found
|
|
777
|
-
const {
|
|
956
|
+
const {
|
|
957
|
+
error: warrning,
|
|
958
|
+
} = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
778
959
|
{
|
|
779
960
|
body,
|
|
780
961
|
},
|
|
@@ -783,9 +964,8 @@ class Lead {
|
|
|
783
964
|
if (warrning) {
|
|
784
965
|
Logger({
|
|
785
966
|
level: "WARN",
|
|
786
|
-
message:
|
|
967
|
+
message: `Parameter Validation warrnings for platform > Lead > openVideoRoom \n ${warrning}`,
|
|
787
968
|
});
|
|
788
|
-
Logger({ level: "WARN", message: warrning });
|
|
789
969
|
}
|
|
790
970
|
|
|
791
971
|
const query_params = {};
|
|
@@ -795,12 +975,19 @@ class Lead {
|
|
|
795
975
|
"post",
|
|
796
976
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
797
977
|
query_params,
|
|
798
|
-
body
|
|
978
|
+
body,
|
|
979
|
+
requestHeaders,
|
|
980
|
+
{ responseHeaders }
|
|
799
981
|
);
|
|
800
982
|
|
|
983
|
+
let responseData = response;
|
|
984
|
+
if (responseHeaders) {
|
|
985
|
+
responseData = response[0];
|
|
986
|
+
}
|
|
987
|
+
|
|
801
988
|
const {
|
|
802
989
|
error: res_error,
|
|
803
|
-
} =
|
|
990
|
+
} = LeadPlatformModel.CreateVideoRoomResponse().validate(responseData, {
|
|
804
991
|
abortEarly: false,
|
|
805
992
|
allowUnknown: false,
|
|
806
993
|
});
|
|
@@ -808,9 +995,8 @@ class Lead {
|
|
|
808
995
|
if (res_error) {
|
|
809
996
|
Logger({
|
|
810
997
|
level: "WARN",
|
|
811
|
-
message:
|
|
998
|
+
message: `Response Validation Warnnings for platform > Lead > openVideoRoom \n ${res_error}`,
|
|
812
999
|
});
|
|
813
|
-
Logger({ level: "WARN", message: res_error });
|
|
814
1000
|
}
|
|
815
1001
|
|
|
816
1002
|
return response;
|