@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
|
@@ -13,27 +13,15 @@ class Lead {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @param {Object} arg - Arg object.
|
|
16
|
-
* @param {
|
|
17
|
-
*
|
|
18
|
-
* @
|
|
19
|
-
*
|
|
20
|
-
* @param {string} [arg.q] - Search through ticket titles and description
|
|
21
|
-
* @param {string} [arg.status] - Filter tickets on status
|
|
22
|
-
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
23
|
-
* @param {string} [arg.category] - Filter tickets on category
|
|
24
|
-
* @returns {Promise<TicketList>} - Success response
|
|
25
|
-
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
26
|
-
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
16
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
17
|
+
* @returns {Promise<CloseVideoRoomResponse>} - Success response
|
|
18
|
+
* @summary: Close the video room and force all participants to leave.
|
|
19
|
+
* @description: Close the video room and force all participants to leave.
|
|
27
20
|
*/
|
|
28
|
-
async
|
|
29
|
-
const { error } = LeadValidator.
|
|
21
|
+
async closeVideoRoom({ uniqueName } = {}) {
|
|
22
|
+
const { error } = LeadValidator.closeVideoRoom().validate(
|
|
30
23
|
{
|
|
31
|
-
|
|
32
|
-
filters,
|
|
33
|
-
q,
|
|
34
|
-
status,
|
|
35
|
-
priority,
|
|
36
|
-
category,
|
|
24
|
+
uniqueName,
|
|
37
25
|
},
|
|
38
26
|
{ abortEarly: false, allowUnknown: true }
|
|
39
27
|
);
|
|
@@ -42,42 +30,33 @@ class Lead {
|
|
|
42
30
|
}
|
|
43
31
|
|
|
44
32
|
// Showing warrnings if extra unknown parameters are found
|
|
45
|
-
const { error: warrning } = LeadValidator.
|
|
33
|
+
const { error: warrning } = LeadValidator.closeVideoRoom().validate(
|
|
46
34
|
{
|
|
47
|
-
|
|
48
|
-
filters,
|
|
49
|
-
q,
|
|
50
|
-
status,
|
|
51
|
-
priority,
|
|
52
|
-
category,
|
|
35
|
+
uniqueName,
|
|
53
36
|
},
|
|
54
37
|
{ abortEarly: false, allowUnknown: false }
|
|
55
38
|
);
|
|
56
39
|
if (warrning) {
|
|
57
40
|
Logger({
|
|
58
41
|
level: "WARN",
|
|
59
|
-
message: "Parameter Validation warrnings for
|
|
42
|
+
message: "Parameter Validation warrnings for closeVideoRoom",
|
|
60
43
|
});
|
|
61
44
|
Logger({ level: "WARN", message: warrning });
|
|
62
45
|
}
|
|
63
46
|
|
|
64
47
|
const query_params = {};
|
|
65
|
-
query_params["items"] = items;
|
|
66
|
-
query_params["filters"] = filters;
|
|
67
|
-
query_params["q"] = q;
|
|
68
|
-
query_params["status"] = status;
|
|
69
|
-
query_params["priority"] = priority;
|
|
70
|
-
query_params["category"] = category;
|
|
71
48
|
|
|
72
49
|
const response = await PlatformAPIClient.execute(
|
|
73
50
|
this.config,
|
|
74
|
-
"
|
|
75
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
51
|
+
"delete",
|
|
52
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
76
53
|
query_params,
|
|
77
54
|
undefined
|
|
78
55
|
);
|
|
79
56
|
|
|
80
|
-
const {
|
|
57
|
+
const {
|
|
58
|
+
error: res_error,
|
|
59
|
+
} = LeadModel.CloseVideoRoomResponse().validate(response, {
|
|
81
60
|
abortEarly: false,
|
|
82
61
|
allowUnknown: false,
|
|
83
62
|
});
|
|
@@ -85,7 +64,7 @@ class Lead {
|
|
|
85
64
|
if (res_error) {
|
|
86
65
|
Logger({
|
|
87
66
|
level: "WARN",
|
|
88
|
-
message: "Response Validation Warnnings for
|
|
67
|
+
message: "Response Validation Warnnings for closeVideoRoom",
|
|
89
68
|
});
|
|
90
69
|
Logger({ level: "WARN", message: res_error });
|
|
91
70
|
}
|
|
@@ -95,15 +74,15 @@ class Lead {
|
|
|
95
74
|
|
|
96
75
|
/**
|
|
97
76
|
* @param {Object} arg - Arg object.
|
|
98
|
-
* @param {
|
|
99
|
-
* @returns {Promise<
|
|
100
|
-
* @summary:
|
|
101
|
-
* @description:
|
|
77
|
+
* @param {CreateCustomFormPayload} arg.body
|
|
78
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
79
|
+
* @summary: Creates a new custom form
|
|
80
|
+
* @description: Creates a new custom form for given application
|
|
102
81
|
*/
|
|
103
|
-
async
|
|
104
|
-
const { error } = LeadValidator.
|
|
82
|
+
async createCustomForm({ body } = {}) {
|
|
83
|
+
const { error } = LeadValidator.createCustomForm().validate(
|
|
105
84
|
{
|
|
106
|
-
|
|
85
|
+
body,
|
|
107
86
|
},
|
|
108
87
|
{ abortEarly: false, allowUnknown: true }
|
|
109
88
|
);
|
|
@@ -112,16 +91,16 @@ class Lead {
|
|
|
112
91
|
}
|
|
113
92
|
|
|
114
93
|
// Showing warrnings if extra unknown parameters are found
|
|
115
|
-
const { error: warrning } = LeadValidator.
|
|
94
|
+
const { error: warrning } = LeadValidator.createCustomForm().validate(
|
|
116
95
|
{
|
|
117
|
-
|
|
96
|
+
body,
|
|
118
97
|
},
|
|
119
98
|
{ abortEarly: false, allowUnknown: false }
|
|
120
99
|
);
|
|
121
100
|
if (warrning) {
|
|
122
101
|
Logger({
|
|
123
102
|
level: "WARN",
|
|
124
|
-
message: "Parameter Validation warrnings for
|
|
103
|
+
message: "Parameter Validation warrnings for createCustomForm",
|
|
125
104
|
});
|
|
126
105
|
Logger({ level: "WARN", message: warrning });
|
|
127
106
|
}
|
|
@@ -130,13 +109,13 @@ class Lead {
|
|
|
130
109
|
|
|
131
110
|
const response = await PlatformAPIClient.execute(
|
|
132
111
|
this.config,
|
|
133
|
-
"
|
|
134
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
112
|
+
"post",
|
|
113
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
135
114
|
query_params,
|
|
136
|
-
|
|
115
|
+
body
|
|
137
116
|
);
|
|
138
117
|
|
|
139
|
-
const { error: res_error } = LeadModel.
|
|
118
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
140
119
|
abortEarly: false,
|
|
141
120
|
allowUnknown: false,
|
|
142
121
|
});
|
|
@@ -144,7 +123,7 @@ class Lead {
|
|
|
144
123
|
if (res_error) {
|
|
145
124
|
Logger({
|
|
146
125
|
level: "WARN",
|
|
147
|
-
message: "Response Validation Warnnings for
|
|
126
|
+
message: "Response Validation Warnnings for createCustomForm",
|
|
148
127
|
});
|
|
149
128
|
Logger({ level: "WARN", message: res_error });
|
|
150
129
|
}
|
|
@@ -154,14 +133,14 @@ class Lead {
|
|
|
154
133
|
|
|
155
134
|
/**
|
|
156
135
|
* @param {Object} arg - Arg object.
|
|
157
|
-
* @param {string} arg.id - Ticket ID
|
|
158
|
-
* @param {
|
|
159
|
-
* @returns {Promise<
|
|
160
|
-
* @summary:
|
|
161
|
-
* @description:
|
|
136
|
+
* @param {string} arg.id - Ticket ID for which history is created
|
|
137
|
+
* @param {TicketHistoryPayload} arg.body
|
|
138
|
+
* @returns {Promise<TicketHistory>} - Success response
|
|
139
|
+
* @summary: Create history for specific application level ticket
|
|
140
|
+
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
162
141
|
*/
|
|
163
|
-
async
|
|
164
|
-
const { error } = LeadValidator.
|
|
142
|
+
async createHistory({ id, body } = {}) {
|
|
143
|
+
const { error } = LeadValidator.createHistory().validate(
|
|
165
144
|
{
|
|
166
145
|
id,
|
|
167
146
|
body,
|
|
@@ -173,7 +152,7 @@ class Lead {
|
|
|
173
152
|
}
|
|
174
153
|
|
|
175
154
|
// Showing warrnings if extra unknown parameters are found
|
|
176
|
-
const { error: warrning } = LeadValidator.
|
|
155
|
+
const { error: warrning } = LeadValidator.createHistory().validate(
|
|
177
156
|
{
|
|
178
157
|
id,
|
|
179
158
|
body,
|
|
@@ -183,7 +162,7 @@ class Lead {
|
|
|
183
162
|
if (warrning) {
|
|
184
163
|
Logger({
|
|
185
164
|
level: "WARN",
|
|
186
|
-
message: "Parameter Validation warrnings for
|
|
165
|
+
message: "Parameter Validation warrnings for createHistory",
|
|
187
166
|
});
|
|
188
167
|
Logger({ level: "WARN", message: warrning });
|
|
189
168
|
}
|
|
@@ -192,13 +171,13 @@ class Lead {
|
|
|
192
171
|
|
|
193
172
|
const response = await PlatformAPIClient.execute(
|
|
194
173
|
this.config,
|
|
195
|
-
"
|
|
196
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
174
|
+
"post",
|
|
175
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
197
176
|
query_params,
|
|
198
177
|
body
|
|
199
178
|
);
|
|
200
179
|
|
|
201
|
-
const { error: res_error } = LeadModel.
|
|
180
|
+
const { error: res_error } = LeadModel.TicketHistory().validate(response, {
|
|
202
181
|
abortEarly: false,
|
|
203
182
|
allowUnknown: false,
|
|
204
183
|
});
|
|
@@ -206,7 +185,7 @@ class Lead {
|
|
|
206
185
|
if (res_error) {
|
|
207
186
|
Logger({
|
|
208
187
|
level: "WARN",
|
|
209
|
-
message: "Response Validation Warnnings for
|
|
188
|
+
message: "Response Validation Warnnings for createHistory",
|
|
210
189
|
});
|
|
211
190
|
Logger({ level: "WARN", message: res_error });
|
|
212
191
|
}
|
|
@@ -216,16 +195,16 @@ class Lead {
|
|
|
216
195
|
|
|
217
196
|
/**
|
|
218
197
|
* @param {Object} arg - Arg object.
|
|
219
|
-
* @param {string} arg.
|
|
220
|
-
* @param {
|
|
221
|
-
* @returns {Promise<
|
|
222
|
-
* @summary:
|
|
223
|
-
* @description:
|
|
198
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
199
|
+
* @param {EditCustomFormPayload} arg.body
|
|
200
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
201
|
+
* @summary: Edit the given custom form
|
|
202
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
224
203
|
*/
|
|
225
|
-
async
|
|
226
|
-
const { error } = LeadValidator.
|
|
204
|
+
async editCustomForm({ slug, body } = {}) {
|
|
205
|
+
const { error } = LeadValidator.editCustomForm().validate(
|
|
227
206
|
{
|
|
228
|
-
|
|
207
|
+
slug,
|
|
229
208
|
body,
|
|
230
209
|
},
|
|
231
210
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -235,9 +214,9 @@ class Lead {
|
|
|
235
214
|
}
|
|
236
215
|
|
|
237
216
|
// Showing warrnings if extra unknown parameters are found
|
|
238
|
-
const { error: warrning } = LeadValidator.
|
|
217
|
+
const { error: warrning } = LeadValidator.editCustomForm().validate(
|
|
239
218
|
{
|
|
240
|
-
|
|
219
|
+
slug,
|
|
241
220
|
body,
|
|
242
221
|
},
|
|
243
222
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -245,7 +224,7 @@ class Lead {
|
|
|
245
224
|
if (warrning) {
|
|
246
225
|
Logger({
|
|
247
226
|
level: "WARN",
|
|
248
|
-
message: "Parameter Validation warrnings for
|
|
227
|
+
message: "Parameter Validation warrnings for editCustomForm",
|
|
249
228
|
});
|
|
250
229
|
Logger({ level: "WARN", message: warrning });
|
|
251
230
|
}
|
|
@@ -254,13 +233,13 @@ class Lead {
|
|
|
254
233
|
|
|
255
234
|
const response = await PlatformAPIClient.execute(
|
|
256
235
|
this.config,
|
|
257
|
-
"
|
|
258
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
236
|
+
"put",
|
|
237
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
259
238
|
query_params,
|
|
260
239
|
body
|
|
261
240
|
);
|
|
262
241
|
|
|
263
|
-
const { error: res_error } = LeadModel.
|
|
242
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
264
243
|
abortEarly: false,
|
|
265
244
|
allowUnknown: false,
|
|
266
245
|
});
|
|
@@ -268,7 +247,7 @@ class Lead {
|
|
|
268
247
|
if (res_error) {
|
|
269
248
|
Logger({
|
|
270
249
|
level: "WARN",
|
|
271
|
-
message: "Response Validation Warnnings for
|
|
250
|
+
message: "Response Validation Warnnings for editCustomForm",
|
|
272
251
|
});
|
|
273
252
|
Logger({ level: "WARN", message: res_error });
|
|
274
253
|
}
|
|
@@ -278,15 +257,17 @@ class Lead {
|
|
|
278
257
|
|
|
279
258
|
/**
|
|
280
259
|
* @param {Object} arg - Arg object.
|
|
281
|
-
* @param {string} arg.id - Ticket ID
|
|
282
|
-
* @
|
|
283
|
-
* @
|
|
284
|
-
* @
|
|
260
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
261
|
+
* @param {EditTicketPayload} arg.body
|
|
262
|
+
* @returns {Promise<Ticket>} - Success response
|
|
263
|
+
* @summary: Edits ticket details of a application level ticket
|
|
264
|
+
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
285
265
|
*/
|
|
286
|
-
async
|
|
287
|
-
const { error } = LeadValidator.
|
|
266
|
+
async editTicket({ id, body } = {}) {
|
|
267
|
+
const { error } = LeadValidator.editTicket().validate(
|
|
288
268
|
{
|
|
289
269
|
id,
|
|
270
|
+
body,
|
|
290
271
|
},
|
|
291
272
|
{ abortEarly: false, allowUnknown: true }
|
|
292
273
|
);
|
|
@@ -295,16 +276,17 @@ class Lead {
|
|
|
295
276
|
}
|
|
296
277
|
|
|
297
278
|
// Showing warrnings if extra unknown parameters are found
|
|
298
|
-
const { error: warrning } = LeadValidator.
|
|
279
|
+
const { error: warrning } = LeadValidator.editTicket().validate(
|
|
299
280
|
{
|
|
300
281
|
id,
|
|
282
|
+
body,
|
|
301
283
|
},
|
|
302
284
|
{ abortEarly: false, allowUnknown: false }
|
|
303
285
|
);
|
|
304
286
|
if (warrning) {
|
|
305
287
|
Logger({
|
|
306
288
|
level: "WARN",
|
|
307
|
-
message: "Parameter Validation warrnings for
|
|
289
|
+
message: "Parameter Validation warrnings for editTicket",
|
|
308
290
|
});
|
|
309
291
|
Logger({ level: "WARN", message: warrning });
|
|
310
292
|
}
|
|
@@ -313,15 +295,13 @@ class Lead {
|
|
|
313
295
|
|
|
314
296
|
const response = await PlatformAPIClient.execute(
|
|
315
297
|
this.config,
|
|
316
|
-
"
|
|
317
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}
|
|
298
|
+
"put",
|
|
299
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
318
300
|
query_params,
|
|
319
|
-
|
|
301
|
+
body
|
|
320
302
|
);
|
|
321
303
|
|
|
322
|
-
const {
|
|
323
|
-
error: res_error,
|
|
324
|
-
} = LeadModel.TicketHistoryList().validate(response, {
|
|
304
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
325
305
|
abortEarly: false,
|
|
326
306
|
allowUnknown: false,
|
|
327
307
|
});
|
|
@@ -329,7 +309,7 @@ class Lead {
|
|
|
329
309
|
if (res_error) {
|
|
330
310
|
Logger({
|
|
331
311
|
level: "WARN",
|
|
332
|
-
message: "Response Validation Warnnings for
|
|
312
|
+
message: "Response Validation Warnnings for editTicket",
|
|
333
313
|
});
|
|
334
314
|
Logger({ level: "WARN", message: res_error });
|
|
335
315
|
}
|
|
@@ -398,18 +378,13 @@ class Lead {
|
|
|
398
378
|
|
|
399
379
|
/**
|
|
400
380
|
* @param {Object} arg - Arg object.
|
|
401
|
-
* @
|
|
402
|
-
* @
|
|
403
|
-
* @
|
|
404
|
-
* @summary: Edit the given custom form
|
|
405
|
-
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
381
|
+
* @returns {Promise<CustomFormList>} - Success response
|
|
382
|
+
* @summary: Get list of custom form
|
|
383
|
+
* @description: Get list of custom form for given application
|
|
406
384
|
*/
|
|
407
|
-
async
|
|
408
|
-
const { error } = LeadValidator.
|
|
409
|
-
{
|
|
410
|
-
slug,
|
|
411
|
-
body,
|
|
412
|
-
},
|
|
385
|
+
async getCustomForms({} = {}) {
|
|
386
|
+
const { error } = LeadValidator.getCustomForms().validate(
|
|
387
|
+
{},
|
|
413
388
|
{ abortEarly: false, allowUnknown: true }
|
|
414
389
|
);
|
|
415
390
|
if (error) {
|
|
@@ -417,17 +392,14 @@ class Lead {
|
|
|
417
392
|
}
|
|
418
393
|
|
|
419
394
|
// Showing warrnings if extra unknown parameters are found
|
|
420
|
-
const { error: warrning } = LeadValidator.
|
|
421
|
-
{
|
|
422
|
-
slug,
|
|
423
|
-
body,
|
|
424
|
-
},
|
|
395
|
+
const { error: warrning } = LeadValidator.getCustomForms().validate(
|
|
396
|
+
{},
|
|
425
397
|
{ abortEarly: false, allowUnknown: false }
|
|
426
398
|
);
|
|
427
399
|
if (warrning) {
|
|
428
400
|
Logger({
|
|
429
401
|
level: "WARN",
|
|
430
|
-
message: "Parameter Validation warrnings for
|
|
402
|
+
message: "Parameter Validation warrnings for getCustomForms",
|
|
431
403
|
});
|
|
432
404
|
Logger({ level: "WARN", message: warrning });
|
|
433
405
|
}
|
|
@@ -436,13 +408,13 @@ class Lead {
|
|
|
436
408
|
|
|
437
409
|
const response = await PlatformAPIClient.execute(
|
|
438
410
|
this.config,
|
|
439
|
-
"
|
|
440
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form
|
|
411
|
+
"get",
|
|
412
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
441
413
|
query_params,
|
|
442
|
-
|
|
414
|
+
undefined
|
|
443
415
|
);
|
|
444
416
|
|
|
445
|
-
const { error: res_error } = LeadModel.
|
|
417
|
+
const { error: res_error } = LeadModel.CustomFormList().validate(response, {
|
|
446
418
|
abortEarly: false,
|
|
447
419
|
allowUnknown: false,
|
|
448
420
|
});
|
|
@@ -450,7 +422,7 @@ class Lead {
|
|
|
450
422
|
if (res_error) {
|
|
451
423
|
Logger({
|
|
452
424
|
level: "WARN",
|
|
453
|
-
message: "Response Validation Warnnings for
|
|
425
|
+
message: "Response Validation Warnnings for getCustomForms",
|
|
454
426
|
});
|
|
455
427
|
Logger({ level: "WARN", message: res_error });
|
|
456
428
|
}
|
|
@@ -460,13 +432,16 @@ class Lead {
|
|
|
460
432
|
|
|
461
433
|
/**
|
|
462
434
|
* @param {Object} arg - Arg object.
|
|
463
|
-
* @
|
|
464
|
-
* @
|
|
465
|
-
* @
|
|
435
|
+
* @param {string} arg.id - Tiket ID of the ticket to be fetched
|
|
436
|
+
* @returns {Promise<Ticket>} - Success response
|
|
437
|
+
* @summary: Retreives ticket details of a application level ticket
|
|
438
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
466
439
|
*/
|
|
467
|
-
async
|
|
468
|
-
const { error } = LeadValidator.
|
|
469
|
-
{
|
|
440
|
+
async getTicket({ id } = {}) {
|
|
441
|
+
const { error } = LeadValidator.getTicket().validate(
|
|
442
|
+
{
|
|
443
|
+
id,
|
|
444
|
+
},
|
|
470
445
|
{ abortEarly: false, allowUnknown: true }
|
|
471
446
|
);
|
|
472
447
|
if (error) {
|
|
@@ -474,14 +449,16 @@ class Lead {
|
|
|
474
449
|
}
|
|
475
450
|
|
|
476
451
|
// Showing warrnings if extra unknown parameters are found
|
|
477
|
-
const { error: warrning } = LeadValidator.
|
|
478
|
-
{
|
|
452
|
+
const { error: warrning } = LeadValidator.getTicket().validate(
|
|
453
|
+
{
|
|
454
|
+
id,
|
|
455
|
+
},
|
|
479
456
|
{ abortEarly: false, allowUnknown: false }
|
|
480
457
|
);
|
|
481
458
|
if (warrning) {
|
|
482
459
|
Logger({
|
|
483
460
|
level: "WARN",
|
|
484
|
-
message: "Parameter Validation warrnings for
|
|
461
|
+
message: "Parameter Validation warrnings for getTicket",
|
|
485
462
|
});
|
|
486
463
|
Logger({ level: "WARN", message: warrning });
|
|
487
464
|
}
|
|
@@ -491,12 +468,12 @@ class Lead {
|
|
|
491
468
|
const response = await PlatformAPIClient.execute(
|
|
492
469
|
this.config,
|
|
493
470
|
"get",
|
|
494
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
471
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
495
472
|
query_params,
|
|
496
473
|
undefined
|
|
497
474
|
);
|
|
498
475
|
|
|
499
|
-
const { error: res_error } = LeadModel.
|
|
476
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
500
477
|
abortEarly: false,
|
|
501
478
|
allowUnknown: false,
|
|
502
479
|
});
|
|
@@ -504,7 +481,7 @@ class Lead {
|
|
|
504
481
|
if (res_error) {
|
|
505
482
|
Logger({
|
|
506
483
|
level: "WARN",
|
|
507
|
-
message: "Response Validation Warnnings for
|
|
484
|
+
message: "Response Validation Warnnings for getTicket",
|
|
508
485
|
});
|
|
509
486
|
Logger({ level: "WARN", message: res_error });
|
|
510
487
|
}
|
|
@@ -514,15 +491,15 @@ class Lead {
|
|
|
514
491
|
|
|
515
492
|
/**
|
|
516
493
|
* @param {Object} arg - Arg object.
|
|
517
|
-
* @param {
|
|
518
|
-
* @returns {Promise<
|
|
519
|
-
* @summary:
|
|
520
|
-
* @description:
|
|
494
|
+
* @param {string} arg.id - Ticket ID for which history is to be fetched
|
|
495
|
+
* @returns {Promise<TicketHistoryList>} - Success response
|
|
496
|
+
* @summary: Gets history list for specific application level ticket
|
|
497
|
+
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
521
498
|
*/
|
|
522
|
-
async
|
|
523
|
-
const { error } = LeadValidator.
|
|
499
|
+
async getTicketHistory({ id } = {}) {
|
|
500
|
+
const { error } = LeadValidator.getTicketHistory().validate(
|
|
524
501
|
{
|
|
525
|
-
|
|
502
|
+
id,
|
|
526
503
|
},
|
|
527
504
|
{ abortEarly: false, allowUnknown: true }
|
|
528
505
|
);
|
|
@@ -531,16 +508,16 @@ class Lead {
|
|
|
531
508
|
}
|
|
532
509
|
|
|
533
510
|
// Showing warrnings if extra unknown parameters are found
|
|
534
|
-
const { error: warrning } = LeadValidator.
|
|
511
|
+
const { error: warrning } = LeadValidator.getTicketHistory().validate(
|
|
535
512
|
{
|
|
536
|
-
|
|
513
|
+
id,
|
|
537
514
|
},
|
|
538
515
|
{ abortEarly: false, allowUnknown: false }
|
|
539
516
|
);
|
|
540
517
|
if (warrning) {
|
|
541
518
|
Logger({
|
|
542
519
|
level: "WARN",
|
|
543
|
-
message: "Parameter Validation warrnings for
|
|
520
|
+
message: "Parameter Validation warrnings for getTicketHistory",
|
|
544
521
|
});
|
|
545
522
|
Logger({ level: "WARN", message: warrning });
|
|
546
523
|
}
|
|
@@ -549,13 +526,15 @@ class Lead {
|
|
|
549
526
|
|
|
550
527
|
const response = await PlatformAPIClient.execute(
|
|
551
528
|
this.config,
|
|
552
|
-
"
|
|
553
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
529
|
+
"get",
|
|
530
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
554
531
|
query_params,
|
|
555
|
-
|
|
532
|
+
undefined
|
|
556
533
|
);
|
|
557
534
|
|
|
558
|
-
const {
|
|
535
|
+
const {
|
|
536
|
+
error: res_error,
|
|
537
|
+
} = LeadModel.TicketHistoryList().validate(response, {
|
|
559
538
|
abortEarly: false,
|
|
560
539
|
allowUnknown: false,
|
|
561
540
|
});
|
|
@@ -563,7 +542,7 @@ class Lead {
|
|
|
563
542
|
if (res_error) {
|
|
564
543
|
Logger({
|
|
565
544
|
level: "WARN",
|
|
566
|
-
message: "Response Validation Warnnings for
|
|
545
|
+
message: "Response Validation Warnnings for getTicketHistory",
|
|
567
546
|
});
|
|
568
547
|
Logger({ level: "WARN", message: res_error });
|
|
569
548
|
}
|
|
@@ -573,15 +552,27 @@ class Lead {
|
|
|
573
552
|
|
|
574
553
|
/**
|
|
575
554
|
* @param {Object} arg - Arg object.
|
|
576
|
-
* @param {
|
|
577
|
-
*
|
|
578
|
-
* @
|
|
579
|
-
*
|
|
555
|
+
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
556
|
+
* list of tickets
|
|
557
|
+
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
558
|
+
* the ticket filters
|
|
559
|
+
* @param {string} [arg.q] - Search through ticket titles and description
|
|
560
|
+
* @param {string} [arg.status] - Filter tickets on status
|
|
561
|
+
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
562
|
+
* @param {string} [arg.category] - Filter tickets on category
|
|
563
|
+
* @returns {Promise<TicketList>} - Success response
|
|
564
|
+
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
565
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
580
566
|
*/
|
|
581
|
-
async
|
|
582
|
-
const { error } = LeadValidator.
|
|
567
|
+
async getTickets({ items, filters, q, status, priority, category } = {}) {
|
|
568
|
+
const { error } = LeadValidator.getTickets().validate(
|
|
583
569
|
{
|
|
584
|
-
|
|
570
|
+
items,
|
|
571
|
+
filters,
|
|
572
|
+
q,
|
|
573
|
+
status,
|
|
574
|
+
priority,
|
|
575
|
+
category,
|
|
585
576
|
},
|
|
586
577
|
{ abortEarly: false, allowUnknown: true }
|
|
587
578
|
);
|
|
@@ -590,33 +581,42 @@ class Lead {
|
|
|
590
581
|
}
|
|
591
582
|
|
|
592
583
|
// Showing warrnings if extra unknown parameters are found
|
|
593
|
-
const { error: warrning } = LeadValidator.
|
|
584
|
+
const { error: warrning } = LeadValidator.getTickets().validate(
|
|
594
585
|
{
|
|
595
|
-
|
|
586
|
+
items,
|
|
587
|
+
filters,
|
|
588
|
+
q,
|
|
589
|
+
status,
|
|
590
|
+
priority,
|
|
591
|
+
category,
|
|
596
592
|
},
|
|
597
593
|
{ abortEarly: false, allowUnknown: false }
|
|
598
594
|
);
|
|
599
595
|
if (warrning) {
|
|
600
596
|
Logger({
|
|
601
597
|
level: "WARN",
|
|
602
|
-
message: "Parameter Validation warrnings for
|
|
598
|
+
message: "Parameter Validation warrnings for getTickets",
|
|
603
599
|
});
|
|
604
600
|
Logger({ level: "WARN", message: warrning });
|
|
605
601
|
}
|
|
606
602
|
|
|
607
603
|
const query_params = {};
|
|
604
|
+
query_params["items"] = items;
|
|
605
|
+
query_params["filters"] = filters;
|
|
606
|
+
query_params["q"] = q;
|
|
607
|
+
query_params["status"] = status;
|
|
608
|
+
query_params["priority"] = priority;
|
|
609
|
+
query_params["category"] = category;
|
|
608
610
|
|
|
609
611
|
const response = await PlatformAPIClient.execute(
|
|
610
612
|
this.config,
|
|
611
613
|
"get",
|
|
612
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
614
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
613
615
|
query_params,
|
|
614
616
|
undefined
|
|
615
617
|
);
|
|
616
618
|
|
|
617
|
-
const {
|
|
618
|
-
error: res_error,
|
|
619
|
-
} = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
|
|
619
|
+
const { error: res_error } = LeadModel.TicketList().validate(response, {
|
|
620
620
|
abortEarly: false,
|
|
621
621
|
allowUnknown: false,
|
|
622
622
|
});
|
|
@@ -624,7 +624,7 @@ class Lead {
|
|
|
624
624
|
if (res_error) {
|
|
625
625
|
Logger({
|
|
626
626
|
level: "WARN",
|
|
627
|
-
message: "Response Validation Warnnings for
|
|
627
|
+
message: "Response Validation Warnnings for getTickets",
|
|
628
628
|
});
|
|
629
629
|
Logger({ level: "WARN", message: res_error });
|
|
630
630
|
}
|
|
@@ -634,13 +634,13 @@ class Lead {
|
|
|
634
634
|
|
|
635
635
|
/**
|
|
636
636
|
* @param {Object} arg - Arg object.
|
|
637
|
-
* @param {string} arg.uniqueName - Unique name of
|
|
638
|
-
* @returns {Promise<
|
|
639
|
-
* @summary: Get
|
|
640
|
-
* @description: Get
|
|
637
|
+
* @param {string} arg.uniqueName - Unique name of video room
|
|
638
|
+
* @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
|
|
639
|
+
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
640
|
+
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
|
|
641
641
|
*/
|
|
642
|
-
async
|
|
643
|
-
const { error } = LeadValidator.
|
|
642
|
+
async getTokenForVideoRoom({ uniqueName } = {}) {
|
|
643
|
+
const { error } = LeadValidator.getTokenForVideoRoom().validate(
|
|
644
644
|
{
|
|
645
645
|
uniqueName,
|
|
646
646
|
},
|
|
@@ -651,7 +651,7 @@ class Lead {
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
// Showing warrnings if extra unknown parameters are found
|
|
654
|
-
const { error: warrning } = LeadValidator.
|
|
654
|
+
const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
|
|
655
655
|
{
|
|
656
656
|
uniqueName,
|
|
657
657
|
},
|
|
@@ -660,7 +660,7 @@ class Lead {
|
|
|
660
660
|
if (warrning) {
|
|
661
661
|
Logger({
|
|
662
662
|
level: "WARN",
|
|
663
|
-
message: "Parameter Validation warrnings for
|
|
663
|
+
message: "Parameter Validation warrnings for getTokenForVideoRoom",
|
|
664
664
|
});
|
|
665
665
|
Logger({ level: "WARN", message: warrning });
|
|
666
666
|
}
|
|
@@ -670,14 +670,14 @@ class Lead {
|
|
|
670
670
|
const response = await PlatformAPIClient.execute(
|
|
671
671
|
this.config,
|
|
672
672
|
"get",
|
|
673
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/
|
|
673
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
674
674
|
query_params,
|
|
675
675
|
undefined
|
|
676
676
|
);
|
|
677
677
|
|
|
678
678
|
const {
|
|
679
679
|
error: res_error,
|
|
680
|
-
} = LeadModel.
|
|
680
|
+
} = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
|
|
681
681
|
abortEarly: false,
|
|
682
682
|
allowUnknown: false,
|
|
683
683
|
});
|
|
@@ -685,7 +685,7 @@ class Lead {
|
|
|
685
685
|
if (res_error) {
|
|
686
686
|
Logger({
|
|
687
687
|
level: "WARN",
|
|
688
|
-
message: "Response Validation Warnnings for
|
|
688
|
+
message: "Response Validation Warnnings for getTokenForVideoRoom",
|
|
689
689
|
});
|
|
690
690
|
Logger({ level: "WARN", message: res_error });
|
|
691
691
|
}
|
|
@@ -695,15 +695,15 @@ class Lead {
|
|
|
695
695
|
|
|
696
696
|
/**
|
|
697
697
|
* @param {Object} arg - Arg object.
|
|
698
|
-
* @param {
|
|
699
|
-
* @returns {Promise<
|
|
700
|
-
* @summary:
|
|
701
|
-
* @description:
|
|
698
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
699
|
+
* @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
|
|
700
|
+
* @summary: Get participants of a specific Video Room using it's unique name
|
|
701
|
+
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
|
|
702
702
|
*/
|
|
703
|
-
async
|
|
704
|
-
const { error } = LeadValidator.
|
|
703
|
+
async getVideoParticipants({ uniqueName } = {}) {
|
|
704
|
+
const { error } = LeadValidator.getVideoParticipants().validate(
|
|
705
705
|
{
|
|
706
|
-
|
|
706
|
+
uniqueName,
|
|
707
707
|
},
|
|
708
708
|
{ abortEarly: false, allowUnknown: true }
|
|
709
709
|
);
|
|
@@ -712,16 +712,16 @@ class Lead {
|
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
// Showing warrnings if extra unknown parameters are found
|
|
715
|
-
const { error: warrning } = LeadValidator.
|
|
715
|
+
const { error: warrning } = LeadValidator.getVideoParticipants().validate(
|
|
716
716
|
{
|
|
717
|
-
|
|
717
|
+
uniqueName,
|
|
718
718
|
},
|
|
719
719
|
{ abortEarly: false, allowUnknown: false }
|
|
720
720
|
);
|
|
721
721
|
if (warrning) {
|
|
722
722
|
Logger({
|
|
723
723
|
level: "WARN",
|
|
724
|
-
message: "Parameter Validation warrnings for
|
|
724
|
+
message: "Parameter Validation warrnings for getVideoParticipants",
|
|
725
725
|
});
|
|
726
726
|
Logger({ level: "WARN", message: warrning });
|
|
727
727
|
}
|
|
@@ -730,15 +730,15 @@ class Lead {
|
|
|
730
730
|
|
|
731
731
|
const response = await PlatformAPIClient.execute(
|
|
732
732
|
this.config,
|
|
733
|
-
"
|
|
734
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
733
|
+
"get",
|
|
734
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
735
735
|
query_params,
|
|
736
|
-
|
|
736
|
+
undefined
|
|
737
737
|
);
|
|
738
738
|
|
|
739
739
|
const {
|
|
740
740
|
error: res_error,
|
|
741
|
-
} = LeadModel.
|
|
741
|
+
} = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
|
|
742
742
|
abortEarly: false,
|
|
743
743
|
allowUnknown: false,
|
|
744
744
|
});
|
|
@@ -746,7 +746,7 @@ class Lead {
|
|
|
746
746
|
if (res_error) {
|
|
747
747
|
Logger({
|
|
748
748
|
level: "WARN",
|
|
749
|
-
message: "Response Validation Warnnings for
|
|
749
|
+
message: "Response Validation Warnnings for getVideoParticipants",
|
|
750
750
|
});
|
|
751
751
|
Logger({ level: "WARN", message: res_error });
|
|
752
752
|
}
|
|
@@ -756,15 +756,15 @@ class Lead {
|
|
|
756
756
|
|
|
757
757
|
/**
|
|
758
758
|
* @param {Object} arg - Arg object.
|
|
759
|
-
* @param {
|
|
760
|
-
* @returns {Promise<
|
|
761
|
-
* @summary:
|
|
762
|
-
* @description:
|
|
759
|
+
* @param {CreateVideoRoomPayload} arg.body
|
|
760
|
+
* @returns {Promise<CreateVideoRoomResponse>} - Success response
|
|
761
|
+
* @summary: Open a video room.
|
|
762
|
+
* @description: Open a video room.
|
|
763
763
|
*/
|
|
764
|
-
async
|
|
765
|
-
const { error } = LeadValidator.
|
|
764
|
+
async openVideoRoom({ body } = {}) {
|
|
765
|
+
const { error } = LeadValidator.openVideoRoom().validate(
|
|
766
766
|
{
|
|
767
|
-
|
|
767
|
+
body,
|
|
768
768
|
},
|
|
769
769
|
{ abortEarly: false, allowUnknown: true }
|
|
770
770
|
);
|
|
@@ -773,16 +773,16 @@ class Lead {
|
|
|
773
773
|
}
|
|
774
774
|
|
|
775
775
|
// Showing warrnings if extra unknown parameters are found
|
|
776
|
-
const { error: warrning } = LeadValidator.
|
|
776
|
+
const { error: warrning } = LeadValidator.openVideoRoom().validate(
|
|
777
777
|
{
|
|
778
|
-
|
|
778
|
+
body,
|
|
779
779
|
},
|
|
780
780
|
{ abortEarly: false, allowUnknown: false }
|
|
781
781
|
);
|
|
782
782
|
if (warrning) {
|
|
783
783
|
Logger({
|
|
784
784
|
level: "WARN",
|
|
785
|
-
message: "Parameter Validation warrnings for
|
|
785
|
+
message: "Parameter Validation warrnings for openVideoRoom",
|
|
786
786
|
});
|
|
787
787
|
Logger({ level: "WARN", message: warrning });
|
|
788
788
|
}
|
|
@@ -791,15 +791,15 @@ class Lead {
|
|
|
791
791
|
|
|
792
792
|
const response = await PlatformAPIClient.execute(
|
|
793
793
|
this.config,
|
|
794
|
-
"
|
|
795
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room
|
|
794
|
+
"post",
|
|
795
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
796
796
|
query_params,
|
|
797
|
-
|
|
797
|
+
body
|
|
798
798
|
);
|
|
799
799
|
|
|
800
800
|
const {
|
|
801
801
|
error: res_error,
|
|
802
|
-
} = LeadModel.
|
|
802
|
+
} = LeadModel.CreateVideoRoomResponse().validate(response, {
|
|
803
803
|
abortEarly: false,
|
|
804
804
|
allowUnknown: false,
|
|
805
805
|
});
|
|
@@ -807,7 +807,7 @@ class Lead {
|
|
|
807
807
|
if (res_error) {
|
|
808
808
|
Logger({
|
|
809
809
|
level: "WARN",
|
|
810
|
-
message: "Response Validation Warnnings for
|
|
810
|
+
message: "Response Validation Warnnings for openVideoRoom",
|
|
811
811
|
});
|
|
812
812
|
Logger({ level: "WARN", message: res_error });
|
|
813
813
|
}
|