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