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