@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.10
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 +1 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -1,154 +1,116 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {Object} [created_by] - Creator of the ticket
|
|
9
|
-
* @property {PriorityEnum} [priority]
|
|
10
|
-
* @property {string} [status] - Status of the ticket
|
|
4
|
+
* @typedef TicketList
|
|
5
|
+
* @property {Ticket[]} [items] - List of tickets
|
|
6
|
+
* @property {Filter} [filters]
|
|
7
|
+
* @property {Page} [page]
|
|
11
8
|
*/
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
|
-
* @typedef
|
|
15
|
-
* @property {
|
|
11
|
+
* @typedef Page
|
|
12
|
+
* @property {number} [item_total]
|
|
13
|
+
* @property {string} [next_id]
|
|
14
|
+
* @property {boolean} [has_previous]
|
|
15
|
+
* @property {boolean} [has_next]
|
|
16
|
+
* @property {number} [current]
|
|
17
|
+
* @property {string} type
|
|
18
|
+
* @property {number} [size]
|
|
16
19
|
*/
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
|
-
* @typedef
|
|
20
|
-
* @property {
|
|
22
|
+
* @typedef TicketHistoryList
|
|
23
|
+
* @property {TicketHistory[]} [items] - List of ticket history
|
|
24
|
+
* @property {Page} [page]
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef CustomFormList
|
|
29
|
+
* @property {CustomForm[]} [items] - List of forms
|
|
30
|
+
* @property {Page} [page]
|
|
21
31
|
*/
|
|
22
32
|
|
|
23
33
|
/**
|
|
24
34
|
* @typedef CreateCustomFormPayload
|
|
35
|
+
* @property {string} slug - Slug for the form
|
|
36
|
+
* @property {string} title - Title for the form
|
|
37
|
+
* @property {Object[]} inputs - List of all the form components
|
|
25
38
|
* @property {string} [description] - Description of the form
|
|
26
39
|
* @property {string} [header_image] - Header image that is to be shown for the form
|
|
27
|
-
* @property {Object[]} inputs - List of all the form components
|
|
28
|
-
* @property {PollForAssignment} [poll_for_assignment]
|
|
29
40
|
* @property {PriorityEnum} priority
|
|
30
41
|
* @property {boolean} [should_notify] - Indicates if staff should be notified
|
|
31
42
|
* when a response is received
|
|
32
|
-
* @property {string} slug - Slug for the form
|
|
33
43
|
* @property {string} [success_message] - Success message that will be shown on submission
|
|
34
|
-
* @property {string} title - Title for the form
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @typedef CreatedOn
|
|
39
|
-
* @property {string} user_agent - Useragent details
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @typedef CreateVideoRoomPayload
|
|
44
|
-
* @property {NotifyUser[]} [notify] - List of people to be notified
|
|
45
|
-
* @property {string} unique_name - Ticket id
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @typedef CreateVideoRoomResponse
|
|
50
|
-
* @property {string} unique_name - Video Room's unique name
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @typedef CustomForm
|
|
55
|
-
* @property {string} _id - Unique identifier for the form
|
|
56
|
-
* @property {string} application_id - Application ID for form
|
|
57
|
-
* @property {CreatedOn} [created_on]
|
|
58
|
-
* @property {string} [description] - Form description that will be shown to the user
|
|
59
|
-
* @property {string} [header_image] - Form header image that will be shown to the user
|
|
60
|
-
* @property {Object[]} inputs - List of all the form fields
|
|
61
|
-
* @property {boolean} login_required - Denotes if login is required to make a
|
|
62
|
-
* form response submission
|
|
63
44
|
* @property {PollForAssignment} [poll_for_assignment]
|
|
64
|
-
* @property {Priority} priority
|
|
65
|
-
* @property {boolean} should_notify - Denotes if new response submission for
|
|
66
|
-
* the form should be notified to the assignees
|
|
67
|
-
* @property {string} slug - Slug for the form, which is to be used for accessing the form
|
|
68
|
-
* @property {SubmitButton} [submit_button]
|
|
69
|
-
* @property {string} [success_message] - Message that is to be shown on
|
|
70
|
-
* succesfull form response submission
|
|
71
|
-
* @property {string} title - Form title that will be shown to the user
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @typedef CustomFormList
|
|
76
|
-
* @property {CustomForm[]} [items] - List of forms
|
|
77
|
-
* @property {Page} [page]
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @typedef Debug
|
|
82
|
-
* @property {string} [platform] - Platform of user
|
|
83
|
-
* @property {string} [source] - Source of user
|
|
84
45
|
*/
|
|
85
46
|
|
|
86
47
|
/**
|
|
87
48
|
* @typedef EditCustomFormPayload
|
|
88
|
-
* @property {string}
|
|
89
|
-
* @property {string} [header_image] - Header image that is to be shown for the form
|
|
49
|
+
* @property {string} title - Title for the form
|
|
90
50
|
* @property {Object[]} inputs - List of all the form components
|
|
91
|
-
* @property {
|
|
92
|
-
* form response submission
|
|
93
|
-
* @property {PollForAssignment} [poll_for_assignment]
|
|
51
|
+
* @property {string} [description] - Description of the form
|
|
94
52
|
* @property {PriorityEnum} priority
|
|
53
|
+
* @property {string} [header_image] - Header image that is to be shown for the form
|
|
95
54
|
* @property {boolean} [should_notify] - Indicates if staff should be notified
|
|
96
55
|
* when a response is received
|
|
56
|
+
* @property {boolean} [login_required] - Denotes if login is required to make a
|
|
57
|
+
* form response submission
|
|
97
58
|
* @property {string} [success_message] - Success message that will be shown on submission
|
|
98
|
-
* @property {
|
|
59
|
+
* @property {PollForAssignment} [poll_for_assignment]
|
|
99
60
|
*/
|
|
100
61
|
|
|
101
62
|
/**
|
|
102
63
|
* @typedef EditTicketPayload
|
|
103
|
-
* @property {AgentChangePayload} [assigned_to]
|
|
104
|
-
* @property {string} [category] - Category assigned to the ticket
|
|
105
64
|
* @property {TicketContent} [content]
|
|
106
|
-
* @property {
|
|
65
|
+
* @property {string} [category] - Category assigned to the ticket
|
|
66
|
+
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
107
67
|
* @property {string} [source] - Denotes if the ticket was created at company or
|
|
108
68
|
* application level
|
|
109
69
|
* @property {string} [status] - Denotes in what state is the ticket
|
|
110
|
-
* @property {
|
|
70
|
+
* @property {PriorityEnum} [priority]
|
|
71
|
+
* @property {AgentChangePayload} [assigned_to]
|
|
111
72
|
* @property {string[]} [tags] - Tags relevant to ticket
|
|
112
73
|
*/
|
|
113
74
|
|
|
114
75
|
/**
|
|
115
|
-
* @typedef
|
|
116
|
-
* @property {
|
|
117
|
-
* @property {string} [email] - Email Address
|
|
118
|
-
* @property {boolean} [primary] - Denotes it's the primary email for the account
|
|
119
|
-
* @property {boolean} [verified] - Denotes it's a verified email
|
|
76
|
+
* @typedef AgentChangePayload
|
|
77
|
+
* @property {string} agent_id - Agent's unique ID
|
|
120
78
|
*/
|
|
121
79
|
|
|
122
80
|
/**
|
|
123
|
-
* @typedef
|
|
124
|
-
* @property {string}
|
|
81
|
+
* @typedef CreateVideoRoomResponse
|
|
82
|
+
* @property {string} unique_name - Video Room's unique name
|
|
125
83
|
*/
|
|
126
84
|
|
|
127
85
|
/**
|
|
128
|
-
* @typedef
|
|
129
|
-
* @property {
|
|
130
|
-
* @property {Object} [timestamps] - Gives details of category releted data
|
|
131
|
-
* @property {string} [title] - Title for the feed back form
|
|
86
|
+
* @typedef CloseVideoRoomResponse
|
|
87
|
+
* @property {boolean} success - Denotes if operation was successfully
|
|
132
88
|
*/
|
|
133
89
|
|
|
134
90
|
/**
|
|
135
|
-
* @typedef
|
|
136
|
-
* @property {string}
|
|
137
|
-
* @property {
|
|
138
|
-
|
|
91
|
+
* @typedef CreateVideoRoomPayload
|
|
92
|
+
* @property {string} unique_name - Ticket id
|
|
93
|
+
* @property {NotifyUser[]} [notify] - List of people to be notified
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @typedef NotifyUser
|
|
98
|
+
* @property {string} country_code - Country code
|
|
99
|
+
* @property {string} phone_number - Phone number
|
|
139
100
|
*/
|
|
140
101
|
|
|
141
102
|
/**
|
|
142
103
|
* @typedef Filter
|
|
143
|
-
* @property {Object[]} assignees - List of support staff availble for tickets assignment
|
|
144
|
-
* @property {TicketCategory[]} [categories] - List of possible categories for tickets
|
|
145
104
|
* @property {Priority[]} priorities - List of possible priorities for tickets
|
|
105
|
+
* @property {TicketCategory[]} [categories] - List of possible categories for tickets
|
|
146
106
|
* @property {Status[]} statuses - List of possible statuses for tickets
|
|
107
|
+
* @property {Object[]} assignees - List of support staff availble for tickets assignment
|
|
147
108
|
*/
|
|
148
109
|
|
|
149
110
|
/**
|
|
150
|
-
* @typedef
|
|
151
|
-
* @property {
|
|
111
|
+
* @typedef TicketHistoryPayload
|
|
112
|
+
* @property {Object} value - Details of history event
|
|
113
|
+
* @property {HistoryTypeEnum} type
|
|
152
114
|
*/
|
|
153
115
|
|
|
154
116
|
/**
|
|
@@ -157,130 +119,108 @@ const Joi = require("joi");
|
|
|
157
119
|
*/
|
|
158
120
|
|
|
159
121
|
/**
|
|
160
|
-
* @typedef
|
|
161
|
-
* @property {
|
|
162
|
-
* @property {string} phone_number - Phone number
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @typedef Page
|
|
167
|
-
* @property {number} [current]
|
|
168
|
-
* @property {boolean} [has_next]
|
|
169
|
-
* @property {boolean} [has_previous]
|
|
170
|
-
* @property {number} [item_total]
|
|
171
|
-
* @property {string} [next_id]
|
|
172
|
-
* @property {number} [size]
|
|
173
|
-
* @property {string} type
|
|
122
|
+
* @typedef GetParticipantsInsideVideoRoomResponse
|
|
123
|
+
* @property {Participant[]} participants - List of participants of the video room
|
|
174
124
|
*/
|
|
175
125
|
|
|
176
126
|
/**
|
|
177
127
|
* @typedef Participant
|
|
128
|
+
* @property {UserSchema} [user]
|
|
178
129
|
* @property {string} [identity] - Unique identifier of participant
|
|
179
130
|
* @property {string} [status] - Status of participant
|
|
180
|
-
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @typedef UserSchema
|
|
135
|
+
* @property {string} [application_id]
|
|
136
|
+
* @property {string} [user_id]
|
|
137
|
+
* @property {string} [first_name]
|
|
138
|
+
* @property {Object} [meta]
|
|
139
|
+
* @property {string} [last_name]
|
|
140
|
+
* @property {PhoneNumber[]} [phone_numbers]
|
|
141
|
+
* @property {Email[]} [emails]
|
|
142
|
+
* @property {string} [gender]
|
|
143
|
+
* @property {string} [dob]
|
|
144
|
+
* @property {boolean} [active]
|
|
145
|
+
* @property {string} [profile_pic_url]
|
|
146
|
+
* @property {string} [username]
|
|
147
|
+
* @property {string} [account_type]
|
|
148
|
+
* @property {string} [_id]
|
|
149
|
+
* @property {string} [created_at]
|
|
150
|
+
* @property {string} [updated_at]
|
|
151
|
+
* @property {string} [external_id]
|
|
181
152
|
*/
|
|
182
153
|
|
|
183
154
|
/**
|
|
184
155
|
* @typedef PhoneNumber
|
|
185
156
|
* @property {boolean} [active] - Denotes if the phone number is active
|
|
186
|
-
* @property {number} [country_code] - Country code
|
|
187
|
-
* @property {string} [phone] - Phone number
|
|
188
157
|
* @property {boolean} [primary] - Denotes it's the primary phone number for the account
|
|
189
158
|
* @property {boolean} [verified] - Denotes it's a verified phone number
|
|
159
|
+
* @property {string} [phone] - Phone number
|
|
160
|
+
* @property {number} [country_code] - Country code
|
|
190
161
|
*/
|
|
191
162
|
|
|
192
163
|
/**
|
|
193
|
-
* @typedef
|
|
194
|
-
* @property {
|
|
195
|
-
* @property {
|
|
196
|
-
* @property {string}
|
|
197
|
-
* @property {
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @typedef Priority
|
|
202
|
-
* @property {string} color - Color for priority
|
|
203
|
-
* @property {string} display - Display text for priority
|
|
204
|
-
* @property {PriorityEnum} key
|
|
164
|
+
* @typedef Email
|
|
165
|
+
* @property {boolean} [primary] - Denotes it's the primary email for the account
|
|
166
|
+
* @property {boolean} [verified] - Denotes it's a verified email
|
|
167
|
+
* @property {string} [email] - Email Address
|
|
168
|
+
* @property {boolean} [active] - Denotes if the email is active
|
|
205
169
|
*/
|
|
206
170
|
|
|
207
171
|
/**
|
|
208
|
-
* @typedef
|
|
209
|
-
* @property {string}
|
|
210
|
-
* @property {string}
|
|
211
|
-
* @property {string} key - Key for status
|
|
172
|
+
* @typedef Debug
|
|
173
|
+
* @property {string} [source] - Source of user
|
|
174
|
+
* @property {string} [platform] - Platform of user
|
|
212
175
|
*/
|
|
213
176
|
|
|
214
177
|
/**
|
|
215
|
-
* @typedef
|
|
216
|
-
* @property {string}
|
|
217
|
-
* @property {string}
|
|
218
|
-
* @property {string} title_color - Title color submit button
|
|
178
|
+
* @typedef TicketContext
|
|
179
|
+
* @property {string} [application_id] - Application ID related to the ticket
|
|
180
|
+
* @property {string} company_id - Company ID related to the ticket
|
|
219
181
|
*/
|
|
220
182
|
|
|
221
183
|
/**
|
|
222
|
-
* @typedef
|
|
223
|
-
* @property {
|
|
224
|
-
* @property {string} _id - Unique identifier for the ticket
|
|
225
|
-
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
226
|
-
* @property {TicketCategory} category
|
|
227
|
-
* @property {TicketContent} [content]
|
|
228
|
-
* @property {TicketContext} [context]
|
|
229
|
-
* @property {string} [created_at] - Time when the ticket was created
|
|
230
|
-
* @property {Object} [created_by] - User details of ticket creator
|
|
231
|
-
* @property {CreatedOn} [created_on]
|
|
232
|
-
* @property {Object} [integration] - Integration type and its details of the ticket
|
|
233
|
-
* @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
|
|
234
|
-
* pending for the ticket
|
|
235
|
-
* @property {Priority} priority
|
|
236
|
-
* @property {string} [response_id] - Details of company and application
|
|
237
|
-
* realated to the ticket
|
|
238
|
-
* @property {TicketSourceEnum} source
|
|
239
|
-
* @property {Status} status
|
|
240
|
-
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
241
|
-
* @property {string[]} [tags] - Tags relevant to ticket
|
|
242
|
-
* @property {string} [updated_at] - Time when the ticket was last updated
|
|
184
|
+
* @typedef CreatedOn
|
|
185
|
+
* @property {string} user_agent - Useragent details
|
|
243
186
|
*/
|
|
244
187
|
|
|
245
188
|
/**
|
|
246
189
|
* @typedef TicketAsset
|
|
247
190
|
* @property {string} [display] - Display text for asset
|
|
248
|
-
* @property {TicketAssetTypeEnum} type
|
|
249
191
|
* @property {string} value - To be used for details
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* @typedef TicketCategory
|
|
254
|
-
* @property {string} display - Category display value identifier
|
|
255
|
-
* @property {FeedbackForm} [feedback_form]
|
|
256
|
-
* @property {number} [group_id] - Group id of category releted data
|
|
257
|
-
* @property {string} key - Category key value identifier
|
|
258
|
-
* @property {TicketCategory} [sub_categories]
|
|
192
|
+
* @property {TicketAssetTypeEnum} type
|
|
259
193
|
*/
|
|
260
194
|
|
|
261
195
|
/**
|
|
262
196
|
* @typedef TicketContent
|
|
263
|
-
* @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket
|
|
264
|
-
* @property {string} [description] - Long description of issue
|
|
265
197
|
* @property {string} title - Title for ticket
|
|
198
|
+
* @property {string} [description] - Long description of issue
|
|
199
|
+
* @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket
|
|
266
200
|
*/
|
|
267
201
|
|
|
268
202
|
/**
|
|
269
|
-
* @typedef
|
|
270
|
-
* @property {
|
|
271
|
-
* @property {string}
|
|
203
|
+
* @typedef AddTicketPayload
|
|
204
|
+
* @property {Object} [created_by] - Creator of the ticket
|
|
205
|
+
* @property {string} [status] - Status of the ticket
|
|
206
|
+
* @property {PriorityEnum} [priority]
|
|
207
|
+
* @property {string} category - Category of the ticket
|
|
208
|
+
* @property {TicketContent} content
|
|
209
|
+
* @property {Object} [_custom_json] - Optional custom data that needs to be sent
|
|
272
210
|
*/
|
|
273
211
|
|
|
274
212
|
/**
|
|
275
|
-
* @typedef
|
|
276
|
-
* @property {
|
|
277
|
-
* @property {string}
|
|
278
|
-
* @property {string}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
* @
|
|
283
|
-
* @property {
|
|
213
|
+
* @typedef Priority
|
|
214
|
+
* @property {PriorityEnum} key
|
|
215
|
+
* @property {string} display - Display text for priority
|
|
216
|
+
* @property {string} color - Color for priority
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @typedef Status
|
|
221
|
+
* @property {string} key - Key for status
|
|
222
|
+
* @property {string} display - Display text for status
|
|
223
|
+
* @property {string} color - Color for status
|
|
284
224
|
*/
|
|
285
225
|
|
|
286
226
|
/**
|
|
@@ -295,61 +235,116 @@ const Joi = require("joi");
|
|
|
295
235
|
*/
|
|
296
236
|
|
|
297
237
|
/**
|
|
298
|
-
* @typedef
|
|
299
|
-
* @property {string}
|
|
300
|
-
* @property {string}
|
|
301
|
-
* @property {
|
|
238
|
+
* @typedef SubmitButton
|
|
239
|
+
* @property {string} title - Title for submit button
|
|
240
|
+
* @property {string} title_color - Title color submit button
|
|
241
|
+
* @property {string} background_color - Color for submit button
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @typedef PollForAssignment
|
|
246
|
+
* @property {number} duration - Duration for polling of staff
|
|
247
|
+
* @property {string} message - Message for polling
|
|
248
|
+
* @property {string} success_message - Message for successful polling
|
|
249
|
+
* @property {string} failure_message - Message if polling failed
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @typedef CustomForm
|
|
254
|
+
* @property {string} application_id - Application ID for form
|
|
255
|
+
* @property {string} slug - Slug for the form, which is to be used for accessing the form
|
|
256
|
+
* @property {string} [header_image] - Form header image that will be shown to the user
|
|
257
|
+
* @property {string} title - Form title that will be shown to the user
|
|
258
|
+
* @property {string} [description] - Form description that will be shown to the user
|
|
259
|
+
* @property {Priority} priority
|
|
260
|
+
* @property {boolean} login_required - Denotes if login is required to make a
|
|
261
|
+
* form response submission
|
|
262
|
+
* @property {boolean} should_notify - Denotes if new response submission for
|
|
263
|
+
* the form should be notified to the assignees
|
|
264
|
+
* @property {string} [success_message] - Message that is to be shown on
|
|
265
|
+
* succesfull form response submission
|
|
266
|
+
* @property {SubmitButton} [submit_button]
|
|
267
|
+
* @property {Object[]} inputs - List of all the form fields
|
|
302
268
|
* @property {CreatedOn} [created_on]
|
|
303
|
-
* @property {
|
|
304
|
-
* @property {string}
|
|
305
|
-
* @property {string} [updated_at] - Time of last update of the history event
|
|
306
|
-
* @property {Object} value - Data of the history event
|
|
269
|
+
* @property {PollForAssignment} [poll_for_assignment]
|
|
270
|
+
* @property {string} _id - Unique identifier for the form
|
|
307
271
|
*/
|
|
308
272
|
|
|
309
273
|
/**
|
|
310
|
-
* @typedef
|
|
311
|
-
* @property {
|
|
312
|
-
* @property {
|
|
274
|
+
* @typedef FeedbackForm
|
|
275
|
+
* @property {Object} [inputs] - Input details for the feed back form
|
|
276
|
+
* @property {string} [title] - Title for the feed back form
|
|
277
|
+
* @property {Object} [timestamps] - Gives details of category releted data
|
|
313
278
|
*/
|
|
314
279
|
|
|
315
280
|
/**
|
|
316
|
-
* @typedef
|
|
317
|
-
* @property {
|
|
318
|
-
* @property {
|
|
281
|
+
* @typedef TicketCategory
|
|
282
|
+
* @property {string} display - Category display value identifier
|
|
283
|
+
* @property {string} key - Category key value identifier
|
|
284
|
+
* @property {TicketCategory} [sub_categories]
|
|
285
|
+
* @property {number} [group_id] - Group id of category releted data
|
|
286
|
+
* @property {FeedbackForm} [feedback_form]
|
|
319
287
|
*/
|
|
320
288
|
|
|
321
289
|
/**
|
|
322
|
-
* @typedef
|
|
323
|
-
* @property {
|
|
324
|
-
* @property {
|
|
325
|
-
* @property {
|
|
290
|
+
* @typedef FeedbackResponseItem
|
|
291
|
+
* @property {string} display - Question/Title of the form field
|
|
292
|
+
* @property {string} key - Key of the form field
|
|
293
|
+
* @property {string} value - User response value for the form field
|
|
326
294
|
*/
|
|
327
295
|
|
|
328
296
|
/**
|
|
329
|
-
* @typedef
|
|
330
|
-
* @property {string}
|
|
331
|
-
* @property {string}
|
|
332
|
-
* @property {
|
|
333
|
-
* @property {
|
|
334
|
-
* @property {string} [
|
|
335
|
-
* @property {
|
|
336
|
-
* @property {
|
|
337
|
-
* @property {string} [
|
|
338
|
-
* @property {string} [first_name]
|
|
339
|
-
* @property {string} [gender]
|
|
340
|
-
* @property {string} [last_name]
|
|
341
|
-
* @property {Object} [meta]
|
|
342
|
-
* @property {PhoneNumber[]} [phone_numbers]
|
|
343
|
-
* @property {string} [profile_pic_url]
|
|
344
|
-
* @property {string} [updated_at]
|
|
345
|
-
* @property {string} [user_id]
|
|
346
|
-
* @property {string} [username]
|
|
297
|
+
* @typedef TicketFeedback
|
|
298
|
+
* @property {string} _id - Unique identifier for the feedback
|
|
299
|
+
* @property {string} ticket_id - Readable ticket number
|
|
300
|
+
* @property {string} company_id - Company id for which ticket was raised
|
|
301
|
+
* @property {FeedbackResponseItem[]} response
|
|
302
|
+
* @property {string} [category] - Category of the ticket
|
|
303
|
+
* @property {Object} [user] - User who submitted the feedback
|
|
304
|
+
* @property {string} [updated_at] - Time when the feedback was last updated
|
|
305
|
+
* @property {string} [created_at] - Time when the feedback was created
|
|
347
306
|
*/
|
|
348
307
|
|
|
349
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* @typedef TicketHistory
|
|
310
|
+
* @property {string} type - Type of the history event
|
|
311
|
+
* @property {Object} value - Data of the history event
|
|
312
|
+
* @property {string} ticket_id - Readable ticket number
|
|
313
|
+
* @property {CreatedOn} [created_on]
|
|
314
|
+
* @property {Object} [created_by] - User who created the history event
|
|
315
|
+
* @property {string} _id - Unique identifier of the history event
|
|
316
|
+
* @property {string} [updated_at] - Time of last update of the history event
|
|
317
|
+
* @property {string} [created_at] - Time of creation of the history event
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @typedef Ticket
|
|
322
|
+
* @property {TicketContext} [context]
|
|
323
|
+
* @property {CreatedOn} [created_on]
|
|
324
|
+
* @property {string} [response_id] - Details of company and application
|
|
325
|
+
* realated to the ticket
|
|
326
|
+
* @property {TicketContent} [content]
|
|
327
|
+
* @property {TicketCategory} category
|
|
328
|
+
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
329
|
+
* @property {TicketSourceEnum} source
|
|
330
|
+
* @property {Status} status
|
|
331
|
+
* @property {Priority} priority
|
|
332
|
+
* @property {Object} [created_by] - User details of ticket creator
|
|
333
|
+
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
334
|
+
* @property {string[]} [tags] - Tags relevant to ticket
|
|
335
|
+
* @property {Object} [_custom_json] - Custom json relevant to the ticket
|
|
336
|
+
* @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
|
|
337
|
+
* pending for the ticket
|
|
338
|
+
* @property {Object} [integration] - Integration type and its details of the ticket
|
|
339
|
+
* @property {string} _id - Unique identifier for the ticket
|
|
340
|
+
* @property {string} [updated_at] - Time when the ticket was last updated
|
|
341
|
+
* @property {string} [created_at] - Time when the ticket was created
|
|
342
|
+
*/
|
|
350
343
|
|
|
351
344
|
/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
|
|
352
345
|
|
|
346
|
+
/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */
|
|
347
|
+
|
|
353
348
|
/**
|
|
354
349
|
* @typedef {| "image"
|
|
355
350
|
* | "video"
|
|
@@ -365,59 +360,92 @@ const Joi = require("joi");
|
|
|
365
360
|
/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */
|
|
366
361
|
|
|
367
362
|
class LeadPlatformModel {
|
|
368
|
-
/** @returns {
|
|
369
|
-
static
|
|
363
|
+
/** @returns {TicketList} */
|
|
364
|
+
static TicketList() {
|
|
370
365
|
return Joi.object({
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
created_by: Joi.any(),
|
|
375
|
-
priority: LeadPlatformModel.PriorityEnum(),
|
|
376
|
-
status: Joi.string().allow(""),
|
|
366
|
+
items: Joi.array().items(LeadPlatformModel.Ticket()),
|
|
367
|
+
filters: LeadPlatformModel.Filter(),
|
|
368
|
+
page: LeadPlatformModel.Page(),
|
|
377
369
|
});
|
|
378
370
|
}
|
|
379
371
|
|
|
380
|
-
/** @returns {
|
|
381
|
-
static
|
|
372
|
+
/** @returns {Page} */
|
|
373
|
+
static Page() {
|
|
382
374
|
return Joi.object({
|
|
383
|
-
|
|
375
|
+
item_total: Joi.number(),
|
|
376
|
+
next_id: Joi.string().allow(""),
|
|
377
|
+
has_previous: Joi.boolean(),
|
|
378
|
+
has_next: Joi.boolean(),
|
|
379
|
+
current: Joi.number(),
|
|
380
|
+
type: Joi.string().allow("").required(),
|
|
381
|
+
size: Joi.number(),
|
|
384
382
|
});
|
|
385
383
|
}
|
|
386
384
|
|
|
387
|
-
/** @returns {
|
|
388
|
-
static
|
|
385
|
+
/** @returns {TicketHistoryList} */
|
|
386
|
+
static TicketHistoryList() {
|
|
389
387
|
return Joi.object({
|
|
390
|
-
|
|
388
|
+
items: Joi.array().items(LeadPlatformModel.TicketHistory()),
|
|
389
|
+
page: LeadPlatformModel.Page(),
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** @returns {CustomFormList} */
|
|
394
|
+
static CustomFormList() {
|
|
395
|
+
return Joi.object({
|
|
396
|
+
items: Joi.array().items(LeadPlatformModel.CustomForm()),
|
|
397
|
+
page: LeadPlatformModel.Page(),
|
|
391
398
|
});
|
|
392
399
|
}
|
|
393
400
|
|
|
394
401
|
/** @returns {CreateCustomFormPayload} */
|
|
395
402
|
static CreateCustomFormPayload() {
|
|
396
403
|
return Joi.object({
|
|
404
|
+
slug: Joi.string().allow("").required(),
|
|
405
|
+
title: Joi.string().allow("").required(),
|
|
406
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
397
407
|
description: Joi.string().allow(""),
|
|
398
408
|
header_image: Joi.string().allow(""),
|
|
399
|
-
inputs: Joi.array().items(Joi.any()).required(),
|
|
400
|
-
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
401
409
|
priority: LeadPlatformModel.PriorityEnum().required(),
|
|
402
410
|
should_notify: Joi.boolean(),
|
|
403
|
-
slug: Joi.string().allow("").required(),
|
|
404
411
|
success_message: Joi.string().allow(""),
|
|
412
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/** @returns {EditCustomFormPayload} */
|
|
417
|
+
static EditCustomFormPayload() {
|
|
418
|
+
return Joi.object({
|
|
405
419
|
title: Joi.string().allow("").required(),
|
|
420
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
421
|
+
description: Joi.string().allow(""),
|
|
422
|
+
priority: LeadPlatformModel.PriorityEnum().required(),
|
|
423
|
+
header_image: Joi.string().allow(""),
|
|
424
|
+
should_notify: Joi.boolean(),
|
|
425
|
+
login_required: Joi.boolean(),
|
|
426
|
+
success_message: Joi.string().allow(""),
|
|
427
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
406
428
|
});
|
|
407
429
|
}
|
|
408
430
|
|
|
409
|
-
/** @returns {
|
|
410
|
-
static
|
|
431
|
+
/** @returns {EditTicketPayload} */
|
|
432
|
+
static EditTicketPayload() {
|
|
411
433
|
return Joi.object({
|
|
412
|
-
|
|
434
|
+
content: LeadPlatformModel.TicketContent(),
|
|
435
|
+
category: Joi.string().allow(""),
|
|
436
|
+
sub_category: Joi.string().allow(""),
|
|
437
|
+
source: Joi.string().allow(""),
|
|
438
|
+
status: Joi.string().allow(""),
|
|
439
|
+
priority: LeadPlatformModel.PriorityEnum(),
|
|
440
|
+
assigned_to: LeadPlatformModel.AgentChangePayload(),
|
|
441
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
413
442
|
});
|
|
414
443
|
}
|
|
415
444
|
|
|
416
|
-
/** @returns {
|
|
417
|
-
static
|
|
445
|
+
/** @returns {AgentChangePayload} */
|
|
446
|
+
static AgentChangePayload() {
|
|
418
447
|
return Joi.object({
|
|
419
|
-
|
|
420
|
-
unique_name: Joi.string().allow("").required(),
|
|
448
|
+
agent_id: Joi.string().allow("").required(),
|
|
421
449
|
});
|
|
422
450
|
}
|
|
423
451
|
|
|
@@ -428,240 +456,246 @@ class LeadPlatformModel {
|
|
|
428
456
|
});
|
|
429
457
|
}
|
|
430
458
|
|
|
431
|
-
/** @returns {
|
|
432
|
-
static
|
|
459
|
+
/** @returns {CloseVideoRoomResponse} */
|
|
460
|
+
static CloseVideoRoomResponse() {
|
|
433
461
|
return Joi.object({
|
|
434
|
-
|
|
435
|
-
application_id: Joi.string().allow("").required(),
|
|
436
|
-
created_on: LeadPlatformModel.CreatedOn(),
|
|
437
|
-
description: Joi.string().allow(""),
|
|
438
|
-
header_image: Joi.string().allow(""),
|
|
439
|
-
inputs: Joi.array().items(Joi.any()).required(),
|
|
440
|
-
login_required: Joi.boolean().required(),
|
|
441
|
-
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
442
|
-
priority: LeadPlatformModel.Priority().required(),
|
|
443
|
-
should_notify: Joi.boolean().required(),
|
|
444
|
-
slug: Joi.string().allow("").required(),
|
|
445
|
-
submit_button: LeadPlatformModel.SubmitButton(),
|
|
446
|
-
success_message: Joi.string().allow(""),
|
|
447
|
-
title: Joi.string().allow("").required(),
|
|
462
|
+
success: Joi.boolean().required(),
|
|
448
463
|
});
|
|
449
464
|
}
|
|
450
465
|
|
|
451
|
-
/** @returns {
|
|
452
|
-
static
|
|
466
|
+
/** @returns {CreateVideoRoomPayload} */
|
|
467
|
+
static CreateVideoRoomPayload() {
|
|
453
468
|
return Joi.object({
|
|
454
|
-
|
|
455
|
-
|
|
469
|
+
unique_name: Joi.string().allow("").required(),
|
|
470
|
+
notify: Joi.array().items(LeadPlatformModel.NotifyUser()),
|
|
456
471
|
});
|
|
457
472
|
}
|
|
458
473
|
|
|
459
|
-
/** @returns {
|
|
460
|
-
static
|
|
474
|
+
/** @returns {NotifyUser} */
|
|
475
|
+
static NotifyUser() {
|
|
461
476
|
return Joi.object({
|
|
462
|
-
|
|
463
|
-
|
|
477
|
+
country_code: Joi.string().allow("").required(),
|
|
478
|
+
phone_number: Joi.string().allow("").required(),
|
|
464
479
|
});
|
|
465
480
|
}
|
|
466
481
|
|
|
467
|
-
/** @returns {
|
|
468
|
-
static
|
|
482
|
+
/** @returns {Filter} */
|
|
483
|
+
static Filter() {
|
|
469
484
|
return Joi.object({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
475
|
-
priority: LeadPlatformModel.PriorityEnum().required(),
|
|
476
|
-
should_notify: Joi.boolean(),
|
|
477
|
-
success_message: Joi.string().allow(""),
|
|
478
|
-
title: Joi.string().allow("").required(),
|
|
485
|
+
priorities: Joi.array().items(LeadPlatformModel.Priority()).required(),
|
|
486
|
+
categories: Joi.array().items(LeadPlatformModel.TicketCategory()),
|
|
487
|
+
statuses: Joi.array().items(LeadPlatformModel.Status()).required(),
|
|
488
|
+
assignees: Joi.array().items(Joi.any()).required(),
|
|
479
489
|
});
|
|
480
490
|
}
|
|
481
491
|
|
|
482
|
-
/** @returns {
|
|
483
|
-
static
|
|
492
|
+
/** @returns {TicketHistoryPayload} */
|
|
493
|
+
static TicketHistoryPayload() {
|
|
484
494
|
return Joi.object({
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
content: LeadPlatformModel.TicketContent(),
|
|
488
|
-
priority: LeadPlatformModel.PriorityEnum(),
|
|
489
|
-
source: Joi.string().allow(""),
|
|
490
|
-
status: Joi.string().allow(""),
|
|
491
|
-
sub_category: Joi.string().allow(""),
|
|
492
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
495
|
+
value: Joi.any().required(),
|
|
496
|
+
type: LeadPlatformModel.HistoryTypeEnum().required(),
|
|
493
497
|
});
|
|
494
498
|
}
|
|
495
499
|
|
|
496
|
-
/** @returns {
|
|
497
|
-
static
|
|
500
|
+
/** @returns {GetTokenForVideoRoomResponse} */
|
|
501
|
+
static GetTokenForVideoRoomResponse() {
|
|
498
502
|
return Joi.object({
|
|
499
|
-
|
|
500
|
-
email: Joi.string().allow(""),
|
|
501
|
-
primary: Joi.boolean(),
|
|
502
|
-
verified: Joi.boolean(),
|
|
503
|
+
access_token: Joi.string().allow("").required(),
|
|
503
504
|
});
|
|
504
505
|
}
|
|
505
506
|
|
|
506
|
-
/** @returns {
|
|
507
|
-
static
|
|
507
|
+
/** @returns {GetParticipantsInsideVideoRoomResponse} */
|
|
508
|
+
static GetParticipantsInsideVideoRoomResponse() {
|
|
508
509
|
return Joi.object({
|
|
509
|
-
|
|
510
|
+
participants: Joi.array()
|
|
511
|
+
.items(LeadPlatformModel.Participant())
|
|
512
|
+
.required(),
|
|
510
513
|
});
|
|
511
514
|
}
|
|
512
515
|
|
|
513
|
-
/** @returns {
|
|
514
|
-
static
|
|
516
|
+
/** @returns {Participant} */
|
|
517
|
+
static Participant() {
|
|
515
518
|
return Joi.object({
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
+
user: LeadPlatformModel.UserSchema(),
|
|
520
|
+
identity: Joi.string().allow(""),
|
|
521
|
+
status: Joi.string().allow(""),
|
|
519
522
|
});
|
|
520
523
|
}
|
|
521
524
|
|
|
522
|
-
/** @returns {
|
|
523
|
-
static
|
|
525
|
+
/** @returns {UserSchema} */
|
|
526
|
+
static UserSchema() {
|
|
524
527
|
return Joi.object({
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
+
application_id: Joi.string().allow(""),
|
|
529
|
+
user_id: Joi.string().allow(""),
|
|
530
|
+
first_name: Joi.string().allow(""),
|
|
531
|
+
meta: Joi.any(),
|
|
532
|
+
last_name: Joi.string().allow(""),
|
|
533
|
+
phone_numbers: Joi.array().items(LeadPlatformModel.PhoneNumber()),
|
|
534
|
+
emails: Joi.array().items(LeadPlatformModel.Email()),
|
|
535
|
+
gender: Joi.string().allow(""),
|
|
536
|
+
dob: Joi.string().allow(""),
|
|
537
|
+
active: Joi.boolean(),
|
|
538
|
+
profile_pic_url: Joi.string().allow(""),
|
|
539
|
+
username: Joi.string().allow(""),
|
|
540
|
+
account_type: Joi.string().allow(""),
|
|
541
|
+
_id: Joi.string().allow(""),
|
|
542
|
+
created_at: Joi.string().allow(""),
|
|
543
|
+
updated_at: Joi.string().allow(""),
|
|
544
|
+
external_id: Joi.string().allow(""),
|
|
528
545
|
});
|
|
529
546
|
}
|
|
530
547
|
|
|
531
|
-
/** @returns {
|
|
532
|
-
static
|
|
548
|
+
/** @returns {PhoneNumber} */
|
|
549
|
+
static PhoneNumber() {
|
|
533
550
|
return Joi.object({
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
551
|
+
active: Joi.boolean(),
|
|
552
|
+
primary: Joi.boolean(),
|
|
553
|
+
verified: Joi.boolean(),
|
|
554
|
+
phone: Joi.string().allow(""),
|
|
555
|
+
country_code: Joi.number(),
|
|
538
556
|
});
|
|
539
557
|
}
|
|
540
558
|
|
|
541
|
-
/** @returns {
|
|
542
|
-
static
|
|
559
|
+
/** @returns {Email} */
|
|
560
|
+
static Email() {
|
|
543
561
|
return Joi.object({
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
562
|
+
primary: Joi.boolean(),
|
|
563
|
+
verified: Joi.boolean(),
|
|
564
|
+
email: Joi.string().allow(""),
|
|
565
|
+
active: Joi.boolean(),
|
|
547
566
|
});
|
|
548
567
|
}
|
|
549
568
|
|
|
550
|
-
/** @returns {
|
|
551
|
-
static
|
|
569
|
+
/** @returns {Debug} */
|
|
570
|
+
static Debug() {
|
|
552
571
|
return Joi.object({
|
|
553
|
-
|
|
572
|
+
source: Joi.string().allow(""),
|
|
573
|
+
platform: Joi.string().allow(""),
|
|
554
574
|
});
|
|
555
575
|
}
|
|
556
576
|
|
|
557
|
-
/** @returns {
|
|
558
|
-
static
|
|
577
|
+
/** @returns {TicketContext} */
|
|
578
|
+
static TicketContext() {
|
|
559
579
|
return Joi.object({
|
|
560
|
-
|
|
561
|
-
|
|
580
|
+
application_id: Joi.string().allow(""),
|
|
581
|
+
company_id: Joi.string().allow("").required(),
|
|
562
582
|
});
|
|
563
583
|
}
|
|
564
584
|
|
|
565
|
-
/** @returns {
|
|
566
|
-
static
|
|
585
|
+
/** @returns {CreatedOn} */
|
|
586
|
+
static CreatedOn() {
|
|
567
587
|
return Joi.object({
|
|
568
|
-
|
|
569
|
-
has_next: Joi.boolean(),
|
|
570
|
-
has_previous: Joi.boolean(),
|
|
571
|
-
item_total: Joi.number(),
|
|
572
|
-
next_id: Joi.string().allow(""),
|
|
573
|
-
size: Joi.number(),
|
|
574
|
-
type: Joi.string().allow("").required(),
|
|
588
|
+
user_agent: Joi.string().allow("").required(),
|
|
575
589
|
});
|
|
576
590
|
}
|
|
577
|
-
|
|
578
|
-
/** @returns {
|
|
579
|
-
static
|
|
591
|
+
|
|
592
|
+
/** @returns {TicketAsset} */
|
|
593
|
+
static TicketAsset() {
|
|
580
594
|
return Joi.object({
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
595
|
+
display: Joi.string().allow(""),
|
|
596
|
+
value: Joi.string().allow("").required(),
|
|
597
|
+
type: LeadPlatformModel.TicketAssetTypeEnum().required(),
|
|
584
598
|
});
|
|
585
599
|
}
|
|
586
600
|
|
|
587
|
-
/** @returns {
|
|
588
|
-
static
|
|
601
|
+
/** @returns {TicketContent} */
|
|
602
|
+
static TicketContent() {
|
|
589
603
|
return Joi.object({
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
primary: Joi.boolean(),
|
|
594
|
-
verified: Joi.boolean(),
|
|
604
|
+
title: Joi.string().allow("").required(),
|
|
605
|
+
description: Joi.string().allow(""),
|
|
606
|
+
attachments: Joi.array().items(LeadPlatformModel.TicketAsset()),
|
|
595
607
|
});
|
|
596
608
|
}
|
|
597
609
|
|
|
598
|
-
/** @returns {
|
|
599
|
-
static
|
|
610
|
+
/** @returns {AddTicketPayload} */
|
|
611
|
+
static AddTicketPayload() {
|
|
600
612
|
return Joi.object({
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
613
|
+
created_by: Joi.any(),
|
|
614
|
+
status: Joi.string().allow(""),
|
|
615
|
+
priority: LeadPlatformModel.PriorityEnum(),
|
|
616
|
+
category: Joi.string().allow("").required(),
|
|
617
|
+
content: LeadPlatformModel.TicketContent().required(),
|
|
618
|
+
_custom_json: Joi.any(),
|
|
605
619
|
});
|
|
606
620
|
}
|
|
607
621
|
|
|
608
622
|
/** @returns {Priority} */
|
|
609
623
|
static Priority() {
|
|
610
624
|
return Joi.object({
|
|
611
|
-
color: Joi.string().allow("").required(),
|
|
612
|
-
display: Joi.string().allow("").required(),
|
|
613
625
|
key: LeadPlatformModel.PriorityEnum().required(),
|
|
626
|
+
display: Joi.string().allow("").required(),
|
|
627
|
+
color: Joi.string().allow("").required(),
|
|
614
628
|
});
|
|
615
629
|
}
|
|
616
630
|
|
|
617
631
|
/** @returns {Status} */
|
|
618
632
|
static Status() {
|
|
619
633
|
return Joi.object({
|
|
620
|
-
color: Joi.string().allow("").required(),
|
|
621
|
-
display: Joi.string().allow("").required(),
|
|
622
634
|
key: Joi.string().allow("").required(),
|
|
635
|
+
display: Joi.string().allow("").required(),
|
|
636
|
+
color: Joi.string().allow("").required(),
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/** @returns {TicketFeedbackList} */
|
|
641
|
+
static TicketFeedbackList() {
|
|
642
|
+
return Joi.object({
|
|
643
|
+
items: Joi.array().items(LeadPlatformModel.TicketFeedback()),
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/** @returns {TicketFeedbackPayload} */
|
|
648
|
+
static TicketFeedbackPayload() {
|
|
649
|
+
return Joi.object({
|
|
650
|
+
form_response: Joi.any(),
|
|
623
651
|
});
|
|
624
652
|
}
|
|
625
653
|
|
|
626
654
|
/** @returns {SubmitButton} */
|
|
627
655
|
static SubmitButton() {
|
|
628
656
|
return Joi.object({
|
|
629
|
-
background_color: Joi.string().allow("").required(),
|
|
630
657
|
title: Joi.string().allow("").required(),
|
|
631
658
|
title_color: Joi.string().allow("").required(),
|
|
659
|
+
background_color: Joi.string().allow("").required(),
|
|
632
660
|
});
|
|
633
661
|
}
|
|
634
662
|
|
|
635
|
-
/** @returns {
|
|
636
|
-
static
|
|
663
|
+
/** @returns {PollForAssignment} */
|
|
664
|
+
static PollForAssignment() {
|
|
637
665
|
return Joi.object({
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
666
|
+
duration: Joi.number().required(),
|
|
667
|
+
message: Joi.string().allow("").required(),
|
|
668
|
+
success_message: Joi.string().allow("").required(),
|
|
669
|
+
failure_message: Joi.string().allow("").required(),
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** @returns {CustomForm} */
|
|
674
|
+
static CustomForm() {
|
|
675
|
+
return Joi.object({
|
|
676
|
+
application_id: Joi.string().allow("").required(),
|
|
677
|
+
slug: Joi.string().allow("").required(),
|
|
678
|
+
header_image: Joi.string().allow(""),
|
|
679
|
+
title: Joi.string().allow("").required(),
|
|
680
|
+
description: Joi.string().allow(""),
|
|
649
681
|
priority: LeadPlatformModel.Priority().required(),
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
682
|
+
login_required: Joi.boolean().required(),
|
|
683
|
+
should_notify: Joi.boolean().required(),
|
|
684
|
+
success_message: Joi.string().allow(""),
|
|
685
|
+
submit_button: LeadPlatformModel.SubmitButton(),
|
|
686
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
687
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
688
|
+
poll_for_assignment: LeadPlatformModel.PollForAssignment(),
|
|
689
|
+
_id: Joi.string().allow("").required(),
|
|
656
690
|
});
|
|
657
691
|
}
|
|
658
692
|
|
|
659
|
-
/** @returns {
|
|
660
|
-
static
|
|
693
|
+
/** @returns {FeedbackForm} */
|
|
694
|
+
static FeedbackForm() {
|
|
661
695
|
return Joi.object({
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
696
|
+
inputs: Joi.any(),
|
|
697
|
+
title: Joi.string().allow(""),
|
|
698
|
+
timestamps: Joi.any(),
|
|
665
699
|
});
|
|
666
700
|
}
|
|
667
701
|
|
|
@@ -669,27 +703,19 @@ class LeadPlatformModel {
|
|
|
669
703
|
static TicketCategory() {
|
|
670
704
|
return Joi.object({
|
|
671
705
|
display: Joi.string().allow("").required(),
|
|
672
|
-
feedback_form: LeadPlatformModel.FeedbackForm(),
|
|
673
|
-
group_id: Joi.number(),
|
|
674
706
|
key: Joi.string().allow("").required(),
|
|
675
707
|
sub_categories: Joi.link("#TicketCategory"),
|
|
708
|
+
group_id: Joi.number(),
|
|
709
|
+
feedback_form: LeadPlatformModel.FeedbackForm(),
|
|
676
710
|
}).id("TicketCategory");
|
|
677
711
|
}
|
|
678
712
|
|
|
679
|
-
/** @returns {
|
|
680
|
-
static
|
|
681
|
-
return Joi.object({
|
|
682
|
-
attachments: Joi.array().items(LeadPlatformModel.TicketAsset()),
|
|
683
|
-
description: Joi.string().allow(""),
|
|
684
|
-
title: Joi.string().allow("").required(),
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/** @returns {TicketContext} */
|
|
689
|
-
static TicketContext() {
|
|
713
|
+
/** @returns {FeedbackResponseItem} */
|
|
714
|
+
static FeedbackResponseItem() {
|
|
690
715
|
return Joi.object({
|
|
691
|
-
|
|
692
|
-
|
|
716
|
+
display: Joi.string().allow("").required(),
|
|
717
|
+
key: Joi.string().allow("").required(),
|
|
718
|
+
value: Joi.string().allow("").required(),
|
|
693
719
|
});
|
|
694
720
|
}
|
|
695
721
|
|
|
@@ -697,125 +723,85 @@ class LeadPlatformModel {
|
|
|
697
723
|
static TicketFeedback() {
|
|
698
724
|
return Joi.object({
|
|
699
725
|
_id: Joi.string().allow("").required(),
|
|
700
|
-
|
|
726
|
+
ticket_id: Joi.string().allow("").required(),
|
|
701
727
|
company_id: Joi.string().allow("").required(),
|
|
702
|
-
created_at: Joi.string().allow(""),
|
|
703
728
|
response: Joi.array()
|
|
704
729
|
.items(LeadPlatformModel.FeedbackResponseItem())
|
|
705
730
|
.required(),
|
|
706
|
-
|
|
707
|
-
updated_at: Joi.string().allow(""),
|
|
731
|
+
category: Joi.string().allow(""),
|
|
708
732
|
user: Joi.any(),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
/** @returns {TicketFeedbackList} */
|
|
713
|
-
static TicketFeedbackList() {
|
|
714
|
-
return Joi.object({
|
|
715
|
-
items: Joi.array().items(LeadPlatformModel.TicketFeedback()),
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
/** @returns {TicketFeedbackPayload} */
|
|
720
|
-
static TicketFeedbackPayload() {
|
|
721
|
-
return Joi.object({
|
|
722
|
-
form_response: Joi.any(),
|
|
733
|
+
updated_at: Joi.string().allow(""),
|
|
734
|
+
created_at: Joi.string().allow(""),
|
|
723
735
|
});
|
|
724
736
|
}
|
|
725
737
|
|
|
726
738
|
/** @returns {TicketHistory} */
|
|
727
739
|
static TicketHistory() {
|
|
728
740
|
return Joi.object({
|
|
729
|
-
_id: Joi.string().allow("").required(),
|
|
730
|
-
created_at: Joi.string().allow(""),
|
|
731
|
-
created_by: Joi.any(),
|
|
732
|
-
created_on: LeadPlatformModel.CreatedOn(),
|
|
733
|
-
ticket_id: Joi.string().allow("").required(),
|
|
734
741
|
type: Joi.string().allow("").required(),
|
|
735
|
-
updated_at: Joi.string().allow(""),
|
|
736
|
-
value: Joi.any().required(),
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/** @returns {TicketHistoryList} */
|
|
741
|
-
static TicketHistoryList() {
|
|
742
|
-
return Joi.object({
|
|
743
|
-
items: Joi.array().items(LeadPlatformModel.TicketHistory()),
|
|
744
|
-
page: LeadPlatformModel.Page(),
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
/** @returns {TicketHistoryPayload} */
|
|
749
|
-
static TicketHistoryPayload() {
|
|
750
|
-
return Joi.object({
|
|
751
|
-
type: LeadPlatformModel.HistoryTypeEnum().required(),
|
|
752
742
|
value: Joi.any().required(),
|
|
743
|
+
ticket_id: Joi.string().allow("").required(),
|
|
744
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
745
|
+
created_by: Joi.any(),
|
|
746
|
+
_id: Joi.string().allow("").required(),
|
|
747
|
+
updated_at: Joi.string().allow(""),
|
|
748
|
+
created_at: Joi.string().allow(""),
|
|
753
749
|
});
|
|
754
750
|
}
|
|
755
751
|
|
|
756
|
-
/** @returns {
|
|
757
|
-
static
|
|
758
|
-
return Joi.object({
|
|
759
|
-
filters: LeadPlatformModel.Filter(),
|
|
760
|
-
items: Joi.array().items(LeadPlatformModel.Ticket()),
|
|
761
|
-
page: LeadPlatformModel.Page(),
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/** @returns {UserSchema} */
|
|
766
|
-
static UserSchema() {
|
|
752
|
+
/** @returns {Ticket} */
|
|
753
|
+
static Ticket() {
|
|
767
754
|
return Joi.object({
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
755
|
+
context: LeadPlatformModel.TicketContext(),
|
|
756
|
+
created_on: LeadPlatformModel.CreatedOn(),
|
|
757
|
+
response_id: Joi.string().allow(""),
|
|
758
|
+
content: LeadPlatformModel.TicketContent(),
|
|
759
|
+
category: LeadPlatformModel.TicketCategory().required(),
|
|
760
|
+
sub_category: Joi.string().allow(""),
|
|
761
|
+
source: LeadPlatformModel.TicketSourceEnum().required(),
|
|
762
|
+
status: LeadPlatformModel.Status().required(),
|
|
763
|
+
priority: LeadPlatformModel.Priority().required(),
|
|
764
|
+
created_by: Joi.any(),
|
|
765
|
+
assigned_to: Joi.any(),
|
|
766
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
767
|
+
_custom_json: Joi.any(),
|
|
768
|
+
is_feedback_pending: Joi.boolean(),
|
|
769
|
+
integration: Joi.any(),
|
|
770
|
+
_id: Joi.string().allow("").required(),
|
|
782
771
|
updated_at: Joi.string().allow(""),
|
|
783
|
-
|
|
784
|
-
username: Joi.string().allow(""),
|
|
772
|
+
created_at: Joi.string().allow(""),
|
|
785
773
|
});
|
|
786
774
|
}
|
|
787
775
|
|
|
788
776
|
/**
|
|
789
|
-
* Enum:
|
|
777
|
+
* Enum: PriorityEnum Used By: Lead
|
|
790
778
|
*
|
|
791
|
-
* @returns {
|
|
779
|
+
* @returns {PriorityEnum}
|
|
792
780
|
*/
|
|
793
|
-
static
|
|
781
|
+
static PriorityEnum() {
|
|
794
782
|
return Joi.string().valid(
|
|
795
|
-
"
|
|
783
|
+
"low",
|
|
796
784
|
|
|
797
|
-
"
|
|
785
|
+
"medium",
|
|
798
786
|
|
|
799
|
-
"
|
|
787
|
+
"high",
|
|
800
788
|
|
|
801
|
-
"
|
|
789
|
+
"urgent"
|
|
802
790
|
);
|
|
803
791
|
}
|
|
804
792
|
|
|
805
793
|
/**
|
|
806
|
-
* Enum:
|
|
794
|
+
* Enum: HistoryTypeEnum Used By: Lead
|
|
807
795
|
*
|
|
808
|
-
* @returns {
|
|
796
|
+
* @returns {HistoryTypeEnum}
|
|
809
797
|
*/
|
|
810
|
-
static
|
|
798
|
+
static HistoryTypeEnum() {
|
|
811
799
|
return Joi.string().valid(
|
|
812
|
-
"
|
|
813
|
-
|
|
814
|
-
"medium",
|
|
800
|
+
"rating",
|
|
815
801
|
|
|
816
|
-
"
|
|
802
|
+
"log",
|
|
817
803
|
|
|
818
|
-
"
|
|
804
|
+
"comment"
|
|
819
805
|
);
|
|
820
806
|
}
|
|
821
807
|
|