@gofynd/fdk-client-javascript 1.0.1 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +562 -1270
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +15266 -17619
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3509 -4121
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3750 -5636
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +1058 -547
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +76 -36
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +581 -213
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
- package/sdk/application/Content/ContentApplicationModel.js +468 -875
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +230 -96
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
- package/sdk/application/Order/OrderApplicationClient.js +448 -215
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +357 -661
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
- package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +221 -96
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +1201 -543
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
- package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
- package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
- package/sdk/platform/Common/CommonPlatformClient.js +80 -37
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
- package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
- package/sdk/platform/Content/ContentPlatformModel.js +486 -867
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
- package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
- package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
- package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
- package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
- package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
- package/sdk/platform/PlatformApplicationClient.js +1584 -13691
- package/sdk/platform/PlatformClient.d.ts +7918 -7666
- package/sdk/platform/PlatformClient.js +8701 -9926
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
- package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
- package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
- package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -2,6 +2,8 @@ const Paginator = require("../../common/Paginator");
|
|
|
2
2
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
3
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
4
|
const LeadValidator = require("./LeadPlatformApplicationValidator");
|
|
5
|
+
const LeadModel = require("./LeadPlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
5
7
|
|
|
6
8
|
class Lead {
|
|
7
9
|
constructor(config, applicationId) {
|
|
@@ -11,26 +13,15 @@ class Lead {
|
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* @param {Object} arg - Arg object.
|
|
14
|
-
* @param {
|
|
15
|
-
*
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
* @param {string} [arg.q] - Search through ticket titles and description
|
|
19
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
20
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
21
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
22
|
-
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
23
|
-
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
16
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
17
|
+
* @returns {Promise<CloseVideoRoomResponse>} - Success response
|
|
18
|
+
* @summary: Close the video room and force all participants to leave.
|
|
19
|
+
* @description: Close the video room and force all participants to leave.
|
|
24
20
|
*/
|
|
25
|
-
|
|
26
|
-
const { error } = LeadValidator.
|
|
21
|
+
async closeVideoRoom({ uniqueName } = {}) {
|
|
22
|
+
const { error } = LeadValidator.closeVideoRoom().validate(
|
|
27
23
|
{
|
|
28
|
-
|
|
29
|
-
filters,
|
|
30
|
-
q,
|
|
31
|
-
status,
|
|
32
|
-
priority,
|
|
33
|
-
category,
|
|
24
|
+
uniqueName,
|
|
34
25
|
},
|
|
35
26
|
{ abortEarly: false, allowUnknown: true }
|
|
36
27
|
);
|
|
@@ -39,49 +30,59 @@ class Lead {
|
|
|
39
30
|
}
|
|
40
31
|
|
|
41
32
|
// Showing warrnings if extra unknown parameters are found
|
|
42
|
-
const { error: warrning } = LeadValidator.
|
|
33
|
+
const { error: warrning } = LeadValidator.closeVideoRoom().validate(
|
|
43
34
|
{
|
|
44
|
-
|
|
45
|
-
filters,
|
|
46
|
-
q,
|
|
47
|
-
status,
|
|
48
|
-
priority,
|
|
49
|
-
category,
|
|
35
|
+
uniqueName,
|
|
50
36
|
},
|
|
51
37
|
{ abortEarly: false, allowUnknown: false }
|
|
52
38
|
);
|
|
53
39
|
if (warrning) {
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
Logger({
|
|
41
|
+
level: "WARN",
|
|
42
|
+
message: "Parameter Validation warrnings for closeVideoRoom",
|
|
43
|
+
});
|
|
44
|
+
Logger({ level: "WARN", message: warrning });
|
|
56
45
|
}
|
|
57
46
|
|
|
58
47
|
const query_params = {};
|
|
59
|
-
query_params["items"] = items;
|
|
60
|
-
query_params["filters"] = filters;
|
|
61
|
-
query_params["q"] = q;
|
|
62
|
-
query_params["status"] = status;
|
|
63
|
-
query_params["priority"] = priority;
|
|
64
|
-
query_params["category"] = category;
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
const response = await PlatformAPIClient.execute(
|
|
67
50
|
this.config,
|
|
68
|
-
"
|
|
69
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
51
|
+
"delete",
|
|
52
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
70
53
|
query_params,
|
|
71
54
|
undefined
|
|
72
55
|
);
|
|
56
|
+
|
|
57
|
+
const {
|
|
58
|
+
error: res_error,
|
|
59
|
+
} = LeadModel.CloseVideoRoomResponse().validate(response, {
|
|
60
|
+
abortEarly: false,
|
|
61
|
+
allowUnknown: false,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
if (res_error) {
|
|
65
|
+
Logger({
|
|
66
|
+
level: "WARN",
|
|
67
|
+
message: "Response Validation Warnnings for closeVideoRoom",
|
|
68
|
+
});
|
|
69
|
+
Logger({ level: "WARN", message: res_error });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return response;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @param {Object} arg - Arg object.
|
|
77
|
-
* @param {
|
|
78
|
-
* @
|
|
79
|
-
* @
|
|
77
|
+
* @param {CreateCustomFormPayload} arg.body
|
|
78
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
79
|
+
* @summary: Creates a new custom form
|
|
80
|
+
* @description: Creates a new custom form for given application
|
|
80
81
|
*/
|
|
81
|
-
|
|
82
|
-
const { error } = LeadValidator.
|
|
82
|
+
async createCustomForm({ body } = {}) {
|
|
83
|
+
const { error } = LeadValidator.createCustomForm().validate(
|
|
83
84
|
{
|
|
84
|
-
|
|
85
|
+
body,
|
|
85
86
|
},
|
|
86
87
|
{ abortEarly: false, allowUnknown: true }
|
|
87
88
|
);
|
|
@@ -90,37 +91,56 @@ class Lead {
|
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
// Showing warrnings if extra unknown parameters are found
|
|
93
|
-
const { error: warrning } = LeadValidator.
|
|
94
|
+
const { error: warrning } = LeadValidator.createCustomForm().validate(
|
|
94
95
|
{
|
|
95
|
-
|
|
96
|
+
body,
|
|
96
97
|
},
|
|
97
98
|
{ abortEarly: false, allowUnknown: false }
|
|
98
99
|
);
|
|
99
100
|
if (warrning) {
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
Logger({
|
|
102
|
+
level: "WARN",
|
|
103
|
+
message: "Parameter Validation warrnings for createCustomForm",
|
|
104
|
+
});
|
|
105
|
+
Logger({ level: "WARN", message: warrning });
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
const query_params = {};
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
const response = await PlatformAPIClient.execute(
|
|
107
111
|
this.config,
|
|
108
|
-
"
|
|
109
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
112
|
+
"post",
|
|
113
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
110
114
|
query_params,
|
|
111
|
-
|
|
115
|
+
body
|
|
112
116
|
);
|
|
117
|
+
|
|
118
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
119
|
+
abortEarly: false,
|
|
120
|
+
allowUnknown: false,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
if (res_error) {
|
|
124
|
+
Logger({
|
|
125
|
+
level: "WARN",
|
|
126
|
+
message: "Response Validation Warnnings for createCustomForm",
|
|
127
|
+
});
|
|
128
|
+
Logger({ level: "WARN", message: res_error });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return response;
|
|
113
132
|
}
|
|
114
133
|
|
|
115
134
|
/**
|
|
116
135
|
* @param {Object} arg - Arg object.
|
|
117
|
-
* @param {string} arg.id - Ticket ID
|
|
118
|
-
* @param {
|
|
119
|
-
* @
|
|
120
|
-
* @
|
|
136
|
+
* @param {string} arg.id - Ticket ID for which history is created
|
|
137
|
+
* @param {TicketHistoryPayload} arg.body
|
|
138
|
+
* @returns {Promise<TicketHistory>} - Success response
|
|
139
|
+
* @summary: Create history for specific application level ticket
|
|
140
|
+
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
121
141
|
*/
|
|
122
|
-
|
|
123
|
-
const { error } = LeadValidator.
|
|
142
|
+
async createHistory({ id, body } = {}) {
|
|
143
|
+
const { error } = LeadValidator.createHistory().validate(
|
|
124
144
|
{
|
|
125
145
|
id,
|
|
126
146
|
body,
|
|
@@ -132,7 +152,7 @@ class Lead {
|
|
|
132
152
|
}
|
|
133
153
|
|
|
134
154
|
// Showing warrnings if extra unknown parameters are found
|
|
135
|
-
const { error: warrning } = LeadValidator.
|
|
155
|
+
const { error: warrning } = LeadValidator.createHistory().validate(
|
|
136
156
|
{
|
|
137
157
|
id,
|
|
138
158
|
body,
|
|
@@ -140,32 +160,51 @@ class Lead {
|
|
|
140
160
|
{ abortEarly: false, allowUnknown: false }
|
|
141
161
|
);
|
|
142
162
|
if (warrning) {
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
Logger({
|
|
164
|
+
level: "WARN",
|
|
165
|
+
message: "Parameter Validation warrnings for createHistory",
|
|
166
|
+
});
|
|
167
|
+
Logger({ level: "WARN", message: warrning });
|
|
145
168
|
}
|
|
146
169
|
|
|
147
170
|
const query_params = {};
|
|
148
171
|
|
|
149
|
-
|
|
172
|
+
const response = await PlatformAPIClient.execute(
|
|
150
173
|
this.config,
|
|
151
|
-
"
|
|
152
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
174
|
+
"post",
|
|
175
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
153
176
|
query_params,
|
|
154
177
|
body
|
|
155
178
|
);
|
|
179
|
+
|
|
180
|
+
const { error: res_error } = LeadModel.TicketHistory().validate(response, {
|
|
181
|
+
abortEarly: false,
|
|
182
|
+
allowUnknown: false,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
if (res_error) {
|
|
186
|
+
Logger({
|
|
187
|
+
level: "WARN",
|
|
188
|
+
message: "Response Validation Warnnings for createHistory",
|
|
189
|
+
});
|
|
190
|
+
Logger({ level: "WARN", message: res_error });
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return response;
|
|
156
194
|
}
|
|
157
195
|
|
|
158
196
|
/**
|
|
159
197
|
* @param {Object} arg - Arg object.
|
|
160
|
-
* @param {string} arg.
|
|
161
|
-
* @param {
|
|
162
|
-
* @
|
|
163
|
-
* @
|
|
198
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
199
|
+
* @param {EditCustomFormPayload} arg.body
|
|
200
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
201
|
+
* @summary: Edit the given custom form
|
|
202
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
164
203
|
*/
|
|
165
|
-
|
|
166
|
-
const { error } = LeadValidator.
|
|
204
|
+
async editCustomForm({ slug, body } = {}) {
|
|
205
|
+
const { error } = LeadValidator.editCustomForm().validate(
|
|
167
206
|
{
|
|
168
|
-
|
|
207
|
+
slug,
|
|
169
208
|
body,
|
|
170
209
|
},
|
|
171
210
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -175,39 +214,60 @@ class Lead {
|
|
|
175
214
|
}
|
|
176
215
|
|
|
177
216
|
// Showing warrnings if extra unknown parameters are found
|
|
178
|
-
const { error: warrning } = LeadValidator.
|
|
217
|
+
const { error: warrning } = LeadValidator.editCustomForm().validate(
|
|
179
218
|
{
|
|
180
|
-
|
|
219
|
+
slug,
|
|
181
220
|
body,
|
|
182
221
|
},
|
|
183
222
|
{ abortEarly: false, allowUnknown: false }
|
|
184
223
|
);
|
|
185
224
|
if (warrning) {
|
|
186
|
-
|
|
187
|
-
|
|
225
|
+
Logger({
|
|
226
|
+
level: "WARN",
|
|
227
|
+
message: "Parameter Validation warrnings for editCustomForm",
|
|
228
|
+
});
|
|
229
|
+
Logger({ level: "WARN", message: warrning });
|
|
188
230
|
}
|
|
189
231
|
|
|
190
232
|
const query_params = {};
|
|
191
233
|
|
|
192
|
-
|
|
234
|
+
const response = await PlatformAPIClient.execute(
|
|
193
235
|
this.config,
|
|
194
|
-
"
|
|
195
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
236
|
+
"put",
|
|
237
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
196
238
|
query_params,
|
|
197
239
|
body
|
|
198
240
|
);
|
|
241
|
+
|
|
242
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
243
|
+
abortEarly: false,
|
|
244
|
+
allowUnknown: false,
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if (res_error) {
|
|
248
|
+
Logger({
|
|
249
|
+
level: "WARN",
|
|
250
|
+
message: "Response Validation Warnnings for editCustomForm",
|
|
251
|
+
});
|
|
252
|
+
Logger({ level: "WARN", message: res_error });
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return response;
|
|
199
256
|
}
|
|
200
257
|
|
|
201
258
|
/**
|
|
202
259
|
* @param {Object} arg - Arg object.
|
|
203
|
-
* @param {string} arg.id - Ticket ID
|
|
204
|
-
* @
|
|
205
|
-
* @
|
|
260
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
261
|
+
* @param {EditTicketPayload} arg.body
|
|
262
|
+
* @returns {Promise<Ticket>} - Success response
|
|
263
|
+
* @summary: Edits ticket details of a application level ticket
|
|
264
|
+
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
206
265
|
*/
|
|
207
|
-
|
|
208
|
-
const { error } = LeadValidator.
|
|
266
|
+
async editTicket({ id, body } = {}) {
|
|
267
|
+
const { error } = LeadValidator.editTicket().validate(
|
|
209
268
|
{
|
|
210
269
|
id,
|
|
270
|
+
body,
|
|
211
271
|
},
|
|
212
272
|
{ abortEarly: false, allowUnknown: true }
|
|
213
273
|
);
|
|
@@ -216,35 +276,55 @@ class Lead {
|
|
|
216
276
|
}
|
|
217
277
|
|
|
218
278
|
// Showing warrnings if extra unknown parameters are found
|
|
219
|
-
const { error: warrning } = LeadValidator.
|
|
279
|
+
const { error: warrning } = LeadValidator.editTicket().validate(
|
|
220
280
|
{
|
|
221
281
|
id,
|
|
282
|
+
body,
|
|
222
283
|
},
|
|
223
284
|
{ abortEarly: false, allowUnknown: false }
|
|
224
285
|
);
|
|
225
286
|
if (warrning) {
|
|
226
|
-
|
|
227
|
-
|
|
287
|
+
Logger({
|
|
288
|
+
level: "WARN",
|
|
289
|
+
message: "Parameter Validation warrnings for editTicket",
|
|
290
|
+
});
|
|
291
|
+
Logger({ level: "WARN", message: warrning });
|
|
228
292
|
}
|
|
229
293
|
|
|
230
294
|
const query_params = {};
|
|
231
295
|
|
|
232
|
-
|
|
296
|
+
const response = await PlatformAPIClient.execute(
|
|
233
297
|
this.config,
|
|
234
|
-
"
|
|
235
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}
|
|
298
|
+
"put",
|
|
299
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
236
300
|
query_params,
|
|
237
|
-
|
|
301
|
+
body
|
|
238
302
|
);
|
|
303
|
+
|
|
304
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
305
|
+
abortEarly: false,
|
|
306
|
+
allowUnknown: false,
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
if (res_error) {
|
|
310
|
+
Logger({
|
|
311
|
+
level: "WARN",
|
|
312
|
+
message: "Response Validation Warnnings for editTicket",
|
|
313
|
+
});
|
|
314
|
+
Logger({ level: "WARN", message: res_error });
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return response;
|
|
239
318
|
}
|
|
240
319
|
|
|
241
320
|
/**
|
|
242
321
|
* @param {Object} arg - Arg object.
|
|
243
322
|
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
323
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
244
324
|
* @summary: Get specific custom form using it's slug
|
|
245
325
|
* @description: Get specific custom form using it's slug, this is used to view the form.
|
|
246
326
|
*/
|
|
247
|
-
getCustomForm({ slug } = {}) {
|
|
327
|
+
async getCustomForm({ slug } = {}) {
|
|
248
328
|
const { error } = LeadValidator.getCustomForm().validate(
|
|
249
329
|
{
|
|
250
330
|
slug,
|
|
@@ -263,33 +343,104 @@ class Lead {
|
|
|
263
343
|
{ abortEarly: false, allowUnknown: false }
|
|
264
344
|
);
|
|
265
345
|
if (warrning) {
|
|
266
|
-
|
|
267
|
-
|
|
346
|
+
Logger({
|
|
347
|
+
level: "WARN",
|
|
348
|
+
message: "Parameter Validation warrnings for getCustomForm",
|
|
349
|
+
});
|
|
350
|
+
Logger({ level: "WARN", message: warrning });
|
|
268
351
|
}
|
|
269
352
|
|
|
270
353
|
const query_params = {};
|
|
271
354
|
|
|
272
|
-
|
|
355
|
+
const response = await PlatformAPIClient.execute(
|
|
273
356
|
this.config,
|
|
274
357
|
"get",
|
|
275
358
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
276
359
|
query_params,
|
|
277
360
|
undefined
|
|
278
361
|
);
|
|
362
|
+
|
|
363
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
364
|
+
abortEarly: false,
|
|
365
|
+
allowUnknown: false,
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
if (res_error) {
|
|
369
|
+
Logger({
|
|
370
|
+
level: "WARN",
|
|
371
|
+
message: "Response Validation Warnnings for getCustomForm",
|
|
372
|
+
});
|
|
373
|
+
Logger({ level: "WARN", message: res_error });
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return response;
|
|
279
377
|
}
|
|
280
378
|
|
|
281
379
|
/**
|
|
282
380
|
* @param {Object} arg - Arg object.
|
|
283
|
-
* @
|
|
284
|
-
* @
|
|
285
|
-
* @
|
|
286
|
-
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
381
|
+
* @returns {Promise<CustomFormList>} - Success response
|
|
382
|
+
* @summary: Get list of custom form
|
|
383
|
+
* @description: Get list of custom form for given application
|
|
287
384
|
*/
|
|
288
|
-
|
|
289
|
-
const { error } = LeadValidator.
|
|
385
|
+
async getCustomForms({} = {}) {
|
|
386
|
+
const { error } = LeadValidator.getCustomForms().validate(
|
|
387
|
+
{},
|
|
388
|
+
{ abortEarly: false, allowUnknown: true }
|
|
389
|
+
);
|
|
390
|
+
if (error) {
|
|
391
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Showing warrnings if extra unknown parameters are found
|
|
395
|
+
const { error: warrning } = LeadValidator.getCustomForms().validate(
|
|
396
|
+
{},
|
|
397
|
+
{ abortEarly: false, allowUnknown: false }
|
|
398
|
+
);
|
|
399
|
+
if (warrning) {
|
|
400
|
+
Logger({
|
|
401
|
+
level: "WARN",
|
|
402
|
+
message: "Parameter Validation warrnings for getCustomForms",
|
|
403
|
+
});
|
|
404
|
+
Logger({ level: "WARN", message: warrning });
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const query_params = {};
|
|
408
|
+
|
|
409
|
+
const response = await PlatformAPIClient.execute(
|
|
410
|
+
this.config,
|
|
411
|
+
"get",
|
|
412
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
413
|
+
query_params,
|
|
414
|
+
undefined
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
const { error: res_error } = LeadModel.CustomFormList().validate(response, {
|
|
418
|
+
abortEarly: false,
|
|
419
|
+
allowUnknown: false,
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
if (res_error) {
|
|
423
|
+
Logger({
|
|
424
|
+
level: "WARN",
|
|
425
|
+
message: "Response Validation Warnnings for getCustomForms",
|
|
426
|
+
});
|
|
427
|
+
Logger({ level: "WARN", message: res_error });
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return response;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @param {Object} arg - Arg object.
|
|
435
|
+
* @param {string} arg.id - Tiket ID of the ticket to be fetched
|
|
436
|
+
* @returns {Promise<Ticket>} - Success response
|
|
437
|
+
* @summary: Retreives ticket details of a application level ticket
|
|
438
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
439
|
+
*/
|
|
440
|
+
async getTicket({ id } = {}) {
|
|
441
|
+
const { error } = LeadValidator.getTicket().validate(
|
|
290
442
|
{
|
|
291
|
-
|
|
292
|
-
body,
|
|
443
|
+
id,
|
|
293
444
|
},
|
|
294
445
|
{ abortEarly: false, allowUnknown: true }
|
|
295
446
|
);
|
|
@@ -298,37 +449,58 @@ class Lead {
|
|
|
298
449
|
}
|
|
299
450
|
|
|
300
451
|
// Showing warrnings if extra unknown parameters are found
|
|
301
|
-
const { error: warrning } = LeadValidator.
|
|
452
|
+
const { error: warrning } = LeadValidator.getTicket().validate(
|
|
302
453
|
{
|
|
303
|
-
|
|
304
|
-
body,
|
|
454
|
+
id,
|
|
305
455
|
},
|
|
306
456
|
{ abortEarly: false, allowUnknown: false }
|
|
307
457
|
);
|
|
308
458
|
if (warrning) {
|
|
309
|
-
|
|
310
|
-
|
|
459
|
+
Logger({
|
|
460
|
+
level: "WARN",
|
|
461
|
+
message: "Parameter Validation warrnings for getTicket",
|
|
462
|
+
});
|
|
463
|
+
Logger({ level: "WARN", message: warrning });
|
|
311
464
|
}
|
|
312
465
|
|
|
313
466
|
const query_params = {};
|
|
314
467
|
|
|
315
|
-
|
|
468
|
+
const response = await PlatformAPIClient.execute(
|
|
316
469
|
this.config,
|
|
317
|
-
"
|
|
318
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
470
|
+
"get",
|
|
471
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
319
472
|
query_params,
|
|
320
|
-
|
|
473
|
+
undefined
|
|
321
474
|
);
|
|
475
|
+
|
|
476
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
477
|
+
abortEarly: false,
|
|
478
|
+
allowUnknown: false,
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
if (res_error) {
|
|
482
|
+
Logger({
|
|
483
|
+
level: "WARN",
|
|
484
|
+
message: "Response Validation Warnnings for getTicket",
|
|
485
|
+
});
|
|
486
|
+
Logger({ level: "WARN", message: res_error });
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return response;
|
|
322
490
|
}
|
|
323
491
|
|
|
324
492
|
/**
|
|
325
493
|
* @param {Object} arg - Arg object.
|
|
326
|
-
* @
|
|
327
|
-
* @
|
|
494
|
+
* @param {string} arg.id - Ticket ID for which history is to be fetched
|
|
495
|
+
* @returns {Promise<TicketHistoryList>} - Success response
|
|
496
|
+
* @summary: Gets history list for specific application level ticket
|
|
497
|
+
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
328
498
|
*/
|
|
329
|
-
|
|
330
|
-
const { error } = LeadValidator.
|
|
331
|
-
{
|
|
499
|
+
async getTicketHistory({ id } = {}) {
|
|
500
|
+
const { error } = LeadValidator.getTicketHistory().validate(
|
|
501
|
+
{
|
|
502
|
+
id,
|
|
503
|
+
},
|
|
332
504
|
{ abortEarly: false, allowUnknown: true }
|
|
333
505
|
);
|
|
334
506
|
if (error) {
|
|
@@ -336,36 +508,71 @@ class Lead {
|
|
|
336
508
|
}
|
|
337
509
|
|
|
338
510
|
// Showing warrnings if extra unknown parameters are found
|
|
339
|
-
const { error: warrning } = LeadValidator.
|
|
340
|
-
{
|
|
511
|
+
const { error: warrning } = LeadValidator.getTicketHistory().validate(
|
|
512
|
+
{
|
|
513
|
+
id,
|
|
514
|
+
},
|
|
341
515
|
{ abortEarly: false, allowUnknown: false }
|
|
342
516
|
);
|
|
343
517
|
if (warrning) {
|
|
344
|
-
|
|
345
|
-
|
|
518
|
+
Logger({
|
|
519
|
+
level: "WARN",
|
|
520
|
+
message: "Parameter Validation warrnings for getTicketHistory",
|
|
521
|
+
});
|
|
522
|
+
Logger({ level: "WARN", message: warrning });
|
|
346
523
|
}
|
|
347
524
|
|
|
348
525
|
const query_params = {};
|
|
349
526
|
|
|
350
|
-
|
|
527
|
+
const response = await PlatformAPIClient.execute(
|
|
351
528
|
this.config,
|
|
352
529
|
"get",
|
|
353
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
530
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
354
531
|
query_params,
|
|
355
532
|
undefined
|
|
356
533
|
);
|
|
534
|
+
|
|
535
|
+
const {
|
|
536
|
+
error: res_error,
|
|
537
|
+
} = LeadModel.TicketHistoryList().validate(response, {
|
|
538
|
+
abortEarly: false,
|
|
539
|
+
allowUnknown: false,
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
if (res_error) {
|
|
543
|
+
Logger({
|
|
544
|
+
level: "WARN",
|
|
545
|
+
message: "Response Validation Warnnings for getTicketHistory",
|
|
546
|
+
});
|
|
547
|
+
Logger({ level: "WARN", message: res_error });
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
return response;
|
|
357
551
|
}
|
|
358
552
|
|
|
359
553
|
/**
|
|
360
554
|
* @param {Object} arg - Arg object.
|
|
361
|
-
* @param {
|
|
362
|
-
*
|
|
363
|
-
* @
|
|
555
|
+
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
556
|
+
* list of tickets
|
|
557
|
+
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
558
|
+
* the ticket filters
|
|
559
|
+
* @param {string} [arg.q] - Search through ticket titles and description
|
|
560
|
+
* @param {string} [arg.status] - Filter tickets on status
|
|
561
|
+
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
562
|
+
* @param {string} [arg.category] - Filter tickets on category
|
|
563
|
+
* @returns {Promise<TicketList>} - Success response
|
|
564
|
+
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
565
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
364
566
|
*/
|
|
365
|
-
|
|
366
|
-
const { error } = LeadValidator.
|
|
567
|
+
async getTickets({ items, filters, q, status, priority, category } = {}) {
|
|
568
|
+
const { error } = LeadValidator.getTickets().validate(
|
|
367
569
|
{
|
|
368
|
-
|
|
570
|
+
items,
|
|
571
|
+
filters,
|
|
572
|
+
q,
|
|
573
|
+
status,
|
|
574
|
+
priority,
|
|
575
|
+
category,
|
|
369
576
|
},
|
|
370
577
|
{ abortEarly: false, allowUnknown: true }
|
|
371
578
|
);
|
|
@@ -374,35 +581,65 @@ class Lead {
|
|
|
374
581
|
}
|
|
375
582
|
|
|
376
583
|
// Showing warrnings if extra unknown parameters are found
|
|
377
|
-
const { error: warrning } = LeadValidator.
|
|
584
|
+
const { error: warrning } = LeadValidator.getTickets().validate(
|
|
378
585
|
{
|
|
379
|
-
|
|
586
|
+
items,
|
|
587
|
+
filters,
|
|
588
|
+
q,
|
|
589
|
+
status,
|
|
590
|
+
priority,
|
|
591
|
+
category,
|
|
380
592
|
},
|
|
381
593
|
{ abortEarly: false, allowUnknown: false }
|
|
382
594
|
);
|
|
383
595
|
if (warrning) {
|
|
384
|
-
|
|
385
|
-
|
|
596
|
+
Logger({
|
|
597
|
+
level: "WARN",
|
|
598
|
+
message: "Parameter Validation warrnings for getTickets",
|
|
599
|
+
});
|
|
600
|
+
Logger({ level: "WARN", message: warrning });
|
|
386
601
|
}
|
|
387
602
|
|
|
388
603
|
const query_params = {};
|
|
604
|
+
query_params["items"] = items;
|
|
605
|
+
query_params["filters"] = filters;
|
|
606
|
+
query_params["q"] = q;
|
|
607
|
+
query_params["status"] = status;
|
|
608
|
+
query_params["priority"] = priority;
|
|
609
|
+
query_params["category"] = category;
|
|
389
610
|
|
|
390
|
-
|
|
611
|
+
const response = await PlatformAPIClient.execute(
|
|
391
612
|
this.config,
|
|
392
|
-
"
|
|
393
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
613
|
+
"get",
|
|
614
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
394
615
|
query_params,
|
|
395
|
-
|
|
616
|
+
undefined
|
|
396
617
|
);
|
|
618
|
+
|
|
619
|
+
const { error: res_error } = LeadModel.TicketList().validate(response, {
|
|
620
|
+
abortEarly: false,
|
|
621
|
+
allowUnknown: false,
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
if (res_error) {
|
|
625
|
+
Logger({
|
|
626
|
+
level: "WARN",
|
|
627
|
+
message: "Response Validation Warnnings for getTickets",
|
|
628
|
+
});
|
|
629
|
+
Logger({ level: "WARN", message: res_error });
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
return response;
|
|
397
633
|
}
|
|
398
634
|
|
|
399
635
|
/**
|
|
400
636
|
* @param {Object} arg - Arg object.
|
|
401
637
|
* @param {string} arg.uniqueName - Unique name of video room
|
|
638
|
+
* @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
|
|
402
639
|
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
403
640
|
* @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.
|
|
404
641
|
*/
|
|
405
|
-
getTokenForVideoRoom({ uniqueName } = {}) {
|
|
642
|
+
async getTokenForVideoRoom({ uniqueName } = {}) {
|
|
406
643
|
const { error } = LeadValidator.getTokenForVideoRoom().validate(
|
|
407
644
|
{
|
|
408
645
|
uniqueName,
|
|
@@ -421,28 +658,49 @@ class Lead {
|
|
|
421
658
|
{ abortEarly: false, allowUnknown: false }
|
|
422
659
|
);
|
|
423
660
|
if (warrning) {
|
|
424
|
-
|
|
425
|
-
|
|
661
|
+
Logger({
|
|
662
|
+
level: "WARN",
|
|
663
|
+
message: "Parameter Validation warrnings for getTokenForVideoRoom",
|
|
664
|
+
});
|
|
665
|
+
Logger({ level: "WARN", message: warrning });
|
|
426
666
|
}
|
|
427
667
|
|
|
428
668
|
const query_params = {};
|
|
429
669
|
|
|
430
|
-
|
|
670
|
+
const response = await PlatformAPIClient.execute(
|
|
431
671
|
this.config,
|
|
432
672
|
"get",
|
|
433
673
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
434
674
|
query_params,
|
|
435
675
|
undefined
|
|
436
676
|
);
|
|
677
|
+
|
|
678
|
+
const {
|
|
679
|
+
error: res_error,
|
|
680
|
+
} = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
|
|
681
|
+
abortEarly: false,
|
|
682
|
+
allowUnknown: false,
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
if (res_error) {
|
|
686
|
+
Logger({
|
|
687
|
+
level: "WARN",
|
|
688
|
+
message: "Response Validation Warnnings for getTokenForVideoRoom",
|
|
689
|
+
});
|
|
690
|
+
Logger({ level: "WARN", message: res_error });
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
return response;
|
|
437
694
|
}
|
|
438
695
|
|
|
439
696
|
/**
|
|
440
697
|
* @param {Object} arg - Arg object.
|
|
441
698
|
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
699
|
+
* @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
|
|
442
700
|
* @summary: Get participants of a specific Video Room using it's unique name
|
|
443
701
|
* @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.
|
|
444
702
|
*/
|
|
445
|
-
getVideoParticipants({ uniqueName } = {}) {
|
|
703
|
+
async getVideoParticipants({ uniqueName } = {}) {
|
|
446
704
|
const { error } = LeadValidator.getVideoParticipants().validate(
|
|
447
705
|
{
|
|
448
706
|
uniqueName,
|
|
@@ -461,28 +719,49 @@ class Lead {
|
|
|
461
719
|
{ abortEarly: false, allowUnknown: false }
|
|
462
720
|
);
|
|
463
721
|
if (warrning) {
|
|
464
|
-
|
|
465
|
-
|
|
722
|
+
Logger({
|
|
723
|
+
level: "WARN",
|
|
724
|
+
message: "Parameter Validation warrnings for getVideoParticipants",
|
|
725
|
+
});
|
|
726
|
+
Logger({ level: "WARN", message: warrning });
|
|
466
727
|
}
|
|
467
728
|
|
|
468
729
|
const query_params = {};
|
|
469
730
|
|
|
470
|
-
|
|
731
|
+
const response = await PlatformAPIClient.execute(
|
|
471
732
|
this.config,
|
|
472
733
|
"get",
|
|
473
734
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
474
735
|
query_params,
|
|
475
736
|
undefined
|
|
476
737
|
);
|
|
738
|
+
|
|
739
|
+
const {
|
|
740
|
+
error: res_error,
|
|
741
|
+
} = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
|
|
742
|
+
abortEarly: false,
|
|
743
|
+
allowUnknown: false,
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
if (res_error) {
|
|
747
|
+
Logger({
|
|
748
|
+
level: "WARN",
|
|
749
|
+
message: "Response Validation Warnnings for getVideoParticipants",
|
|
750
|
+
});
|
|
751
|
+
Logger({ level: "WARN", message: res_error });
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
return response;
|
|
477
755
|
}
|
|
478
756
|
|
|
479
757
|
/**
|
|
480
758
|
* @param {Object} arg - Arg object.
|
|
481
759
|
* @param {CreateVideoRoomPayload} arg.body
|
|
760
|
+
* @returns {Promise<CreateVideoRoomResponse>} - Success response
|
|
482
761
|
* @summary: Open a video room.
|
|
483
762
|
* @description: Open a video room.
|
|
484
763
|
*/
|
|
485
|
-
openVideoRoom({ body } = {}) {
|
|
764
|
+
async openVideoRoom({ body } = {}) {
|
|
486
765
|
const { error } = LeadValidator.openVideoRoom().validate(
|
|
487
766
|
{
|
|
488
767
|
body,
|
|
@@ -501,59 +780,39 @@ class Lead {
|
|
|
501
780
|
{ abortEarly: false, allowUnknown: false }
|
|
502
781
|
);
|
|
503
782
|
if (warrning) {
|
|
504
|
-
|
|
505
|
-
|
|
783
|
+
Logger({
|
|
784
|
+
level: "WARN",
|
|
785
|
+
message: "Parameter Validation warrnings for openVideoRoom",
|
|
786
|
+
});
|
|
787
|
+
Logger({ level: "WARN", message: warrning });
|
|
506
788
|
}
|
|
507
789
|
|
|
508
790
|
const query_params = {};
|
|
509
791
|
|
|
510
|
-
|
|
792
|
+
const response = await PlatformAPIClient.execute(
|
|
511
793
|
this.config,
|
|
512
794
|
"post",
|
|
513
795
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
514
796
|
query_params,
|
|
515
797
|
body
|
|
516
798
|
);
|
|
517
|
-
}
|
|
518
799
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
closeVideoRoom({ uniqueName } = {}) {
|
|
526
|
-
const { error } = LeadValidator.closeVideoRoom().validate(
|
|
527
|
-
{
|
|
528
|
-
uniqueName,
|
|
529
|
-
},
|
|
530
|
-
{ abortEarly: false, allowUnknown: true }
|
|
531
|
-
);
|
|
532
|
-
if (error) {
|
|
533
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
534
|
-
}
|
|
800
|
+
const {
|
|
801
|
+
error: res_error,
|
|
802
|
+
} = LeadModel.CreateVideoRoomResponse().validate(response, {
|
|
803
|
+
abortEarly: false,
|
|
804
|
+
allowUnknown: false,
|
|
805
|
+
});
|
|
535
806
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
}
|
|
541
|
-
{
|
|
542
|
-
);
|
|
543
|
-
if (warrning) {
|
|
544
|
-
console.log("Parameter Validation warrnings for closeVideoRoom");
|
|
545
|
-
console.log(warrning);
|
|
807
|
+
if (res_error) {
|
|
808
|
+
Logger({
|
|
809
|
+
level: "WARN",
|
|
810
|
+
message: "Response Validation Warnnings for openVideoRoom",
|
|
811
|
+
});
|
|
812
|
+
Logger({ level: "WARN", message: res_error });
|
|
546
813
|
}
|
|
547
814
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
return PlatformAPIClient.execute(
|
|
551
|
-
this.config,
|
|
552
|
-
"delete",
|
|
553
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
554
|
-
query_params,
|
|
555
|
-
undefined
|
|
556
|
-
);
|
|
815
|
+
return response;
|
|
557
816
|
}
|
|
558
817
|
}
|
|
559
818
|
module.exports = Lead;
|