@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- 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 +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- 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/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +852 -846
- package/sdk/application/Order/OrderApplicationModel.js +828 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2176 -2145
- package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- 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/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.js +4 -7
- package/sdk/application/User/UserApplicationModel.d.ts +769 -764
- package/sdk/application/User/UserApplicationModel.js +731 -741
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
- package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1842 -1825
- package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5192 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4752 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2693 -2657
- package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +823 -753
- package/sdk/platform/User/UserPlatformModel.js +731 -661
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- 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/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,167 +1,118 @@
|
|
|
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 partner 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
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @typedef FeedbackForm
|
|
124
|
-
* @property {Object} [inputs] - Input details for the feed back form
|
|
125
|
-
* @property {Object} [timestamps] - Gives details of category releted data
|
|
126
|
-
* @property {string} [title] - Title for the feed back form
|
|
76
|
+
* @typedef AgentChangePayload
|
|
77
|
+
* @property {string} agent_id - Agent's unique ID
|
|
127
78
|
*/
|
|
128
79
|
|
|
129
80
|
/**
|
|
130
|
-
* @typedef
|
|
131
|
-
* @property {string}
|
|
132
|
-
* @property {string} key - Key of the form field
|
|
133
|
-
* @property {string} value - User response value for the form field
|
|
81
|
+
* @typedef CreateVideoRoomResponse
|
|
82
|
+
* @property {string} unique_name - Video Room's unique name
|
|
134
83
|
*/
|
|
135
84
|
|
|
136
85
|
/**
|
|
137
|
-
* @typedef
|
|
138
|
-
* @property {
|
|
139
|
-
* @property {TicketCategory[]} [categories] - List of possible categories for tickets
|
|
140
|
-
* @property {Priority[]} priorities - List of possible priorities for tickets
|
|
141
|
-
* @property {Status[]} statuses - List of possible statuses for tickets
|
|
86
|
+
* @typedef CloseVideoRoomResponse
|
|
87
|
+
* @property {boolean} success - Denotes if operation was successfully
|
|
142
88
|
*/
|
|
143
89
|
|
|
144
90
|
/**
|
|
145
|
-
* @typedef
|
|
91
|
+
* @typedef GeneralConfigResponse
|
|
92
|
+
* @property {SupportCommunicationSchema[]} [support_communication]
|
|
146
93
|
* @property {string} [type]
|
|
94
|
+
* @property {GeneralConfigIntegrationSchema} [integration]
|
|
95
|
+
* @property {string[]} [available_integration]
|
|
147
96
|
*/
|
|
148
97
|
|
|
149
98
|
/**
|
|
150
|
-
* @typedef
|
|
151
|
-
* @property {string[]} [available_integration]
|
|
152
|
-
* @property {GeneralConfigIntegrationSchema} [integration]
|
|
153
|
-
* @property {SupportCommunicationSchema[]} [support_communication]
|
|
99
|
+
* @typedef SupportCommunicationSchema
|
|
154
100
|
* @property {string} [type]
|
|
101
|
+
* @property {string} [title]
|
|
102
|
+
* @property {Object} [value]
|
|
103
|
+
* @property {string} [description]
|
|
104
|
+
* @property {boolean} [enabled]
|
|
155
105
|
*/
|
|
156
106
|
|
|
157
107
|
/**
|
|
158
|
-
* @typedef
|
|
159
|
-
* @property {
|
|
108
|
+
* @typedef GeneralConfigIntegrationSchema
|
|
109
|
+
* @property {string} [type]
|
|
160
110
|
*/
|
|
161
111
|
|
|
162
112
|
/**
|
|
163
|
-
* @typedef
|
|
164
|
-
* @property {string}
|
|
113
|
+
* @typedef CreateVideoRoomPayload
|
|
114
|
+
* @property {string} unique_name - Ticket id
|
|
115
|
+
* @property {NotifyUser[]} [notify] - List of people to be notified
|
|
165
116
|
*/
|
|
166
117
|
|
|
167
118
|
/**
|
|
@@ -171,133 +122,125 @@ const Joi = require("joi");
|
|
|
171
122
|
*/
|
|
172
123
|
|
|
173
124
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {
|
|
177
|
-
* @property {
|
|
178
|
-
* @property {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
125
|
+
* @typedef Filter
|
|
126
|
+
* @property {Priority[]} priorities - List of possible priorities for tickets
|
|
127
|
+
* @property {TicketCategory[]} [categories] - List of possible categories for tickets
|
|
128
|
+
* @property {Status[]} statuses - List of possible statuses for tickets
|
|
129
|
+
* @property {Object[]} assignees - List of support staff availble for tickets assignment
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @typedef TicketHistoryPayload
|
|
134
|
+
* @property {Object} value - Details of history event
|
|
135
|
+
* @property {HistoryTypeEnum} type
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @typedef GetTokenForVideoRoomResponse
|
|
140
|
+
* @property {string} access_token - Access token to be used for video room
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @typedef GetParticipantsInsideVideoRoomResponse
|
|
145
|
+
* @property {Participant[]} participants - List of participants of the video room
|
|
182
146
|
*/
|
|
183
147
|
|
|
184
148
|
/**
|
|
185
149
|
* @typedef Participant
|
|
150
|
+
* @property {UserSchema} [user]
|
|
186
151
|
* @property {string} [identity] - Unique identifier of participant
|
|
187
152
|
* @property {string} [status] - Status of participant
|
|
188
|
-
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @typedef UserSchema
|
|
157
|
+
* @property {string} [first_name] - First name
|
|
158
|
+
* @property {string} [last_name] - Last name
|
|
159
|
+
* @property {PhoneNumber[]} [phone_numbers] - List of phone numbers
|
|
160
|
+
* @property {Email[]} [emails] - List of email addresses
|
|
161
|
+
* @property {string} [gender] - Gender of user
|
|
162
|
+
* @property {boolean} [active] - Is account active
|
|
163
|
+
* @property {string} [profile_pic_url] - URL for profile pic
|
|
164
|
+
* @property {string} [username] - Username of user
|
|
165
|
+
* @property {string} [account_type] - Type of account
|
|
166
|
+
* @property {string} [uid] - Unique identifier of user
|
|
167
|
+
* @property {Debug} [debug]
|
|
168
|
+
* @property {boolean} [has_old_password_hash] - Denotes if user has old password hash
|
|
169
|
+
* @property {string} [_id] - Unique identifier of user
|
|
170
|
+
* @property {string} [created_at] - Time of user creation
|
|
171
|
+
* @property {string} [updated_at] - Last time of user details update
|
|
189
172
|
*/
|
|
190
173
|
|
|
191
174
|
/**
|
|
192
175
|
* @typedef PhoneNumber
|
|
193
176
|
* @property {boolean} [active] - Denotes if the phone number is active
|
|
194
|
-
* @property {number} [country_code] - Country code
|
|
195
|
-
* @property {string} [phone] - Phone number
|
|
196
177
|
* @property {boolean} [primary] - Denotes it's the primary phone number for the account
|
|
197
178
|
* @property {boolean} [verified] - Denotes it's a verified phone number
|
|
179
|
+
* @property {string} [phone] - Phone number
|
|
180
|
+
* @property {number} [country_code] - Country code
|
|
198
181
|
*/
|
|
199
182
|
|
|
200
183
|
/**
|
|
201
|
-
* @typedef
|
|
202
|
-
* @property {
|
|
203
|
-
* @property {
|
|
204
|
-
* @property {string}
|
|
205
|
-
* @property {
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @typedef Priority
|
|
210
|
-
* @property {string} color - Color for priority
|
|
211
|
-
* @property {string} display - Display text for priority
|
|
212
|
-
* @property {PriorityEnum} key
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @typedef Status
|
|
217
|
-
* @property {string} color - Color for status
|
|
218
|
-
* @property {string} display - Display text for status
|
|
219
|
-
* @property {string} key - Key for status
|
|
184
|
+
* @typedef Email
|
|
185
|
+
* @property {boolean} [primary] - Denotes it's the primary email for the account
|
|
186
|
+
* @property {boolean} [verified] - Denotes it's a verified email
|
|
187
|
+
* @property {string} [email] - Email Address
|
|
188
|
+
* @property {boolean} [active] - Denotes if the email is active
|
|
220
189
|
*/
|
|
221
190
|
|
|
222
191
|
/**
|
|
223
|
-
* @typedef
|
|
224
|
-
* @property {string}
|
|
225
|
-
* @property {string}
|
|
226
|
-
* @property {string} title_color - Title color submit button
|
|
192
|
+
* @typedef Debug
|
|
193
|
+
* @property {string} [source] - Source of user
|
|
194
|
+
* @property {string} [platform] - Platform of user
|
|
227
195
|
*/
|
|
228
196
|
|
|
229
197
|
/**
|
|
230
|
-
* @typedef
|
|
231
|
-
* @property {string} [
|
|
232
|
-
* @property {
|
|
233
|
-
* @property {string} [title]
|
|
234
|
-
* @property {string} [type]
|
|
235
|
-
* @property {Object} [value]
|
|
198
|
+
* @typedef TicketContext
|
|
199
|
+
* @property {string} [application_id] - Application ID related to the ticket
|
|
200
|
+
* @property {string} partner_id - Partner ID related to the ticket
|
|
236
201
|
*/
|
|
237
202
|
|
|
238
203
|
/**
|
|
239
|
-
* @typedef
|
|
240
|
-
* @property {
|
|
241
|
-
* @property {string} _id - Unique identifier for the ticket
|
|
242
|
-
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
243
|
-
* @property {TicketCategory} category
|
|
244
|
-
* @property {TicketContent} [content]
|
|
245
|
-
* @property {TicketContext} [context]
|
|
246
|
-
* @property {string} [created_at] - Time when the ticket was created
|
|
247
|
-
* @property {Object} [created_by] - User details of ticket creator
|
|
248
|
-
* @property {CreatedOn} [created_on]
|
|
249
|
-
* @property {Object} [integration] - Integration type and its details of the ticket
|
|
250
|
-
* @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
|
|
251
|
-
* pending for the ticket
|
|
252
|
-
* @property {Priority} priority
|
|
253
|
-
* @property {string} [response_id] - Details of partner and application
|
|
254
|
-
* realated to the ticket
|
|
255
|
-
* @property {TicketSourceEnum} source
|
|
256
|
-
* @property {Status} status
|
|
257
|
-
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
258
|
-
* @property {string[]} [tags] - Tags relevant to ticket
|
|
259
|
-
* @property {string} [updated_at] - Time when the ticket was last updated
|
|
204
|
+
* @typedef CreatedOn
|
|
205
|
+
* @property {string} user_agent - Useragent details
|
|
260
206
|
*/
|
|
261
207
|
|
|
262
208
|
/**
|
|
263
209
|
* @typedef TicketAsset
|
|
264
210
|
* @property {string} [display] - Display text for asset
|
|
265
|
-
* @property {TicketAssetTypeEnum} type
|
|
266
211
|
* @property {string} value - To be used for details
|
|
212
|
+
* @property {TicketAssetTypeEnum} type
|
|
267
213
|
*/
|
|
268
214
|
|
|
269
215
|
/**
|
|
270
|
-
* @typedef
|
|
271
|
-
* @property {string}
|
|
272
|
-
* @property {
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {string} key - Category key value identifier
|
|
275
|
-
* @property {TicketCategory} [sub_categories]
|
|
216
|
+
* @typedef TicketContent
|
|
217
|
+
* @property {string} title - Title for ticket
|
|
218
|
+
* @property {string} [description] - Long description of issue
|
|
219
|
+
* @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket
|
|
276
220
|
*/
|
|
277
221
|
|
|
278
222
|
/**
|
|
279
|
-
* @typedef
|
|
280
|
-
* @property {
|
|
281
|
-
* @property {string} [
|
|
282
|
-
* @property {
|
|
223
|
+
* @typedef AddTicketPayload
|
|
224
|
+
* @property {Object} [created_by] - Creator of the ticket
|
|
225
|
+
* @property {string} [status] - Status of the ticket
|
|
226
|
+
* @property {PriorityEnum} [priority]
|
|
227
|
+
* @property {string} category - Category of the ticket
|
|
228
|
+
* @property {TicketContent} content
|
|
229
|
+
* @property {Object} [_custom_json] - Optional custom data that needs to be sent
|
|
283
230
|
*/
|
|
284
231
|
|
|
285
232
|
/**
|
|
286
|
-
* @typedef
|
|
287
|
-
* @property {
|
|
288
|
-
* @property {string}
|
|
233
|
+
* @typedef Priority
|
|
234
|
+
* @property {PriorityEnum} key
|
|
235
|
+
* @property {string} display - Display text for priority
|
|
236
|
+
* @property {string} color - Color for priority
|
|
289
237
|
*/
|
|
290
238
|
|
|
291
239
|
/**
|
|
292
|
-
* @typedef
|
|
293
|
-
* @property {string}
|
|
294
|
-
* @property {string}
|
|
295
|
-
* @property {string}
|
|
296
|
-
* @property {string} partner_id - Partner id for which ticket was raised
|
|
297
|
-
* @property {FeedbackResponseItem[]} response
|
|
298
|
-
* @property {string} ticket_id - Readable ticket number
|
|
299
|
-
* @property {string} [updated_at] - Time when the feedback was last updated
|
|
300
|
-
* @property {Object} [user] - User who submitted the feedback
|
|
240
|
+
* @typedef Status
|
|
241
|
+
* @property {string} key - Key for status
|
|
242
|
+
* @property {string} display - Display text for status
|
|
243
|
+
* @property {string} color - Color for status
|
|
301
244
|
*/
|
|
302
245
|
|
|
303
246
|
/**
|
|
@@ -312,59 +255,116 @@ const Joi = require("joi");
|
|
|
312
255
|
*/
|
|
313
256
|
|
|
314
257
|
/**
|
|
315
|
-
* @typedef
|
|
316
|
-
* @property {string}
|
|
317
|
-
* @property {string}
|
|
318
|
-
* @property {
|
|
258
|
+
* @typedef SubmitButton
|
|
259
|
+
* @property {string} title - Title for submit button
|
|
260
|
+
* @property {string} title_color - Title color submit button
|
|
261
|
+
* @property {string} background_color - Color for submit button
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @typedef PollForAssignment
|
|
266
|
+
* @property {number} duration - Duration for polling of staff
|
|
267
|
+
* @property {string} message - Message for polling
|
|
268
|
+
* @property {string} success_message - Message for successful polling
|
|
269
|
+
* @property {string} failure_message - Message if polling failed
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @typedef CustomForm
|
|
274
|
+
* @property {string} application_id - Application ID for form
|
|
275
|
+
* @property {string} slug - Slug for the form, which is to be used for accessing the form
|
|
276
|
+
* @property {string} [header_image] - Form header image that will be shown to the user
|
|
277
|
+
* @property {string} title - Form title that will be shown to the user
|
|
278
|
+
* @property {string} [description] - Form description that will be shown to the user
|
|
279
|
+
* @property {Priority} priority
|
|
280
|
+
* @property {boolean} login_required - Denotes if login is required to make a
|
|
281
|
+
* form response submission
|
|
282
|
+
* @property {boolean} should_notify - Denotes if new response submission for
|
|
283
|
+
* the form should be notified to the assignees
|
|
284
|
+
* @property {string} [success_message] - Message that is to be shown on
|
|
285
|
+
* succesfull form response submission
|
|
286
|
+
* @property {SubmitButton} [submit_button]
|
|
287
|
+
* @property {Object[]} inputs - List of all the form fields
|
|
319
288
|
* @property {CreatedOn} [created_on]
|
|
320
|
-
* @property {
|
|
321
|
-
* @property {string}
|
|
322
|
-
* @property {string} [updated_at] - Time of last update of the history event
|
|
323
|
-
* @property {Object} value - Data of the history event
|
|
289
|
+
* @property {PollForAssignment} [poll_for_assignment]
|
|
290
|
+
* @property {string} _id - Unique identifier for the form
|
|
324
291
|
*/
|
|
325
292
|
|
|
326
293
|
/**
|
|
327
|
-
* @typedef
|
|
328
|
-
* @property {
|
|
329
|
-
* @property {
|
|
294
|
+
* @typedef FeedbackForm
|
|
295
|
+
* @property {Object} [inputs] - Input details for the feed back form
|
|
296
|
+
* @property {string} [title] - Title for the feed back form
|
|
297
|
+
* @property {Object} [timestamps] - Gives details of category releted data
|
|
330
298
|
*/
|
|
331
299
|
|
|
332
300
|
/**
|
|
333
|
-
* @typedef
|
|
334
|
-
* @property {
|
|
335
|
-
* @property {
|
|
301
|
+
* @typedef TicketCategory
|
|
302
|
+
* @property {string} display - Category display value identifier
|
|
303
|
+
* @property {string} key - Category key value identifier
|
|
304
|
+
* @property {TicketCategory} [sub_categories]
|
|
305
|
+
* @property {number} [group_id] - Group id of category releted data
|
|
306
|
+
* @property {FeedbackForm} [feedback_form]
|
|
336
307
|
*/
|
|
337
308
|
|
|
338
309
|
/**
|
|
339
|
-
* @typedef
|
|
340
|
-
* @property {
|
|
341
|
-
* @property {
|
|
342
|
-
* @property {
|
|
310
|
+
* @typedef FeedbackResponseItem
|
|
311
|
+
* @property {string} display - Question/Title of the form field
|
|
312
|
+
* @property {string} key - Key of the form field
|
|
313
|
+
* @property {string} value - User response value for the form field
|
|
343
314
|
*/
|
|
344
315
|
|
|
345
316
|
/**
|
|
346
|
-
* @typedef
|
|
347
|
-
* @property {string}
|
|
348
|
-
* @property {string}
|
|
349
|
-
* @property {
|
|
350
|
-
* @property {
|
|
351
|
-
* @property {
|
|
352
|
-
* @property {
|
|
353
|
-
* @property {string} [
|
|
354
|
-
* @property {string} [
|
|
355
|
-
* @property {boolean} [has_old_password_hash] - Denotes if user has old password hash
|
|
356
|
-
* @property {string} [last_name] - Last name
|
|
357
|
-
* @property {PhoneNumber[]} [phone_numbers] - List of phone numbers
|
|
358
|
-
* @property {string} [profile_pic_url] - URL for profile pic
|
|
359
|
-
* @property {string} [uid] - Unique identifier of user
|
|
360
|
-
* @property {string} [updated_at] - Last time of user details update
|
|
361
|
-
* @property {string} [username] - Username of user
|
|
317
|
+
* @typedef TicketFeedback
|
|
318
|
+
* @property {string} _id - Unique identifier for the feedback
|
|
319
|
+
* @property {string} ticket_id - Readable ticket number
|
|
320
|
+
* @property {string} partner_id - Partner id for which ticket was raised
|
|
321
|
+
* @property {FeedbackResponseItem[]} response
|
|
322
|
+
* @property {string} [category] - Category of the ticket
|
|
323
|
+
* @property {Object} [user] - User who submitted the feedback
|
|
324
|
+
* @property {string} [updated_at] - Time when the feedback was last updated
|
|
325
|
+
* @property {string} [created_at] - Time when the feedback was created
|
|
362
326
|
*/
|
|
363
327
|
|
|
364
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* @typedef TicketHistory
|
|
330
|
+
* @property {string} type - Type of the history event
|
|
331
|
+
* @property {Object} value - Data of the history event
|
|
332
|
+
* @property {string} ticket_id - Readable ticket number
|
|
333
|
+
* @property {CreatedOn} [created_on]
|
|
334
|
+
* @property {Object} [created_by] - User who created the history event
|
|
335
|
+
* @property {string} _id - Unique identifier of the history event
|
|
336
|
+
* @property {string} [updated_at] - Time of last update of the history event
|
|
337
|
+
* @property {string} [created_at] - Time of creation of the history event
|
|
338
|
+
*/
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @typedef Ticket
|
|
342
|
+
* @property {TicketContext} [context]
|
|
343
|
+
* @property {CreatedOn} [created_on]
|
|
344
|
+
* @property {string} [response_id] - Details of partner and application
|
|
345
|
+
* realated to the ticket
|
|
346
|
+
* @property {TicketContent} [content]
|
|
347
|
+
* @property {TicketCategory} category
|
|
348
|
+
* @property {string} [sub_category] - Sub-category assigned to the ticket
|
|
349
|
+
* @property {TicketSourceEnum} source
|
|
350
|
+
* @property {Status} status
|
|
351
|
+
* @property {Priority} priority
|
|
352
|
+
* @property {Object} [created_by] - User details of ticket creator
|
|
353
|
+
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
354
|
+
* @property {string[]} [tags] - Tags relevant to ticket
|
|
355
|
+
* @property {Object} [_custom_json] - Custom json relevant to the ticket
|
|
356
|
+
* @property {boolean} [is_feedback_pending] - Denotes if feedback submission is
|
|
357
|
+
* pending for the ticket
|
|
358
|
+
* @property {Object} [integration] - Integration type and its details of the ticket
|
|
359
|
+
* @property {string} _id - Unique identifier for the ticket
|
|
360
|
+
* @property {string} [updated_at] - Time when the ticket was last updated
|
|
361
|
+
* @property {string} [created_at] - Time when the ticket was created
|
|
362
|
+
*/
|
|
365
363
|
|
|
366
364
|
/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
|
|
367
365
|
|
|
366
|
+
/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */
|
|
367
|
+
|
|
368
368
|
/**
|
|
369
369
|
* @typedef {| "image"
|
|
370
370
|
* | "video"
|
|
@@ -380,188 +380,177 @@ const Joi = require("joi");
|
|
|
380
380
|
/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */
|
|
381
381
|
|
|
382
382
|
class LeadPartnerModel {
|
|
383
|
-
/** @returns {
|
|
384
|
-
static
|
|
383
|
+
/** @returns {TicketList} */
|
|
384
|
+
static TicketList() {
|
|
385
385
|
return Joi.object({
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
386
|
+
items: Joi.array().items(LeadPartnerModel.Ticket()),
|
|
387
|
+
filters: LeadPartnerModel.Filter(),
|
|
388
|
+
page: LeadPartnerModel.Page(),
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** @returns {Page} */
|
|
393
|
+
static Page() {
|
|
394
|
+
return Joi.object({
|
|
395
|
+
item_total: Joi.number(),
|
|
396
|
+
next_id: Joi.string().allow(""),
|
|
397
|
+
has_previous: Joi.boolean(),
|
|
398
|
+
has_next: Joi.boolean(),
|
|
399
|
+
current: Joi.number(),
|
|
400
|
+
type: Joi.string().allow("").required(),
|
|
401
|
+
size: Joi.number(),
|
|
392
402
|
});
|
|
393
403
|
}
|
|
394
404
|
|
|
395
|
-
/** @returns {
|
|
396
|
-
static
|
|
405
|
+
/** @returns {TicketHistoryList} */
|
|
406
|
+
static TicketHistoryList() {
|
|
397
407
|
return Joi.object({
|
|
398
|
-
|
|
408
|
+
items: Joi.array().items(LeadPartnerModel.TicketHistory()),
|
|
409
|
+
page: LeadPartnerModel.Page(),
|
|
399
410
|
});
|
|
400
411
|
}
|
|
401
412
|
|
|
402
|
-
/** @returns {
|
|
403
|
-
static
|
|
413
|
+
/** @returns {CustomFormList} */
|
|
414
|
+
static CustomFormList() {
|
|
404
415
|
return Joi.object({
|
|
405
|
-
|
|
416
|
+
items: Joi.array().items(LeadPartnerModel.CustomForm()),
|
|
417
|
+
page: LeadPartnerModel.Page(),
|
|
406
418
|
});
|
|
407
419
|
}
|
|
408
420
|
|
|
409
421
|
/** @returns {CreateCustomFormPayload} */
|
|
410
422
|
static CreateCustomFormPayload() {
|
|
411
423
|
return Joi.object({
|
|
424
|
+
slug: Joi.string().allow("").required(),
|
|
425
|
+
title: Joi.string().allow("").required(),
|
|
426
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
412
427
|
description: Joi.string().allow(""),
|
|
413
428
|
header_image: Joi.string().allow(""),
|
|
414
|
-
inputs: Joi.array().items(Joi.any()).required(),
|
|
415
|
-
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
416
429
|
priority: LeadPartnerModel.PriorityEnum().required(),
|
|
417
430
|
should_notify: Joi.boolean(),
|
|
418
|
-
slug: Joi.string().allow("").required(),
|
|
419
431
|
success_message: Joi.string().allow(""),
|
|
420
|
-
|
|
432
|
+
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
421
433
|
});
|
|
422
434
|
}
|
|
423
435
|
|
|
424
|
-
/** @returns {
|
|
425
|
-
static
|
|
436
|
+
/** @returns {EditCustomFormPayload} */
|
|
437
|
+
static EditCustomFormPayload() {
|
|
426
438
|
return Joi.object({
|
|
427
|
-
|
|
439
|
+
title: Joi.string().allow("").required(),
|
|
440
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
441
|
+
description: Joi.string().allow(""),
|
|
442
|
+
priority: LeadPartnerModel.PriorityEnum().required(),
|
|
443
|
+
header_image: Joi.string().allow(""),
|
|
444
|
+
should_notify: Joi.boolean(),
|
|
445
|
+
login_required: Joi.boolean(),
|
|
446
|
+
success_message: Joi.string().allow(""),
|
|
447
|
+
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
428
448
|
});
|
|
429
449
|
}
|
|
430
450
|
|
|
431
|
-
/** @returns {
|
|
432
|
-
static
|
|
451
|
+
/** @returns {EditTicketPayload} */
|
|
452
|
+
static EditTicketPayload() {
|
|
433
453
|
return Joi.object({
|
|
434
|
-
|
|
435
|
-
|
|
454
|
+
content: LeadPartnerModel.TicketContent(),
|
|
455
|
+
category: Joi.string().allow(""),
|
|
456
|
+
sub_category: Joi.string().allow(""),
|
|
457
|
+
source: Joi.string().allow(""),
|
|
458
|
+
status: Joi.string().allow(""),
|
|
459
|
+
priority: LeadPartnerModel.PriorityEnum(),
|
|
460
|
+
assigned_to: LeadPartnerModel.AgentChangePayload(),
|
|
461
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
436
462
|
});
|
|
437
463
|
}
|
|
438
464
|
|
|
439
|
-
/** @returns {
|
|
440
|
-
static
|
|
465
|
+
/** @returns {AgentChangePayload} */
|
|
466
|
+
static AgentChangePayload() {
|
|
441
467
|
return Joi.object({
|
|
442
|
-
|
|
468
|
+
agent_id: Joi.string().allow("").required(),
|
|
443
469
|
});
|
|
444
470
|
}
|
|
445
471
|
|
|
446
|
-
/** @returns {
|
|
447
|
-
static
|
|
472
|
+
/** @returns {CreateVideoRoomResponse} */
|
|
473
|
+
static CreateVideoRoomResponse() {
|
|
448
474
|
return Joi.object({
|
|
449
|
-
|
|
450
|
-
application_id: Joi.string().allow("").required(),
|
|
451
|
-
created_on: LeadPartnerModel.CreatedOn(),
|
|
452
|
-
description: Joi.string().allow(""),
|
|
453
|
-
header_image: Joi.string().allow(""),
|
|
454
|
-
inputs: Joi.array().items(Joi.any()).required(),
|
|
455
|
-
login_required: Joi.boolean().required(),
|
|
456
|
-
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
457
|
-
priority: LeadPartnerModel.Priority().required(),
|
|
458
|
-
should_notify: Joi.boolean().required(),
|
|
459
|
-
slug: Joi.string().allow("").required(),
|
|
460
|
-
submit_button: LeadPartnerModel.SubmitButton(),
|
|
461
|
-
success_message: Joi.string().allow(""),
|
|
462
|
-
title: Joi.string().allow("").required(),
|
|
475
|
+
unique_name: Joi.string().allow("").required(),
|
|
463
476
|
});
|
|
464
477
|
}
|
|
465
478
|
|
|
466
|
-
/** @returns {
|
|
467
|
-
static
|
|
479
|
+
/** @returns {CloseVideoRoomResponse} */
|
|
480
|
+
static CloseVideoRoomResponse() {
|
|
468
481
|
return Joi.object({
|
|
469
|
-
|
|
470
|
-
page: LeadPartnerModel.Page(),
|
|
482
|
+
success: Joi.boolean().required(),
|
|
471
483
|
});
|
|
472
484
|
}
|
|
473
485
|
|
|
474
|
-
/** @returns {
|
|
475
|
-
static
|
|
486
|
+
/** @returns {GeneralConfigResponse} */
|
|
487
|
+
static GeneralConfigResponse() {
|
|
476
488
|
return Joi.object({
|
|
477
|
-
|
|
478
|
-
|
|
489
|
+
support_communication: Joi.array().items(
|
|
490
|
+
LeadPartnerModel.SupportCommunicationSchema()
|
|
491
|
+
),
|
|
492
|
+
type: Joi.string().allow(""),
|
|
493
|
+
integration: LeadPartnerModel.GeneralConfigIntegrationSchema(),
|
|
494
|
+
available_integration: Joi.array().items(Joi.string().allow("")),
|
|
479
495
|
});
|
|
480
496
|
}
|
|
481
497
|
|
|
482
|
-
/** @returns {
|
|
483
|
-
static
|
|
498
|
+
/** @returns {SupportCommunicationSchema} */
|
|
499
|
+
static SupportCommunicationSchema() {
|
|
484
500
|
return Joi.object({
|
|
501
|
+
type: Joi.string().allow(""),
|
|
502
|
+
title: Joi.string().allow(""),
|
|
503
|
+
value: Joi.any(),
|
|
485
504
|
description: Joi.string().allow(""),
|
|
486
|
-
|
|
487
|
-
inputs: Joi.array().items(Joi.any()).required(),
|
|
488
|
-
login_required: Joi.boolean(),
|
|
489
|
-
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
490
|
-
priority: LeadPartnerModel.PriorityEnum().required(),
|
|
491
|
-
should_notify: Joi.boolean(),
|
|
492
|
-
success_message: Joi.string().allow(""),
|
|
493
|
-
title: Joi.string().allow("").required(),
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
/** @returns {EditTicketPayload} */
|
|
498
|
-
static EditTicketPayload() {
|
|
499
|
-
return Joi.object({
|
|
500
|
-
assigned_to: LeadPartnerModel.AgentChangePayload(),
|
|
501
|
-
category: Joi.string().allow(""),
|
|
502
|
-
content: LeadPartnerModel.TicketContent(),
|
|
503
|
-
priority: LeadPartnerModel.PriorityEnum(),
|
|
504
|
-
source: Joi.string().allow(""),
|
|
505
|
-
status: Joi.string().allow(""),
|
|
506
|
-
sub_category: Joi.string().allow(""),
|
|
507
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
505
|
+
enabled: Joi.boolean(),
|
|
508
506
|
});
|
|
509
507
|
}
|
|
510
508
|
|
|
511
|
-
/** @returns {
|
|
512
|
-
static
|
|
509
|
+
/** @returns {GeneralConfigIntegrationSchema} */
|
|
510
|
+
static GeneralConfigIntegrationSchema() {
|
|
513
511
|
return Joi.object({
|
|
514
|
-
|
|
515
|
-
email: Joi.string().allow(""),
|
|
516
|
-
primary: Joi.boolean(),
|
|
517
|
-
verified: Joi.boolean(),
|
|
512
|
+
type: Joi.string().allow(""),
|
|
518
513
|
});
|
|
519
514
|
}
|
|
520
515
|
|
|
521
|
-
/** @returns {
|
|
522
|
-
static
|
|
516
|
+
/** @returns {CreateVideoRoomPayload} */
|
|
517
|
+
static CreateVideoRoomPayload() {
|
|
523
518
|
return Joi.object({
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
title: Joi.string().allow(""),
|
|
519
|
+
unique_name: Joi.string().allow("").required(),
|
|
520
|
+
notify: Joi.array().items(LeadPartnerModel.NotifyUser()),
|
|
527
521
|
});
|
|
528
522
|
}
|
|
529
523
|
|
|
530
|
-
/** @returns {
|
|
531
|
-
static
|
|
524
|
+
/** @returns {NotifyUser} */
|
|
525
|
+
static NotifyUser() {
|
|
532
526
|
return Joi.object({
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
value: Joi.string().allow("").required(),
|
|
527
|
+
country_code: Joi.string().allow("").required(),
|
|
528
|
+
phone_number: Joi.string().allow("").required(),
|
|
536
529
|
});
|
|
537
530
|
}
|
|
538
531
|
|
|
539
532
|
/** @returns {Filter} */
|
|
540
533
|
static Filter() {
|
|
541
534
|
return Joi.object({
|
|
542
|
-
assignees: Joi.array().items(Joi.any()).required(),
|
|
543
|
-
categories: Joi.array().items(LeadPartnerModel.TicketCategory()),
|
|
544
535
|
priorities: Joi.array().items(LeadPartnerModel.Priority()).required(),
|
|
536
|
+
categories: Joi.array().items(LeadPartnerModel.TicketCategory()),
|
|
545
537
|
statuses: Joi.array().items(LeadPartnerModel.Status()).required(),
|
|
538
|
+
assignees: Joi.array().items(Joi.any()).required(),
|
|
546
539
|
});
|
|
547
540
|
}
|
|
548
541
|
|
|
549
|
-
/** @returns {
|
|
550
|
-
static
|
|
542
|
+
/** @returns {TicketHistoryPayload} */
|
|
543
|
+
static TicketHistoryPayload() {
|
|
551
544
|
return Joi.object({
|
|
552
|
-
|
|
545
|
+
value: Joi.any().required(),
|
|
546
|
+
type: LeadPartnerModel.HistoryTypeEnum().required(),
|
|
553
547
|
});
|
|
554
548
|
}
|
|
555
549
|
|
|
556
|
-
/** @returns {
|
|
557
|
-
static
|
|
550
|
+
/** @returns {GetTokenForVideoRoomResponse} */
|
|
551
|
+
static GetTokenForVideoRoomResponse() {
|
|
558
552
|
return Joi.object({
|
|
559
|
-
|
|
560
|
-
integration: LeadPartnerModel.GeneralConfigIntegrationSchema(),
|
|
561
|
-
support_communication: Joi.array().items(
|
|
562
|
-
LeadPartnerModel.SupportCommunicationSchema()
|
|
563
|
-
),
|
|
564
|
-
type: Joi.string().allow(""),
|
|
553
|
+
access_token: Joi.string().allow("").required(),
|
|
565
554
|
});
|
|
566
555
|
}
|
|
567
556
|
|
|
@@ -574,132 +563,187 @@ class LeadPartnerModel {
|
|
|
574
563
|
});
|
|
575
564
|
}
|
|
576
565
|
|
|
577
|
-
/** @returns {
|
|
578
|
-
static
|
|
566
|
+
/** @returns {Participant} */
|
|
567
|
+
static Participant() {
|
|
579
568
|
return Joi.object({
|
|
580
|
-
|
|
569
|
+
user: LeadPartnerModel.UserSchema(),
|
|
570
|
+
identity: Joi.string().allow(""),
|
|
571
|
+
status: Joi.string().allow(""),
|
|
581
572
|
});
|
|
582
573
|
}
|
|
583
574
|
|
|
584
|
-
/** @returns {
|
|
585
|
-
static
|
|
575
|
+
/** @returns {UserSchema} */
|
|
576
|
+
static UserSchema() {
|
|
586
577
|
return Joi.object({
|
|
587
|
-
|
|
588
|
-
|
|
578
|
+
first_name: Joi.string().allow(""),
|
|
579
|
+
last_name: Joi.string().allow(""),
|
|
580
|
+
phone_numbers: Joi.array().items(LeadPartnerModel.PhoneNumber()),
|
|
581
|
+
emails: Joi.array().items(LeadPartnerModel.Email()),
|
|
582
|
+
gender: Joi.string().allow(""),
|
|
583
|
+
active: Joi.boolean(),
|
|
584
|
+
profile_pic_url: Joi.string().allow(""),
|
|
585
|
+
username: Joi.string().allow(""),
|
|
586
|
+
account_type: Joi.string().allow(""),
|
|
587
|
+
uid: Joi.string().allow(""),
|
|
588
|
+
debug: LeadPartnerModel.Debug(),
|
|
589
|
+
has_old_password_hash: Joi.boolean(),
|
|
590
|
+
_id: Joi.string().allow(""),
|
|
591
|
+
created_at: Joi.string().allow(""),
|
|
592
|
+
updated_at: Joi.string().allow(""),
|
|
589
593
|
});
|
|
590
594
|
}
|
|
591
595
|
|
|
592
|
-
/** @returns {
|
|
593
|
-
static
|
|
596
|
+
/** @returns {PhoneNumber} */
|
|
597
|
+
static PhoneNumber() {
|
|
594
598
|
return Joi.object({
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
size: Joi.number(),
|
|
601
|
-
type: Joi.string().allow("").required(),
|
|
599
|
+
active: Joi.boolean(),
|
|
600
|
+
primary: Joi.boolean(),
|
|
601
|
+
verified: Joi.boolean(),
|
|
602
|
+
phone: Joi.string().allow(""),
|
|
603
|
+
country_code: Joi.number(),
|
|
602
604
|
});
|
|
603
605
|
}
|
|
604
606
|
|
|
605
|
-
/** @returns {
|
|
606
|
-
static
|
|
607
|
+
/** @returns {Email} */
|
|
608
|
+
static Email() {
|
|
609
|
+
return Joi.object({
|
|
610
|
+
primary: Joi.boolean(),
|
|
611
|
+
verified: Joi.boolean(),
|
|
612
|
+
email: Joi.string().allow(""),
|
|
613
|
+
active: Joi.boolean(),
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/** @returns {Debug} */
|
|
618
|
+
static Debug() {
|
|
619
|
+
return Joi.object({
|
|
620
|
+
source: Joi.string().allow(""),
|
|
621
|
+
platform: Joi.string().allow(""),
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/** @returns {TicketContext} */
|
|
626
|
+
static TicketContext() {
|
|
627
|
+
return Joi.object({
|
|
628
|
+
application_id: Joi.string().allow(""),
|
|
629
|
+
partner_id: Joi.string().allow("").required(),
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** @returns {CreatedOn} */
|
|
634
|
+
static CreatedOn() {
|
|
635
|
+
return Joi.object({
|
|
636
|
+
user_agent: Joi.string().allow("").required(),
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/** @returns {TicketAsset} */
|
|
641
|
+
static TicketAsset() {
|
|
607
642
|
return Joi.object({
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
643
|
+
display: Joi.string().allow(""),
|
|
644
|
+
value: Joi.string().allow("").required(),
|
|
645
|
+
type: LeadPartnerModel.TicketAssetTypeEnum().required(),
|
|
611
646
|
});
|
|
612
647
|
}
|
|
613
648
|
|
|
614
|
-
/** @returns {
|
|
615
|
-
static
|
|
649
|
+
/** @returns {TicketContent} */
|
|
650
|
+
static TicketContent() {
|
|
616
651
|
return Joi.object({
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
primary: Joi.boolean(),
|
|
621
|
-
verified: Joi.boolean(),
|
|
652
|
+
title: Joi.string().allow("").required(),
|
|
653
|
+
description: Joi.string().allow(""),
|
|
654
|
+
attachments: Joi.array().items(LeadPartnerModel.TicketAsset()),
|
|
622
655
|
});
|
|
623
656
|
}
|
|
624
657
|
|
|
625
|
-
/** @returns {
|
|
626
|
-
static
|
|
658
|
+
/** @returns {AddTicketPayload} */
|
|
659
|
+
static AddTicketPayload() {
|
|
627
660
|
return Joi.object({
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
661
|
+
created_by: Joi.any(),
|
|
662
|
+
status: Joi.string().allow(""),
|
|
663
|
+
priority: LeadPartnerModel.PriorityEnum(),
|
|
664
|
+
category: Joi.string().allow("").required(),
|
|
665
|
+
content: LeadPartnerModel.TicketContent().required(),
|
|
666
|
+
_custom_json: Joi.any(),
|
|
632
667
|
});
|
|
633
668
|
}
|
|
634
669
|
|
|
635
670
|
/** @returns {Priority} */
|
|
636
671
|
static Priority() {
|
|
637
672
|
return Joi.object({
|
|
638
|
-
color: Joi.string().allow("").required(),
|
|
639
|
-
display: Joi.string().allow("").required(),
|
|
640
673
|
key: LeadPartnerModel.PriorityEnum().required(),
|
|
674
|
+
display: Joi.string().allow("").required(),
|
|
675
|
+
color: Joi.string().allow("").required(),
|
|
641
676
|
});
|
|
642
677
|
}
|
|
643
678
|
|
|
644
679
|
/** @returns {Status} */
|
|
645
680
|
static Status() {
|
|
646
681
|
return Joi.object({
|
|
647
|
-
color: Joi.string().allow("").required(),
|
|
648
|
-
display: Joi.string().allow("").required(),
|
|
649
682
|
key: Joi.string().allow("").required(),
|
|
683
|
+
display: Joi.string().allow("").required(),
|
|
684
|
+
color: Joi.string().allow("").required(),
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/** @returns {TicketFeedbackList} */
|
|
689
|
+
static TicketFeedbackList() {
|
|
690
|
+
return Joi.object({
|
|
691
|
+
items: Joi.array().items(LeadPartnerModel.TicketFeedback()),
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/** @returns {TicketFeedbackPayload} */
|
|
696
|
+
static TicketFeedbackPayload() {
|
|
697
|
+
return Joi.object({
|
|
698
|
+
form_response: Joi.any(),
|
|
650
699
|
});
|
|
651
700
|
}
|
|
652
701
|
|
|
653
702
|
/** @returns {SubmitButton} */
|
|
654
703
|
static SubmitButton() {
|
|
655
704
|
return Joi.object({
|
|
656
|
-
background_color: Joi.string().allow("").required(),
|
|
657
705
|
title: Joi.string().allow("").required(),
|
|
658
706
|
title_color: Joi.string().allow("").required(),
|
|
707
|
+
background_color: Joi.string().allow("").required(),
|
|
659
708
|
});
|
|
660
709
|
}
|
|
661
710
|
|
|
662
|
-
/** @returns {
|
|
663
|
-
static
|
|
711
|
+
/** @returns {PollForAssignment} */
|
|
712
|
+
static PollForAssignment() {
|
|
664
713
|
return Joi.object({
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
value: Joi.any(),
|
|
714
|
+
duration: Joi.number().required(),
|
|
715
|
+
message: Joi.string().allow("").required(),
|
|
716
|
+
success_message: Joi.string().allow("").required(),
|
|
717
|
+
failure_message: Joi.string().allow("").required(),
|
|
670
718
|
});
|
|
671
719
|
}
|
|
672
720
|
|
|
673
|
-
/** @returns {
|
|
674
|
-
static
|
|
721
|
+
/** @returns {CustomForm} */
|
|
722
|
+
static CustomForm() {
|
|
675
723
|
return Joi.object({
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
context: LeadPartnerModel.TicketContext(),
|
|
682
|
-
created_at: Joi.string().allow(""),
|
|
683
|
-
created_by: Joi.any(),
|
|
684
|
-
created_on: LeadPartnerModel.CreatedOn(),
|
|
685
|
-
integration: Joi.any(),
|
|
686
|
-
is_feedback_pending: Joi.boolean(),
|
|
724
|
+
application_id: Joi.string().allow("").required(),
|
|
725
|
+
slug: Joi.string().allow("").required(),
|
|
726
|
+
header_image: Joi.string().allow(""),
|
|
727
|
+
title: Joi.string().allow("").required(),
|
|
728
|
+
description: Joi.string().allow(""),
|
|
687
729
|
priority: LeadPartnerModel.Priority().required(),
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
730
|
+
login_required: Joi.boolean().required(),
|
|
731
|
+
should_notify: Joi.boolean().required(),
|
|
732
|
+
success_message: Joi.string().allow(""),
|
|
733
|
+
submit_button: LeadPartnerModel.SubmitButton(),
|
|
734
|
+
inputs: Joi.array().items(Joi.any()).required(),
|
|
735
|
+
created_on: LeadPartnerModel.CreatedOn(),
|
|
736
|
+
poll_for_assignment: LeadPartnerModel.PollForAssignment(),
|
|
737
|
+
_id: Joi.string().allow("").required(),
|
|
694
738
|
});
|
|
695
739
|
}
|
|
696
740
|
|
|
697
|
-
/** @returns {
|
|
698
|
-
static
|
|
741
|
+
/** @returns {FeedbackForm} */
|
|
742
|
+
static FeedbackForm() {
|
|
699
743
|
return Joi.object({
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
744
|
+
inputs: Joi.any(),
|
|
745
|
+
title: Joi.string().allow(""),
|
|
746
|
+
timestamps: Joi.any(),
|
|
703
747
|
});
|
|
704
748
|
}
|
|
705
749
|
|
|
@@ -707,27 +751,19 @@ class LeadPartnerModel {
|
|
|
707
751
|
static TicketCategory() {
|
|
708
752
|
return Joi.object({
|
|
709
753
|
display: Joi.string().allow("").required(),
|
|
710
|
-
feedback_form: LeadPartnerModel.FeedbackForm(),
|
|
711
|
-
group_id: Joi.number(),
|
|
712
754
|
key: Joi.string().allow("").required(),
|
|
713
755
|
sub_categories: Joi.link("#TicketCategory"),
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
/** @returns {TicketContent} */
|
|
718
|
-
static TicketContent() {
|
|
719
|
-
return Joi.object({
|
|
720
|
-
attachments: Joi.array().items(LeadPartnerModel.TicketAsset()),
|
|
721
|
-
description: Joi.string().allow(""),
|
|
722
|
-
title: Joi.string().allow("").required(),
|
|
756
|
+
group_id: Joi.number(),
|
|
757
|
+
feedback_form: LeadPartnerModel.FeedbackForm(),
|
|
723
758
|
});
|
|
724
759
|
}
|
|
725
760
|
|
|
726
|
-
/** @returns {
|
|
727
|
-
static
|
|
761
|
+
/** @returns {FeedbackResponseItem} */
|
|
762
|
+
static FeedbackResponseItem() {
|
|
728
763
|
return Joi.object({
|
|
729
|
-
|
|
730
|
-
|
|
764
|
+
display: Joi.string().allow("").required(),
|
|
765
|
+
key: Joi.string().allow("").required(),
|
|
766
|
+
value: Joi.string().allow("").required(),
|
|
731
767
|
});
|
|
732
768
|
}
|
|
733
769
|
|
|
@@ -735,121 +771,85 @@ class LeadPartnerModel {
|
|
|
735
771
|
static TicketFeedback() {
|
|
736
772
|
return Joi.object({
|
|
737
773
|
_id: Joi.string().allow("").required(),
|
|
738
|
-
|
|
739
|
-
created_at: Joi.string().allow(""),
|
|
774
|
+
ticket_id: Joi.string().allow("").required(),
|
|
740
775
|
partner_id: Joi.string().allow("").required(),
|
|
741
776
|
response: Joi.array()
|
|
742
777
|
.items(LeadPartnerModel.FeedbackResponseItem())
|
|
743
778
|
.required(),
|
|
744
|
-
|
|
745
|
-
updated_at: Joi.string().allow(""),
|
|
779
|
+
category: Joi.string().allow(""),
|
|
746
780
|
user: Joi.any(),
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
/** @returns {TicketFeedbackList} */
|
|
751
|
-
static TicketFeedbackList() {
|
|
752
|
-
return Joi.object({
|
|
753
|
-
items: Joi.array().items(LeadPartnerModel.TicketFeedback()),
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/** @returns {TicketFeedbackPayload} */
|
|
758
|
-
static TicketFeedbackPayload() {
|
|
759
|
-
return Joi.object({
|
|
760
|
-
form_response: Joi.any(),
|
|
781
|
+
updated_at: Joi.string().allow(""),
|
|
782
|
+
created_at: Joi.string().allow(""),
|
|
761
783
|
});
|
|
762
784
|
}
|
|
763
785
|
|
|
764
786
|
/** @returns {TicketHistory} */
|
|
765
787
|
static TicketHistory() {
|
|
766
788
|
return Joi.object({
|
|
767
|
-
_id: Joi.string().allow("").required(),
|
|
768
|
-
created_at: Joi.string().allow(""),
|
|
769
|
-
created_by: Joi.any(),
|
|
770
|
-
created_on: LeadPartnerModel.CreatedOn(),
|
|
771
|
-
ticket_id: Joi.string().allow("").required(),
|
|
772
789
|
type: Joi.string().allow("").required(),
|
|
773
|
-
updated_at: Joi.string().allow(""),
|
|
774
|
-
value: Joi.any().required(),
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/** @returns {TicketHistoryList} */
|
|
779
|
-
static TicketHistoryList() {
|
|
780
|
-
return Joi.object({
|
|
781
|
-
items: Joi.array().items(LeadPartnerModel.TicketHistory()),
|
|
782
|
-
page: LeadPartnerModel.Page(),
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
/** @returns {TicketHistoryPayload} */
|
|
787
|
-
static TicketHistoryPayload() {
|
|
788
|
-
return Joi.object({
|
|
789
|
-
type: LeadPartnerModel.HistoryTypeEnum().required(),
|
|
790
790
|
value: Joi.any().required(),
|
|
791
|
+
ticket_id: Joi.string().allow("").required(),
|
|
792
|
+
created_on: LeadPartnerModel.CreatedOn(),
|
|
793
|
+
created_by: Joi.any(),
|
|
794
|
+
_id: Joi.string().allow("").required(),
|
|
795
|
+
updated_at: Joi.string().allow(""),
|
|
796
|
+
created_at: Joi.string().allow(""),
|
|
791
797
|
});
|
|
792
798
|
}
|
|
793
799
|
|
|
794
|
-
/** @returns {
|
|
795
|
-
static
|
|
796
|
-
return Joi.object({
|
|
797
|
-
filters: LeadPartnerModel.Filter(),
|
|
798
|
-
items: Joi.array().items(LeadPartnerModel.Ticket()),
|
|
799
|
-
page: LeadPartnerModel.Page(),
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
/** @returns {UserSchema} */
|
|
804
|
-
static UserSchema() {
|
|
800
|
+
/** @returns {Ticket} */
|
|
801
|
+
static Ticket() {
|
|
805
802
|
return Joi.object({
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
803
|
+
context: LeadPartnerModel.TicketContext(),
|
|
804
|
+
created_on: LeadPartnerModel.CreatedOn(),
|
|
805
|
+
response_id: Joi.string().allow(""),
|
|
806
|
+
content: LeadPartnerModel.TicketContent(),
|
|
807
|
+
category: LeadPartnerModel.TicketCategory().required(),
|
|
808
|
+
sub_category: Joi.string().allow(""),
|
|
809
|
+
source: LeadPartnerModel.TicketSourceEnum().required(),
|
|
810
|
+
status: LeadPartnerModel.Status().required(),
|
|
811
|
+
priority: LeadPartnerModel.Priority().required(),
|
|
812
|
+
created_by: Joi.any(),
|
|
813
|
+
assigned_to: Joi.any(),
|
|
814
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
815
|
+
_custom_json: Joi.any(),
|
|
816
|
+
is_feedback_pending: Joi.boolean(),
|
|
817
|
+
integration: Joi.any(),
|
|
818
|
+
_id: Joi.string().allow("").required(),
|
|
819
819
|
updated_at: Joi.string().allow(""),
|
|
820
|
-
|
|
820
|
+
created_at: Joi.string().allow(""),
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
|
|
824
824
|
/**
|
|
825
|
-
* Enum:
|
|
825
|
+
* Enum: PriorityEnum Used By: Lead
|
|
826
826
|
*
|
|
827
|
-
* @returns {
|
|
827
|
+
* @returns {PriorityEnum}
|
|
828
828
|
*/
|
|
829
|
-
static
|
|
829
|
+
static PriorityEnum() {
|
|
830
830
|
return Joi.string().valid(
|
|
831
|
-
"
|
|
831
|
+
"low",
|
|
832
832
|
|
|
833
|
-
"
|
|
833
|
+
"medium",
|
|
834
834
|
|
|
835
|
-
"
|
|
835
|
+
"high",
|
|
836
|
+
|
|
837
|
+
"urgent"
|
|
836
838
|
);
|
|
837
839
|
}
|
|
838
840
|
|
|
839
841
|
/**
|
|
840
|
-
* Enum:
|
|
842
|
+
* Enum: HistoryTypeEnum Used By: Lead
|
|
841
843
|
*
|
|
842
|
-
* @returns {
|
|
844
|
+
* @returns {HistoryTypeEnum}
|
|
843
845
|
*/
|
|
844
|
-
static
|
|
846
|
+
static HistoryTypeEnum() {
|
|
845
847
|
return Joi.string().valid(
|
|
846
|
-
"
|
|
847
|
-
|
|
848
|
-
"medium",
|
|
848
|
+
"rating",
|
|
849
849
|
|
|
850
|
-
"
|
|
850
|
+
"log",
|
|
851
851
|
|
|
852
|
-
"
|
|
852
|
+
"comment"
|
|
853
853
|
);
|
|
854
854
|
}
|
|
855
855
|
|