@gofynd/fdk-client-javascript 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +595 -594
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +490 -885
- 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 +1079 -1078
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
- 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 +43 -42
- 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 +32 -31
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
- 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 +216 -215
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +468 -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 +65 -64
- 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 +109 -108
- 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 +31 -22
- package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
- 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 -9
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +247 -246
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +361 -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 +781 -780
- 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 +646 -645
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
- 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 +122 -121
- 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 +94 -93
- 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 +38 -37
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +619 -618
- 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 +18 -7
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
- 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 +7 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
- 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 +26 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +40 -51
- 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 +7 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
- 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 +25 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
- 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 +39 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +485 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
- 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 +30 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
- 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 +12 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
- 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 +29 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
- 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 +25 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
- 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 +22 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7972 -7888
- package/sdk/platform/PlatformClient.js +8678 -10107
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
- 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 +62 -60
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
- 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 +314 -312
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
- 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 +507 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
- 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 +91 -90
- 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 +15 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -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 +115 -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/WebhookPublicClient.js +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -7339
- package/documentation/application/CATALOG.md +0 -9597
- package/documentation/application/COMMON.md +0 -452
- package/documentation/application/COMMUNICATION.md +0 -467
- package/documentation/application/CONFIGURATION.md +0 -2906
- package/documentation/application/CONTENT.md +0 -3351
- package/documentation/application/FILESTORAGE.md +0 -578
- package/documentation/application/LEAD.md +0 -1895
- package/documentation/application/LOGISTIC.md +0 -765
- package/documentation/application/ORDER.md +0 -3432
- package/documentation/application/PAYMENT.md +0 -5221
- package/documentation/application/POSCART.md +0 -7938
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -708
- package/documentation/application/SHARE.md +0 -733
- package/documentation/application/THEME.md +0 -5800
- package/documentation/application/USER.md +0 -4335
- package/documentation/platform/ANALYTICS.md +0 -1154
- package/documentation/platform/AUDITTRAIL.md +0 -576
- package/documentation/platform/BILLING.md +0 -2400
- package/documentation/platform/CART.md +0 -5559
- package/documentation/platform/CATALOG.md +0 -23261
- package/documentation/platform/COMMON.md +0 -452
- package/documentation/platform/COMMUNICATION.md +0 -5718
- package/documentation/platform/COMPANYPROFILE.md +0 -2031
- package/documentation/platform/CONFIGURATION.md +0 -7339
- package/documentation/platform/CONTENT.md +0 -9098
- package/documentation/platform/DISCOUNT.md +0 -863
- package/documentation/platform/FILESTORAGE.md +0 -1081
- package/documentation/platform/INVENTORY.md +0 -1779
- package/documentation/platform/LEAD.md +0 -4740
- package/documentation/platform/ORDER.md +0 -8486
- package/documentation/platform/PARTNER.md +0 -220
- package/documentation/platform/PAYMENT.md +0 -3448
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -1083
- package/documentation/platform/SHARE.md +0 -606
- package/documentation/platform/THEME.md +0 -35729
- package/documentation/platform/USER.md +0 -2319
- package/documentation/platform/WEBHOOK.md +0 -591
- package/documentation/public/CONFIGURATION.md +0 -452
- package/documentation/public/INVENTORY.md +0 -690
- package/documentation/public/WEBHOOK.md +0 -352
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -47
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const Paginator = require("../../common/Paginator");
|
|
2
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const LeadValidator = require("./LeadPlatformApplicationValidator");
|
|
5
5
|
const LeadModel = require("./LeadPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
const Joi = require("joi");
|
|
7
8
|
|
|
8
9
|
class Lead {
|
|
9
10
|
constructor(config, applicationId) {
|
|
@@ -13,27 +14,15 @@ class Lead {
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @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
|
|
17
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
18
|
+
* @returns {Promise<CloseVideoRoomResponse>} - Success response
|
|
19
|
+
* @summary: Close the video room and force all participants to leave.
|
|
20
|
+
* @description: Close the video room and force all participants to leave.
|
|
27
21
|
*/
|
|
28
|
-
async
|
|
29
|
-
const { error } = LeadValidator.
|
|
22
|
+
async closeVideoRoom({ uniqueName } = {}) {
|
|
23
|
+
const { error } = LeadValidator.closeVideoRoom().validate(
|
|
30
24
|
{
|
|
31
|
-
|
|
32
|
-
filters,
|
|
33
|
-
q,
|
|
34
|
-
status,
|
|
35
|
-
priority,
|
|
36
|
-
category,
|
|
25
|
+
uniqueName,
|
|
37
26
|
},
|
|
38
27
|
{ abortEarly: false, allowUnknown: true }
|
|
39
28
|
);
|
|
@@ -42,42 +31,33 @@ class Lead {
|
|
|
42
31
|
}
|
|
43
32
|
|
|
44
33
|
// Showing warrnings if extra unknown parameters are found
|
|
45
|
-
const { error: warrning } = LeadValidator.
|
|
34
|
+
const { error: warrning } = LeadValidator.closeVideoRoom().validate(
|
|
46
35
|
{
|
|
47
|
-
|
|
48
|
-
filters,
|
|
49
|
-
q,
|
|
50
|
-
status,
|
|
51
|
-
priority,
|
|
52
|
-
category,
|
|
36
|
+
uniqueName,
|
|
53
37
|
},
|
|
54
38
|
{ abortEarly: false, allowUnknown: false }
|
|
55
39
|
);
|
|
56
40
|
if (warrning) {
|
|
57
41
|
Logger({
|
|
58
42
|
level: "WARN",
|
|
59
|
-
message: "Parameter Validation warrnings for
|
|
43
|
+
message: "Parameter Validation warrnings for closeVideoRoom",
|
|
60
44
|
});
|
|
61
45
|
Logger({ level: "WARN", message: warrning });
|
|
62
46
|
}
|
|
63
47
|
|
|
64
48
|
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
49
|
|
|
72
50
|
const response = await PlatformAPIClient.execute(
|
|
73
51
|
this.config,
|
|
74
|
-
"
|
|
75
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
52
|
+
"delete",
|
|
53
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
76
54
|
query_params,
|
|
77
55
|
undefined
|
|
78
56
|
);
|
|
79
57
|
|
|
80
|
-
const {
|
|
58
|
+
const {
|
|
59
|
+
error: res_error,
|
|
60
|
+
} = LeadModel.CloseVideoRoomResponse().validate(response, {
|
|
81
61
|
abortEarly: false,
|
|
82
62
|
allowUnknown: false,
|
|
83
63
|
});
|
|
@@ -85,7 +65,7 @@ class Lead {
|
|
|
85
65
|
if (res_error) {
|
|
86
66
|
Logger({
|
|
87
67
|
level: "WARN",
|
|
88
|
-
message: "Response Validation Warnnings for
|
|
68
|
+
message: "Response Validation Warnnings for closeVideoRoom",
|
|
89
69
|
});
|
|
90
70
|
Logger({ level: "WARN", message: res_error });
|
|
91
71
|
}
|
|
@@ -95,15 +75,15 @@ class Lead {
|
|
|
95
75
|
|
|
96
76
|
/**
|
|
97
77
|
* @param {Object} arg - Arg object.
|
|
98
|
-
* @param {
|
|
99
|
-
* @returns {Promise<
|
|
100
|
-
* @summary:
|
|
101
|
-
* @description:
|
|
78
|
+
* @param {CreateCustomFormPayload} arg.body
|
|
79
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
80
|
+
* @summary: Creates a new custom form
|
|
81
|
+
* @description: Creates a new custom form for given application
|
|
102
82
|
*/
|
|
103
|
-
async
|
|
104
|
-
const { error } = LeadValidator.
|
|
83
|
+
async createCustomForm({ body } = {}) {
|
|
84
|
+
const { error } = LeadValidator.createCustomForm().validate(
|
|
105
85
|
{
|
|
106
|
-
|
|
86
|
+
body,
|
|
107
87
|
},
|
|
108
88
|
{ abortEarly: false, allowUnknown: true }
|
|
109
89
|
);
|
|
@@ -112,16 +92,16 @@ class Lead {
|
|
|
112
92
|
}
|
|
113
93
|
|
|
114
94
|
// Showing warrnings if extra unknown parameters are found
|
|
115
|
-
const { error: warrning } = LeadValidator.
|
|
95
|
+
const { error: warrning } = LeadValidator.createCustomForm().validate(
|
|
116
96
|
{
|
|
117
|
-
|
|
97
|
+
body,
|
|
118
98
|
},
|
|
119
99
|
{ abortEarly: false, allowUnknown: false }
|
|
120
100
|
);
|
|
121
101
|
if (warrning) {
|
|
122
102
|
Logger({
|
|
123
103
|
level: "WARN",
|
|
124
|
-
message: "Parameter Validation warrnings for
|
|
104
|
+
message: "Parameter Validation warrnings for createCustomForm",
|
|
125
105
|
});
|
|
126
106
|
Logger({ level: "WARN", message: warrning });
|
|
127
107
|
}
|
|
@@ -130,13 +110,13 @@ class Lead {
|
|
|
130
110
|
|
|
131
111
|
const response = await PlatformAPIClient.execute(
|
|
132
112
|
this.config,
|
|
133
|
-
"
|
|
134
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
113
|
+
"post",
|
|
114
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
135
115
|
query_params,
|
|
136
|
-
|
|
116
|
+
body
|
|
137
117
|
);
|
|
138
118
|
|
|
139
|
-
const { error: res_error } = LeadModel.
|
|
119
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
140
120
|
abortEarly: false,
|
|
141
121
|
allowUnknown: false,
|
|
142
122
|
});
|
|
@@ -144,7 +124,7 @@ class Lead {
|
|
|
144
124
|
if (res_error) {
|
|
145
125
|
Logger({
|
|
146
126
|
level: "WARN",
|
|
147
|
-
message: "Response Validation Warnnings for
|
|
127
|
+
message: "Response Validation Warnnings for createCustomForm",
|
|
148
128
|
});
|
|
149
129
|
Logger({ level: "WARN", message: res_error });
|
|
150
130
|
}
|
|
@@ -154,14 +134,14 @@ class Lead {
|
|
|
154
134
|
|
|
155
135
|
/**
|
|
156
136
|
* @param {Object} arg - Arg object.
|
|
157
|
-
* @param {string} arg.id - Ticket ID
|
|
158
|
-
* @param {
|
|
159
|
-
* @returns {Promise<
|
|
160
|
-
* @summary:
|
|
161
|
-
* @description:
|
|
137
|
+
* @param {string} arg.id - Ticket ID for which history is created
|
|
138
|
+
* @param {TicketHistoryPayload} arg.body
|
|
139
|
+
* @returns {Promise<TicketHistory>} - Success response
|
|
140
|
+
* @summary: Create history for specific application level ticket
|
|
141
|
+
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
162
142
|
*/
|
|
163
|
-
async
|
|
164
|
-
const { error } = LeadValidator.
|
|
143
|
+
async createHistory({ id, body } = {}) {
|
|
144
|
+
const { error } = LeadValidator.createHistory().validate(
|
|
165
145
|
{
|
|
166
146
|
id,
|
|
167
147
|
body,
|
|
@@ -173,7 +153,7 @@ class Lead {
|
|
|
173
153
|
}
|
|
174
154
|
|
|
175
155
|
// Showing warrnings if extra unknown parameters are found
|
|
176
|
-
const { error: warrning } = LeadValidator.
|
|
156
|
+
const { error: warrning } = LeadValidator.createHistory().validate(
|
|
177
157
|
{
|
|
178
158
|
id,
|
|
179
159
|
body,
|
|
@@ -183,7 +163,7 @@ class Lead {
|
|
|
183
163
|
if (warrning) {
|
|
184
164
|
Logger({
|
|
185
165
|
level: "WARN",
|
|
186
|
-
message: "Parameter Validation warrnings for
|
|
166
|
+
message: "Parameter Validation warrnings for createHistory",
|
|
187
167
|
});
|
|
188
168
|
Logger({ level: "WARN", message: warrning });
|
|
189
169
|
}
|
|
@@ -192,13 +172,13 @@ class Lead {
|
|
|
192
172
|
|
|
193
173
|
const response = await PlatformAPIClient.execute(
|
|
194
174
|
this.config,
|
|
195
|
-
"
|
|
196
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
175
|
+
"post",
|
|
176
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
197
177
|
query_params,
|
|
198
178
|
body
|
|
199
179
|
);
|
|
200
180
|
|
|
201
|
-
const { error: res_error } = LeadModel.
|
|
181
|
+
const { error: res_error } = LeadModel.TicketHistory().validate(response, {
|
|
202
182
|
abortEarly: false,
|
|
203
183
|
allowUnknown: false,
|
|
204
184
|
});
|
|
@@ -206,7 +186,7 @@ class Lead {
|
|
|
206
186
|
if (res_error) {
|
|
207
187
|
Logger({
|
|
208
188
|
level: "WARN",
|
|
209
|
-
message: "Response Validation Warnnings for
|
|
189
|
+
message: "Response Validation Warnnings for createHistory",
|
|
210
190
|
});
|
|
211
191
|
Logger({ level: "WARN", message: res_error });
|
|
212
192
|
}
|
|
@@ -216,16 +196,16 @@ class Lead {
|
|
|
216
196
|
|
|
217
197
|
/**
|
|
218
198
|
* @param {Object} arg - Arg object.
|
|
219
|
-
* @param {string} arg.
|
|
220
|
-
* @param {
|
|
221
|
-
* @returns {Promise<
|
|
222
|
-
* @summary:
|
|
223
|
-
* @description:
|
|
199
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
200
|
+
* @param {EditCustomFormPayload} arg.body
|
|
201
|
+
* @returns {Promise<CustomForm>} - Success response
|
|
202
|
+
* @summary: Edit the given custom form
|
|
203
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
224
204
|
*/
|
|
225
|
-
async
|
|
226
|
-
const { error } = LeadValidator.
|
|
205
|
+
async editCustomForm({ slug, body } = {}) {
|
|
206
|
+
const { error } = LeadValidator.editCustomForm().validate(
|
|
227
207
|
{
|
|
228
|
-
|
|
208
|
+
slug,
|
|
229
209
|
body,
|
|
230
210
|
},
|
|
231
211
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -235,9 +215,9 @@ class Lead {
|
|
|
235
215
|
}
|
|
236
216
|
|
|
237
217
|
// Showing warrnings if extra unknown parameters are found
|
|
238
|
-
const { error: warrning } = LeadValidator.
|
|
218
|
+
const { error: warrning } = LeadValidator.editCustomForm().validate(
|
|
239
219
|
{
|
|
240
|
-
|
|
220
|
+
slug,
|
|
241
221
|
body,
|
|
242
222
|
},
|
|
243
223
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -245,7 +225,7 @@ class Lead {
|
|
|
245
225
|
if (warrning) {
|
|
246
226
|
Logger({
|
|
247
227
|
level: "WARN",
|
|
248
|
-
message: "Parameter Validation warrnings for
|
|
228
|
+
message: "Parameter Validation warrnings for editCustomForm",
|
|
249
229
|
});
|
|
250
230
|
Logger({ level: "WARN", message: warrning });
|
|
251
231
|
}
|
|
@@ -254,13 +234,13 @@ class Lead {
|
|
|
254
234
|
|
|
255
235
|
const response = await PlatformAPIClient.execute(
|
|
256
236
|
this.config,
|
|
257
|
-
"
|
|
258
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
237
|
+
"put",
|
|
238
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
259
239
|
query_params,
|
|
260
240
|
body
|
|
261
241
|
);
|
|
262
242
|
|
|
263
|
-
const { error: res_error } = LeadModel.
|
|
243
|
+
const { error: res_error } = LeadModel.CustomForm().validate(response, {
|
|
264
244
|
abortEarly: false,
|
|
265
245
|
allowUnknown: false,
|
|
266
246
|
});
|
|
@@ -268,7 +248,7 @@ class Lead {
|
|
|
268
248
|
if (res_error) {
|
|
269
249
|
Logger({
|
|
270
250
|
level: "WARN",
|
|
271
|
-
message: "Response Validation Warnnings for
|
|
251
|
+
message: "Response Validation Warnnings for editCustomForm",
|
|
272
252
|
});
|
|
273
253
|
Logger({ level: "WARN", message: res_error });
|
|
274
254
|
}
|
|
@@ -278,15 +258,17 @@ class Lead {
|
|
|
278
258
|
|
|
279
259
|
/**
|
|
280
260
|
* @param {Object} arg - Arg object.
|
|
281
|
-
* @param {string} arg.id - Ticket ID
|
|
282
|
-
* @
|
|
283
|
-
* @
|
|
284
|
-
* @
|
|
261
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
262
|
+
* @param {EditTicketPayload} arg.body
|
|
263
|
+
* @returns {Promise<Ticket>} - Success response
|
|
264
|
+
* @summary: Edits ticket details of a application level ticket
|
|
265
|
+
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
285
266
|
*/
|
|
286
|
-
async
|
|
287
|
-
const { error } = LeadValidator.
|
|
267
|
+
async editTicket({ id, body } = {}) {
|
|
268
|
+
const { error } = LeadValidator.editTicket().validate(
|
|
288
269
|
{
|
|
289
270
|
id,
|
|
271
|
+
body,
|
|
290
272
|
},
|
|
291
273
|
{ abortEarly: false, allowUnknown: true }
|
|
292
274
|
);
|
|
@@ -295,16 +277,17 @@ class Lead {
|
|
|
295
277
|
}
|
|
296
278
|
|
|
297
279
|
// Showing warrnings if extra unknown parameters are found
|
|
298
|
-
const { error: warrning } = LeadValidator.
|
|
280
|
+
const { error: warrning } = LeadValidator.editTicket().validate(
|
|
299
281
|
{
|
|
300
282
|
id,
|
|
283
|
+
body,
|
|
301
284
|
},
|
|
302
285
|
{ abortEarly: false, allowUnknown: false }
|
|
303
286
|
);
|
|
304
287
|
if (warrning) {
|
|
305
288
|
Logger({
|
|
306
289
|
level: "WARN",
|
|
307
|
-
message: "Parameter Validation warrnings for
|
|
290
|
+
message: "Parameter Validation warrnings for editTicket",
|
|
308
291
|
});
|
|
309
292
|
Logger({ level: "WARN", message: warrning });
|
|
310
293
|
}
|
|
@@ -313,15 +296,13 @@ class Lead {
|
|
|
313
296
|
|
|
314
297
|
const response = await PlatformAPIClient.execute(
|
|
315
298
|
this.config,
|
|
316
|
-
"
|
|
317
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}
|
|
299
|
+
"put",
|
|
300
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
318
301
|
query_params,
|
|
319
|
-
|
|
302
|
+
body
|
|
320
303
|
);
|
|
321
304
|
|
|
322
|
-
const {
|
|
323
|
-
error: res_error,
|
|
324
|
-
} = LeadModel.TicketHistoryList().validate(response, {
|
|
305
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
325
306
|
abortEarly: false,
|
|
326
307
|
allowUnknown: false,
|
|
327
308
|
});
|
|
@@ -329,7 +310,7 @@ class Lead {
|
|
|
329
310
|
if (res_error) {
|
|
330
311
|
Logger({
|
|
331
312
|
level: "WARN",
|
|
332
|
-
message: "Response Validation Warnnings for
|
|
313
|
+
message: "Response Validation Warnnings for editTicket",
|
|
333
314
|
});
|
|
334
315
|
Logger({ level: "WARN", message: res_error });
|
|
335
316
|
}
|
|
@@ -398,18 +379,13 @@ class Lead {
|
|
|
398
379
|
|
|
399
380
|
/**
|
|
400
381
|
* @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.
|
|
382
|
+
* @returns {Promise<CustomFormList>} - Success response
|
|
383
|
+
* @summary: Get list of custom form
|
|
384
|
+
* @description: Get list of custom form for given application
|
|
406
385
|
*/
|
|
407
|
-
async
|
|
408
|
-
const { error } = LeadValidator.
|
|
409
|
-
{
|
|
410
|
-
slug,
|
|
411
|
-
body,
|
|
412
|
-
},
|
|
386
|
+
async getCustomForms({} = {}) {
|
|
387
|
+
const { error } = LeadValidator.getCustomForms().validate(
|
|
388
|
+
{},
|
|
413
389
|
{ abortEarly: false, allowUnknown: true }
|
|
414
390
|
);
|
|
415
391
|
if (error) {
|
|
@@ -417,17 +393,14 @@ class Lead {
|
|
|
417
393
|
}
|
|
418
394
|
|
|
419
395
|
// Showing warrnings if extra unknown parameters are found
|
|
420
|
-
const { error: warrning } = LeadValidator.
|
|
421
|
-
{
|
|
422
|
-
slug,
|
|
423
|
-
body,
|
|
424
|
-
},
|
|
396
|
+
const { error: warrning } = LeadValidator.getCustomForms().validate(
|
|
397
|
+
{},
|
|
425
398
|
{ abortEarly: false, allowUnknown: false }
|
|
426
399
|
);
|
|
427
400
|
if (warrning) {
|
|
428
401
|
Logger({
|
|
429
402
|
level: "WARN",
|
|
430
|
-
message: "Parameter Validation warrnings for
|
|
403
|
+
message: "Parameter Validation warrnings for getCustomForms",
|
|
431
404
|
});
|
|
432
405
|
Logger({ level: "WARN", message: warrning });
|
|
433
406
|
}
|
|
@@ -436,13 +409,13 @@ class Lead {
|
|
|
436
409
|
|
|
437
410
|
const response = await PlatformAPIClient.execute(
|
|
438
411
|
this.config,
|
|
439
|
-
"
|
|
440
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form
|
|
412
|
+
"get",
|
|
413
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
441
414
|
query_params,
|
|
442
|
-
|
|
415
|
+
undefined
|
|
443
416
|
);
|
|
444
417
|
|
|
445
|
-
const { error: res_error } = LeadModel.
|
|
418
|
+
const { error: res_error } = LeadModel.CustomFormList().validate(response, {
|
|
446
419
|
abortEarly: false,
|
|
447
420
|
allowUnknown: false,
|
|
448
421
|
});
|
|
@@ -450,7 +423,7 @@ class Lead {
|
|
|
450
423
|
if (res_error) {
|
|
451
424
|
Logger({
|
|
452
425
|
level: "WARN",
|
|
453
|
-
message: "Response Validation Warnnings for
|
|
426
|
+
message: "Response Validation Warnnings for getCustomForms",
|
|
454
427
|
});
|
|
455
428
|
Logger({ level: "WARN", message: res_error });
|
|
456
429
|
}
|
|
@@ -460,13 +433,16 @@ class Lead {
|
|
|
460
433
|
|
|
461
434
|
/**
|
|
462
435
|
* @param {Object} arg - Arg object.
|
|
463
|
-
* @
|
|
464
|
-
* @
|
|
465
|
-
* @
|
|
436
|
+
* @param {string} arg.id - Tiket ID of the ticket to be fetched
|
|
437
|
+
* @returns {Promise<Ticket>} - Success response
|
|
438
|
+
* @summary: Retreives ticket details of a application level ticket
|
|
439
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
466
440
|
*/
|
|
467
|
-
async
|
|
468
|
-
const { error } = LeadValidator.
|
|
469
|
-
{
|
|
441
|
+
async getTicket({ id } = {}) {
|
|
442
|
+
const { error } = LeadValidator.getTicket().validate(
|
|
443
|
+
{
|
|
444
|
+
id,
|
|
445
|
+
},
|
|
470
446
|
{ abortEarly: false, allowUnknown: true }
|
|
471
447
|
);
|
|
472
448
|
if (error) {
|
|
@@ -474,14 +450,16 @@ class Lead {
|
|
|
474
450
|
}
|
|
475
451
|
|
|
476
452
|
// Showing warrnings if extra unknown parameters are found
|
|
477
|
-
const { error: warrning } = LeadValidator.
|
|
478
|
-
{
|
|
453
|
+
const { error: warrning } = LeadValidator.getTicket().validate(
|
|
454
|
+
{
|
|
455
|
+
id,
|
|
456
|
+
},
|
|
479
457
|
{ abortEarly: false, allowUnknown: false }
|
|
480
458
|
);
|
|
481
459
|
if (warrning) {
|
|
482
460
|
Logger({
|
|
483
461
|
level: "WARN",
|
|
484
|
-
message: "Parameter Validation warrnings for
|
|
462
|
+
message: "Parameter Validation warrnings for getTicket",
|
|
485
463
|
});
|
|
486
464
|
Logger({ level: "WARN", message: warrning });
|
|
487
465
|
}
|
|
@@ -491,12 +469,12 @@ class Lead {
|
|
|
491
469
|
const response = await PlatformAPIClient.execute(
|
|
492
470
|
this.config,
|
|
493
471
|
"get",
|
|
494
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
472
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
495
473
|
query_params,
|
|
496
474
|
undefined
|
|
497
475
|
);
|
|
498
476
|
|
|
499
|
-
const { error: res_error } = LeadModel.
|
|
477
|
+
const { error: res_error } = LeadModel.Ticket().validate(response, {
|
|
500
478
|
abortEarly: false,
|
|
501
479
|
allowUnknown: false,
|
|
502
480
|
});
|
|
@@ -504,7 +482,7 @@ class Lead {
|
|
|
504
482
|
if (res_error) {
|
|
505
483
|
Logger({
|
|
506
484
|
level: "WARN",
|
|
507
|
-
message: "Response Validation Warnnings for
|
|
485
|
+
message: "Response Validation Warnnings for getTicket",
|
|
508
486
|
});
|
|
509
487
|
Logger({ level: "WARN", message: res_error });
|
|
510
488
|
}
|
|
@@ -514,15 +492,15 @@ class Lead {
|
|
|
514
492
|
|
|
515
493
|
/**
|
|
516
494
|
* @param {Object} arg - Arg object.
|
|
517
|
-
* @param {
|
|
518
|
-
* @returns {Promise<
|
|
519
|
-
* @summary:
|
|
520
|
-
* @description:
|
|
495
|
+
* @param {string} arg.id - Ticket ID for which history is to be fetched
|
|
496
|
+
* @returns {Promise<TicketHistoryList>} - Success response
|
|
497
|
+
* @summary: Gets history list for specific application level ticket
|
|
498
|
+
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
521
499
|
*/
|
|
522
|
-
async
|
|
523
|
-
const { error } = LeadValidator.
|
|
500
|
+
async getTicketHistory({ id } = {}) {
|
|
501
|
+
const { error } = LeadValidator.getTicketHistory().validate(
|
|
524
502
|
{
|
|
525
|
-
|
|
503
|
+
id,
|
|
526
504
|
},
|
|
527
505
|
{ abortEarly: false, allowUnknown: true }
|
|
528
506
|
);
|
|
@@ -531,16 +509,16 @@ class Lead {
|
|
|
531
509
|
}
|
|
532
510
|
|
|
533
511
|
// Showing warrnings if extra unknown parameters are found
|
|
534
|
-
const { error: warrning } = LeadValidator.
|
|
512
|
+
const { error: warrning } = LeadValidator.getTicketHistory().validate(
|
|
535
513
|
{
|
|
536
|
-
|
|
514
|
+
id,
|
|
537
515
|
},
|
|
538
516
|
{ abortEarly: false, allowUnknown: false }
|
|
539
517
|
);
|
|
540
518
|
if (warrning) {
|
|
541
519
|
Logger({
|
|
542
520
|
level: "WARN",
|
|
543
|
-
message: "Parameter Validation warrnings for
|
|
521
|
+
message: "Parameter Validation warrnings for getTicketHistory",
|
|
544
522
|
});
|
|
545
523
|
Logger({ level: "WARN", message: warrning });
|
|
546
524
|
}
|
|
@@ -549,13 +527,15 @@ class Lead {
|
|
|
549
527
|
|
|
550
528
|
const response = await PlatformAPIClient.execute(
|
|
551
529
|
this.config,
|
|
552
|
-
"
|
|
553
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
530
|
+
"get",
|
|
531
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
554
532
|
query_params,
|
|
555
|
-
|
|
533
|
+
undefined
|
|
556
534
|
);
|
|
557
535
|
|
|
558
|
-
const {
|
|
536
|
+
const {
|
|
537
|
+
error: res_error,
|
|
538
|
+
} = LeadModel.TicketHistoryList().validate(response, {
|
|
559
539
|
abortEarly: false,
|
|
560
540
|
allowUnknown: false,
|
|
561
541
|
});
|
|
@@ -563,7 +543,7 @@ class Lead {
|
|
|
563
543
|
if (res_error) {
|
|
564
544
|
Logger({
|
|
565
545
|
level: "WARN",
|
|
566
|
-
message: "Response Validation Warnnings for
|
|
546
|
+
message: "Response Validation Warnnings for getTicketHistory",
|
|
567
547
|
});
|
|
568
548
|
Logger({ level: "WARN", message: res_error });
|
|
569
549
|
}
|
|
@@ -573,15 +553,27 @@ class Lead {
|
|
|
573
553
|
|
|
574
554
|
/**
|
|
575
555
|
* @param {Object} arg - Arg object.
|
|
576
|
-
* @param {
|
|
577
|
-
*
|
|
578
|
-
* @
|
|
579
|
-
*
|
|
556
|
+
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
557
|
+
* list of tickets
|
|
558
|
+
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
559
|
+
* the ticket filters
|
|
560
|
+
* @param {string} [arg.q] - Search through ticket titles and description
|
|
561
|
+
* @param {string} [arg.status] - Filter tickets on status
|
|
562
|
+
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
563
|
+
* @param {string} [arg.category] - Filter tickets on category
|
|
564
|
+
* @returns {Promise<TicketList>} - Success response
|
|
565
|
+
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
566
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
580
567
|
*/
|
|
581
|
-
async
|
|
582
|
-
const { error } = LeadValidator.
|
|
568
|
+
async getTickets({ items, filters, q, status, priority, category } = {}) {
|
|
569
|
+
const { error } = LeadValidator.getTickets().validate(
|
|
583
570
|
{
|
|
584
|
-
|
|
571
|
+
items,
|
|
572
|
+
filters,
|
|
573
|
+
q,
|
|
574
|
+
status,
|
|
575
|
+
priority,
|
|
576
|
+
category,
|
|
585
577
|
},
|
|
586
578
|
{ abortEarly: false, allowUnknown: true }
|
|
587
579
|
);
|
|
@@ -590,33 +582,42 @@ class Lead {
|
|
|
590
582
|
}
|
|
591
583
|
|
|
592
584
|
// Showing warrnings if extra unknown parameters are found
|
|
593
|
-
const { error: warrning } = LeadValidator.
|
|
585
|
+
const { error: warrning } = LeadValidator.getTickets().validate(
|
|
594
586
|
{
|
|
595
|
-
|
|
587
|
+
items,
|
|
588
|
+
filters,
|
|
589
|
+
q,
|
|
590
|
+
status,
|
|
591
|
+
priority,
|
|
592
|
+
category,
|
|
596
593
|
},
|
|
597
594
|
{ abortEarly: false, allowUnknown: false }
|
|
598
595
|
);
|
|
599
596
|
if (warrning) {
|
|
600
597
|
Logger({
|
|
601
598
|
level: "WARN",
|
|
602
|
-
message: "Parameter Validation warrnings for
|
|
599
|
+
message: "Parameter Validation warrnings for getTickets",
|
|
603
600
|
});
|
|
604
601
|
Logger({ level: "WARN", message: warrning });
|
|
605
602
|
}
|
|
606
603
|
|
|
607
604
|
const query_params = {};
|
|
605
|
+
query_params["items"] = items;
|
|
606
|
+
query_params["filters"] = filters;
|
|
607
|
+
query_params["q"] = q;
|
|
608
|
+
query_params["status"] = status;
|
|
609
|
+
query_params["priority"] = priority;
|
|
610
|
+
query_params["category"] = category;
|
|
608
611
|
|
|
609
612
|
const response = await PlatformAPIClient.execute(
|
|
610
613
|
this.config,
|
|
611
614
|
"get",
|
|
612
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
615
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
613
616
|
query_params,
|
|
614
617
|
undefined
|
|
615
618
|
);
|
|
616
619
|
|
|
617
|
-
const {
|
|
618
|
-
error: res_error,
|
|
619
|
-
} = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
|
|
620
|
+
const { error: res_error } = LeadModel.TicketList().validate(response, {
|
|
620
621
|
abortEarly: false,
|
|
621
622
|
allowUnknown: false,
|
|
622
623
|
});
|
|
@@ -624,7 +625,7 @@ class Lead {
|
|
|
624
625
|
if (res_error) {
|
|
625
626
|
Logger({
|
|
626
627
|
level: "WARN",
|
|
627
|
-
message: "Response Validation Warnnings for
|
|
628
|
+
message: "Response Validation Warnnings for getTickets",
|
|
628
629
|
});
|
|
629
630
|
Logger({ level: "WARN", message: res_error });
|
|
630
631
|
}
|
|
@@ -634,13 +635,13 @@ class Lead {
|
|
|
634
635
|
|
|
635
636
|
/**
|
|
636
637
|
* @param {Object} arg - Arg object.
|
|
637
|
-
* @param {string} arg.uniqueName - Unique name of
|
|
638
|
-
* @returns {Promise<
|
|
639
|
-
* @summary: Get
|
|
640
|
-
* @description: Get
|
|
638
|
+
* @param {string} arg.uniqueName - Unique name of video room
|
|
639
|
+
* @returns {Promise<GetTokenForVideoRoomResponse>} - Success response
|
|
640
|
+
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
641
|
+
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
|
|
641
642
|
*/
|
|
642
|
-
async
|
|
643
|
-
const { error } = LeadValidator.
|
|
643
|
+
async getTokenForVideoRoom({ uniqueName } = {}) {
|
|
644
|
+
const { error } = LeadValidator.getTokenForVideoRoom().validate(
|
|
644
645
|
{
|
|
645
646
|
uniqueName,
|
|
646
647
|
},
|
|
@@ -651,7 +652,7 @@ class Lead {
|
|
|
651
652
|
}
|
|
652
653
|
|
|
653
654
|
// Showing warrnings if extra unknown parameters are found
|
|
654
|
-
const { error: warrning } = LeadValidator.
|
|
655
|
+
const { error: warrning } = LeadValidator.getTokenForVideoRoom().validate(
|
|
655
656
|
{
|
|
656
657
|
uniqueName,
|
|
657
658
|
},
|
|
@@ -660,7 +661,7 @@ class Lead {
|
|
|
660
661
|
if (warrning) {
|
|
661
662
|
Logger({
|
|
662
663
|
level: "WARN",
|
|
663
|
-
message: "Parameter Validation warrnings for
|
|
664
|
+
message: "Parameter Validation warrnings for getTokenForVideoRoom",
|
|
664
665
|
});
|
|
665
666
|
Logger({ level: "WARN", message: warrning });
|
|
666
667
|
}
|
|
@@ -670,14 +671,14 @@ class Lead {
|
|
|
670
671
|
const response = await PlatformAPIClient.execute(
|
|
671
672
|
this.config,
|
|
672
673
|
"get",
|
|
673
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/
|
|
674
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
674
675
|
query_params,
|
|
675
676
|
undefined
|
|
676
677
|
);
|
|
677
678
|
|
|
678
679
|
const {
|
|
679
680
|
error: res_error,
|
|
680
|
-
} = LeadModel.
|
|
681
|
+
} = LeadModel.GetTokenForVideoRoomResponse().validate(response, {
|
|
681
682
|
abortEarly: false,
|
|
682
683
|
allowUnknown: false,
|
|
683
684
|
});
|
|
@@ -685,7 +686,7 @@ class Lead {
|
|
|
685
686
|
if (res_error) {
|
|
686
687
|
Logger({
|
|
687
688
|
level: "WARN",
|
|
688
|
-
message: "Response Validation Warnnings for
|
|
689
|
+
message: "Response Validation Warnnings for getTokenForVideoRoom",
|
|
689
690
|
});
|
|
690
691
|
Logger({ level: "WARN", message: res_error });
|
|
691
692
|
}
|
|
@@ -695,15 +696,15 @@ class Lead {
|
|
|
695
696
|
|
|
696
697
|
/**
|
|
697
698
|
* @param {Object} arg - Arg object.
|
|
698
|
-
* @param {
|
|
699
|
-
* @returns {Promise<
|
|
700
|
-
* @summary:
|
|
701
|
-
* @description:
|
|
699
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
700
|
+
* @returns {Promise<GetParticipantsInsideVideoRoomResponse>} - Success response
|
|
701
|
+
* @summary: Get participants of a specific Video Room using it's unique name
|
|
702
|
+
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
|
|
702
703
|
*/
|
|
703
|
-
async
|
|
704
|
-
const { error } = LeadValidator.
|
|
704
|
+
async getVideoParticipants({ uniqueName } = {}) {
|
|
705
|
+
const { error } = LeadValidator.getVideoParticipants().validate(
|
|
705
706
|
{
|
|
706
|
-
|
|
707
|
+
uniqueName,
|
|
707
708
|
},
|
|
708
709
|
{ abortEarly: false, allowUnknown: true }
|
|
709
710
|
);
|
|
@@ -712,16 +713,16 @@ class Lead {
|
|
|
712
713
|
}
|
|
713
714
|
|
|
714
715
|
// Showing warrnings if extra unknown parameters are found
|
|
715
|
-
const { error: warrning } = LeadValidator.
|
|
716
|
+
const { error: warrning } = LeadValidator.getVideoParticipants().validate(
|
|
716
717
|
{
|
|
717
|
-
|
|
718
|
+
uniqueName,
|
|
718
719
|
},
|
|
719
720
|
{ abortEarly: false, allowUnknown: false }
|
|
720
721
|
);
|
|
721
722
|
if (warrning) {
|
|
722
723
|
Logger({
|
|
723
724
|
level: "WARN",
|
|
724
|
-
message: "Parameter Validation warrnings for
|
|
725
|
+
message: "Parameter Validation warrnings for getVideoParticipants",
|
|
725
726
|
});
|
|
726
727
|
Logger({ level: "WARN", message: warrning });
|
|
727
728
|
}
|
|
@@ -730,15 +731,15 @@ class Lead {
|
|
|
730
731
|
|
|
731
732
|
const response = await PlatformAPIClient.execute(
|
|
732
733
|
this.config,
|
|
733
|
-
"
|
|
734
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
734
|
+
"get",
|
|
735
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
735
736
|
query_params,
|
|
736
|
-
|
|
737
|
+
undefined
|
|
737
738
|
);
|
|
738
739
|
|
|
739
740
|
const {
|
|
740
741
|
error: res_error,
|
|
741
|
-
} = LeadModel.
|
|
742
|
+
} = LeadModel.GetParticipantsInsideVideoRoomResponse().validate(response, {
|
|
742
743
|
abortEarly: false,
|
|
743
744
|
allowUnknown: false,
|
|
744
745
|
});
|
|
@@ -746,7 +747,7 @@ class Lead {
|
|
|
746
747
|
if (res_error) {
|
|
747
748
|
Logger({
|
|
748
749
|
level: "WARN",
|
|
749
|
-
message: "Response Validation Warnnings for
|
|
750
|
+
message: "Response Validation Warnnings for getVideoParticipants",
|
|
750
751
|
});
|
|
751
752
|
Logger({ level: "WARN", message: res_error });
|
|
752
753
|
}
|
|
@@ -756,15 +757,15 @@ class Lead {
|
|
|
756
757
|
|
|
757
758
|
/**
|
|
758
759
|
* @param {Object} arg - Arg object.
|
|
759
|
-
* @param {
|
|
760
|
-
* @returns {Promise<
|
|
761
|
-
* @summary:
|
|
762
|
-
* @description:
|
|
760
|
+
* @param {CreateVideoRoomPayload} arg.body
|
|
761
|
+
* @returns {Promise<CreateVideoRoomResponse>} - Success response
|
|
762
|
+
* @summary: Open a video room.
|
|
763
|
+
* @description: Open a video room.
|
|
763
764
|
*/
|
|
764
|
-
async
|
|
765
|
-
const { error } = LeadValidator.
|
|
765
|
+
async openVideoRoom({ body } = {}) {
|
|
766
|
+
const { error } = LeadValidator.openVideoRoom().validate(
|
|
766
767
|
{
|
|
767
|
-
|
|
768
|
+
body,
|
|
768
769
|
},
|
|
769
770
|
{ abortEarly: false, allowUnknown: true }
|
|
770
771
|
);
|
|
@@ -773,16 +774,16 @@ class Lead {
|
|
|
773
774
|
}
|
|
774
775
|
|
|
775
776
|
// Showing warrnings if extra unknown parameters are found
|
|
776
|
-
const { error: warrning } = LeadValidator.
|
|
777
|
+
const { error: warrning } = LeadValidator.openVideoRoom().validate(
|
|
777
778
|
{
|
|
778
|
-
|
|
779
|
+
body,
|
|
779
780
|
},
|
|
780
781
|
{ abortEarly: false, allowUnknown: false }
|
|
781
782
|
);
|
|
782
783
|
if (warrning) {
|
|
783
784
|
Logger({
|
|
784
785
|
level: "WARN",
|
|
785
|
-
message: "Parameter Validation warrnings for
|
|
786
|
+
message: "Parameter Validation warrnings for openVideoRoom",
|
|
786
787
|
});
|
|
787
788
|
Logger({ level: "WARN", message: warrning });
|
|
788
789
|
}
|
|
@@ -791,15 +792,15 @@ class Lead {
|
|
|
791
792
|
|
|
792
793
|
const response = await PlatformAPIClient.execute(
|
|
793
794
|
this.config,
|
|
794
|
-
"
|
|
795
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room
|
|
795
|
+
"post",
|
|
796
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
796
797
|
query_params,
|
|
797
|
-
|
|
798
|
+
body
|
|
798
799
|
);
|
|
799
800
|
|
|
800
801
|
const {
|
|
801
802
|
error: res_error,
|
|
802
|
-
} = LeadModel.
|
|
803
|
+
} = LeadModel.CreateVideoRoomResponse().validate(response, {
|
|
803
804
|
abortEarly: false,
|
|
804
805
|
allowUnknown: false,
|
|
805
806
|
});
|
|
@@ -807,7 +808,7 @@ class Lead {
|
|
|
807
808
|
if (res_error) {
|
|
808
809
|
Logger({
|
|
809
810
|
level: "WARN",
|
|
810
|
-
message: "Response Validation Warnnings for
|
|
811
|
+
message: "Response Validation Warnnings for openVideoRoom",
|
|
811
812
|
});
|
|
812
813
|
Logger({ level: "WARN", message: res_error });
|
|
813
814
|
}
|
|
@@ -815,4 +816,5 @@ class Lead {
|
|
|
815
816
|
return response;
|
|
816
817
|
}
|
|
817
818
|
}
|
|
819
|
+
|
|
818
820
|
module.exports = Lead;
|