@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -1,31 +1,483 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @typedef AddTicketPayload
|
|
5
|
+
* @property {Object} [_custom_json] - Optional custom data that needs to be sent
|
|
6
|
+
* @property {string} category - Category of the ticket
|
|
7
|
+
* @property {TicketContent} content - Content for the ticket
|
|
8
|
+
* @property {Object} [created_by] - Creator of the ticket
|
|
9
|
+
* @property {PriorityEnum} [priority] - Priority of the ticket
|
|
10
|
+
* @property {string} [status] - Status of the ticket
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef AgentChangePayload
|
|
15
|
+
* @property {string} agent_id - Agent's unique ID
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef CategoryData
|
|
20
|
+
* @property {TicketCategory} [list]
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef CloseVideoRoomResponse
|
|
25
|
+
* @property {boolean} success - Denotes if operation was successfully
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef CommunicationDetails
|
|
30
|
+
* @property {string} [description] - Short description for the communication method
|
|
31
|
+
* @property {boolean} [enabled] - Denotes if this communication method has to be shown
|
|
32
|
+
* @property {string} [title] - Title for the communication method
|
|
33
|
+
* @property {string} [type] - Enum type for the communication method
|
|
34
|
+
* @property {string} [value] - Value for the communication method
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @typedef CreateCustomFormPayload
|
|
39
|
+
* @property {string} [description] - Description of the form
|
|
40
|
+
* @property {string} [header_image] - Header image that is to be shown for the form
|
|
41
|
+
* @property {Object[]} inputs - List of all the form components
|
|
42
|
+
* @property {PollForAssignment} [poll_for_assignment] - Describes how polling
|
|
43
|
+
* will be done for the tickets createds
|
|
44
|
+
* @property {PriorityEnum} priority - Describes the priority of the tickets
|
|
45
|
+
* created by the form
|
|
46
|
+
* @property {boolean} [should_notify] - Indicates if staff should be notified
|
|
47
|
+
* when a response is received
|
|
48
|
+
* @property {string} slug - Slug for the form
|
|
49
|
+
* @property {string} [success_message] - Success message that will be shown on submission
|
|
50
|
+
* @property {string} title - Title for the form
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef CreatedOn
|
|
55
|
+
* @property {string} user_agent - Useragent details
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @typedef CreateVideoRoomPayload
|
|
60
|
+
* @property {NotifyUser[]} [notify] - List of people to be notified
|
|
61
|
+
* @property {string} unique_name - Ticket id
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @typedef CreateVideoRoomResponse
|
|
66
|
+
* @property {string} unique_name - Video Room's unique name
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @typedef CustomForm
|
|
71
|
+
* @property {string} _id - Unique identifier for the form
|
|
72
|
+
* @property {string} application_id - Application ID for form
|
|
73
|
+
* @property {CreatedOn} [created_on] - Gives details of when the form was created
|
|
74
|
+
* @property {string} [description] - Form description that will be shown to the user
|
|
75
|
+
* @property {string} [header_image] - Form header image that will be shown to the user
|
|
76
|
+
* @property {Object[]} inputs - List of all the form fields
|
|
77
|
+
* @property {boolean} login_required - Denotes if login is required to make a
|
|
78
|
+
* form response submission
|
|
79
|
+
* @property {PollForAssignment} [poll_for_assignment] - Details of how polling
|
|
80
|
+
* should be done for support
|
|
81
|
+
* @property {Priority} priority - Sets priority of tickets created by form response
|
|
82
|
+
* @property {boolean} should_notify - Denotes if new response submission for
|
|
83
|
+
* the form should be notified to the assignees
|
|
84
|
+
* @property {string} slug - Slug for the form, which is to be used for accessing the form
|
|
85
|
+
* @property {SubmitButton} [submit_button] - Details for submit button
|
|
86
|
+
* @property {string} [success_message] - Message that is to be shown on
|
|
87
|
+
* succesfull form response submission
|
|
88
|
+
* @property {string} title - Form title that will be shown to the user
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @typedef CustomFormList
|
|
93
|
+
* @property {CustomForm[]} [items] - List of forms
|
|
94
|
+
* @property {Page} [page] - Describes the pagination state
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @typedef CustomFormSubmissionPayload
|
|
99
|
+
* @property {TicketAsset[]} [attachments] - List of all attachments related to the form
|
|
100
|
+
* @property {Object[]} response - Form response
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @typedef Debug
|
|
105
|
+
* @property {string} [platform] - Platform of user
|
|
106
|
+
* @property {string} [source] - Source of user
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @typedef EditCustomFormPayload
|
|
111
|
+
* @property {string} [description] - Description of the form
|
|
112
|
+
* @property {string} [header_image] - Header image that is to be shown for the form
|
|
113
|
+
* @property {Object[]} inputs - List of all the form components
|
|
114
|
+
* @property {boolean} [login_required] - Denotes if login is required to make a
|
|
115
|
+
* form response submission
|
|
116
|
+
* @property {PollForAssignment} [poll_for_assignment] - Describes how polling
|
|
117
|
+
* will be done for the tickets createds
|
|
118
|
+
* @property {PriorityEnum} priority - Describes the priority of the tickets
|
|
119
|
+
* created by the form
|
|
120
|
+
* @property {boolean} [should_notify] - Indicates if staff should be notified
|
|
121
|
+
* when a response is received
|
|
122
|
+
* @property {string} [success_message] - Success message that will be shown on submission
|
|
123
|
+
* @property {string} title - Title for the form
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @typedef EditTicketPayload
|
|
128
|
+
* @property {AgentChangePayload} [assigned_to] - Details of support staff to
|
|
129
|
+
* whom ticket is assigned
|
|
130
|
+
* @property {string} [category] - Category assigned to the ticket
|
|
131
|
+
* @property {TicketContent} [content] - Ticket conetent details
|
|
132
|
+
* @property {PriorityEnum} [priority] - Denotes the priority of ticket
|
|
133
|
+
* @property {string} [source] - Denotes if the ticket was created at company or
|
|
134
|
+
* application level
|
|
135
|
+
* @property {string} [status] - Denotes in what state is the ticket
|
|
136
|
+
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
137
|
+
* @property {string[]} [tags] - Tags relevant to ticket
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @typedef Email
|
|
142
|
+
* @property {boolean} [active] - Denotes if the email is active
|
|
143
|
+
* @property {string} [email] - Email Address
|
|
144
|
+
* @property {boolean} [primary] - Denotes it's the primary email for the account
|
|
145
|
+
* @property {boolean} [verified] - Denotes it's a verified email
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @typedef FeedbackForm
|
|
150
|
+
* @property {Object} [inputs] - Input details for the feed back form
|
|
151
|
+
* @property {Object} [timestamps] - Gives details of category releted data
|
|
152
|
+
* @property {string} [title] - Title for the feed back form
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @typedef FeedbackResponseItem
|
|
157
|
+
* @property {string} display - Question/Title of the form field
|
|
158
|
+
* @property {string} key - Key of the form field
|
|
159
|
+
* @property {string} value - User response value for the form field
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @typedef Filter
|
|
164
|
+
* @property {Object[]} assignees - List of support staff availble for tickets assignment
|
|
165
|
+
* @property {TicketCategory[]} [categories] - List of possible categories for tickets
|
|
166
|
+
* @property {Priority[]} priorities - List of possible priorities for tickets
|
|
167
|
+
* @property {Status[]} statuses - List of possible statuses for tickets
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @typedef GetParticipantsInsideVideoRoomResponse
|
|
172
|
+
* @property {Participant[]} participants - List of participants of the video room
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @typedef GetTokenForVideoRoomResponse
|
|
177
|
+
* @property {string} access_token - Access token to be used for video room
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @typedef IntegrationConfig
|
|
182
|
+
* @property {string} [_id] - Unique id
|
|
183
|
+
* @property {boolean} allow_ticket_creation - Denotes ticket creation enable or
|
|
184
|
+
* disable on platform
|
|
185
|
+
* @property {string} [base_url] - Integration base url for validate and create ticket
|
|
186
|
+
* @property {CategoryData} [category_data] - Support category array list details
|
|
187
|
+
* @property {string} [category_sync_apikey] - Integration apikey to sync
|
|
188
|
+
* category of selected type
|
|
189
|
+
* @property {boolean} [config_completed] - Denotes the current intergration is
|
|
190
|
+
* completed or partially done
|
|
191
|
+
* @property {string} [create_ticket_apikey] - Integration apikey to validate
|
|
192
|
+
* and create ticket
|
|
193
|
+
* @property {string} integration_type - Enum string values for integration
|
|
194
|
+
* @property {boolean} show_listing - Denotes ticket listing enable or disable on platform
|
|
195
|
+
* @property {string} [update_ticket_apikey] - Integration apikey to update ticket
|
|
196
|
+
* @property {string} [webhook_apikey] - Integration webhook apikey to got
|
|
197
|
+
* callbacks from integration type dashboard like freshdesk, etc
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @typedef NotifyUser
|
|
202
|
+
* @property {string} country_code - Country code
|
|
203
|
+
* @property {string} phone_number - Phone number
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @typedef Page
|
|
208
|
+
* @property {number} [current]
|
|
209
|
+
* @property {boolean} [has_next]
|
|
210
|
+
* @property {boolean} [has_previous]
|
|
211
|
+
* @property {number} [item_total]
|
|
212
|
+
* @property {string} [next_id]
|
|
213
|
+
* @property {number} [size]
|
|
214
|
+
* @property {string} type
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @typedef Participant
|
|
219
|
+
* @property {string} [identity] - Unique identifier of participant
|
|
220
|
+
* @property {string} [status] - Status of participant
|
|
221
|
+
* @property {UserSchema} [user] - Details of participant
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @typedef PhoneNumber
|
|
226
|
+
* @property {boolean} [active] - Denotes if the phone number is active
|
|
227
|
+
* @property {number} [country_code] - Country code
|
|
228
|
+
* @property {string} [phone] - Phone number
|
|
229
|
+
* @property {boolean} [primary] - Denotes it's the primary phone number for the account
|
|
230
|
+
* @property {boolean} [verified] - Denotes it's a verified phone number
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @typedef PollForAssignment
|
|
235
|
+
* @property {number} duration - Duration for polling of staff
|
|
236
|
+
* @property {string} failure_message - Message if polling failed
|
|
237
|
+
* @property {string} message - Message for polling
|
|
238
|
+
* @property {string} success_message - Message for successful polling
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @typedef Priority
|
|
243
|
+
* @property {string} color - Color for priority
|
|
244
|
+
* @property {string} display - Display text for priority
|
|
245
|
+
* @property {PriorityEnum} key - Key for priority
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @typedef Status
|
|
250
|
+
* @property {string} color - Color for status
|
|
251
|
+
* @property {string} display - Display text for status
|
|
252
|
+
* @property {string} key - Key for status
|
|
253
|
+
*/
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @typedef SubmitButton
|
|
257
|
+
* @property {string} background_color - Color for submit button
|
|
258
|
+
* @property {string} title - Title for submit button
|
|
259
|
+
* @property {string} title_color - Title color submit button
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @typedef SubmitCustomFormResponse
|
|
264
|
+
* @property {string} message - Success message for form submission
|
|
265
|
+
* @property {Ticket} [ticket] - Ticket created on form submission
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @typedef SupportGeneralConfig
|
|
270
|
+
* @property {string} [_id] - Unique id
|
|
271
|
+
* @property {Object} [integration] - Contains integrations basic information
|
|
272
|
+
* @property {boolean} [show_communication_info] - Denotes if support
|
|
273
|
+
* communication info should be shown
|
|
274
|
+
* @property {boolean} [show_support_dris] - Denotes if support DRIS info should be shown
|
|
275
|
+
* @property {CommunicationDetails} [support_communication] - Support
|
|
276
|
+
* communication array list details
|
|
277
|
+
* @property {CommunicationDetails} [support_email] - Support e-mail details
|
|
278
|
+
* @property {CommunicationDetails} [support_faq] - Support FAQ details
|
|
279
|
+
* @property {CommunicationDetails} [support_phone] - Support Phone number details
|
|
280
|
+
* @property {string} [type] - The enity/platform for which the config is stored
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @typedef Ticket
|
|
285
|
+
* @property {Object} [_custom_json] - Custom json relevant to the ticket
|
|
286
|
+
* @property {string} _id - Unique identifier for the ticket
|
|
287
|
+
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
288
|
+
* @property {TicketCategory} category - Category assigned to the ticket
|
|
289
|
+
* @property {TicketContent} [content] - Ticket conetent details
|
|
290
|
+
* @property {TicketContext} [context] - Details of company and application
|
|
291
|
+
* realated to the ticket
|
|
292
|
+
* @property {string} [created_at] - Time when the ticket was created
|
|
293
|
+
* @property {Object} [created_by] - User details of ticket creator
|
|
294
|
+
* @property {CreatedOn} [created_on] - Details of company and application
|
|
295
|
+
* realated to the ticket
|
|
296
|
+
* @property {Object} [integration] - Integration type and its details of the ticket
|
|
297
|
+
* @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
|
|
298
|
+
* pending for the ticket
|
|
299
|
+
* @property {Priority} priority - Denotes the priority of ticket
|
|
300
|
+
* @property {string} [response_id] - Details of company and application
|
|
301
|
+
* realated to the ticket
|
|
302
|
+
* @property {TicketSourceEnum} source - Denotes if the ticket was created at
|
|
303
|
+
* company or application level
|
|
304
|
+
* @property {Status} status - Denotes in what state is the ticket
|
|
305
|
+
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
306
|
+
* @property {string[]} [tags] - Tags relevant to ticket
|
|
307
|
+
* @property {string} [updated_at] - Time when the ticket was last updated
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @typedef TicketAsset
|
|
312
|
+
* @property {string} [display] - Display text for asset
|
|
313
|
+
* @property {TicketAssetTypeEnum} type - Type of asset
|
|
314
|
+
* @property {string} value - To be used for details
|
|
315
|
+
*/
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @typedef TicketCategory
|
|
319
|
+
* @property {string} display - Category display value identifier
|
|
320
|
+
* @property {FeedbackForm} [feedback_form] - Support category array list details
|
|
321
|
+
* @property {number} [group_id] - Group id of category releted data
|
|
322
|
+
* @property {string} key - Category key value identifier
|
|
323
|
+
* @property {TicketCategory} [sub_categories] - Support category array list details
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @typedef TicketContent
|
|
328
|
+
* @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket
|
|
329
|
+
* @property {string} [description] - Long description of issue
|
|
330
|
+
* @property {string} title - Title for ticket
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @typedef TicketContext
|
|
335
|
+
* @property {string} [application_id] - Application ID related to the ticket
|
|
336
|
+
* @property {string} company_id - Company ID related to the ticket
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* @typedef TicketFeedback
|
|
341
|
+
* @property {string} _id - Unique identifier for the feedback
|
|
342
|
+
* @property {string} [category] - Category of the ticket
|
|
343
|
+
* @property {string} company_id - Company id for which ticket was raised
|
|
344
|
+
* @property {string} [created_at] - Time when the feedback was created
|
|
345
|
+
* @property {FeedbackResponseItem[]} response
|
|
346
|
+
* @property {string} ticket_id - Readable ticket number
|
|
347
|
+
* @property {string} [updated_at] - Time when the feedback was last updated
|
|
348
|
+
* @property {Object} [user] - User who submitted the feedback
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @typedef TicketFeedbackForm
|
|
353
|
+
* @property {Object[]} [display] - List of all the form fields
|
|
354
|
+
* @property {string} title - Feedback form title that will be shown to the user
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @typedef TicketFeedbackList
|
|
359
|
+
* @property {TicketFeedback[]} [items] - List of all ticket feedback for the ticket
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @typedef TicketFeedbackPayload
|
|
364
|
+
* @property {Object} [form_response] - Key-value pairs of all the form fields
|
|
365
|
+
* and their response
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @typedef TicketHistory
|
|
370
|
+
* @property {string} _id - Unique identifier of the history event
|
|
371
|
+
* @property {string} [created_at] - Time of creation of the history event
|
|
372
|
+
* @property {Object} [created_by] - User who created the history event
|
|
373
|
+
* @property {CreatedOn} [created_on] - Time of creation of the history event
|
|
374
|
+
* @property {string} ticket_id - Readable ticket number
|
|
375
|
+
* @property {string} type - Type of the history event
|
|
376
|
+
* @property {string} [updated_at] - Time of last update of the history event
|
|
377
|
+
* @property {Object} value - Data of the history event
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @typedef TicketHistoryList
|
|
382
|
+
* @property {TicketHistory[]} [items] - List of ticket history
|
|
383
|
+
* @property {Page} [page] - Describes the pagination state
|
|
384
|
+
*/
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @typedef TicketHistoryPayload
|
|
388
|
+
* @property {HistoryTypeEnum} type - Type of history event
|
|
389
|
+
* @property {Object} value - Details of history event
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @typedef TicketList
|
|
394
|
+
* @property {Filter} [filters] - All the filters available for tickets
|
|
395
|
+
* @property {Ticket[]} [items] - List of tickets
|
|
396
|
+
* @property {Page} [page] - Describes the pagination state
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @typedef TicketSubCategory
|
|
401
|
+
* @property {string} display - Display text for sub-category
|
|
402
|
+
* @property {string} key - Key for sub-category
|
|
403
|
+
* @property {TicketSubCategory} [sub_categories]
|
|
404
|
+
*/
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @typedef UserSchema
|
|
408
|
+
* @property {string} [_id]
|
|
409
|
+
* @property {string} [account_type]
|
|
410
|
+
* @property {boolean} [active]
|
|
411
|
+
* @property {string} [application_id]
|
|
412
|
+
* @property {string} [created_at]
|
|
413
|
+
* @property {string} [dob]
|
|
414
|
+
* @property {Email[]} [emails]
|
|
415
|
+
* @property {string} [first_name]
|
|
416
|
+
* @property {string} [gender]
|
|
417
|
+
* @property {string} [last_name]
|
|
418
|
+
* @property {Object} [meta]
|
|
419
|
+
* @property {PhoneNumber[]} [phone_numbers]
|
|
420
|
+
* @property {string} [profile_pic_url]
|
|
421
|
+
* @property {string} [updated_at]
|
|
422
|
+
* @property {string} [user_id]
|
|
423
|
+
* @property {string} [username]
|
|
424
|
+
*/
|
|
425
|
+
|
|
426
|
+
/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */
|
|
427
|
+
|
|
428
|
+
/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @typedef {| "image"
|
|
432
|
+
* | "video"
|
|
433
|
+
* | "file"
|
|
434
|
+
* | "youtube"
|
|
435
|
+
* | "product"
|
|
436
|
+
* | "collection"
|
|
437
|
+
* | "brand"
|
|
438
|
+
* | "shipment"
|
|
439
|
+
* | "order"} TicketAssetTypeEnum
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
/** @typedef {"default" | "freshdesk" | "kapture"} TicketIntegrationDetails */
|
|
443
|
+
|
|
444
|
+
/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */
|
|
445
|
+
|
|
446
|
+
class LeadPlatformModel {
|
|
447
|
+
/** @returns {AddTicketPayload} */
|
|
4
448
|
static AddTicketPayload() {
|
|
5
449
|
return Joi.object({
|
|
6
450
|
_custom_json: Joi.any(),
|
|
7
451
|
category: Joi.string().allow("").required(),
|
|
8
|
-
content:
|
|
452
|
+
content: LeadPlatformModel.TicketContent().required(),
|
|
9
453
|
created_by: Joi.any(),
|
|
10
|
-
priority:
|
|
454
|
+
priority: LeadPlatformModel.PriorityEnum(),
|
|
11
455
|
status: Joi.string().allow(""),
|
|
12
456
|
});
|
|
13
457
|
}
|
|
458
|
+
|
|
459
|
+
/** @returns {AgentChangePayload} */
|
|
14
460
|
static AgentChangePayload() {
|
|
15
461
|
return Joi.object({
|
|
16
462
|
agent_id: Joi.string().allow("").required(),
|
|
17
463
|
});
|
|
18
464
|
}
|
|
465
|
+
|
|
466
|
+
/** @returns {CategoryData} */
|
|
19
467
|
static CategoryData() {
|
|
20
468
|
return Joi.object({
|
|
21
|
-
list:
|
|
469
|
+
list: LeadPlatformModel.TicketCategory(),
|
|
22
470
|
});
|
|
23
471
|
}
|
|
472
|
+
|
|
473
|
+
/** @returns {CloseVideoRoomResponse} */
|
|
24
474
|
static CloseVideoRoomResponse() {
|
|
25
475
|
return Joi.object({
|
|
26
476
|
success: Joi.boolean().required(),
|
|
27
477
|
});
|
|
28
478
|
}
|
|
479
|
+
|
|
480
|
+
/** @returns {CommunicationDetails} */
|
|
29
481
|
static CommunicationDetails() {
|
|
30
482
|
return Joi.object({
|
|
31
483
|
description: Joi.string().allow(""),
|
|
@@ -35,96 +487,118 @@ class LeadModel {
|
|
|
35
487
|
value: Joi.string().allow(""),
|
|
36
488
|
});
|
|
37
489
|
}
|
|
490
|
+
|
|
491
|
+
/** @returns {CreateCustomFormPayload} */
|
|
38
492
|
static CreateCustomFormPayload() {
|
|
39
493
|
return Joi.object({
|
|
40
494
|
description: Joi.string().allow(""),
|
|
41
495
|
header_image: Joi.string().allow(""),
|
|
42
496
|
inputs: Joi.array().items(Joi.any()).required(),
|
|
43
|
-
poll_for_assignment:
|
|
44
|
-
priority:
|
|
497
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
498
|
+
priority: LeadPlatformModel.PriorityEnum().required(),
|
|
45
499
|
should_notify: Joi.boolean(),
|
|
46
500
|
slug: Joi.string().allow("").required(),
|
|
47
501
|
success_message: Joi.string().allow(""),
|
|
48
502
|
title: Joi.string().allow("").required(),
|
|
49
503
|
});
|
|
50
504
|
}
|
|
505
|
+
|
|
506
|
+
/** @returns {CreatedOn} */
|
|
51
507
|
static CreatedOn() {
|
|
52
508
|
return Joi.object({
|
|
53
509
|
user_agent: Joi.string().allow("").required(),
|
|
54
510
|
});
|
|
55
511
|
}
|
|
512
|
+
|
|
513
|
+
/** @returns {CreateVideoRoomPayload} */
|
|
56
514
|
static CreateVideoRoomPayload() {
|
|
57
515
|
return Joi.object({
|
|
58
|
-
notify: Joi.array().items(
|
|
516
|
+
notify: Joi.array().items(LeadPlatformModel.NotifyUser()),
|
|
59
517
|
unique_name: Joi.string().allow("").required(),
|
|
60
518
|
});
|
|
61
519
|
}
|
|
520
|
+
|
|
521
|
+
/** @returns {CreateVideoRoomResponse} */
|
|
62
522
|
static CreateVideoRoomResponse() {
|
|
63
523
|
return Joi.object({
|
|
64
524
|
unique_name: Joi.string().allow("").required(),
|
|
65
525
|
});
|
|
66
526
|
}
|
|
527
|
+
|
|
528
|
+
/** @returns {CustomForm} */
|
|
67
529
|
static CustomForm() {
|
|
68
530
|
return Joi.object({
|
|
69
531
|
_id: Joi.string().allow("").required(),
|
|
70
532
|
application_id: Joi.string().allow("").required(),
|
|
71
|
-
created_on:
|
|
533
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
72
534
|
description: Joi.string().allow(""),
|
|
73
535
|
header_image: Joi.string().allow(""),
|
|
74
536
|
inputs: Joi.array().items(Joi.any()).required(),
|
|
75
537
|
login_required: Joi.boolean().required(),
|
|
76
|
-
poll_for_assignment:
|
|
77
|
-
priority:
|
|
538
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
539
|
+
priority: LeadPlatformModel.Priority().required(),
|
|
78
540
|
should_notify: Joi.boolean().required(),
|
|
79
541
|
slug: Joi.string().allow("").required(),
|
|
80
|
-
submit_button:
|
|
542
|
+
submit_button: LeadPlatformModel.SubmitButton(),
|
|
81
543
|
success_message: Joi.string().allow(""),
|
|
82
544
|
title: Joi.string().allow("").required(),
|
|
83
545
|
});
|
|
84
546
|
}
|
|
547
|
+
|
|
548
|
+
/** @returns {CustomFormList} */
|
|
85
549
|
static CustomFormList() {
|
|
86
550
|
return Joi.object({
|
|
87
|
-
items: Joi.array().items(
|
|
88
|
-
page:
|
|
551
|
+
items: Joi.array().items(LeadPlatformModel.CustomForm()),
|
|
552
|
+
page: LeadPlatformModel.Page(),
|
|
89
553
|
});
|
|
90
554
|
}
|
|
555
|
+
|
|
556
|
+
/** @returns {CustomFormSubmissionPayload} */
|
|
91
557
|
static CustomFormSubmissionPayload() {
|
|
92
558
|
return Joi.object({
|
|
93
|
-
attachments: Joi.array().items(
|
|
559
|
+
attachments: Joi.array().items(LeadPlatformModel.TicketAsset()),
|
|
94
560
|
response: Joi.array().items(Joi.any()).required(),
|
|
95
561
|
});
|
|
96
562
|
}
|
|
563
|
+
|
|
564
|
+
/** @returns {Debug} */
|
|
97
565
|
static Debug() {
|
|
98
566
|
return Joi.object({
|
|
99
567
|
platform: Joi.string().allow(""),
|
|
100
568
|
source: Joi.string().allow(""),
|
|
101
569
|
});
|
|
102
570
|
}
|
|
571
|
+
|
|
572
|
+
/** @returns {EditCustomFormPayload} */
|
|
103
573
|
static EditCustomFormPayload() {
|
|
104
574
|
return Joi.object({
|
|
105
575
|
description: Joi.string().allow(""),
|
|
106
576
|
header_image: Joi.string().allow(""),
|
|
107
577
|
inputs: Joi.array().items(Joi.any()).required(),
|
|
108
578
|
login_required: Joi.boolean(),
|
|
109
|
-
poll_for_assignment:
|
|
110
|
-
priority:
|
|
579
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
580
|
+
priority: LeadPlatformModel.PriorityEnum().required(),
|
|
111
581
|
should_notify: Joi.boolean(),
|
|
112
582
|
success_message: Joi.string().allow(""),
|
|
113
583
|
title: Joi.string().allow("").required(),
|
|
114
584
|
});
|
|
115
585
|
}
|
|
586
|
+
|
|
587
|
+
/** @returns {EditTicketPayload} */
|
|
116
588
|
static EditTicketPayload() {
|
|
117
589
|
return Joi.object({
|
|
118
|
-
assigned_to:
|
|
590
|
+
assigned_to: LeadPlatformModel.AgentChangePayload(),
|
|
119
591
|
category: Joi.string().allow(""),
|
|
120
|
-
content:
|
|
121
|
-
priority:
|
|
592
|
+
content: LeadPlatformModel.TicketContent(),
|
|
593
|
+
priority: LeadPlatformModel.PriorityEnum(),
|
|
122
594
|
source: Joi.string().allow(""),
|
|
123
595
|
status: Joi.string().allow(""),
|
|
124
596
|
sub_category: Joi.string().allow(""),
|
|
125
597
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
126
598
|
});
|
|
127
599
|
}
|
|
600
|
+
|
|
601
|
+
/** @returns {Email} */
|
|
128
602
|
static Email() {
|
|
129
603
|
return Joi.object({
|
|
130
604
|
active: Joi.boolean(),
|
|
@@ -133,6 +607,8 @@ class LeadModel {
|
|
|
133
607
|
verified: Joi.boolean(),
|
|
134
608
|
});
|
|
135
609
|
}
|
|
610
|
+
|
|
611
|
+
/** @returns {FeedbackForm} */
|
|
136
612
|
static FeedbackForm() {
|
|
137
613
|
return Joi.object({
|
|
138
614
|
inputs: Joi.any(),
|
|
@@ -140,6 +616,8 @@ class LeadModel {
|
|
|
140
616
|
title: Joi.string().allow(""),
|
|
141
617
|
});
|
|
142
618
|
}
|
|
619
|
+
|
|
620
|
+
/** @returns {FeedbackResponseItem} */
|
|
143
621
|
static FeedbackResponseItem() {
|
|
144
622
|
return Joi.object({
|
|
145
623
|
display: Joi.string().allow("").required(),
|
|
@@ -147,30 +625,40 @@ class LeadModel {
|
|
|
147
625
|
value: Joi.string().allow("").required(),
|
|
148
626
|
});
|
|
149
627
|
}
|
|
628
|
+
|
|
629
|
+
/** @returns {Filter} */
|
|
150
630
|
static Filter() {
|
|
151
631
|
return Joi.object({
|
|
152
632
|
assignees: Joi.array().items(Joi.any()).required(),
|
|
153
|
-
categories: Joi.array().items(
|
|
154
|
-
priorities: Joi.array().items(
|
|
155
|
-
statuses: Joi.array().items(
|
|
633
|
+
categories: Joi.array().items(LeadPlatformModel.TicketCategory()),
|
|
634
|
+
priorities: Joi.array().items(LeadPlatformModel.Priority()).required(),
|
|
635
|
+
statuses: Joi.array().items(LeadPlatformModel.Status()).required(),
|
|
156
636
|
});
|
|
157
637
|
}
|
|
638
|
+
|
|
639
|
+
/** @returns {GetParticipantsInsideVideoRoomResponse} */
|
|
158
640
|
static GetParticipantsInsideVideoRoomResponse() {
|
|
159
641
|
return Joi.object({
|
|
160
|
-
participants: Joi.array()
|
|
642
|
+
participants: Joi.array()
|
|
643
|
+
.items(LeadPlatformModel.Participant())
|
|
644
|
+
.required(),
|
|
161
645
|
});
|
|
162
646
|
}
|
|
647
|
+
|
|
648
|
+
/** @returns {GetTokenForVideoRoomResponse} */
|
|
163
649
|
static GetTokenForVideoRoomResponse() {
|
|
164
650
|
return Joi.object({
|
|
165
651
|
access_token: Joi.string().allow("").required(),
|
|
166
652
|
});
|
|
167
653
|
}
|
|
654
|
+
|
|
655
|
+
/** @returns {IntegrationConfig} */
|
|
168
656
|
static IntegrationConfig() {
|
|
169
657
|
return Joi.object({
|
|
170
658
|
_id: Joi.string().allow(""),
|
|
171
659
|
allow_ticket_creation: Joi.boolean().required(),
|
|
172
660
|
base_url: Joi.string().allow(""),
|
|
173
|
-
category_data:
|
|
661
|
+
category_data: LeadPlatformModel.CategoryData(),
|
|
174
662
|
category_sync_apikey: Joi.string().allow(""),
|
|
175
663
|
config_completed: Joi.boolean(),
|
|
176
664
|
create_ticket_apikey: Joi.string().allow(""),
|
|
@@ -180,12 +668,16 @@ class LeadModel {
|
|
|
180
668
|
webhook_apikey: Joi.string().allow(""),
|
|
181
669
|
});
|
|
182
670
|
}
|
|
671
|
+
|
|
672
|
+
/** @returns {NotifyUser} */
|
|
183
673
|
static NotifyUser() {
|
|
184
674
|
return Joi.object({
|
|
185
675
|
country_code: Joi.string().allow("").required(),
|
|
186
676
|
phone_number: Joi.string().allow("").required(),
|
|
187
677
|
});
|
|
188
678
|
}
|
|
679
|
+
|
|
680
|
+
/** @returns {Page} */
|
|
189
681
|
static Page() {
|
|
190
682
|
return Joi.object({
|
|
191
683
|
current: Joi.number(),
|
|
@@ -197,13 +689,17 @@ class LeadModel {
|
|
|
197
689
|
type: Joi.string().allow("").required(),
|
|
198
690
|
});
|
|
199
691
|
}
|
|
692
|
+
|
|
693
|
+
/** @returns {Participant} */
|
|
200
694
|
static Participant() {
|
|
201
695
|
return Joi.object({
|
|
202
696
|
identity: Joi.string().allow(""),
|
|
203
697
|
status: Joi.string().allow(""),
|
|
204
|
-
user:
|
|
698
|
+
user: LeadPlatformModel.UserSchema(),
|
|
205
699
|
});
|
|
206
700
|
}
|
|
701
|
+
|
|
702
|
+
/** @returns {PhoneNumber} */
|
|
207
703
|
static PhoneNumber() {
|
|
208
704
|
return Joi.object({
|
|
209
705
|
active: Joi.boolean(),
|
|
@@ -213,6 +709,8 @@ class LeadModel {
|
|
|
213
709
|
verified: Joi.boolean(),
|
|
214
710
|
});
|
|
215
711
|
}
|
|
712
|
+
|
|
713
|
+
/** @returns {PollForAssignment} */
|
|
216
714
|
static PollForAssignment() {
|
|
217
715
|
return Joi.object({
|
|
218
716
|
duration: Joi.number().required(),
|
|
@@ -221,13 +719,17 @@ class LeadModel {
|
|
|
221
719
|
success_message: Joi.string().allow("").required(),
|
|
222
720
|
});
|
|
223
721
|
}
|
|
722
|
+
|
|
723
|
+
/** @returns {Priority} */
|
|
224
724
|
static Priority() {
|
|
225
725
|
return Joi.object({
|
|
226
726
|
color: Joi.string().allow("").required(),
|
|
227
727
|
display: Joi.string().allow("").required(),
|
|
228
|
-
key:
|
|
728
|
+
key: LeadPlatformModel.PriorityEnum().required(),
|
|
229
729
|
});
|
|
230
730
|
}
|
|
731
|
+
|
|
732
|
+
/** @returns {Status} */
|
|
231
733
|
static Status() {
|
|
232
734
|
return Joi.object({
|
|
233
735
|
color: Joi.string().allow("").required(),
|
|
@@ -235,6 +737,8 @@ class LeadModel {
|
|
|
235
737
|
key: Joi.string().allow("").required(),
|
|
236
738
|
});
|
|
237
739
|
}
|
|
740
|
+
|
|
741
|
+
/** @returns {SubmitButton} */
|
|
238
742
|
static SubmitButton() {
|
|
239
743
|
return Joi.object({
|
|
240
744
|
background_color: Joi.string().allow("").required(),
|
|
@@ -242,135 +746,169 @@ class LeadModel {
|
|
|
242
746
|
title_color: Joi.string().allow("").required(),
|
|
243
747
|
});
|
|
244
748
|
}
|
|
749
|
+
|
|
750
|
+
/** @returns {SubmitCustomFormResponse} */
|
|
245
751
|
static SubmitCustomFormResponse() {
|
|
246
752
|
return Joi.object({
|
|
247
753
|
message: Joi.string().allow("").required(),
|
|
248
|
-
ticket:
|
|
754
|
+
ticket: LeadPlatformModel.Ticket(),
|
|
249
755
|
});
|
|
250
756
|
}
|
|
757
|
+
|
|
758
|
+
/** @returns {SupportGeneralConfig} */
|
|
251
759
|
static SupportGeneralConfig() {
|
|
252
760
|
return Joi.object({
|
|
253
761
|
_id: Joi.string().allow(""),
|
|
254
762
|
integration: Joi.any(),
|
|
255
763
|
show_communication_info: Joi.boolean(),
|
|
256
764
|
show_support_dris: Joi.boolean(),
|
|
257
|
-
support_communication:
|
|
258
|
-
support_email:
|
|
259
|
-
support_faq:
|
|
260
|
-
support_phone:
|
|
765
|
+
support_communication: LeadPlatformModel.CommunicationDetails(),
|
|
766
|
+
support_email: LeadPlatformModel.CommunicationDetails(),
|
|
767
|
+
support_faq: LeadPlatformModel.CommunicationDetails(),
|
|
768
|
+
support_phone: LeadPlatformModel.CommunicationDetails(),
|
|
261
769
|
type: Joi.string().allow(""),
|
|
262
770
|
});
|
|
263
771
|
}
|
|
772
|
+
|
|
773
|
+
/** @returns {Ticket} */
|
|
264
774
|
static Ticket() {
|
|
265
775
|
return Joi.object({
|
|
266
776
|
_custom_json: Joi.any(),
|
|
267
777
|
_id: Joi.string().allow("").required(),
|
|
268
778
|
assigned_to: Joi.any(),
|
|
269
|
-
category:
|
|
270
|
-
content:
|
|
271
|
-
context:
|
|
779
|
+
category: LeadPlatformModel.TicketCategory().required(),
|
|
780
|
+
content: LeadPlatformModel.TicketContent(),
|
|
781
|
+
context: LeadPlatformModel.TicketContext(),
|
|
272
782
|
created_at: Joi.string().allow(""),
|
|
273
783
|
created_by: Joi.any(),
|
|
274
|
-
created_on:
|
|
784
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
275
785
|
integration: Joi.any(),
|
|
276
786
|
is_feedback_pending: Joi.boolean(),
|
|
277
|
-
priority:
|
|
787
|
+
priority: LeadPlatformModel.Priority().required(),
|
|
278
788
|
response_id: Joi.string().allow(""),
|
|
279
|
-
source:
|
|
280
|
-
status:
|
|
789
|
+
source: LeadPlatformModel.TicketSourceEnum().required(),
|
|
790
|
+
status: LeadPlatformModel.Status().required(),
|
|
281
791
|
sub_category: Joi.string().allow(""),
|
|
282
792
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
283
793
|
updated_at: Joi.string().allow(""),
|
|
284
794
|
});
|
|
285
795
|
}
|
|
796
|
+
|
|
797
|
+
/** @returns {TicketAsset} */
|
|
286
798
|
static TicketAsset() {
|
|
287
799
|
return Joi.object({
|
|
288
800
|
display: Joi.string().allow(""),
|
|
289
|
-
type:
|
|
801
|
+
type: LeadPlatformModel.TicketAssetTypeEnum().required(),
|
|
290
802
|
value: Joi.string().allow("").required(),
|
|
291
803
|
});
|
|
292
804
|
}
|
|
805
|
+
|
|
806
|
+
/** @returns {TicketCategory} */
|
|
293
807
|
static TicketCategory() {
|
|
294
808
|
return Joi.object({
|
|
295
809
|
display: Joi.string().allow("").required(),
|
|
296
|
-
feedback_form:
|
|
810
|
+
feedback_form: LeadPlatformModel.FeedbackForm(),
|
|
297
811
|
group_id: Joi.number(),
|
|
298
812
|
key: Joi.string().allow("").required(),
|
|
299
813
|
sub_categories: Joi.link("#TicketCategory"),
|
|
300
814
|
}).id("TicketCategory");
|
|
301
815
|
}
|
|
816
|
+
|
|
817
|
+
/** @returns {TicketContent} */
|
|
302
818
|
static TicketContent() {
|
|
303
819
|
return Joi.object({
|
|
304
|
-
attachments: Joi.array().items(
|
|
820
|
+
attachments: Joi.array().items(LeadPlatformModel.TicketAsset()),
|
|
305
821
|
description: Joi.string().allow(""),
|
|
306
822
|
title: Joi.string().allow("").required(),
|
|
307
823
|
});
|
|
308
824
|
}
|
|
825
|
+
|
|
826
|
+
/** @returns {TicketContext} */
|
|
309
827
|
static TicketContext() {
|
|
310
828
|
return Joi.object({
|
|
311
829
|
application_id: Joi.string().allow(""),
|
|
312
830
|
company_id: Joi.string().allow("").required(),
|
|
313
831
|
});
|
|
314
832
|
}
|
|
833
|
+
|
|
834
|
+
/** @returns {TicketFeedback} */
|
|
315
835
|
static TicketFeedback() {
|
|
316
836
|
return Joi.object({
|
|
317
837
|
_id: Joi.string().allow("").required(),
|
|
318
838
|
category: Joi.string().allow(""),
|
|
319
839
|
company_id: Joi.string().allow("").required(),
|
|
320
840
|
created_at: Joi.string().allow(""),
|
|
321
|
-
response: Joi.array()
|
|
841
|
+
response: Joi.array()
|
|
842
|
+
.items(LeadPlatformModel.FeedbackResponseItem())
|
|
843
|
+
.required(),
|
|
322
844
|
ticket_id: Joi.string().allow("").required(),
|
|
323
845
|
updated_at: Joi.string().allow(""),
|
|
324
846
|
user: Joi.any(),
|
|
325
847
|
});
|
|
326
848
|
}
|
|
849
|
+
|
|
850
|
+
/** @returns {TicketFeedbackForm} */
|
|
327
851
|
static TicketFeedbackForm() {
|
|
328
852
|
return Joi.object({
|
|
329
853
|
display: Joi.array().items(Joi.any()),
|
|
330
854
|
title: Joi.string().allow("").required(),
|
|
331
855
|
});
|
|
332
856
|
}
|
|
857
|
+
|
|
858
|
+
/** @returns {TicketFeedbackList} */
|
|
333
859
|
static TicketFeedbackList() {
|
|
334
860
|
return Joi.object({
|
|
335
|
-
items: Joi.array().items(
|
|
861
|
+
items: Joi.array().items(LeadPlatformModel.TicketFeedback()),
|
|
336
862
|
});
|
|
337
863
|
}
|
|
864
|
+
|
|
865
|
+
/** @returns {TicketFeedbackPayload} */
|
|
338
866
|
static TicketFeedbackPayload() {
|
|
339
867
|
return Joi.object({
|
|
340
868
|
form_response: Joi.any(),
|
|
341
869
|
});
|
|
342
870
|
}
|
|
871
|
+
|
|
872
|
+
/** @returns {TicketHistory} */
|
|
343
873
|
static TicketHistory() {
|
|
344
874
|
return Joi.object({
|
|
345
875
|
_id: Joi.string().allow("").required(),
|
|
346
876
|
created_at: Joi.string().allow(""),
|
|
347
877
|
created_by: Joi.any(),
|
|
348
|
-
created_on:
|
|
878
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
349
879
|
ticket_id: Joi.string().allow("").required(),
|
|
350
880
|
type: Joi.string().allow("").required(),
|
|
351
881
|
updated_at: Joi.string().allow(""),
|
|
352
882
|
value: Joi.any().required(),
|
|
353
883
|
});
|
|
354
884
|
}
|
|
885
|
+
|
|
886
|
+
/** @returns {TicketHistoryList} */
|
|
355
887
|
static TicketHistoryList() {
|
|
356
888
|
return Joi.object({
|
|
357
|
-
items: Joi.array().items(
|
|
358
|
-
page:
|
|
889
|
+
items: Joi.array().items(LeadPlatformModel.TicketHistory()),
|
|
890
|
+
page: LeadPlatformModel.Page(),
|
|
359
891
|
});
|
|
360
892
|
}
|
|
893
|
+
|
|
894
|
+
/** @returns {TicketHistoryPayload} */
|
|
361
895
|
static TicketHistoryPayload() {
|
|
362
896
|
return Joi.object({
|
|
363
|
-
type:
|
|
897
|
+
type: LeadPlatformModel.HistoryTypeEnum().required(),
|
|
364
898
|
value: Joi.any().required(),
|
|
365
899
|
});
|
|
366
900
|
}
|
|
901
|
+
|
|
902
|
+
/** @returns {TicketList} */
|
|
367
903
|
static TicketList() {
|
|
368
904
|
return Joi.object({
|
|
369
|
-
filters:
|
|
370
|
-
items: Joi.array().items(
|
|
371
|
-
page:
|
|
905
|
+
filters: LeadPlatformModel.Filter(),
|
|
906
|
+
items: Joi.array().items(LeadPlatformModel.Ticket()),
|
|
907
|
+
page: LeadPlatformModel.Page(),
|
|
372
908
|
});
|
|
373
909
|
}
|
|
910
|
+
|
|
911
|
+
/** @returns {TicketSubCategory} */
|
|
374
912
|
static TicketSubCategory() {
|
|
375
913
|
return Joi.object({
|
|
376
914
|
display: Joi.string().allow("").required(),
|
|
@@ -378,6 +916,8 @@ class LeadModel {
|
|
|
378
916
|
sub_categories: Joi.link("#TicketSubCategory"),
|
|
379
917
|
}).id("TicketSubCategory");
|
|
380
918
|
}
|
|
919
|
+
|
|
920
|
+
/** @returns {UserSchema} */
|
|
381
921
|
static UserSchema() {
|
|
382
922
|
return Joi.object({
|
|
383
923
|
_id: Joi.string().allow(""),
|
|
@@ -386,12 +926,12 @@ class LeadModel {
|
|
|
386
926
|
application_id: Joi.string().allow(""),
|
|
387
927
|
created_at: Joi.string().allow(""),
|
|
388
928
|
dob: Joi.string().allow(""),
|
|
389
|
-
emails: Joi.array().items(
|
|
929
|
+
emails: Joi.array().items(LeadPlatformModel.Email()),
|
|
390
930
|
first_name: Joi.string().allow(""),
|
|
391
931
|
gender: Joi.string().allow(""),
|
|
392
932
|
last_name: Joi.string().allow(""),
|
|
393
933
|
meta: Joi.any(),
|
|
394
|
-
phone_numbers: Joi.array().items(
|
|
934
|
+
phone_numbers: Joi.array().items(LeadPlatformModel.PhoneNumber()),
|
|
395
935
|
profile_pic_url: Joi.string().allow(""),
|
|
396
936
|
updated_at: Joi.string().allow(""),
|
|
397
937
|
user_id: Joi.string().allow(""),
|
|
@@ -399,10 +939,11 @@ class LeadModel {
|
|
|
399
939
|
});
|
|
400
940
|
}
|
|
401
941
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
942
|
+
/**
|
|
943
|
+
* Enum: HistoryTypeEnum Used By: Lead
|
|
944
|
+
*
|
|
945
|
+
* @returns {HistoryTypeEnum}
|
|
946
|
+
*/
|
|
406
947
|
static HistoryTypeEnum() {
|
|
407
948
|
return Joi.string().valid(
|
|
408
949
|
"rating",
|
|
@@ -413,10 +954,11 @@ class LeadModel {
|
|
|
413
954
|
);
|
|
414
955
|
}
|
|
415
956
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
957
|
+
/**
|
|
958
|
+
* Enum: PriorityEnum Used By: Lead
|
|
959
|
+
*
|
|
960
|
+
* @returns {PriorityEnum}
|
|
961
|
+
*/
|
|
420
962
|
static PriorityEnum() {
|
|
421
963
|
return Joi.string().valid(
|
|
422
964
|
"low",
|
|
@@ -429,10 +971,11 @@ class LeadModel {
|
|
|
429
971
|
);
|
|
430
972
|
}
|
|
431
973
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
974
|
+
/**
|
|
975
|
+
* Enum: TicketAssetTypeEnum Used By: Lead
|
|
976
|
+
*
|
|
977
|
+
* @returns {TicketAssetTypeEnum}
|
|
978
|
+
*/
|
|
436
979
|
static TicketAssetTypeEnum() {
|
|
437
980
|
return Joi.string().valid(
|
|
438
981
|
"image",
|
|
@@ -455,10 +998,11 @@ class LeadModel {
|
|
|
455
998
|
);
|
|
456
999
|
}
|
|
457
1000
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Enum: TicketIntegrationDetails Used By: Lead
|
|
1003
|
+
*
|
|
1004
|
+
* @returns {TicketIntegrationDetails}
|
|
1005
|
+
*/
|
|
462
1006
|
static TicketIntegrationDetails() {
|
|
463
1007
|
return Joi.string().valid(
|
|
464
1008
|
"default",
|
|
@@ -469,10 +1013,11 @@ class LeadModel {
|
|
|
469
1013
|
);
|
|
470
1014
|
}
|
|
471
1015
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* Enum: TicketSourceEnum Used By: Lead
|
|
1018
|
+
*
|
|
1019
|
+
* @returns {TicketSourceEnum}
|
|
1020
|
+
*/
|
|
476
1021
|
static TicketSourceEnum() {
|
|
477
1022
|
return Joi.string().valid(
|
|
478
1023
|
"platform_panel",
|
|
@@ -481,4 +1026,4 @@ class LeadModel {
|
|
|
481
1026
|
);
|
|
482
1027
|
}
|
|
483
1028
|
}
|
|
484
|
-
module.exports =
|
|
1029
|
+
module.exports = LeadPlatformModel;
|