@gofynd/fdk-client-javascript 1.4.2-beta.7 → 1.4.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.
Files changed (254) hide show
  1. package/README.md +1 -10
  2. package/application.d.ts +3 -3
  3. package/common.d.ts +3 -3
  4. package/index.d.ts +15 -15
  5. package/package.json +5 -3
  6. package/partner.d.ts +3 -3
  7. package/platform.d.ts +3 -3
  8. package/public.d.ts +2 -2
  9. package/sdk/application/ApplicationAPIClient.d.ts +1 -1
  10. package/sdk/application/ApplicationAPIClient.js +0 -1
  11. package/sdk/application/ApplicationClient.d.ts +17 -17
  12. package/sdk/application/ApplicationConfig.d.ts +3 -3
  13. package/sdk/application/Cart/CartApplicationClient.d.ts +58 -58
  14. package/sdk/application/Cart/CartApplicationClient.js +56 -56
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -1
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +72 -72
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +69 -69
  18. package/sdk/application/Common/CommonApplicationClient.d.ts +6 -6
  19. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  20. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +8 -8
  21. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -6
  22. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  23. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -34
  24. package/sdk/application/Configuration/ConfigurationApplicationClient.js +32 -32
  25. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +1 -1
  26. package/sdk/application/Content/ContentApplicationClient.d.ts +48 -48
  27. package/sdk/application/Content/ContentApplicationClient.js +45 -45
  28. package/sdk/application/Content/ContentApplicationModel.d.ts +18 -18
  29. package/sdk/application/Content/ContentApplicationModel.js +26 -26
  30. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +7 -7
  31. package/sdk/application/FileStorage/FileStorageApplicationClient.js +15 -9
  32. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  33. package/sdk/application/Lead/LeadApplicationClient.d.ts +12 -12
  34. package/sdk/application/Lead/LeadApplicationClient.js +10 -10
  35. package/sdk/application/Lead/LeadApplicationModel.d.ts +64 -77
  36. package/sdk/application/Lead/LeadApplicationModel.js +42 -52
  37. package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -1
  38. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +24 -24
  39. package/sdk/application/Logistic/LogisticApplicationClient.js +22 -22
  40. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -1
  41. package/sdk/application/Order/OrderApplicationClient.d.ts +19 -30
  42. package/sdk/application/Order/OrderApplicationClient.js +17 -97
  43. package/sdk/application/Order/OrderApplicationValidator.d.ts +2 -16
  44. package/sdk/application/Order/OrderApplicationValidator.js +0 -13
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -91
  46. package/sdk/application/Payment/PaymentApplicationClient.js +94 -94
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -2
  48. package/sdk/application/Payment/PaymentApplicationModel.js +4 -2
  49. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +6 -6
  50. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  51. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +29 -29
  52. package/sdk/application/PosCart/PosCartApplicationClient.js +27 -27
  53. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +1 -1
  54. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +9 -9
  55. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  56. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +1 -1
  57. package/sdk/application/Share/ShareApplicationClient.d.ts +9 -9
  58. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  59. package/sdk/application/Share/ShareApplicationModel.d.ts +2 -0
  60. package/sdk/application/Share/ShareApplicationModel.js +2 -0
  61. package/sdk/application/Share/ShareApplicationValidator.d.ts +1 -1
  62. package/sdk/application/Theme/ThemeApplicationClient.d.ts +10 -10
  63. package/sdk/application/Theme/ThemeApplicationClient.js +8 -8
  64. package/sdk/application/Theme/ThemeApplicationModel.d.ts +25 -32
  65. package/sdk/application/Theme/ThemeApplicationModel.js +30 -40
  66. package/sdk/application/User/UserApplicationClient.d.ts +76 -76
  67. package/sdk/application/User/UserApplicationClient.js +74 -74
  68. package/sdk/application/User/UserApplicationModel.d.ts +44 -13
  69. package/sdk/application/User/UserApplicationModel.js +17 -13
  70. package/sdk/application/User/UserApplicationValidator.d.ts +1 -1
  71. package/sdk/application/index.d.ts +18 -18
  72. package/sdk/common/AxiosHelper.d.ts +1 -1
  73. package/sdk/common/AxiosHelper.js +38 -17
  74. package/sdk/common/Clickstream.js +22 -16
  75. package/sdk/common/curlHelper.js +1 -3
  76. package/sdk/common/utils.d.ts +15 -0
  77. package/sdk/common/utils.js +30 -0
  78. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +3 -3
  79. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +2 -2
  80. package/sdk/partner/Lead/LeadPartnerClient.d.ts +3 -3
  81. package/sdk/partner/Lead/LeadPartnerClient.js +1 -1
  82. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +5 -5
  83. package/sdk/partner/Logistics/LogisticsPartnerClient.js +4 -4
  84. package/sdk/partner/OAuthClient.d.ts +4 -4
  85. package/sdk/partner/PartnerAPIClient.d.ts +1 -1
  86. package/sdk/partner/PartnerAPIClient.js +0 -1
  87. package/sdk/partner/PartnerClient.d.ts +6 -6
  88. package/sdk/partner/PartnerConfig.d.ts +4 -4
  89. package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -20
  90. package/sdk/partner/Theme/ThemePartnerClient.js +19 -19
  91. package/sdk/partner/Theme/ThemePartnerModel.d.ts +25 -32
  92. package/sdk/partner/Theme/ThemePartnerModel.js +30 -40
  93. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +3 -3
  94. package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
  95. package/sdk/partner/index.d.ts +7 -7
  96. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -8
  97. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +6 -6
  98. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  99. package/sdk/platform/Billing/BillingPlatformClient.d.ts +25 -25
  100. package/sdk/platform/Billing/BillingPlatformClient.js +23 -23
  101. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +1 -1
  102. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +115 -115
  103. package/sdk/platform/Cart/CartPlatformApplicationClient.js +113 -113
  104. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +1 -1
  105. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +147 -146
  106. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +146 -145
  107. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1 -1
  108. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +156 -156
  109. package/sdk/platform/Catalog/CatalogPlatformClient.js +153 -153
  110. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +65 -28
  111. package/sdk/platform/Catalog/CatalogPlatformModel.js +68 -36
  112. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -1
  113. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -5
  114. package/sdk/platform/Common/CommonPlatformClient.js +3 -3
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +133 -133
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +131 -131
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +1 -1
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +4 -4
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +2 -2
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +12 -0
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +12 -0
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +28 -28
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +25 -25
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +1 -1
  127. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +52 -52
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +50 -50
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +1 -1
  130. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +31 -31
  131. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +29 -29
  132. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -1
  133. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +128 -128
  134. package/sdk/platform/Content/ContentPlatformApplicationClient.js +131 -131
  135. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
  136. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +4 -4
  137. package/sdk/platform/Content/ContentPlatformClient.d.ts +33 -33
  138. package/sdk/platform/Content/ContentPlatformClient.js +37 -37
  139. package/sdk/platform/Content/ContentPlatformModel.d.ts +18 -18
  140. package/sdk/platform/Content/ContentPlatformModel.js +26 -26
  141. package/sdk/platform/Content/ContentPlatformValidator.d.ts +5 -5
  142. package/sdk/platform/Content/ContentPlatformValidator.js +4 -4
  143. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +24 -24
  144. package/sdk/platform/Discount/DiscountPlatformClient.js +22 -22
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +1 -1
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -23
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +32 -25
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +15 -15
  150. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -19
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +12 -1
  152. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +16 -2
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +1 -1
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +30 -30
  155. package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
  156. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -1
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +19 -19
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +17 -17
  159. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -1
  160. package/sdk/platform/Lead/LeadPlatformClient.d.ts +20 -20
  161. package/sdk/platform/Lead/LeadPlatformClient.js +18 -18
  162. package/sdk/platform/Lead/LeadPlatformModel.d.ts +62 -77
  163. package/sdk/platform/Lead/LeadPlatformModel.js +40 -52
  164. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -1
  165. package/sdk/platform/OAuthClient.d.ts +3 -3
  166. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +12 -12
  167. package/sdk/platform/Order/OrderPlatformApplicationClient.js +10 -10
  168. package/sdk/platform/Order/OrderPlatformClient.d.ts +111 -122
  169. package/sdk/platform/Order/OrderPlatformClient.js +109 -204
  170. package/sdk/platform/Order/OrderPlatformModel.d.ts +18 -2
  171. package/sdk/platform/Order/OrderPlatformModel.js +12 -2
  172. package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -34
  173. package/sdk/platform/Order/OrderPlatformValidator.js +0 -20
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -6
  175. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +4 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -1
  177. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +97 -97
  178. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +95 -95
  179. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +1 -1
  180. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +13 -13
  181. package/sdk/platform/Payment/PaymentPlatformClient.js +11 -11
  182. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +7 -0
  183. package/sdk/platform/Payment/PaymentPlatformModel.js +3 -0
  184. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +1 -1
  185. package/sdk/platform/PlatformAPIClient.d.ts +1 -1
  186. package/sdk/platform/PlatformAPIClient.js +0 -1
  187. package/sdk/platform/PlatformApplicationClient.d.ts +16 -16
  188. package/sdk/platform/PlatformClient.d.ts +19 -21
  189. package/sdk/platform/PlatformClient.js +0 -4
  190. package/sdk/platform/PlatformConfig.d.ts +4 -4
  191. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -14
  192. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +12 -12
  193. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +42 -42
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +40 -40
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -1
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +55 -54
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +53 -52
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2 -2
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -2
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -1
  202. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  203. package/sdk/platform/Share/SharePlatformApplicationClient.js +5 -5
  204. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -0
  206. package/sdk/platform/Share/SharePlatformModel.js +4 -0
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +42 -112
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +40 -597
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +2 -101
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -92
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -8
  212. package/sdk/platform/Theme/ThemePlatformClient.js +6 -6
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +25 -32
  214. package/sdk/platform/Theme/ThemePlatformModel.js +30 -40
  215. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +1 -1
  216. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +37 -37
  217. package/sdk/platform/User/UserPlatformApplicationClient.js +35 -35
  218. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/User/UserPlatformModel.d.ts +48 -13
  220. package/sdk/platform/User/UserPlatformModel.js +21 -13
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +20 -19
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +18 -17
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +2 -2
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +1 -1
  226. package/sdk/platform/index.d.ts +24 -25
  227. package/sdk/platform/index.js +0 -2
  228. package/sdk/public/Billing/BillingPublicClient.d.ts +3 -3
  229. package/sdk/public/Billing/BillingPublicClient.js +4 -4
  230. package/sdk/public/Billing/BillingPublicValidator.d.ts +2 -2
  231. package/sdk/public/Billing/BillingPublicValidator.js +2 -2
  232. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -3
  233. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -1
  234. package/sdk/public/Content/ContentPublicClient.d.ts +2 -2
  235. package/sdk/public/Content/ContentPublicValidator.d.ts +2 -2
  236. package/sdk/public/Content/ContentPublicValidator.js +3 -3
  237. package/sdk/public/Inventory/InventoryPublicClient.d.ts +2 -2
  238. package/sdk/public/Inventory/InventoryPublicModel.d.ts +8 -8
  239. package/sdk/public/Inventory/InventoryPublicModel.js +8 -8
  240. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +1 -1
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +3 -3
  242. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  243. package/sdk/public/PublicAPIClient.d.ts +1 -1
  244. package/sdk/public/PublicClient.d.ts +7 -7
  245. package/sdk/public/Webhook/WebhookPublicClient.d.ts +4 -4
  246. package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
  247. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -1
  248. package/sdk/public/index.d.ts +8 -8
  249. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +0 -152
  250. package/sdk/platform/Inventory/InventoryPlatformClient.js +0 -1017
  251. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +0 -1355
  252. package/sdk/platform/Inventory/InventoryPlatformModel.js +0 -1544
  253. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +0 -171
  254. package/sdk/platform/Inventory/InventoryPlatformValidator.js +0 -159
@@ -202,17 +202,9 @@ const Joi = require("joi");
202
202
 
203
203
  /**
204
204
  * @typedef Action
205
+ * @property {string} [type]
205
206
  * @property {ActionPage} [page]
206
207
  * @property {ActionPage} [popup]
207
- * @property {string} [type]
208
- */
209
-
210
- /**
211
- * @typedef ActionPage
212
- * @property {Object} [params]
213
- * @property {Object} [query]
214
- * @property {string} [url]
215
- * @property {PageType} type
216
208
  */
217
209
 
218
210
  /**
@@ -610,6 +602,14 @@ const Joi = require("joi");
610
602
  * @property {CustomFieldSchema[]} [items]
611
603
  */
612
604
 
605
+ /**
606
+ * @typedef ActionPage
607
+ * @property {Object} [params]
608
+ * @property {Object} [query]
609
+ * @property {string} [url]
610
+ * @property {PageType} type
611
+ */
612
+
613
613
  /**
614
614
  * @typedef {| "about-us"
615
615
  * | "addresses"
@@ -919,25 +919,9 @@ class ContentApplicationModel {
919
919
  /** @returns {Action} */
920
920
  static Action() {
921
921
  return Joi.object({
922
+ type: Joi.string().allow(""),
922
923
  page: ContentApplicationModel.ActionPage(),
923
924
  popup: ContentApplicationModel.ActionPage(),
924
- type: Joi.string().allow(""),
925
- });
926
- }
927
-
928
- /** @returns {ActionPage} */
929
- static ActionPage() {
930
- return Joi.object({
931
- params: Joi.object().pattern(
932
- /\S/,
933
- Joi.array().items(Joi.string().allow(""))
934
- ),
935
- query: Joi.object().pattern(
936
- /\S/,
937
- Joi.array().items(Joi.string().allow(""))
938
- ),
939
- url: Joi.string().allow(""),
940
- type: ContentApplicationModel.PageType().required(),
941
925
  });
942
926
  }
943
927
 
@@ -1430,6 +1414,22 @@ class ContentApplicationModel {
1430
1414
  });
1431
1415
  }
1432
1416
 
1417
+ /** @returns {ActionPage} */
1418
+ static ActionPage() {
1419
+ return Joi.object({
1420
+ params: Joi.object().pattern(
1421
+ /\S/,
1422
+ Joi.array().items(Joi.string().allow(""))
1423
+ ),
1424
+ query: Joi.object().pattern(
1425
+ /\S/,
1426
+ Joi.array().items(Joi.string().allow(""))
1427
+ ),
1428
+ url: Joi.string().allow(""),
1429
+ type: ContentApplicationModel.PageType().required(),
1430
+ });
1431
+ }
1432
+
1433
1433
  /**
1434
1434
  * Enum: PageType Used By: Content
1435
1435
  *
@@ -15,8 +15,8 @@ declare class FileStorage {
15
15
  * @param {import("../ApplicationAPIClient").Options} - Options
16
16
  * @returns {Promise<FileStorageApplicationModel.CompleteResponse>} - Success response
17
17
  * @name completeUpload
18
- * @summary: Finalizes upload process.
19
- * @description: Complete the process of uploading the file, and will return the URL of the uploaded file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
18
+ * @summary: Complete file upload
19
+ * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
20
20
  */
21
21
  completeUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.CompleteResponse>;
22
22
  /**
@@ -25,7 +25,7 @@ declare class FileStorage {
25
25
  * @param {import("../ApplicationAPIClient").Options} - Options
26
26
  * @returns {Promise<FileStorageApplicationModel.SignUrlResponse>} - Success response
27
27
  * @name signUrls
28
- * @summary: Signs file URLs.
28
+ * @summary: Get signed URLs
29
29
  * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
30
30
  */
31
31
  signUrls({ body, requestHeaders }?: FileStorageApplicationValidator.SignUrlsParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.SignUrlResponse>;
@@ -35,8 +35,8 @@ declare class FileStorage {
35
35
  * @param {import("../ApplicationAPIClient").Options} - Options
36
36
  * @returns {Promise<FileStorageApplicationModel.StartResponse>} - Success response
37
37
  * @name startUpload
38
- * @summary: Initiates file upload
39
- * @description: Starts the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
38
+ * @summary: Initiate file upload
39
+ * @description: Get a signed url for uploading a file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
40
40
  */
41
41
  startUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.StartResponse>;
42
42
  /**
@@ -56,5 +56,5 @@ declare class FileStorage {
56
56
  tags: any;
57
57
  }): Promise<any>;
58
58
  }
59
- import FileStorageApplicationValidator = require("./FileStorageApplicationValidator");
60
- import FileStorageApplicationModel = require("./FileStorageApplicationModel");
59
+ import FileStorageApplicationValidator = require("sdk/output/javascript/code/sdk/application/FileStorage/FileStorageApplicationValidator");
60
+ import FileStorageApplicationModel = require("sdk/output/javascript/code/sdk/application/FileStorage/FileStorageApplicationModel");
@@ -9,7 +9,7 @@ const FileStorageApplicationValidator = require("./FileStorageApplicationValidat
9
9
  const FileStorageApplicationModel = require("./FileStorageApplicationModel");
10
10
  const { Logger } = require("./../../common/Logger");
11
11
  const Joi = require("joi");
12
- const axios = require("axios");
12
+ const { fdkAxios } = require("../../common/AxiosHelper.js");
13
13
 
14
14
  class FileStorage {
15
15
  constructor(_conf) {
@@ -43,8 +43,8 @@ class FileStorage {
43
43
  * @param {import("../ApplicationAPIClient").Options} - Options
44
44
  * @returns {Promise<FileStorageApplicationModel.CompleteResponse>} - Success response
45
45
  * @name completeUpload
46
- * @summary: Finalizes upload process.
47
- * @description: Complete the process of uploading the file, and will return the URL of the uploaded file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
46
+ * @summary: Complete file upload
47
+ * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
48
48
  */
49
49
  async completeUpload(
50
50
  { namespace, body, requestHeaders } = { requestHeaders: {} },
@@ -121,7 +121,7 @@ class FileStorage {
121
121
  * @param {import("../ApplicationAPIClient").Options} - Options
122
122
  * @returns {Promise<FileStorageApplicationModel.SignUrlResponse>} - Success response
123
123
  * @name signUrls
124
- * @summary: Signs file URLs.
124
+ * @summary: Get signed URLs
125
125
  * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
126
126
  */
127
127
  async signUrls(
@@ -199,8 +199,8 @@ class FileStorage {
199
199
  * @param {import("../ApplicationAPIClient").Options} - Options
200
200
  * @returns {Promise<FileStorageApplicationModel.StartResponse>} - Success response
201
201
  * @name startUpload
202
- * @summary: Initiates file upload
203
- * @description: Starts the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
202
+ * @summary: Initiate file upload
203
+ * @description: Get a signed url for uploading a file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
204
204
  */
205
205
  async startUpload(
206
206
  { namespace, body, requestHeaders } = { requestHeaders: {} },
@@ -300,10 +300,16 @@ FileStorage.prototype.upload = function ({
300
300
  },
301
301
  });
302
302
  if (dataObj.upload && dataObj.upload.url) {
303
- await axios.put(dataObj.upload.url, data, {
303
+ let rawRequest = {
304
+ method: "PUT",
305
+ url: dataObj.upload.url,
306
+ data: data,
307
+ headers: {
308
+ "Content-Type": content_type,
309
+ },
304
310
  withCredentials: false,
305
- headers: { "Content-Type": content_type },
306
- });
311
+ };
312
+ await fdkAxios.request(rawRequest);
307
313
  } else {
308
314
  reject({ message: "Failed to upload file" });
309
315
  }
@@ -53,4 +53,4 @@ type StartUploadParam = {
53
53
  namespace: string;
54
54
  body: FileStorageApplicationModel.StartRequest;
55
55
  };
56
- import FileStorageApplicationModel = require("./FileStorageApplicationModel");
56
+ import FileStorageApplicationModel = require("sdk/output/javascript/code/sdk/application/FileStorage/FileStorageApplicationModel");
@@ -19,7 +19,7 @@ declare class Lead {
19
19
  * @param {import("../ApplicationAPIClient").Options} - Options
20
20
  * @returns {Promise<LeadApplicationModel.TicketHistory>} - Success response
21
21
  * @name createHistory
22
- * @summary: Logs ticket history.
22
+ * @summary: Log ticket history
23
23
  * @description: Adds a history entry for a specific support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createHistory/).
24
24
  */
25
25
  createHistory({ id, body, requestHeaders }?: LeadApplicationValidator.CreateHistoryParam, { responseHeaders }?: object): Promise<LeadApplicationModel.TicketHistory>;
@@ -29,7 +29,7 @@ declare class Lead {
29
29
  * @param {import("../ApplicationAPIClient").Options} - Options
30
30
  * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
31
31
  * @name createTicket
32
- * @summary: Creates a new ticket.
32
+ * @summary: Creates a ticket
33
33
  * @description: Generates a new customer support ticket for a user query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createTicket/).
34
34
  */
35
35
  createTicket({ body, requestHeaders }?: LeadApplicationValidator.CreateTicketParam, { responseHeaders }?: object): Promise<LeadApplicationModel.Ticket>;
@@ -39,8 +39,8 @@ declare class Lead {
39
39
  * @param {import("../ApplicationAPIClient").Options} - Options
40
40
  * @returns {Promise<LeadApplicationModel.CustomForm>} - Success response
41
41
  * @name getCustomForm
42
- * @summary: Fetches custom form.
43
- * @description: Retrieves a customizable form template for data collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
42
+ * @summary: Get custom form
43
+ * @description: Get a customizable form template for data collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
44
44
  */
45
45
  getCustomForm({ slug, requestHeaders }?: LeadApplicationValidator.GetCustomFormParam, { responseHeaders }?: object): Promise<LeadApplicationModel.CustomForm>;
46
46
  /**
@@ -53,7 +53,7 @@ declare class Lead {
53
53
  * - Success response
54
54
  *
55
55
  * @name getParticipantsInsideVideoRoom
56
- * @summary: Lists video room participants.
56
+ * @summary: List video room participants
57
57
  * @description: Gets the current participants inside a specific video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getParticipantsInsideVideoRoom/).
58
58
  */
59
59
  getParticipantsInsideVideoRoom({ uniqueName, requestHeaders }?: LeadApplicationValidator.GetParticipantsInsideVideoRoomParam, { responseHeaders }?: object): Promise<LeadApplicationModel.GetParticipantsInsideVideoRoomResponse>;
@@ -63,8 +63,8 @@ declare class Lead {
63
63
  * @param {import("../ApplicationAPIClient").Options} - Options
64
64
  * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
65
65
  * @name getTicket
66
- * @summary: Retrieves a support ticket.
67
- * @description: Retrieve details of a specific customer support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
66
+ * @summary: Get a support ticket
67
+ * @description: Get details of a specific customer support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
68
68
  */
69
69
  getTicket({ id, requestHeaders }?: LeadApplicationValidator.GetTicketParam, { responseHeaders }?: object): Promise<LeadApplicationModel.Ticket>;
70
70
  /**
@@ -74,8 +74,8 @@ declare class Lead {
74
74
  * @returns {Promise<LeadApplicationModel.GetTokenForVideoRoomResponse>} -
75
75
  * Success response
76
76
  * @name getTokenForVideoRoom
77
- * @summary: Retrieves video room token.
78
- * @description: Retrieves a secure token for accessing a video chat room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTokenForVideoRoom/).
77
+ * @summary: Get video room token
78
+ * @description: Get a secure token for accessing a video chat room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTokenForVideoRoom/).
79
79
  */
80
80
  getTokenForVideoRoom({ uniqueName, requestHeaders }?: LeadApplicationValidator.GetTokenForVideoRoomParam, { responseHeaders }?: object): Promise<LeadApplicationModel.GetTokenForVideoRoomResponse>;
81
81
  /**
@@ -85,10 +85,10 @@ declare class Lead {
85
85
  * @returns {Promise<LeadApplicationModel.SubmitCustomFormResponse>} -
86
86
  * Success response
87
87
  * @name submitCustomForm
88
- * @summary: Submits form data.
88
+ * @summary: Submits form data
89
89
  * @description: Sends user-entered data from a custom form for processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/).
90
90
  */
91
91
  submitCustomForm({ slug, body, requestHeaders }?: LeadApplicationValidator.SubmitCustomFormParam, { responseHeaders }?: object): Promise<LeadApplicationModel.SubmitCustomFormResponse>;
92
92
  }
93
- import LeadApplicationValidator = require("./LeadApplicationValidator");
94
- import LeadApplicationModel = require("./LeadApplicationModel");
93
+ import LeadApplicationValidator = require("sdk/output/javascript/code/sdk/application/Lead/LeadApplicationValidator");
94
+ import LeadApplicationModel = require("sdk/output/javascript/code/sdk/application/Lead/LeadApplicationModel");
@@ -46,7 +46,7 @@ class Lead {
46
46
  * @param {import("../ApplicationAPIClient").Options} - Options
47
47
  * @returns {Promise<LeadApplicationModel.TicketHistory>} - Success response
48
48
  * @name createHistory
49
- * @summary: Logs ticket history.
49
+ * @summary: Log ticket history
50
50
  * @description: Adds a history entry for a specific support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createHistory/).
51
51
  */
52
52
  async createHistory(
@@ -124,7 +124,7 @@ class Lead {
124
124
  * @param {import("../ApplicationAPIClient").Options} - Options
125
125
  * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
126
126
  * @name createTicket
127
- * @summary: Creates a new ticket.
127
+ * @summary: Creates a ticket
128
128
  * @description: Generates a new customer support ticket for a user query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createTicket/).
129
129
  */
130
130
  async createTicket(
@@ -202,8 +202,8 @@ class Lead {
202
202
  * @param {import("../ApplicationAPIClient").Options} - Options
203
203
  * @returns {Promise<LeadApplicationModel.CustomForm>} - Success response
204
204
  * @name getCustomForm
205
- * @summary: Fetches custom form.
206
- * @description: Retrieves a customizable form template for data collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
205
+ * @summary: Get custom form
206
+ * @description: Get a customizable form template for data collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
207
207
  */
208
208
  async getCustomForm(
209
209
  { slug, requestHeaders } = { requestHeaders: {} },
@@ -284,7 +284,7 @@ class Lead {
284
284
  * - Success response
285
285
  *
286
286
  * @name getParticipantsInsideVideoRoom
287
- * @summary: Lists video room participants.
287
+ * @summary: List video room participants
288
288
  * @description: Gets the current participants inside a specific video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getParticipantsInsideVideoRoom/).
289
289
  */
290
290
  async getParticipantsInsideVideoRoom(
@@ -364,8 +364,8 @@ class Lead {
364
364
  * @param {import("../ApplicationAPIClient").Options} - Options
365
365
  * @returns {Promise<LeadApplicationModel.Ticket>} - Success response
366
366
  * @name getTicket
367
- * @summary: Retrieves a support ticket.
368
- * @description: Retrieve details of a specific customer support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
367
+ * @summary: Get a support ticket
368
+ * @description: Get details of a specific customer support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
369
369
  */
370
370
  async getTicket(
371
371
  { id, requestHeaders } = { requestHeaders: {} },
@@ -441,8 +441,8 @@ class Lead {
441
441
  * @returns {Promise<LeadApplicationModel.GetTokenForVideoRoomResponse>} -
442
442
  * Success response
443
443
  * @name getTokenForVideoRoom
444
- * @summary: Retrieves video room token.
445
- * @description: Retrieves a secure token for accessing a video chat room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTokenForVideoRoom/).
444
+ * @summary: Get video room token
445
+ * @description: Get a secure token for accessing a video chat room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTokenForVideoRoom/).
446
446
  */
447
447
  async getTokenForVideoRoom(
448
448
  { uniqueName, requestHeaders } = { requestHeaders: {} },
@@ -520,7 +520,7 @@ class Lead {
520
520
  * @returns {Promise<LeadApplicationModel.SubmitCustomFormResponse>} -
521
521
  * Success response
522
522
  * @name submitCustomForm
523
- * @summary: Submits form data.
523
+ * @summary: Submits form data
524
524
  * @description: Sends user-entered data from a custom form for processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/).
525
525
  */
526
526
  async submitCustomForm(
@@ -41,26 +41,8 @@ export = LeadApplicationModel;
41
41
  * @property {string} [_id]
42
42
  * @property {string} [created_at]
43
43
  * @property {string} [updated_at]
44
- */
45
- /**
46
- * @typedef PhoneNumber
47
- * @property {boolean} [active] - Denotes if the phone number is active
48
- * @property {boolean} [primary] - Denotes it's the primary phone number for the account
49
- * @property {boolean} [verified] - Denotes it's a verified phone number
50
- * @property {string} [phone] - Phone number
51
- * @property {number} [country_code] - Country code
52
- */
53
- /**
54
- * @typedef Email
55
- * @property {boolean} [primary] - Denotes it's the primary email for the account
56
- * @property {boolean} [verified] - Denotes it's a verified email
57
- * @property {string} [email] - Email Address
58
- * @property {boolean} [active] - Denotes if the email is active
59
- */
60
- /**
61
- * @typedef Debug
62
- * @property {string} [source] - Source of user
63
- * @property {string} [platform] - Platform of user
44
+ * @property {string} [external_id]
45
+ * @property {string} [rr_id]
64
46
  */
65
47
  /**
66
48
  * @typedef SubmitCustomFormResponse
@@ -191,6 +173,21 @@ export = LeadApplicationModel;
191
173
  * @property {string} [updated_at] - Time when the ticket was last updated
192
174
  * @property {string} [created_at] - Time when the ticket was created
193
175
  */
176
+ /**
177
+ * @typedef PhoneNumber
178
+ * @property {string} [phone] - Phone number
179
+ * @property {number} [country_code] - Country code
180
+ * @property {boolean} [active] - Is the phone number active
181
+ * @property {boolean} [primary] - Is it a primary phone number
182
+ * @property {boolean} [verified] - Is the phone number verified
183
+ */
184
+ /**
185
+ * @typedef Email
186
+ * @property {string} [email] - Email address
187
+ * @property {boolean} [active] - Is the email active
188
+ * @property {boolean} [primary] - Is it a primary email
189
+ * @property {boolean} [verified] - Is the email verified
190
+ */
194
191
  /** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
195
192
  /** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */
196
193
  /**
@@ -208,7 +205,7 @@ export = LeadApplicationModel;
208
205
  declare class LeadApplicationModel {
209
206
  }
210
207
  declare namespace LeadApplicationModel {
211
- export { TicketHistoryPayload, CustomFormSubmissionPayload, GetTokenForVideoRoomResponse, GetParticipantsInsideVideoRoomResponse, Participant, UserSchema, PhoneNumber, Email, Debug, SubmitCustomFormResponse, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, Status, SubmitButton, PollForAssignment, CustomForm, FeedbackForm, TicketCategory, TicketHistory, Ticket, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum };
208
+ export { TicketHistoryPayload, CustomFormSubmissionPayload, GetTokenForVideoRoomResponse, GetParticipantsInsideVideoRoomResponse, Participant, UserSchema, SubmitCustomFormResponse, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, Status, SubmitButton, PollForAssignment, CustomForm, FeedbackForm, TicketCategory, TicketHistory, Ticket, PhoneNumber, Email, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum };
212
209
  }
213
210
  /** @returns {TicketHistoryPayload} */
214
211
  declare function TicketHistoryPayload(): TicketHistoryPayload;
@@ -279,62 +276,8 @@ type UserSchema = {
279
276
  _id?: string;
280
277
  created_at?: string;
281
278
  updated_at?: string;
282
- };
283
- /** @returns {PhoneNumber} */
284
- declare function PhoneNumber(): PhoneNumber;
285
- type PhoneNumber = {
286
- /**
287
- * - Denotes if the phone number is active
288
- */
289
- active?: boolean;
290
- /**
291
- * - Denotes it's the primary phone number for the account
292
- */
293
- primary?: boolean;
294
- /**
295
- * - Denotes it's a verified phone number
296
- */
297
- verified?: boolean;
298
- /**
299
- * - Phone number
300
- */
301
- phone?: string;
302
- /**
303
- * - Country code
304
- */
305
- country_code?: number;
306
- };
307
- /** @returns {Email} */
308
- declare function Email(): Email;
309
- type Email = {
310
- /**
311
- * - Denotes it's the primary email for the account
312
- */
313
- primary?: boolean;
314
- /**
315
- * - Denotes it's a verified email
316
- */
317
- verified?: boolean;
318
- /**
319
- * - Email Address
320
- */
321
- email?: string;
322
- /**
323
- * - Denotes if the email is active
324
- */
325
- active?: boolean;
326
- };
327
- /** @returns {Debug} */
328
- declare function Debug(): Debug;
329
- type Debug = {
330
- /**
331
- * - Source of user
332
- */
333
- source?: string;
334
- /**
335
- * - Platform of user
336
- */
337
- platform?: string;
279
+ external_id?: string;
280
+ rr_id?: string;
338
281
  };
339
282
  /** @returns {SubmitCustomFormResponse} */
340
283
  declare function SubmitCustomFormResponse(): SubmitCustomFormResponse;
@@ -657,6 +600,50 @@ type Ticket = {
657
600
  */
658
601
  created_at?: string;
659
602
  };
603
+ /** @returns {PhoneNumber} */
604
+ declare function PhoneNumber(): PhoneNumber;
605
+ type PhoneNumber = {
606
+ /**
607
+ * - Phone number
608
+ */
609
+ phone?: string;
610
+ /**
611
+ * - Country code
612
+ */
613
+ country_code?: number;
614
+ /**
615
+ * - Is the phone number active
616
+ */
617
+ active?: boolean;
618
+ /**
619
+ * - Is it a primary phone number
620
+ */
621
+ primary?: boolean;
622
+ /**
623
+ * - Is the phone number verified
624
+ */
625
+ verified?: boolean;
626
+ };
627
+ /** @returns {Email} */
628
+ declare function Email(): Email;
629
+ type Email = {
630
+ /**
631
+ * - Email address
632
+ */
633
+ email?: string;
634
+ /**
635
+ * - Is the email active
636
+ */
637
+ active?: boolean;
638
+ /**
639
+ * - Is it a primary email
640
+ */
641
+ primary?: boolean;
642
+ /**
643
+ * - Is the email verified
644
+ */
645
+ verified?: boolean;
646
+ };
660
647
  /**
661
648
  * Enum: PriorityEnum Used By: Lead
662
649
  *
@@ -47,29 +47,8 @@ const Joi = require("joi");
47
47
  * @property {string} [_id]
48
48
  * @property {string} [created_at]
49
49
  * @property {string} [updated_at]
50
- */
51
-
52
- /**
53
- * @typedef PhoneNumber
54
- * @property {boolean} [active] - Denotes if the phone number is active
55
- * @property {boolean} [primary] - Denotes it's the primary phone number for the account
56
- * @property {boolean} [verified] - Denotes it's a verified phone number
57
- * @property {string} [phone] - Phone number
58
- * @property {number} [country_code] - Country code
59
- */
60
-
61
- /**
62
- * @typedef Email
63
- * @property {boolean} [primary] - Denotes it's the primary email for the account
64
- * @property {boolean} [verified] - Denotes it's a verified email
65
- * @property {string} [email] - Email Address
66
- * @property {boolean} [active] - Denotes if the email is active
67
- */
68
-
69
- /**
70
- * @typedef Debug
71
- * @property {string} [source] - Source of user
72
- * @property {string} [platform] - Platform of user
50
+ * @property {string} [external_id]
51
+ * @property {string} [rr_id]
73
52
  */
74
53
 
75
54
  /**
@@ -216,6 +195,23 @@ const Joi = require("joi");
216
195
  * @property {string} [created_at] - Time when the ticket was created
217
196
  */
218
197
 
198
+ /**
199
+ * @typedef PhoneNumber
200
+ * @property {string} [phone] - Phone number
201
+ * @property {number} [country_code] - Country code
202
+ * @property {boolean} [active] - Is the phone number active
203
+ * @property {boolean} [primary] - Is it a primary phone number
204
+ * @property {boolean} [verified] - Is the phone number verified
205
+ */
206
+
207
+ /**
208
+ * @typedef Email
209
+ * @property {string} [email] - Email address
210
+ * @property {boolean} [active] - Is the email active
211
+ * @property {boolean} [primary] - Is it a primary email
212
+ * @property {boolean} [verified] - Is the email verified
213
+ */
214
+
219
215
  /** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
220
216
 
221
217
  /** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */
@@ -295,35 +291,8 @@ class LeadApplicationModel {
295
291
  _id: Joi.string().allow(""),
296
292
  created_at: Joi.string().allow(""),
297
293
  updated_at: Joi.string().allow(""),
298
- });
299
- }
300
-
301
- /** @returns {PhoneNumber} */
302
- static PhoneNumber() {
303
- return Joi.object({
304
- active: Joi.boolean(),
305
- primary: Joi.boolean(),
306
- verified: Joi.boolean(),
307
- phone: Joi.string().allow(""),
308
- country_code: Joi.number(),
309
- });
310
- }
311
-
312
- /** @returns {Email} */
313
- static Email() {
314
- return Joi.object({
315
- primary: Joi.boolean(),
316
- verified: Joi.boolean(),
317
- email: Joi.string().allow(""),
318
- active: Joi.boolean(),
319
- });
320
- }
321
-
322
- /** @returns {Debug} */
323
- static Debug() {
324
- return Joi.object({
325
- source: Joi.string().allow(""),
326
- platform: Joi.string().allow(""),
294
+ external_id: Joi.string().allow(""),
295
+ rr_id: Joi.string().allow(""),
327
296
  });
328
297
  }
329
298
 
@@ -496,6 +465,27 @@ class LeadApplicationModel {
496
465
  });
497
466
  }
498
467
 
468
+ /** @returns {PhoneNumber} */
469
+ static PhoneNumber() {
470
+ return Joi.object({
471
+ phone: Joi.string().allow(""),
472
+ country_code: Joi.number(),
473
+ active: Joi.boolean(),
474
+ primary: Joi.boolean(),
475
+ verified: Joi.boolean(),
476
+ });
477
+ }
478
+
479
+ /** @returns {Email} */
480
+ static Email() {
481
+ return Joi.object({
482
+ email: Joi.string().allow(""),
483
+ active: Joi.boolean(),
484
+ primary: Joi.boolean(),
485
+ verified: Joi.boolean(),
486
+ });
487
+ }
488
+
499
489
  /**
500
490
  * Enum: PriorityEnum Used By: Lead
501
491
  *
@@ -89,4 +89,4 @@ type SubmitCustomFormParam = {
89
89
  slug: string;
90
90
  body: LeadApplicationModel.CustomFormSubmissionPayload;
91
91
  };
92
- import LeadApplicationModel = require("./LeadApplicationModel");
92
+ import LeadApplicationModel = require("sdk/output/javascript/code/sdk/application/Lead/LeadApplicationModel");