@gofynd/fdk-client-javascript 1.0.2 → 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 +557 -1279
- 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 +14453 -17192
- 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 +3438 -4172
- 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 +3400 -5361
- 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/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- 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 +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- 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 +38 -38
- 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 +26 -26
- 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 +330 -330
- 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 +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- 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 +59 -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 +100 -100
- 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 +110 -43
- 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 +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- 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 +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- 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 +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- 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 +112 -112
- 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 +84 -84
- 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 +31 -31
- 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 +581 -581
- 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 +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- 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 +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- 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 +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- 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 +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- 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 +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- 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 +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- 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 +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- 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 +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -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/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- 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 +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- 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 +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- 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 +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- 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 +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- 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 +38 -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 +113 -113
- 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/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -12,42 +12,17 @@ class Lead {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @param {Object} arg - Arg object.
|
|
15
|
-
* @param {
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
20
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
21
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
22
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
23
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
24
|
-
* given set of results.
|
|
25
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
26
|
-
* page. Default is 12.
|
|
27
|
-
* @returns {Promise<TicketList>} - Success response
|
|
28
|
-
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
29
|
-
* @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.
|
|
30
20
|
*/
|
|
31
|
-
async
|
|
32
|
-
|
|
33
|
-
filters,
|
|
34
|
-
q,
|
|
35
|
-
status,
|
|
36
|
-
priority,
|
|
37
|
-
category,
|
|
38
|
-
pageNo,
|
|
39
|
-
pageSize,
|
|
40
|
-
} = {}) {
|
|
41
|
-
const { error } = LeadValidator.getTickets().validate(
|
|
21
|
+
async createHistory({ id, body } = {}) {
|
|
22
|
+
const { error } = LeadValidator.createHistory().validate(
|
|
42
23
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
q,
|
|
46
|
-
status,
|
|
47
|
-
priority,
|
|
48
|
-
category,
|
|
49
|
-
pageNo,
|
|
50
|
-
pageSize,
|
|
24
|
+
id,
|
|
25
|
+
body,
|
|
51
26
|
},
|
|
52
27
|
{ abortEarly: false, allowUnknown: true }
|
|
53
28
|
);
|
|
@@ -56,49 +31,35 @@ class Lead {
|
|
|
56
31
|
}
|
|
57
32
|
|
|
58
33
|
// Showing warrnings if extra unknown parameters are found
|
|
59
|
-
const { error: warrning } = LeadValidator.
|
|
34
|
+
const { error: warrning } = LeadValidator.createHistory().validate(
|
|
60
35
|
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
q,
|
|
64
|
-
status,
|
|
65
|
-
priority,
|
|
66
|
-
category,
|
|
67
|
-
pageNo,
|
|
68
|
-
pageSize,
|
|
36
|
+
id,
|
|
37
|
+
body,
|
|
69
38
|
},
|
|
70
39
|
{ abortEarly: false, allowUnknown: false }
|
|
71
40
|
);
|
|
72
41
|
if (warrning) {
|
|
73
42
|
Logger({
|
|
74
43
|
level: "WARN",
|
|
75
|
-
message: "Parameter Validation warrnings for
|
|
44
|
+
message: "Parameter Validation warrnings for createHistory",
|
|
76
45
|
});
|
|
77
46
|
Logger({ level: "WARN", message: warrning });
|
|
78
47
|
}
|
|
79
48
|
|
|
80
49
|
const query_params = {};
|
|
81
|
-
query_params["items"] = items;
|
|
82
|
-
query_params["filters"] = filters;
|
|
83
|
-
query_params["q"] = q;
|
|
84
|
-
query_params["status"] = status;
|
|
85
|
-
query_params["priority"] = priority;
|
|
86
|
-
query_params["category"] = category;
|
|
87
|
-
query_params["page_no"] = pageNo;
|
|
88
|
-
query_params["page_size"] = pageSize;
|
|
89
50
|
|
|
90
51
|
const xHeaders = {};
|
|
91
52
|
|
|
92
53
|
const response = await PlatformAPIClient.execute(
|
|
93
54
|
this.config,
|
|
94
|
-
"
|
|
95
|
-
`/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`,
|
|
96
57
|
query_params,
|
|
97
|
-
|
|
58
|
+
body,
|
|
98
59
|
xHeaders
|
|
99
60
|
);
|
|
100
61
|
|
|
101
|
-
const { error: res_error } = LeadModel.
|
|
62
|
+
const { error: res_error } = LeadModel.TicketHistory().validate(response, {
|
|
102
63
|
abortEarly: false,
|
|
103
64
|
allowUnknown: false,
|
|
104
65
|
});
|
|
@@ -106,7 +67,7 @@ class Lead {
|
|
|
106
67
|
if (res_error) {
|
|
107
68
|
Logger({
|
|
108
69
|
level: "WARN",
|
|
109
|
-
message: "Response Validation Warnnings for
|
|
70
|
+
message: "Response Validation Warnnings for createHistory",
|
|
110
71
|
});
|
|
111
72
|
Logger({ level: "WARN", message: res_error });
|
|
112
73
|
}
|
|
@@ -114,55 +75,6 @@ class Lead {
|
|
|
114
75
|
return response;
|
|
115
76
|
}
|
|
116
77
|
|
|
117
|
-
/**
|
|
118
|
-
* @param {Object} arg - Arg object.
|
|
119
|
-
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
120
|
-
* list of tickets
|
|
121
|
-
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
122
|
-
* the ticket filters
|
|
123
|
-
* @param {string} [arg.q] - Search through ticket titles and description
|
|
124
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
125
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
126
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
127
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
128
|
-
* page. Default is 12.
|
|
129
|
-
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
130
|
-
* @description: Gets the list of company level tickets and/or ticket filters
|
|
131
|
-
*/
|
|
132
|
-
getTicketsPaginator({
|
|
133
|
-
items,
|
|
134
|
-
filters,
|
|
135
|
-
q,
|
|
136
|
-
status,
|
|
137
|
-
priority,
|
|
138
|
-
category,
|
|
139
|
-
pageSize,
|
|
140
|
-
} = {}) {
|
|
141
|
-
const paginator = new Paginator();
|
|
142
|
-
const callback = async () => {
|
|
143
|
-
const pageId = paginator.nextId;
|
|
144
|
-
const pageNo = paginator.pageNo;
|
|
145
|
-
const pageType = "number";
|
|
146
|
-
const data = await this.getTickets({
|
|
147
|
-
items: items,
|
|
148
|
-
filters: filters,
|
|
149
|
-
q: q,
|
|
150
|
-
status: status,
|
|
151
|
-
priority: priority,
|
|
152
|
-
category: category,
|
|
153
|
-
pageNo: pageNo,
|
|
154
|
-
pageSize: pageSize,
|
|
155
|
-
});
|
|
156
|
-
paginator.setPaginator({
|
|
157
|
-
hasNext: data.page.has_next ? true : false,
|
|
158
|
-
nextId: data.page.next_id,
|
|
159
|
-
});
|
|
160
|
-
return data;
|
|
161
|
-
};
|
|
162
|
-
paginator.setCallback(callback);
|
|
163
|
-
return paginator;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
78
|
/**
|
|
167
79
|
* @param {Object} arg - Arg object.
|
|
168
80
|
* @param {AddTicketPayload} arg.body
|
|
@@ -227,15 +139,17 @@ class Lead {
|
|
|
227
139
|
|
|
228
140
|
/**
|
|
229
141
|
* @param {Object} arg - Arg object.
|
|
230
|
-
* @param {string} arg.id -
|
|
142
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
143
|
+
* @param {EditTicketPayload} arg.body
|
|
231
144
|
* @returns {Promise<Ticket>} - Success response
|
|
232
|
-
* @summary:
|
|
233
|
-
* @description:
|
|
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
|
|
234
147
|
*/
|
|
235
|
-
async
|
|
236
|
-
const { error } = LeadValidator.
|
|
148
|
+
async editTicket({ id, body } = {}) {
|
|
149
|
+
const { error } = LeadValidator.editTicket().validate(
|
|
237
150
|
{
|
|
238
151
|
id,
|
|
152
|
+
body,
|
|
239
153
|
},
|
|
240
154
|
{ abortEarly: false, allowUnknown: true }
|
|
241
155
|
);
|
|
@@ -244,16 +158,17 @@ class Lead {
|
|
|
244
158
|
}
|
|
245
159
|
|
|
246
160
|
// Showing warrnings if extra unknown parameters are found
|
|
247
|
-
const { error: warrning } = LeadValidator.
|
|
161
|
+
const { error: warrning } = LeadValidator.editTicket().validate(
|
|
248
162
|
{
|
|
249
163
|
id,
|
|
164
|
+
body,
|
|
250
165
|
},
|
|
251
166
|
{ abortEarly: false, allowUnknown: false }
|
|
252
167
|
);
|
|
253
168
|
if (warrning) {
|
|
254
169
|
Logger({
|
|
255
170
|
level: "WARN",
|
|
256
|
-
message: "Parameter Validation warrnings for
|
|
171
|
+
message: "Parameter Validation warrnings for editTicket",
|
|
257
172
|
});
|
|
258
173
|
Logger({ level: "WARN", message: warrning });
|
|
259
174
|
}
|
|
@@ -264,10 +179,10 @@ class Lead {
|
|
|
264
179
|
|
|
265
180
|
const response = await PlatformAPIClient.execute(
|
|
266
181
|
this.config,
|
|
267
|
-
"
|
|
182
|
+
"put",
|
|
268
183
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
269
184
|
query_params,
|
|
270
|
-
|
|
185
|
+
body,
|
|
271
186
|
xHeaders
|
|
272
187
|
);
|
|
273
188
|
|
|
@@ -279,7 +194,7 @@ class Lead {
|
|
|
279
194
|
if (res_error) {
|
|
280
195
|
Logger({
|
|
281
196
|
level: "WARN",
|
|
282
|
-
message: "Response Validation Warnnings for
|
|
197
|
+
message: "Response Validation Warnnings for editTicket",
|
|
283
198
|
});
|
|
284
199
|
Logger({ level: "WARN", message: res_error });
|
|
285
200
|
}
|
|
@@ -289,17 +204,15 @@ class Lead {
|
|
|
289
204
|
|
|
290
205
|
/**
|
|
291
206
|
* @param {Object} arg - Arg object.
|
|
292
|
-
* @param {string} arg.id - Ticket ID
|
|
293
|
-
* @
|
|
294
|
-
* @
|
|
295
|
-
* @
|
|
296
|
-
* @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
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
|
|
297
211
|
*/
|
|
298
|
-
async
|
|
299
|
-
const { error } = LeadValidator.
|
|
212
|
+
async getFeedbacks({ id } = {}) {
|
|
213
|
+
const { error } = LeadValidator.getFeedbacks().validate(
|
|
300
214
|
{
|
|
301
215
|
id,
|
|
302
|
-
body,
|
|
303
216
|
},
|
|
304
217
|
{ abortEarly: false, allowUnknown: true }
|
|
305
218
|
);
|
|
@@ -308,17 +221,16 @@ class Lead {
|
|
|
308
221
|
}
|
|
309
222
|
|
|
310
223
|
// Showing warrnings if extra unknown parameters are found
|
|
311
|
-
const { error: warrning } = LeadValidator.
|
|
224
|
+
const { error: warrning } = LeadValidator.getFeedbacks().validate(
|
|
312
225
|
{
|
|
313
226
|
id,
|
|
314
|
-
body,
|
|
315
227
|
},
|
|
316
228
|
{ abortEarly: false, allowUnknown: false }
|
|
317
229
|
);
|
|
318
230
|
if (warrning) {
|
|
319
231
|
Logger({
|
|
320
232
|
level: "WARN",
|
|
321
|
-
message: "Parameter Validation warrnings for
|
|
233
|
+
message: "Parameter Validation warrnings for getFeedbacks",
|
|
322
234
|
});
|
|
323
235
|
Logger({ level: "WARN", message: warrning });
|
|
324
236
|
}
|
|
@@ -329,14 +241,16 @@ class Lead {
|
|
|
329
241
|
|
|
330
242
|
const response = await PlatformAPIClient.execute(
|
|
331
243
|
this.config,
|
|
332
|
-
"
|
|
333
|
-
`/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`,
|
|
334
246
|
query_params,
|
|
335
|
-
|
|
247
|
+
undefined,
|
|
336
248
|
xHeaders
|
|
337
249
|
);
|
|
338
250
|
|
|
339
|
-
const {
|
|
251
|
+
const {
|
|
252
|
+
error: res_error,
|
|
253
|
+
} = LeadModel.TicketFeedbackList().validate(response, {
|
|
340
254
|
abortEarly: false,
|
|
341
255
|
allowUnknown: false,
|
|
342
256
|
});
|
|
@@ -344,7 +258,7 @@ class Lead {
|
|
|
344
258
|
if (res_error) {
|
|
345
259
|
Logger({
|
|
346
260
|
level: "WARN",
|
|
347
|
-
message: "Response Validation Warnnings for
|
|
261
|
+
message: "Response Validation Warnnings for getFeedbacks",
|
|
348
262
|
});
|
|
349
263
|
Logger({ level: "WARN", message: res_error });
|
|
350
264
|
}
|
|
@@ -354,18 +268,13 @@ class Lead {
|
|
|
354
268
|
|
|
355
269
|
/**
|
|
356
270
|
* @param {Object} arg - Arg object.
|
|
357
|
-
* @
|
|
358
|
-
* @
|
|
359
|
-
* @
|
|
360
|
-
* @summary: Create history for specific company level ticket
|
|
361
|
-
* @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.
|
|
362
274
|
*/
|
|
363
|
-
async
|
|
364
|
-
const { error } = LeadValidator.
|
|
365
|
-
{
|
|
366
|
-
id,
|
|
367
|
-
body,
|
|
368
|
-
},
|
|
275
|
+
async getGeneralConfig({} = {}) {
|
|
276
|
+
const { error } = LeadValidator.getGeneralConfig().validate(
|
|
277
|
+
{},
|
|
369
278
|
{ abortEarly: false, allowUnknown: true }
|
|
370
279
|
);
|
|
371
280
|
if (error) {
|
|
@@ -373,17 +282,14 @@ class Lead {
|
|
|
373
282
|
}
|
|
374
283
|
|
|
375
284
|
// Showing warrnings if extra unknown parameters are found
|
|
376
|
-
const { error: warrning } = LeadValidator.
|
|
377
|
-
{
|
|
378
|
-
id,
|
|
379
|
-
body,
|
|
380
|
-
},
|
|
285
|
+
const { error: warrning } = LeadValidator.getGeneralConfig().validate(
|
|
286
|
+
{},
|
|
381
287
|
{ abortEarly: false, allowUnknown: false }
|
|
382
288
|
);
|
|
383
289
|
if (warrning) {
|
|
384
290
|
Logger({
|
|
385
291
|
level: "WARN",
|
|
386
|
-
message: "Parameter Validation warrnings for
|
|
292
|
+
message: "Parameter Validation warrnings for getGeneralConfig",
|
|
387
293
|
});
|
|
388
294
|
Logger({ level: "WARN", message: warrning });
|
|
389
295
|
}
|
|
@@ -394,14 +300,16 @@ class Lead {
|
|
|
394
300
|
|
|
395
301
|
const response = await PlatformAPIClient.execute(
|
|
396
302
|
this.config,
|
|
397
|
-
"
|
|
398
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/
|
|
303
|
+
"get",
|
|
304
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/general-config`,
|
|
399
305
|
query_params,
|
|
400
|
-
|
|
306
|
+
undefined,
|
|
401
307
|
xHeaders
|
|
402
308
|
);
|
|
403
309
|
|
|
404
|
-
const {
|
|
310
|
+
const {
|
|
311
|
+
error: res_error,
|
|
312
|
+
} = LeadModel.CloseVideoRoomResponse().validate(response, {
|
|
405
313
|
abortEarly: false,
|
|
406
314
|
allowUnknown: false,
|
|
407
315
|
});
|
|
@@ -409,7 +317,7 @@ class Lead {
|
|
|
409
317
|
if (res_error) {
|
|
410
318
|
Logger({
|
|
411
319
|
level: "WARN",
|
|
412
|
-
message: "Response Validation Warnnings for
|
|
320
|
+
message: "Response Validation Warnnings for getGeneralConfig",
|
|
413
321
|
});
|
|
414
322
|
Logger({ level: "WARN", message: res_error });
|
|
415
323
|
}
|
|
@@ -419,13 +327,13 @@ class Lead {
|
|
|
419
327
|
|
|
420
328
|
/**
|
|
421
329
|
* @param {Object} arg - Arg object.
|
|
422
|
-
* @param {string} arg.id -
|
|
423
|
-
* @returns {Promise<
|
|
424
|
-
* @summary:
|
|
425
|
-
* @description:
|
|
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
|
|
426
334
|
*/
|
|
427
|
-
async
|
|
428
|
-
const { error } = LeadValidator.
|
|
335
|
+
async getTicket({ id } = {}) {
|
|
336
|
+
const { error } = LeadValidator.getTicket().validate(
|
|
429
337
|
{
|
|
430
338
|
id,
|
|
431
339
|
},
|
|
@@ -436,7 +344,7 @@ class Lead {
|
|
|
436
344
|
}
|
|
437
345
|
|
|
438
346
|
// Showing warrnings if extra unknown parameters are found
|
|
439
|
-
const { error: warrning } = LeadValidator.
|
|
347
|
+
const { error: warrning } = LeadValidator.getTicket().validate(
|
|
440
348
|
{
|
|
441
349
|
id,
|
|
442
350
|
},
|
|
@@ -445,7 +353,7 @@ class Lead {
|
|
|
445
353
|
if (warrning) {
|
|
446
354
|
Logger({
|
|
447
355
|
level: "WARN",
|
|
448
|
-
message: "Parameter Validation warrnings for
|
|
356
|
+
message: "Parameter Validation warrnings for getTicket",
|
|
449
357
|
});
|
|
450
358
|
Logger({ level: "WARN", message: warrning });
|
|
451
359
|
}
|
|
@@ -457,15 +365,13 @@ class Lead {
|
|
|
457
365
|
const response = await PlatformAPIClient.execute(
|
|
458
366
|
this.config,
|
|
459
367
|
"get",
|
|
460
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}
|
|
368
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
461
369
|
query_params,
|
|
462
370
|
undefined,
|
|
463
371
|
xHeaders
|
|
464
372
|
);
|
|
465
373
|
|
|
466
|
-
const {
|
|
467
|
-
error: res_error,
|
|
468
|
-
} = LeadModel.TicketHistoryList().validate(response, {
|
|
374
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
469
375
|
abortEarly: false,
|
|
470
376
|
allowUnknown: false,
|
|
471
377
|
});
|
|
@@ -473,7 +379,7 @@ class Lead {
|
|
|
473
379
|
if (res_error) {
|
|
474
380
|
Logger({
|
|
475
381
|
level: "WARN",
|
|
476
|
-
message: "Response Validation Warnnings for
|
|
382
|
+
message: "Response Validation Warnnings for getTicket",
|
|
477
383
|
});
|
|
478
384
|
Logger({ level: "WARN", message: res_error });
|
|
479
385
|
}
|
|
@@ -483,13 +389,13 @@ class Lead {
|
|
|
483
389
|
|
|
484
390
|
/**
|
|
485
391
|
* @param {Object} arg - Arg object.
|
|
486
|
-
* @param {string} arg.id - Ticket ID for which
|
|
487
|
-
* @returns {Promise<
|
|
488
|
-
* @summary: Gets
|
|
489
|
-
* @description: Gets
|
|
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.
|
|
490
396
|
*/
|
|
491
|
-
async
|
|
492
|
-
const { error } = LeadValidator.
|
|
397
|
+
async getTicketHistory({ id } = {}) {
|
|
398
|
+
const { error } = LeadValidator.getTicketHistory().validate(
|
|
493
399
|
{
|
|
494
400
|
id,
|
|
495
401
|
},
|
|
@@ -500,7 +406,7 @@ class Lead {
|
|
|
500
406
|
}
|
|
501
407
|
|
|
502
408
|
// Showing warrnings if extra unknown parameters are found
|
|
503
|
-
const { error: warrning } = LeadValidator.
|
|
409
|
+
const { error: warrning } = LeadValidator.getTicketHistory().validate(
|
|
504
410
|
{
|
|
505
411
|
id,
|
|
506
412
|
},
|
|
@@ -509,7 +415,7 @@ class Lead {
|
|
|
509
415
|
if (warrning) {
|
|
510
416
|
Logger({
|
|
511
417
|
level: "WARN",
|
|
512
|
-
message: "Parameter Validation warrnings for
|
|
418
|
+
message: "Parameter Validation warrnings for getTicketHistory",
|
|
513
419
|
});
|
|
514
420
|
Logger({ level: "WARN", message: warrning });
|
|
515
421
|
}
|
|
@@ -521,7 +427,7 @@ class Lead {
|
|
|
521
427
|
const response = await PlatformAPIClient.execute(
|
|
522
428
|
this.config,
|
|
523
429
|
"get",
|
|
524
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/
|
|
430
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
|
|
525
431
|
query_params,
|
|
526
432
|
undefined,
|
|
527
433
|
xHeaders
|
|
@@ -529,7 +435,7 @@ class Lead {
|
|
|
529
435
|
|
|
530
436
|
const {
|
|
531
437
|
error: res_error,
|
|
532
|
-
} = LeadModel.
|
|
438
|
+
} = LeadModel.TicketHistoryList().validate(response, {
|
|
533
439
|
abortEarly: false,
|
|
534
440
|
allowUnknown: false,
|
|
535
441
|
});
|
|
@@ -537,7 +443,7 @@ class Lead {
|
|
|
537
443
|
if (res_error) {
|
|
538
444
|
Logger({
|
|
539
445
|
level: "WARN",
|
|
540
|
-
message: "Response Validation Warnnings for
|
|
446
|
+
message: "Response Validation Warnnings for getTicketHistory",
|
|
541
447
|
});
|
|
542
448
|
Logger({ level: "WARN", message: res_error });
|
|
543
449
|
}
|
|
@@ -547,17 +453,42 @@ class Lead {
|
|
|
547
453
|
|
|
548
454
|
/**
|
|
549
455
|
* @param {Object} arg - Arg object.
|
|
550
|
-
* @param {
|
|
551
|
-
*
|
|
552
|
-
* @
|
|
553
|
-
*
|
|
554
|
-
* @
|
|
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
|
|
555
471
|
*/
|
|
556
|
-
async
|
|
557
|
-
|
|
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(
|
|
558
483
|
{
|
|
559
|
-
|
|
560
|
-
|
|
484
|
+
items,
|
|
485
|
+
filters,
|
|
486
|
+
q,
|
|
487
|
+
status,
|
|
488
|
+
priority,
|
|
489
|
+
category,
|
|
490
|
+
pageNo,
|
|
491
|
+
pageSize,
|
|
561
492
|
},
|
|
562
493
|
{ abortEarly: false, allowUnknown: true }
|
|
563
494
|
);
|
|
@@ -566,35 +497,49 @@ class Lead {
|
|
|
566
497
|
}
|
|
567
498
|
|
|
568
499
|
// Showing warrnings if extra unknown parameters are found
|
|
569
|
-
const { error: warrning } = LeadValidator.
|
|
500
|
+
const { error: warrning } = LeadValidator.getTickets().validate(
|
|
570
501
|
{
|
|
571
|
-
|
|
572
|
-
|
|
502
|
+
items,
|
|
503
|
+
filters,
|
|
504
|
+
q,
|
|
505
|
+
status,
|
|
506
|
+
priority,
|
|
507
|
+
category,
|
|
508
|
+
pageNo,
|
|
509
|
+
pageSize,
|
|
573
510
|
},
|
|
574
511
|
{ abortEarly: false, allowUnknown: false }
|
|
575
512
|
);
|
|
576
513
|
if (warrning) {
|
|
577
514
|
Logger({
|
|
578
515
|
level: "WARN",
|
|
579
|
-
message: "Parameter Validation warrnings for
|
|
516
|
+
message: "Parameter Validation warrnings for getTickets",
|
|
580
517
|
});
|
|
581
518
|
Logger({ level: "WARN", message: warrning });
|
|
582
519
|
}
|
|
583
520
|
|
|
584
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;
|
|
585
530
|
|
|
586
531
|
const xHeaders = {};
|
|
587
532
|
|
|
588
533
|
const response = await PlatformAPIClient.execute(
|
|
589
534
|
this.config,
|
|
590
|
-
"
|
|
591
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket
|
|
535
|
+
"get",
|
|
536
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
|
|
592
537
|
query_params,
|
|
593
|
-
|
|
538
|
+
undefined,
|
|
594
539
|
xHeaders
|
|
595
540
|
);
|
|
596
541
|
|
|
597
|
-
const { error: res_error } = LeadModel.
|
|
542
|
+
const { error: res_error } = LeadModel.TicketList().validate(response, {
|
|
598
543
|
abortEarly: false,
|
|
599
544
|
allowUnknown: false,
|
|
600
545
|
});
|
|
@@ -602,7 +547,7 @@ class Lead {
|
|
|
602
547
|
if (res_error) {
|
|
603
548
|
Logger({
|
|
604
549
|
level: "WARN",
|
|
605
|
-
message: "Response Validation Warnnings for
|
|
550
|
+
message: "Response Validation Warnnings for getTickets",
|
|
606
551
|
});
|
|
607
552
|
Logger({ level: "WARN", message: res_error });
|
|
608
553
|
}
|
|
@@ -610,6 +555,55 @@ class Lead {
|
|
|
610
555
|
return response;
|
|
611
556
|
}
|
|
612
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;
|
|
605
|
+
}
|
|
606
|
+
|
|
613
607
|
/**
|
|
614
608
|
* @param {Object} arg - Arg object.
|
|
615
609
|
* @param {string} arg.uniqueName - Unique name of video room
|
|
@@ -740,13 +734,18 @@ class Lead {
|
|
|
740
734
|
|
|
741
735
|
/**
|
|
742
736
|
* @param {Object} arg - Arg object.
|
|
743
|
-
* @
|
|
744
|
-
* @
|
|
745
|
-
* @
|
|
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
|
|
746
742
|
*/
|
|
747
|
-
async
|
|
748
|
-
const { error } = LeadValidator.
|
|
749
|
-
{
|
|
743
|
+
async submitFeedback({ id, body } = {}) {
|
|
744
|
+
const { error } = LeadValidator.submitFeedback().validate(
|
|
745
|
+
{
|
|
746
|
+
id,
|
|
747
|
+
body,
|
|
748
|
+
},
|
|
750
749
|
{ abortEarly: false, allowUnknown: true }
|
|
751
750
|
);
|
|
752
751
|
if (error) {
|
|
@@ -754,14 +753,17 @@ class Lead {
|
|
|
754
753
|
}
|
|
755
754
|
|
|
756
755
|
// Showing warrnings if extra unknown parameters are found
|
|
757
|
-
const { error: warrning } = LeadValidator.
|
|
758
|
-
{
|
|
756
|
+
const { error: warrning } = LeadValidator.submitFeedback().validate(
|
|
757
|
+
{
|
|
758
|
+
id,
|
|
759
|
+
body,
|
|
760
|
+
},
|
|
759
761
|
{ abortEarly: false, allowUnknown: false }
|
|
760
762
|
);
|
|
761
763
|
if (warrning) {
|
|
762
764
|
Logger({
|
|
763
765
|
level: "WARN",
|
|
764
|
-
message: "Parameter Validation warrnings for
|
|
766
|
+
message: "Parameter Validation warrnings for submitFeedback",
|
|
765
767
|
});
|
|
766
768
|
Logger({ level: "WARN", message: warrning });
|
|
767
769
|
}
|
|
@@ -772,16 +774,14 @@ class Lead {
|
|
|
772
774
|
|
|
773
775
|
const response = await PlatformAPIClient.execute(
|
|
774
776
|
this.config,
|
|
775
|
-
"
|
|
776
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/
|
|
777
|
+
"post",
|
|
778
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
|
|
777
779
|
query_params,
|
|
778
|
-
|
|
780
|
+
body,
|
|
779
781
|
xHeaders
|
|
780
782
|
);
|
|
781
783
|
|
|
782
|
-
const {
|
|
783
|
-
error: res_error,
|
|
784
|
-
} = LeadModel.CloseVideoRoomResponse().validate(response, {
|
|
784
|
+
const { error: res_error } = LeadModel.TicketFeedback().validate(response, {
|
|
785
785
|
abortEarly: false,
|
|
786
786
|
allowUnknown: false,
|
|
787
787
|
});
|
|
@@ -789,7 +789,7 @@ class Lead {
|
|
|
789
789
|
if (res_error) {
|
|
790
790
|
Logger({
|
|
791
791
|
level: "WARN",
|
|
792
|
-
message: "Response Validation Warnnings for
|
|
792
|
+
message: "Response Validation Warnnings for submitFeedback",
|
|
793
793
|
});
|
|
794
794
|
Logger({ level: "WARN", message: res_error });
|
|
795
795
|
}
|