@gofynd/fdk-client-javascript 1.4.2-beta.6 → 1.4.3

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 (187) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -3
  3. package/sdk/application/ApplicationAPIClient.d.ts +1 -1
  4. package/sdk/application/ApplicationAPIClient.js +0 -1
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +25 -25
  6. package/sdk/application/Cart/CartApplicationClient.js +25 -25
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +40 -40
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +40 -40
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +2 -2
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +16 -16
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -16
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +10 -10
  16. package/sdk/application/Content/ContentApplicationClient.js +10 -10
  17. package/sdk/application/Content/ContentApplicationModel.d.ts +18 -18
  18. package/sdk/application/Content/ContentApplicationModel.js +26 -26
  19. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.js +12 -6
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +7 -7
  23. package/sdk/application/Lead/LeadApplicationModel.d.ts +64 -77
  24. package/sdk/application/Lead/LeadApplicationModel.js +42 -52
  25. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +9 -9
  26. package/sdk/application/Logistic/LogisticApplicationClient.js +9 -9
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +13 -13
  28. package/sdk/application/Order/OrderApplicationClient.js +16 -12
  29. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -0
  30. package/sdk/application/Order/OrderApplicationValidator.js +3 -0
  31. package/sdk/application/Payment/PaymentApplicationClient.d.ts +47 -47
  32. package/sdk/application/Payment/PaymentApplicationClient.js +52 -52
  33. package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -2
  34. package/sdk/application/Payment/PaymentApplicationModel.js +4 -2
  35. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  36. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  37. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +27 -27
  38. package/sdk/application/PosCart/PosCartApplicationClient.js +27 -27
  39. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +6 -6
  40. package/sdk/application/Rewards/RewardsApplicationClient.js +6 -6
  41. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  42. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  43. package/sdk/application/Share/ShareApplicationModel.d.ts +2 -0
  44. package/sdk/application/Share/ShareApplicationModel.js +2 -0
  45. package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
  46. package/sdk/application/Theme/ThemeApplicationClient.js +4 -4
  47. package/sdk/application/Theme/ThemeApplicationModel.d.ts +25 -32
  48. package/sdk/application/Theme/ThemeApplicationModel.js +30 -40
  49. package/sdk/application/User/UserApplicationClient.d.ts +28 -28
  50. package/sdk/application/User/UserApplicationClient.js +28 -28
  51. package/sdk/application/User/UserApplicationModel.d.ts +44 -13
  52. package/sdk/application/User/UserApplicationModel.js +17 -13
  53. package/sdk/common/AxiosHelper.d.ts +1 -1
  54. package/sdk/common/AxiosHelper.js +38 -17
  55. package/sdk/common/Clickstream.js +33 -19
  56. package/sdk/common/curlHelper.js +1 -3
  57. package/sdk/common/utils.d.ts +15 -0
  58. package/sdk/common/utils.js +30 -0
  59. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +2 -2
  60. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +2 -2
  61. package/sdk/partner/Lead/LeadPartnerClient.d.ts +1 -1
  62. package/sdk/partner/Lead/LeadPartnerClient.js +1 -1
  63. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +4 -4
  64. package/sdk/partner/Logistics/LogisticsPartnerClient.js +4 -4
  65. package/sdk/partner/OAuthClient.d.ts +3 -3
  66. package/sdk/partner/PartnerAPIClient.d.ts +1 -1
  67. package/sdk/partner/PartnerAPIClient.js +0 -1
  68. package/sdk/partner/Theme/ThemePartnerClient.d.ts +19 -19
  69. package/sdk/partner/Theme/ThemePartnerClient.js +19 -19
  70. package/sdk/partner/Theme/ThemePartnerModel.d.ts +25 -32
  71. package/sdk/partner/Theme/ThemePartnerModel.js +30 -40
  72. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
  73. package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
  74. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +2 -2
  75. package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -2
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +4 -4
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -4
  78. package/sdk/platform/Billing/BillingPlatformClient.d.ts +17 -17
  79. package/sdk/platform/Billing/BillingPlatformClient.js +17 -17
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +49 -49
  81. package/sdk/platform/Cart/CartPlatformApplicationClient.js +49 -49
  82. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +60 -60
  83. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +62 -62
  84. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +87 -87
  85. package/sdk/platform/Catalog/CatalogPlatformClient.js +87 -87
  86. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +65 -28
  87. package/sdk/platform/Catalog/CatalogPlatformModel.js +68 -36
  88. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -2
  89. package/sdk/platform/Common/CommonPlatformClient.js +2 -2
  90. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +58 -58
  91. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +58 -58
  92. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  93. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  94. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +12 -0
  95. package/sdk/platform/Communication/CommunicationPlatformModel.js +12 -0
  96. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +16 -16
  97. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +16 -16
  98. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
  99. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
  100. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +32 -32
  101. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +32 -32
  102. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +18 -18
  103. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +18 -18
  104. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +57 -57
  105. package/sdk/platform/Content/ContentPlatformApplicationClient.js +63 -63
  106. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +4 -4
  107. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +4 -4
  108. package/sdk/platform/Content/ContentPlatformClient.d.ts +3 -3
  109. package/sdk/platform/Content/ContentPlatformClient.js +9 -9
  110. package/sdk/platform/Content/ContentPlatformModel.d.ts +18 -18
  111. package/sdk/platform/Content/ContentPlatformModel.js +26 -26
  112. package/sdk/platform/Content/ContentPlatformValidator.d.ts +4 -4
  113. package/sdk/platform/Content/ContentPlatformValidator.js +4 -4
  114. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +11 -11
  115. package/sdk/platform/Discount/DiscountPlatformClient.js +11 -11
  116. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +9 -9
  117. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +19 -13
  118. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  119. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +23 -14
  120. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +12 -1
  121. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +14 -0
  122. package/sdk/platform/Finance/FinancePlatformClient.d.ts +27 -27
  123. package/sdk/platform/Finance/FinancePlatformClient.js +27 -27
  124. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +6 -6
  125. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +6 -6
  126. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  127. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  128. package/sdk/platform/Lead/LeadPlatformModel.d.ts +62 -77
  129. package/sdk/platform/Lead/LeadPlatformModel.js +40 -52
  130. package/sdk/platform/OAuthClient.d.ts +3 -3
  131. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +2 -2
  132. package/sdk/platform/Order/OrderPlatformApplicationClient.js +2 -2
  133. package/sdk/platform/Order/OrderPlatformClient.d.ts +43 -43
  134. package/sdk/platform/Order/OrderPlatformClient.js +55 -44
  135. package/sdk/platform/Order/OrderPlatformModel.d.ts +8 -2
  136. package/sdk/platform/Order/OrderPlatformModel.js +8 -2
  137. package/sdk/platform/Order/OrderPlatformValidator.d.ts +14 -0
  138. package/sdk/platform/Order/OrderPlatformValidator.js +6 -0
  139. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +2 -2
  140. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +2 -2
  141. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +38 -38
  142. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +38 -38
  143. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +10 -10
  144. package/sdk/platform/Payment/PaymentPlatformClient.js +10 -10
  145. package/sdk/platform/PlatformAPIClient.d.ts +1 -1
  146. package/sdk/platform/PlatformAPIClient.js +0 -1
  147. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +12 -12
  148. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +12 -12
  149. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +9 -9
  150. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +9 -9
  151. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +15 -15
  152. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +15 -15
  153. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2 -2
  154. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -2
  155. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  156. package/sdk/platform/Share/SharePlatformApplicationClient.js +5 -5
  157. package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
  158. package/sdk/platform/Share/SharePlatformModel.js +2 -0
  159. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +28 -28
  160. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +28 -28
  161. package/sdk/platform/Theme/ThemePlatformClient.d.ts +3 -3
  162. package/sdk/platform/Theme/ThemePlatformClient.js +3 -3
  163. package/sdk/platform/Theme/ThemePlatformModel.d.ts +25 -32
  164. package/sdk/platform/Theme/ThemePlatformModel.js +30 -40
  165. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +16 -16
  166. package/sdk/platform/User/UserPlatformApplicationClient.js +16 -16
  167. package/sdk/platform/User/UserPlatformModel.d.ts +48 -13
  168. package/sdk/platform/User/UserPlatformModel.js +21 -13
  169. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +16 -16
  170. package/sdk/platform/Webhook/WebhookPlatformClient.js +16 -16
  171. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +5 -45
  172. package/sdk/platform/Webhook/WebhookPlatformModel.js +4 -50
  173. package/sdk/public/Billing/BillingPublicClient.d.ts +1 -1
  174. package/sdk/public/Billing/BillingPublicClient.js +4 -4
  175. package/sdk/public/Billing/BillingPublicValidator.d.ts +2 -2
  176. package/sdk/public/Billing/BillingPublicValidator.js +2 -2
  177. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +1 -1
  178. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -1
  179. package/sdk/public/Content/ContentPublicValidator.d.ts +2 -2
  180. package/sdk/public/Content/ContentPublicValidator.js +3 -3
  181. package/sdk/public/Inventory/InventoryPublicModel.d.ts +8 -8
  182. package/sdk/public/Inventory/InventoryPublicModel.js +8 -8
  183. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  184. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  185. package/sdk/public/PublicAPIClient.d.ts +1 -1
  186. package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
  187. package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
@@ -108,7 +108,7 @@ class User {
108
108
  * @param {import("../ApplicationAPIClient").Options} - Options
109
109
  * @returns {Promise<UserApplicationModel.VerifyEmailOTPSuccess>} - Success response
110
110
  * @name addEmail
111
- * @summary: Add email.
111
+ * @summary: Add email
112
112
  * @description: Adds a new email address to the user's profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addEmail/).
113
113
  */
114
114
  async addEmail(
@@ -185,7 +185,7 @@ class User {
185
185
  * @param {import("../ApplicationAPIClient").Options} - Options
186
186
  * @returns {Promise<UserApplicationModel.VerifyMobileOTPSuccess>} - Success response
187
187
  * @name addMobileNumber
188
- * @summary: Add mobile.
188
+ * @summary: Add mobile
189
189
  * @description: Adds a new mobile number to the user's profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addMobileNumber/).
190
190
  */
191
191
  async addMobileNumber(
@@ -264,7 +264,7 @@ class User {
264
264
  * @param {import("../ApplicationAPIClient").Options} - Options
265
265
  * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
266
266
  * @name deleteEmail
267
- * @summary: Delete email.
267
+ * @summary: Delete email
268
268
  * @description: Removes an email address from the user's profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteEmail/).
269
269
  */
270
270
  async deleteEmail(
@@ -515,7 +515,7 @@ class User {
515
515
  * @param {import("../ApplicationAPIClient").Options} - Options
516
516
  * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
517
517
  * @name forgotPassword
518
- * @summary: Forgot password.
518
+ * @summary: Forgot password
519
519
  * @description: Initiates the password recovery process for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/forgotPassword/).
520
520
  */
521
521
  async forgotPassword(
@@ -673,7 +673,7 @@ class User {
673
673
  * @param {import("../ApplicationAPIClient").Options} - Options
674
674
  * @returns {Promise<UserApplicationModel.UserObjectSchema>} - Success response
675
675
  * @name getLoggedInUser
676
- * @summary: Current user.
676
+ * @summary: Current user
677
677
  * @description: Retrieve information about the currently logged-in user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getLoggedInUser/).
678
678
  */
679
679
  async getLoggedInUser(
@@ -751,7 +751,7 @@ class User {
751
751
  * @param {import("../ApplicationAPIClient").Options} - Options
752
752
  * @returns {Promise<UserApplicationModel.PlatformSchema>} - Success response
753
753
  * @name getPlatformConfig
754
- * @summary: Platform config.
754
+ * @summary: Platform config
755
755
  * @description: Retrieve configuration settings related to the user platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getPlatformConfig/).
756
756
  */
757
757
  async getPlatformConfig(
@@ -909,7 +909,7 @@ class User {
909
909
  * @param {import("../ApplicationAPIClient").Options} - Options
910
910
  * @returns {Promise<UserApplicationModel.HasPasswordSuccess>} - Success response
911
911
  * @name hasPassword
912
- * @summary: Check password.
912
+ * @summary: Check password
913
913
  * @description: Checks if the user has set a password for the account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/hasPassword/).
914
914
  */
915
915
  async hasPassword(
@@ -985,7 +985,7 @@ class User {
985
985
  * @param {import("../ApplicationAPIClient").Options} - Options
986
986
  * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
987
987
  * @name loginWithAppleIOS
988
- * @summary: Apple iOS login.
988
+ * @summary: Apple iOS login
989
989
  * @description: Enables login through Apple ID specifically for iOS users. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithAppleIOS/).
990
990
  */
991
991
  async loginWithAppleIOS(
@@ -1064,7 +1064,7 @@ class User {
1064
1064
  * @param {import("../ApplicationAPIClient").Options} - Options
1065
1065
  * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
1066
1066
  * @name loginWithEmailAndPassword
1067
- * @summary: Email/password login.
1067
+ * @summary: Email/password login
1068
1068
  * @description: Enables login using an email and password combination. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithEmailAndPassword/).
1069
1069
  */
1070
1070
  async loginWithEmailAndPassword(
@@ -1144,7 +1144,7 @@ class User {
1144
1144
  * @param {import("../ApplicationAPIClient").Options} - Options
1145
1145
  * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1146
1146
  * @name loginWithFacebook
1147
- * @summary: Facebook login.
1147
+ * @summary: Facebook login
1148
1148
  * @description: Enables login through Facebook accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithFacebook/).
1149
1149
  */
1150
1150
  async loginWithFacebook(
@@ -1223,7 +1223,7 @@ class User {
1223
1223
  * @param {import("../ApplicationAPIClient").Options} - Options
1224
1224
  * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1225
1225
  * @name loginWithGoogle
1226
- * @summary: Google login.
1226
+ * @summary: Google login
1227
1227
  * @description: Enables login through Google accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogle/).
1228
1228
  */
1229
1229
  async loginWithGoogle(
@@ -1302,7 +1302,7 @@ class User {
1302
1302
  * @param {import("../ApplicationAPIClient").Options} - Options
1303
1303
  * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1304
1304
  * @name loginWithGoogleAndroid
1305
- * @summary: Android Google login.
1305
+ * @summary: Android Google login
1306
1306
  * @description: Facilitates Google login specifically for Android users. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleAndroid/).
1307
1307
  */
1308
1308
  async loginWithGoogleAndroid(
@@ -1383,7 +1383,7 @@ class User {
1383
1383
  * @param {import("../ApplicationAPIClient").Options} - Options
1384
1384
  * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1385
1385
  * @name loginWithGoogleIOS
1386
- * @summary: iOS Google login.
1386
+ * @summary: iOS Google login
1387
1387
  * @description: Facilitates Google login specifically for iOS users. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleIOS/).
1388
1388
  */
1389
1389
  async loginWithGoogleIOS(
@@ -1462,7 +1462,7 @@ class User {
1462
1462
  * @param {import("../ApplicationAPIClient").Options} - Options
1463
1463
  * @returns {Promise<UserApplicationModel.SendOtpResponse>} - Success response
1464
1464
  * @name loginWithOTP
1465
- * @summary: OTP login.
1465
+ * @summary: OTP login
1466
1466
  * @description: Allows users to log in using a one-time password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/).
1467
1467
  */
1468
1468
  async loginWithOTP(
@@ -1695,7 +1695,7 @@ class User {
1695
1695
  * @param {import("../ApplicationAPIClient").Options} - Options
1696
1696
  * @returns {Promise<UserApplicationModel.RegisterFormSuccess>} - Success response
1697
1697
  * @name registerWithForm
1698
- * @summary: User registration.
1698
+ * @summary: User registration
1699
1699
  * @description: Enables new users to register using a form. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/registerWithForm/).
1700
1700
  */
1701
1701
  async registerWithForm(
@@ -1775,7 +1775,7 @@ class User {
1775
1775
  * @returns {Promise<UserApplicationModel.ResetForgotPasswordSuccess>} -
1776
1776
  * Success response
1777
1777
  * @name resetForgotPassword
1778
- * @summary: Forgot password.
1778
+ * @summary: Forgot password
1779
1779
  * @description: Initiates the password recovery process for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/resetForgotPassword/).
1780
1780
  */
1781
1781
  async resetForgotPassword(
@@ -2011,7 +2011,7 @@ class User {
2011
2011
  * @param {import("../ApplicationAPIClient").Options} - Options
2012
2012
  * @returns {Promise<UserApplicationModel.EmailOtpSuccess>} - Success response
2013
2013
  * @name sendOTPOnEmail
2014
- * @summary: Send email OTP.
2014
+ * @summary: Send email OTP
2015
2015
  * @description: Sends a one-time password to the user's email for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnEmail/).
2016
2016
  */
2017
2017
  async sendOTPOnEmail(
@@ -2090,7 +2090,7 @@ class User {
2090
2090
  * @param {import("../ApplicationAPIClient").Options} - Options
2091
2091
  * @returns {Promise<UserApplicationModel.OtpSuccess>} - Success response
2092
2092
  * @name sendOTPOnMobile
2093
- * @summary: Send mobile OTP.
2093
+ * @summary: Send mobile OTP
2094
2094
  * @description: Sends a one-time password to the user's mobile for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/).
2095
2095
  */
2096
2096
  async sendOTPOnMobile(
@@ -2169,7 +2169,7 @@ class User {
2169
2169
  * @param {import("../ApplicationAPIClient").Options} - Options
2170
2170
  * @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
2171
2171
  * @name sendResetPasswordEmail
2172
- * @summary: Reset password (Email).
2172
+ * @summary: Reset password (Email)
2173
2173
  * @description: Sends a password reset link to the user's email. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordEmail/).
2174
2174
  */
2175
2175
  async sendResetPasswordEmail(
@@ -2250,7 +2250,7 @@ class User {
2250
2250
  * @param {import("../ApplicationAPIClient").Options} - Options
2251
2251
  * @returns {Promise<any>} - Success response
2252
2252
  * @name sendResetPasswordMobile
2253
- * @summary: Reset password (Mobile).
2253
+ * @summary: Reset password (Mobile)
2254
2254
  * @description: Sends a password reset OTP to the user's mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordMobile/).
2255
2255
  */
2256
2256
  async sendResetPasswordMobile(
@@ -2408,7 +2408,7 @@ class User {
2408
2408
  * @returns {Promise<UserApplicationModel.SendEmailVerifyLinkSuccess>} -
2409
2409
  * Success response
2410
2410
  * @name sendVerificationLinkToEmail
2411
- * @summary: Verify new email.
2411
+ * @summary: Verify new email
2412
2412
  * @description: Sends a verification link to a newly added email address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToEmail/).
2413
2413
  */
2414
2414
  async sendVerificationLinkToEmail(
@@ -2492,7 +2492,7 @@ class User {
2492
2492
  * @returns {Promise<UserApplicationModel.SendMobileVerifyLinkSuccess>} -
2493
2493
  * Success response
2494
2494
  * @name sendVerificationLinkToMobile
2495
- * @summary: Verify new mobile.
2495
+ * @summary: Verify new mobile
2496
2496
  * @description: Sends a verification link to a newly added mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToMobile/).
2497
2497
  */
2498
2498
  async sendVerificationLinkToMobile(
@@ -2573,7 +2573,7 @@ class User {
2573
2573
  * @param {import("../ApplicationAPIClient").Options} - Options
2574
2574
  * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
2575
2575
  * @name setEmailAsPrimary
2576
- * @summary: Set primary email.
2576
+ * @summary: Set primary email
2577
2577
  * @description: Sets an email address as the primary contact for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setEmailAsPrimary/).
2578
2578
  */
2579
2579
  async setEmailAsPrimary(
@@ -2651,7 +2651,7 @@ class User {
2651
2651
  * @param {import("../ApplicationAPIClient").Options} - Options
2652
2652
  * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
2653
2653
  * @name setMobileNumberAsPrimary
2654
- * @summary: Set primary mobile.
2654
+ * @summary: Set primary mobile
2655
2655
  * @description: Sets a mobile number as the primary contact for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setMobileNumberAsPrimary/).
2656
2656
  */
2657
2657
  async setMobileNumberAsPrimary(
@@ -2731,7 +2731,7 @@ class User {
2731
2731
  * @param {import("../ApplicationAPIClient").Options} - Options
2732
2732
  * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
2733
2733
  * @name updatePassword
2734
- * @summary: Update password.
2734
+ * @summary: Update password
2735
2735
  * @description: Allows users to update their existing password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/).
2736
2736
  */
2737
2737
  async updatePassword(
@@ -3043,7 +3043,7 @@ class User {
3043
3043
  * @param {import("../ApplicationAPIClient").Options} - Options
3044
3044
  * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
3045
3045
  * @name verifyEmail
3046
- * @summary: Verify email.
3046
+ * @summary: Verify email
3047
3047
  * @description: Verifies the user's email address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyEmail/).
3048
3048
  */
3049
3049
  async verifyEmail(
@@ -3277,7 +3277,7 @@ class User {
3277
3277
  * @param {import("../ApplicationAPIClient").Options} - Options
3278
3278
  * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
3279
3279
  * @name verifyMobile
3280
- * @summary: Verify mobile.
3280
+ * @summary: Verify mobile
3281
3281
  * @description: Verifies the user's mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobile/).
3282
3282
  */
3283
3283
  async verifyMobile(
@@ -3434,7 +3434,7 @@ class User {
3434
3434
  * @param {import("../ApplicationAPIClient").Options} - Options
3435
3435
  * @returns {Promise<UserApplicationModel.VerifyOtpSuccess>} - Success response
3436
3436
  * @name verifyMobileOTP
3437
- * @summary: Verify mobile OTP.
3437
+ * @summary: Verify mobile OTP
3438
3438
  * @description: Validates the OTP sent to the user's mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/).
3439
3439
  */
3440
3440
  async verifyMobileOTP(
@@ -488,21 +488,23 @@ export = UserApplicationModel;
488
488
  * @property {string} [_id]
489
489
  * @property {string} [created_at]
490
490
  * @property {string} [updated_at]
491
+ * @property {string} [external_id]
492
+ * @property {string} [rr_id]
491
493
  */
492
494
  /**
493
495
  * @typedef PhoneNumber
494
- * @property {boolean} [active]
495
- * @property {boolean} [primary]
496
- * @property {boolean} [verified]
497
- * @property {string} [phone]
498
- * @property {number} [country_code]
496
+ * @property {string} [phone] - Phone number
497
+ * @property {number} [country_code] - Country code
498
+ * @property {boolean} [active] - Is the phone number active
499
+ * @property {boolean} [primary] - Is it a primary phone number
500
+ * @property {boolean} [verified] - Is the phone number verified
499
501
  */
500
502
  /**
501
503
  * @typedef Email
502
- * @property {boolean} [primary]
503
- * @property {boolean} [verified]
504
- * @property {string} [email]
505
- * @property {boolean} [active]
504
+ * @property {string} [email] - Email address
505
+ * @property {boolean} [active] - Is the email active
506
+ * @property {boolean} [primary] - Is it a primary email
507
+ * @property {boolean} [verified] - Is the email verified
506
508
  */
507
509
  declare class UserApplicationModel {
508
510
  }
@@ -1085,21 +1087,50 @@ type UserSchema = {
1085
1087
  _id?: string;
1086
1088
  created_at?: string;
1087
1089
  updated_at?: string;
1090
+ external_id?: string;
1091
+ rr_id?: string;
1088
1092
  };
1089
1093
  /** @returns {PhoneNumber} */
1090
1094
  declare function PhoneNumber(): PhoneNumber;
1091
1095
  type PhoneNumber = {
1096
+ /**
1097
+ * - Phone number
1098
+ */
1099
+ phone?: string;
1100
+ /**
1101
+ * - Country code
1102
+ */
1103
+ country_code?: number;
1104
+ /**
1105
+ * - Is the phone number active
1106
+ */
1092
1107
  active?: boolean;
1108
+ /**
1109
+ * - Is it a primary phone number
1110
+ */
1093
1111
  primary?: boolean;
1112
+ /**
1113
+ * - Is the phone number verified
1114
+ */
1094
1115
  verified?: boolean;
1095
- phone?: string;
1096
- country_code?: number;
1097
1116
  };
1098
1117
  /** @returns {Email} */
1099
1118
  declare function Email(): Email;
1100
1119
  type Email = {
1101
- primary?: boolean;
1102
- verified?: boolean;
1120
+ /**
1121
+ * - Email address
1122
+ */
1103
1123
  email?: string;
1124
+ /**
1125
+ * - Is the email active
1126
+ */
1104
1127
  active?: boolean;
1128
+ /**
1129
+ * - Is it a primary email
1130
+ */
1131
+ primary?: boolean;
1132
+ /**
1133
+ * - Is the email verified
1134
+ */
1135
+ verified?: boolean;
1105
1136
  };
@@ -563,23 +563,25 @@ const Joi = require("joi");
563
563
  * @property {string} [_id]
564
564
  * @property {string} [created_at]
565
565
  * @property {string} [updated_at]
566
+ * @property {string} [external_id]
567
+ * @property {string} [rr_id]
566
568
  */
567
569
 
568
570
  /**
569
571
  * @typedef PhoneNumber
570
- * @property {boolean} [active]
571
- * @property {boolean} [primary]
572
- * @property {boolean} [verified]
573
- * @property {string} [phone]
574
- * @property {number} [country_code]
572
+ * @property {string} [phone] - Phone number
573
+ * @property {number} [country_code] - Country code
574
+ * @property {boolean} [active] - Is the phone number active
575
+ * @property {boolean} [primary] - Is it a primary phone number
576
+ * @property {boolean} [verified] - Is the phone number verified
575
577
  */
576
578
 
577
579
  /**
578
580
  * @typedef Email
579
- * @property {boolean} [primary]
580
- * @property {boolean} [verified]
581
- * @property {string} [email]
582
- * @property {boolean} [active]
581
+ * @property {string} [email] - Email address
582
+ * @property {boolean} [active] - Is the email active
583
+ * @property {boolean} [primary] - Is it a primary email
584
+ * @property {boolean} [verified] - Is the email verified
583
585
  */
584
586
 
585
587
  class UserApplicationModel {
@@ -1297,27 +1299,29 @@ class UserApplicationModel {
1297
1299
  _id: Joi.string().allow(""),
1298
1300
  created_at: Joi.string().allow(""),
1299
1301
  updated_at: Joi.string().allow(""),
1302
+ external_id: Joi.string().allow(""),
1303
+ rr_id: Joi.string().allow(""),
1300
1304
  });
1301
1305
  }
1302
1306
 
1303
1307
  /** @returns {PhoneNumber} */
1304
1308
  static PhoneNumber() {
1305
1309
  return Joi.object({
1310
+ phone: Joi.string().allow(""),
1311
+ country_code: Joi.number(),
1306
1312
  active: Joi.boolean(),
1307
1313
  primary: Joi.boolean(),
1308
1314
  verified: Joi.boolean(),
1309
- phone: Joi.string().allow(""),
1310
- country_code: Joi.number(),
1311
1315
  });
1312
1316
  }
1313
1317
 
1314
1318
  /** @returns {Email} */
1315
1319
  static Email() {
1316
1320
  return Joi.object({
1317
- primary: Joi.boolean(),
1318
- verified: Joi.boolean(),
1319
1321
  email: Joi.string().allow(""),
1320
1322
  active: Joi.boolean(),
1323
+ primary: Joi.boolean(),
1324
+ verified: Joi.boolean(),
1321
1325
  });
1322
1326
  }
1323
1327
  }
@@ -1 +1 @@
1
- export const fdkAxios: any;
1
+ export const fdkAxios: import("axios").AxiosInstance;
@@ -1,13 +1,11 @@
1
- const combineURLs = require("axios/lib/helpers/combineURLs");
2
- const isAbsoluteURL = require("axios/lib/helpers/isAbsoluteURL");
3
- const axios = require("axios");
1
+ const { isAbsoluteURL, combineURLs } = require("./utils");
2
+ const axios = require("axios").default;
4
3
  const querystring = require("query-string");
5
4
  const { sign } = require("@gofynd/fp-signature");
6
5
  const { FDKServerResponseError } = require("./FDKError");
7
6
  const { log, Logger, getLoggerLevel } = require("./Logger");
8
7
  const createCurl = require("./curlHelper");
9
8
  const { version } = require("./../../package.json");
10
- axios.defaults.withCredentials = true;
11
9
 
12
10
  function getTransformer(config) {
13
11
  const { transformRequest } = config;
@@ -82,6 +80,7 @@ function requestInterceptorFn() {
82
80
  };
83
81
  }
84
82
  const fdkAxios = axios.create({
83
+ withCredentials: true,
85
84
  paramsSerializer: (params) => {
86
85
  return querystring.stringify(params);
87
86
  },
@@ -132,33 +131,55 @@ fdkAxios.interceptors.response.use(
132
131
  function (error) {
133
132
  if (error.response) {
134
133
  // Request made and server responded
134
+ const responseData = error.response.data;
135
135
  Logger({
136
136
  level: "ERROR",
137
- message: error.response.data || error.message,
138
- stack: error.response.data.stack || error.stack,
137
+ message:
138
+ responseData && responseData.message
139
+ ? responseData.message
140
+ : error.message,
141
+ stack:
142
+ responseData && responseData.stack ? responseData.stack : error.stack,
139
143
  request: {
140
- method: error.config.method,
141
- url: error.config.url,
142
- headers: error.config.headers,
144
+ method:
145
+ error.config && error.config.url ? error.config.url : undefined,
146
+ url:
147
+ error.config && error.config.method
148
+ ? error.config.method
149
+ : undefined,
150
+ headers:
151
+ error.config && error.config.headers
152
+ ? error.config.headers
153
+ : undefined,
143
154
  },
144
155
  });
145
156
  throw new FDKServerResponseError(
146
- error.response.data.message || error.message,
147
- error.response.data.stack || error.stack,
157
+ responseData && responseData.message
158
+ ? responseData.message
159
+ : error.message,
160
+ "",
161
+ // Not Sending Stack for response error
148
162
  error.response.statusText,
149
163
  error.response.status,
150
- error.response.data
164
+ responseData
151
165
  );
152
166
  } else if (error.request) {
153
167
  // The request was made but no error.response was received
154
168
  Logger({
155
169
  level: "ERROR",
156
- message: error.data || error.message,
157
- stack: error.data.stack || error.stack,
170
+ message: error.message,
171
+ stack: error.stack,
158
172
  request: {
159
- method: error.config.method,
160
- url: error.config.url,
161
- headers: error.config.headers,
173
+ method:
174
+ error.config && error.config.url ? error.config.url : undefined,
175
+ url:
176
+ error.config && error.config.method
177
+ ? error.config.method
178
+ : undefined,
179
+ headers:
180
+ error.config && error.config.headers
181
+ ? error.config.headers
182
+ : undefined,
162
183
  },
163
184
  });
164
185
  throw new FDKServerResponseError(
@@ -20,24 +20,36 @@ const sg = function safeGet(fn, defaultValue = null) {
20
20
  if (typeof window != "undefined") {
21
21
  window.FPI.event.on("user.login", (eventData) => {
22
22
  Logger({ level: "DEBUG", message: eventData });
23
- Clickstream.identify(eventData["user_id"], { ...eventData }).catch(
24
- (err) => {
25
- Logger({ level: "ERROR", message: err });
26
- }
27
- );
23
+ Clickstream.identify(eventData["user_id"], {
24
+ event_type: "identity",
25
+ email: sg(() => eventData["email"]),
26
+ phone: sg(() => eventData["phone_number"]),
27
+ login_value: sg(() => eventData["login_value"]),
28
+ method: sg(() => eventData["method"]),
29
+ }).catch((err) => {
30
+ Logger({ level: "ERROR", message: err });
31
+ });
28
32
  });
29
33
 
30
34
  window.FPI.event.on("user.update", (eventData) => {
31
35
  Logger({ level: "DEBUG", message: eventData });
32
- Clickstream.identify(eventData["used_id"], { ...eventData }).catch(
33
- (err) => {
34
- Logger({ level: "ERROR", message: err });
35
- }
36
- );
36
+ Clickstream.identify(eventData["used_id"], {
37
+ event_type: "identity",
38
+ email: sg(() => eventData["email"]),
39
+ phone: sg(() => eventData["phone_number"]),
40
+ method: sg(() => eventData["method"]),
41
+ }).catch((err) => {
42
+ Logger({ level: "ERROR", message: err });
43
+ });
37
44
  });
38
45
 
39
46
  window.FPI.event.on("user.logout", (eventData) => {
40
47
  Logger({ level: "DEBUG", message: eventData });
48
+ Clickstream.sendEvent("user_logout", { event_type: "identity" }).catch(
49
+ (err) => {
50
+ Logger({ level: "ERROR", message: err });
51
+ }
52
+ );
41
53
  Clickstream.reset().catch((err) => {
42
54
  Logger({ level: "ERROR", message: err });
43
55
  });
@@ -48,7 +60,7 @@ if (typeof window != "undefined") {
48
60
  Clickstream.sendEvent("product_wishlist_add", {
49
61
  wishlist_name: "TODO",
50
62
  wishlist_id: "TODO",
51
- event_type: "click",
63
+ event_type: "engagement",
52
64
  product_id: sg(() => eventData.item["uid"]),
53
65
  brand: sg(() => eventData.item.brand["name"]),
54
66
  l3_category: sg(() => eventData.item.categories[0]["name"]),
@@ -72,7 +84,7 @@ if (typeof window != "undefined") {
72
84
  Clickstream.sendEvent("product_wishlist_remove", {
73
85
  wishlist_name: "TODO",
74
86
  wishlist_id: "TODO",
75
- event_type: "click",
87
+ event_type: "engagement",
76
88
  product_id: sg(() => eventData.item["uid"]),
77
89
  brand: sg(() => eventData.item.brand["name"]),
78
90
  l3_category: sg(() => eventData.item.categories[0]["name"]),
@@ -95,8 +107,9 @@ if (typeof window != "undefined") {
95
107
  Logger({ level: "DEBUG", message: eventData });
96
108
  Clickstream.sendEvent("add_to_cart", {
97
109
  cart_id: eventData.cart_id,
98
- event_type: "click",
110
+ event_type: "engagement",
99
111
  product_id: sg(() => eventData.products[0]["uid"]),
112
+ article_id: sg(() => eventData.products[0]["article"]["uid"]),
100
113
  brand: sg(() => eventData.products[0]["brand"]["name"]),
101
114
  l3_category: sg(() => eventData.products[0]["category"]["name"]),
102
115
  l1_category: "TODO",
@@ -119,7 +132,7 @@ if (typeof window != "undefined") {
119
132
  Logger({ level: "DEBUG", message: eventData });
120
133
  Clickstream.sendEvent("remove_from_cart", {
121
134
  cart_id: eventData.cart_id,
122
- event_type: "click",
135
+ event_type: "engagement",
123
136
  product_id: sg(() => eventData.products[0]["uid"]),
124
137
  brand: sg(() => eventData.products[0]["brand"]["name"]),
125
138
  l3_category: sg(() => eventData.products[0]["category"]["name"]),
@@ -142,7 +155,7 @@ if (typeof window != "undefined") {
142
155
  window.FPI.event.on("order.processed", (eventData) => {
143
156
  Logger({ level: "DEBUG", message: eventData });
144
157
  Clickstream.sendEvent("order_complete", {
145
- event_type: "click",
158
+ event_type: "conversion",
146
159
  ...eventData,
147
160
  })
148
161
  .then((resp) => {
@@ -156,7 +169,7 @@ if (typeof window != "undefined") {
156
169
  window.FPI.event.on("refund.success", (eventData) => {
157
170
  Logger({ level: "DEBUG", message: eventData });
158
171
  Clickstream.sendEvent("order_refunded", {
159
- event_type: "click",
172
+ event_type: "conversion",
160
173
  ...eventData,
161
174
  })
162
175
  .then((resp) => {
@@ -170,7 +183,7 @@ if (typeof window != "undefined") {
170
183
  window.FPI.event.on("order.checkout", (eventData) => {
171
184
  Logger({ level: "DEBUG", message: eventData });
172
185
  Clickstream.sendEvent("order_checkout", {
173
- event_type: "click",
186
+ event_type: "conversion",
174
187
  cart_id: eventData.cart_id,
175
188
  cart_total: sg(() => eventData.breakup_values_raw["mrp_total"]),
176
189
  items: sg(() => eventData.products.lenght),
@@ -187,6 +200,7 @@ if (typeof window != "undefined") {
187
200
  price: sg(() => p.price["marked"]),
188
201
  value: sg(() => p.price["effective"]),
189
202
  currency: sg(() => p.price["currency_code"]),
203
+ article_id: sg(() => p.article["uid"]),
190
204
  };
191
205
  }),
192
206
  })
@@ -203,7 +217,7 @@ if (typeof window != "undefined") {
203
217
  Clickstream.sendEvent("product_view", {
204
218
  event_type: "click",
205
219
  product_id: sg(() => eventData.product["uid"]),
206
- currency: sg(() => eventData.product.price["currency"]),
220
+ currency: sg(() => eventData.product.price["currency_code"]),
207
221
  brand: sg(() => eventData.product.brand["name"]),
208
222
  l3_category: sg(() => eventData.product.l3_category),
209
223
  mrp: sg(() => eventData.product.price.max),
@@ -224,7 +238,7 @@ if (typeof window != "undefined") {
224
238
  window.FPI.event.on("search.products", (eventData) => {
225
239
  Logger({ level: "DEBUG", message: eventData });
226
240
  Clickstream.sendEvent("product_search", {
227
- type: "search",
241
+ event_type: "search",
228
242
  query: eventData.search_text,
229
243
  })
230
244
  .then((resp) => {
@@ -1,7 +1,5 @@
1
1
  const qs = require("query-string");
2
- const combineURLs = require("axios/lib/helpers/combineURLs");
3
- const isAbsoluteURL = require("axios/lib/helpers/isAbsoluteURL");
4
-
2
+ const { combineURLs, isAbsoluteURL } = require("./utils");
5
3
  let reqConfig;
6
4
 
7
5
  // generate url with query params
@@ -15,3 +15,18 @@ export namespace NAV_TYPE {
15
15
  const PAGE: string;
16
16
  const POPUP: string;
17
17
  }
18
+ /**
19
+ * Creates a new URL by combining the specified URLs
20
+ *
21
+ * @param {string} baseURL The base URL
22
+ * @param {string} relativeURL The relative URL
23
+ * @returns {string} The combined URL
24
+ */
25
+ export function combineURLs(baseURL: string, relativeURL: string): string;
26
+ /**
27
+ * Determines whether the specified URL is absolute
28
+ *
29
+ * @param {string} url The URL to test
30
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
31
+ */
32
+ export function isAbsoluteURL(url: string): boolean;