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