@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
@@ -48,10 +48,6 @@ export = UserApplicationValidator;
48
48
  * @typedef GetPlatformConfigParam
49
49
  * @property {string} [name] - Name of the application, e.g. Fynd
50
50
  */
51
- /**
52
- * @typedef GetUserAttributesParam
53
- * @property {string} [slug] - Filter by attribute slug.
54
- */
55
51
  /** @typedef HasPasswordParam */
56
52
  /**
57
53
  * @typedef LoginWithAppleIOSParam
@@ -162,14 +158,6 @@ export = UserApplicationValidator;
162
158
  * @property {string} [platform] - ID of the application
163
159
  * @property {UserApplicationModel.EditProfileRequestSchema} body
164
160
  */
165
- /**
166
- * @typedef UpdateUserAttributesParam
167
- * @property {UserApplicationModel.UpdateUserAttributesRequest} body
168
- */
169
- /**
170
- * @typedef UserExistsParam
171
- * @property {string} q - Email id or phone number of user
172
- */
173
161
  /**
174
162
  * @typedef VerifyEmailParam
175
163
  * @property {UserApplicationModel.CodeRequestBodySchema} body
@@ -217,8 +205,6 @@ declare class UserApplicationValidator {
217
205
  static getLoggedInUser(): any;
218
206
  /** @returns {GetPlatformConfigParam} */
219
207
  static getPlatformConfig(): GetPlatformConfigParam;
220
- /** @returns {GetUserAttributesParam} */
221
- static getUserAttributes(): GetUserAttributesParam;
222
208
  /** @returns {HasPasswordParam} */
223
209
  static hasPassword(): any;
224
210
  /** @returns {LoginWithAppleIOSParam} */
@@ -269,10 +255,6 @@ declare class UserApplicationValidator {
269
255
  static updatePassword(): UpdatePasswordParam;
270
256
  /** @returns {UpdateProfileParam} */
271
257
  static updateProfile(): UpdateProfileParam;
272
- /** @returns {UpdateUserAttributesParam} */
273
- static updateUserAttributes(): UpdateUserAttributesParam;
274
- /** @returns {UserExistsParam} */
275
- static userExists(): UserExistsParam;
276
258
  /** @returns {VerifyEmailParam} */
277
259
  static verifyEmail(): VerifyEmailParam;
278
260
  /** @returns {VerifyEmailForgotOTPParam} */
@@ -287,7 +269,7 @@ declare class UserApplicationValidator {
287
269
  static verifyMobileOTP(): VerifyMobileOTPParam;
288
270
  }
289
271
  declare namespace UserApplicationValidator {
290
- export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, GetUserAttributesParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, UpdateUserAttributesParam, UserExistsParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam };
272
+ export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam };
291
273
  }
292
274
  type AddEmailParam = {
293
275
  /**
@@ -371,12 +353,6 @@ type GetPlatformConfigParam = {
371
353
  */
372
354
  name?: string;
373
355
  };
374
- type GetUserAttributesParam = {
375
- /**
376
- * - Filter by attribute slug.
377
- */
378
- slug?: string;
379
- };
380
356
  type LoginWithAppleIOSParam = {
381
357
  /**
382
358
  * - ID of the application
@@ -510,15 +486,6 @@ type UpdateProfileParam = {
510
486
  platform?: string;
511
487
  body: UserApplicationModel.EditProfileRequestSchema;
512
488
  };
513
- type UpdateUserAttributesParam = {
514
- body: UserApplicationModel.UpdateUserAttributesRequest;
515
- };
516
- type UserExistsParam = {
517
- /**
518
- * - Email id or phone number of user
519
- */
520
- q: string;
521
- };
522
489
  type VerifyEmailParam = {
523
490
  body: UserApplicationModel.CodeRequestBodySchema;
524
491
  };
@@ -60,11 +60,6 @@ const UserApplicationModel = require("./UserApplicationModel");
60
60
  * @property {string} [name] - Name of the application, e.g. Fynd
61
61
  */
62
62
 
63
- /**
64
- * @typedef GetUserAttributesParam
65
- * @property {string} [slug] - Filter by attribute slug.
66
- */
67
-
68
63
  /** @typedef HasPasswordParam */
69
64
 
70
65
  /**
@@ -200,16 +195,6 @@ const UserApplicationModel = require("./UserApplicationModel");
200
195
  * @property {UserApplicationModel.EditProfileRequestSchema} body
201
196
  */
202
197
 
203
- /**
204
- * @typedef UpdateUserAttributesParam
205
- * @property {UserApplicationModel.UpdateUserAttributesRequest} body
206
- */
207
-
208
- /**
209
- * @typedef UserExistsParam
210
- * @property {string} q - Email id or phone number of user
211
- */
212
-
213
198
  /**
214
199
  * @typedef VerifyEmailParam
215
200
  * @property {UserApplicationModel.CodeRequestBodySchema} body
@@ -315,13 +300,6 @@ class UserApplicationValidator {
315
300
  });
316
301
  }
317
302
 
318
- /** @returns {GetUserAttributesParam} */
319
- static getUserAttributes() {
320
- return Joi.object({
321
- slug: Joi.string().allow(""),
322
- });
323
- }
324
-
325
303
  /** @returns {HasPasswordParam} */
326
304
  static hasPassword() {
327
305
  return Joi.object({});
@@ -509,20 +487,6 @@ class UserApplicationValidator {
509
487
  }).required();
510
488
  }
511
489
 
512
- /** @returns {UpdateUserAttributesParam} */
513
- static updateUserAttributes() {
514
- return Joi.object({
515
- body: UserApplicationModel.UpdateUserAttributesRequest().required(),
516
- }).required();
517
- }
518
-
519
- /** @returns {UserExistsParam} */
520
- static userExists() {
521
- return Joi.object({
522
- q: Joi.string().allow("").required(),
523
- }).required();
524
- }
525
-
526
490
  /** @returns {VerifyEmailParam} */
527
491
  static verifyEmail() {
528
492
  return Joi.object({
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,254 @@
1
+ const Clickstream = require("@gofynd/flick");
2
+ const { Logger } = require("../common/Logger");
3
+
4
+ /**
5
+ * Safely extracts a value from an Object of n-depth
6
+ *
7
+ * @author Nikhil Kakade
8
+ * @param {function} fn
9
+ * @param {any} [defaultValue] - Null
10
+ * @returns {any}
11
+ */
12
+ const sg = function safeGet(fn, defaultValue = null) {
13
+ try {
14
+ return fn();
15
+ } catch (err) {
16
+ return defaultValue;
17
+ }
18
+ };
19
+
20
+ if (typeof window != "undefined") {
21
+ window.FPI.event.on("user.login", (eventData) => {
22
+ Logger({ level: "DEBUG", message: eventData });
23
+ Clickstream.identify(eventData["user_id"], {
24
+ event_type: "identity",
25
+ ...eventData,
26
+ }).catch((err) => {
27
+ Logger({ level: "ERROR", message: err });
28
+ });
29
+ });
30
+
31
+ window.FPI.event.on("user.update", (eventData) => {
32
+ Logger({ level: "DEBUG", message: eventData });
33
+ Clickstream.identify(eventData["used_id"], {
34
+ event_type: "identity",
35
+ ...eventData,
36
+ }).catch((err) => {
37
+ Logger({ level: "ERROR", message: err });
38
+ });
39
+ });
40
+
41
+ window.FPI.event.on("user.logout", (eventData) => {
42
+ Logger({ level: "DEBUG", message: eventData });
43
+ Clickstream.sendEvent("user_logout", {
44
+ event_type: "identity",
45
+ ...eventData,
46
+ }).catch((err) => {
47
+ Logger({ level: "ERROR", message: err });
48
+ });
49
+ Clickstream.reset().catch((err) => {
50
+ Logger({ level: "ERROR", message: err });
51
+ });
52
+ });
53
+
54
+ window.FPI.event.on("wishlist.add", (eventData) => {
55
+ Logger({ level: "DEBUG", message: eventData });
56
+ Clickstream.sendEvent("product_wishlist_add", {
57
+ wishlist_name: "TODO",
58
+ wishlist_id: "TODO",
59
+ event_type: "click",
60
+ product_id: sg(() => eventData.item["uid"]),
61
+ brand: sg(() => eventData.item.brand["name"]),
62
+ l3_category: sg(() => eventData.item.categories[0]["name"]),
63
+ mrp: sg(() => eventData.item.price.marked.max),
64
+ quantity: "TODO",
65
+ esp: sg(() => eventData.item.price.effective.min),
66
+ currency: sg(() => eventData.item.price.effective.currency_code),
67
+ value: "TODO",
68
+ source_url: "TODO",
69
+ })
70
+ .then((resp) => {
71
+ Logger({ level: "DEBUG", message: "Click event sent" });
72
+ })
73
+ .catch((err) => {
74
+ Logger({ level: "ERROR", message: err });
75
+ });
76
+ });
77
+
78
+ window.FPI.event.on("wishlist.remove", (eventData) => {
79
+ Logger({ level: "DEBUG", message: eventData });
80
+ Clickstream.sendEvent("product_wishlist_remove", {
81
+ wishlist_name: "TODO",
82
+ wishlist_id: "TODO",
83
+ event_type: "click",
84
+ product_id: sg(() => eventData.item["uid"]),
85
+ brand: sg(() => eventData.item.brand["name"]),
86
+ l3_category: sg(() => eventData.item.categories[0]["name"]),
87
+ mrp: sg(() => eventData.item.price.marked.max),
88
+ quantity: "TODO",
89
+ esp: sg(() => eventData.item.price.effective.min),
90
+ currency: sg(() => eventData.item.price.effective.currency_code),
91
+ value: "TODO",
92
+ source_url: "TODO",
93
+ })
94
+ .then((resp) => {
95
+ Logger({ level: "DEBUG", message: "Click event sent" });
96
+ })
97
+ .catch((err) => {
98
+ Logger({ level: "ERROR", message: err });
99
+ });
100
+ });
101
+
102
+ window.FPI.event.on("cart.newProduct", (eventData) => {
103
+ Logger({ level: "DEBUG", message: eventData });
104
+ Clickstream.sendEvent("add_to_cart", {
105
+ cart_id: eventData.cart_id,
106
+ event_type: "click",
107
+ product_id: sg(() => eventData.products[0]["uid"]),
108
+ brand: sg(() => eventData.products[0]["brand"]["name"]),
109
+ l3_category: sg(() => eventData.products[0]["category"]["name"]),
110
+ l1_category: "TODO",
111
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
112
+ price: sg(() => eventData.products[0]["price"]["selling"]),
113
+ quantity: sg(() => eventData.products[0]["quantity"]["current"]),
114
+ source_url: "TODO",
115
+ position: "TODO",
116
+ value: "TODO",
117
+ })
118
+ .then((resp) => {
119
+ Logger({ level: "DEBUG", message: "Click event sent" });
120
+ })
121
+ .catch((err) => {
122
+ Logger({ level: "ERROR", message: err });
123
+ });
124
+ });
125
+
126
+ window.FPI.event.on("cart.remove", (eventData) => {
127
+ Logger({ level: "DEBUG", message: eventData });
128
+ Clickstream.sendEvent("remove_from_cart", {
129
+ cart_id: eventData.cart_id,
130
+ event_type: "click",
131
+ product_id: sg(() => eventData.products[0]["uid"]),
132
+ brand: sg(() => eventData.products[0]["brand"]["name"]),
133
+ l3_category: sg(() => eventData.products[0]["category"]["name"]),
134
+ l1_category: "TODO",
135
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
136
+ price: sg(() => eventData.products[0]["price"]["selling"]),
137
+ quantity: sg(() => eventData.products[0]["quantity"]["current"]),
138
+ source_url: "TODO",
139
+ position: "TODO",
140
+ value: "TODO",
141
+ })
142
+ .then((resp) => {
143
+ Logger({ level: "DEBUG", message: "Click event sent" });
144
+ })
145
+ .catch((err) => {
146
+ Logger({ level: "ERROR", message: err });
147
+ });
148
+ });
149
+
150
+ window.FPI.event.on("order.processed", (eventData) => {
151
+ Logger({ level: "DEBUG", message: eventData });
152
+ Clickstream.sendEvent("order_complete", {
153
+ event_type: "click",
154
+ ...eventData,
155
+ })
156
+ .then((resp) => {
157
+ Logger({ level: "DEBUG", message: "Click event sent" });
158
+ })
159
+ .catch((err) => {
160
+ Logger({ level: "ERROR", message: err });
161
+ });
162
+ });
163
+
164
+ window.FPI.event.on("refund.success", (eventData) => {
165
+ Logger({ level: "DEBUG", message: eventData });
166
+ Clickstream.sendEvent("order_refunded", {
167
+ event_type: "click",
168
+ ...eventData,
169
+ })
170
+ .then((resp) => {
171
+ Logger({ level: "DEBUG", message: "Click event sent" });
172
+ })
173
+ .catch((err) => {
174
+ Logger({ level: "ERROR", message: err });
175
+ });
176
+ });
177
+
178
+ window.FPI.event.on("order.checkout", (eventData) => {
179
+ Logger({ level: "DEBUG", message: eventData });
180
+ Clickstream.sendEvent("order_checkout", {
181
+ event_type: "click",
182
+ cart_id: eventData.cart_id,
183
+ cart_total: sg(() => eventData.breakup_values_raw["mrp_total"]),
184
+ items: sg(() => eventData.products.lenght),
185
+ shipping: sg(() => eventData.breakup_values_raw["delivery_charge"]),
186
+ tax: sg(() => eventData.breakup_values_raw["gst_charges"]),
187
+ order_total: sg(() => eventData.breakup_values_raw["total"]),
188
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
189
+ products: eventData.products.map((p) => {
190
+ return {
191
+ product_id: p.uid,
192
+ l3_category: sg(() => p.category["name"]),
193
+ l1_category: "TODO",
194
+ quantity: sg(() => p.quantity["current"]),
195
+ price: sg(() => p.price["marked"]),
196
+ value: sg(() => p.price["effective"]),
197
+ currency: sg(() => p.price["currency_code"]),
198
+ };
199
+ }),
200
+ })
201
+ .then((resp) => {
202
+ Logger({ level: "DEBUG", message: "Click event sent" });
203
+ })
204
+ .catch((err) => {
205
+ Logger({ level: "ERROR", message: err });
206
+ });
207
+ });
208
+
209
+ window.FPI.event.on("product.view", (eventData) => {
210
+ Logger({ level: "DEBUG", message: eventData });
211
+ Clickstream.sendEvent("product_view", {
212
+ event_type: "click",
213
+ product_id: sg(() => eventData.product["uid"]),
214
+ currency: sg(() => eventData.product.price["currency"]),
215
+ brand: sg(() => eventData.product.brand["name"]),
216
+ l3_category: sg(() => eventData.product.l3_category),
217
+ mrp: sg(() => eventData.product.price.max),
218
+ esp: sg(() => eventData.product.price.min),
219
+ l1_category: sg(() => eventData.product.l1_category),
220
+ source_url: sg(() => eventData.product.source_url),
221
+ quantity: sg(() => eventData.product.sizes[0]["quantity"]),
222
+ position: "TODO",
223
+ })
224
+ .then((resp) => {
225
+ Logger({ level: "DEBUG", message: "Click event sent" });
226
+ })
227
+ .catch((err) => {
228
+ Logger({ level: "ERROR", message: err });
229
+ });
230
+ });
231
+
232
+ window.FPI.event.on("search.products", (eventData) => {
233
+ Logger({ level: "DEBUG", message: eventData });
234
+ Clickstream.sendEvent("product_search", {
235
+ event_type: "search",
236
+ query: eventData.search_text,
237
+ })
238
+ .then((resp) => {
239
+ Logger({ level: "DEBUG", message: "Click event sent" });
240
+ })
241
+ .catch((err) => {
242
+ Logger({ level: "ERROR", message: err });
243
+ });
244
+ });
245
+
246
+ window.FPI.event.on("product_list.filter", (eventData) => {
247
+ Logger({ level: "DEBUG", message: eventData });
248
+ // Clickstream.sendEvent("add_to_cart", { event_type: "conversion", product_uid: eventData.products[0]['uid'], user_id: eventData.user['user_id'], brand: eventData.products[0]['brand']['name'], category: eventData.products[0]['category']['name'], currency: eventData.products[0]['price']['currency_code'], price: eventData.products[0]['price']['selling'], quantity: eventData.products[0]['quantity']['current'], cart: [] }).then((resp) => {
249
+ // console.log("Event sent succesfully")
250
+ // }).catch(err => {
251
+ // console.error(err)
252
+ // })
253
+ });
254
+ }
@@ -30,10 +30,7 @@ function convertUrlToAction(url) {
30
30
  const closestMatchingNavLink = Object.keys(typeLink).find((pageType) => {
31
31
  return utils.trimChar(pageType) === bestMatchingLink.value;
32
32
  });
33
- const closestMatchingNavKey = typeLink[closestMatchingNavLink];
34
- if (!closestMatchingNavKey) {
35
- closestMatchingNavKey = "home";
36
- }
33
+ const closestMatchingNavKey = typeLink[closestMatchingNavLink] || "home";
37
34
  return {
38
35
  type: "page",
39
36
  page: {
@@ -1,127 +1,139 @@
1
1
  export = FileStoragePartnerModel;
2
2
  /**
3
3
  * @typedef CDN
4
+ * @property {string} url
4
5
  * @property {string} absolute_url
5
6
  * @property {string} relative_url
7
+ */
8
+ /**
9
+ * @typedef Upload
10
+ * @property {number} expiry
6
11
  * @property {string} url
7
12
  */
8
13
  /**
9
- * @typedef CompleteResponse
10
- * @property {string} _id
11
- * @property {CDN} cdn
12
- * @property {string} content_type
13
- * @property {CreatedBy} [created_by]
14
- * @property {string} created_on
14
+ * @typedef StartResponse
15
15
  * @property {string} file_name
16
16
  * @property {string} file_path
17
- * @property {string} modified_on
17
+ * @property {string} content_type
18
+ * @property {string} [method]
18
19
  * @property {string} namespace
19
20
  * @property {string} operation
20
21
  * @property {number} size
21
- * @property {boolean} success
22
- * @property {string[]} [tags]
23
22
  * @property {Upload} upload
23
+ * @property {CDN} cdn
24
+ * @property {string[]} [tags]
24
25
  */
25
26
  /**
26
- * @typedef CreatedBy
27
- * @property {string} [username]
28
- */
29
- /**
30
- * @typedef FailedResponse
31
- * @property {string} message
27
+ * @typedef Params
28
+ * @property {string} [subpath] - The subpath for the file.
32
29
  */
33
30
  /**
34
31
  * @typedef StartRequest
35
- * @property {string} content_type
36
32
  * @property {string} file_name
37
- * @property {Object} [params]
33
+ * @property {string} content_type
38
34
  * @property {number} size
39
35
  * @property {string[]} [tags]
36
+ * @property {Params} [params]
40
37
  */
41
38
  /**
42
- * @typedef StartResponse
43
- * @property {CDN} cdn
44
- * @property {string} content_type
39
+ * @typedef CreatedBy
40
+ * @property {string} [username]
41
+ */
42
+ /**
43
+ * @typedef CompleteResponse
44
+ * @property {string} _id
45
45
  * @property {string} file_name
46
46
  * @property {string} file_path
47
- * @property {string} [method]
47
+ * @property {string} content_type
48
48
  * @property {string} namespace
49
49
  * @property {string} operation
50
50
  * @property {number} size
51
- * @property {string[]} [tags]
52
51
  * @property {Upload} upload
52
+ * @property {CDN} cdn
53
+ * @property {boolean} success
54
+ * @property {string[]} [tags]
55
+ * @property {string} created_on
56
+ * @property {string} modified_on
57
+ * @property {CreatedBy} [created_by]
53
58
  */
54
59
  /**
55
- * @typedef Upload
56
- * @property {number} expiry
57
- * @property {string} url
60
+ * @typedef FailedResponse
61
+ * @property {string} message
58
62
  */
59
63
  declare class FileStoragePartnerModel {
60
64
  }
61
65
  declare namespace FileStoragePartnerModel {
62
- export { CDN, CompleteResponse, CreatedBy, FailedResponse, StartRequest, StartResponse, Upload };
66
+ export { CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, FailedResponse };
63
67
  }
64
68
  /** @returns {CDN} */
65
69
  declare function CDN(): CDN;
66
70
  type CDN = {
71
+ url: string;
67
72
  absolute_url: string;
68
73
  relative_url: string;
74
+ };
75
+ /** @returns {Upload} */
76
+ declare function Upload(): Upload;
77
+ type Upload = {
78
+ expiry: number;
69
79
  url: string;
70
80
  };
71
- /** @returns {CompleteResponse} */
72
- declare function CompleteResponse(): CompleteResponse;
73
- type CompleteResponse = {
74
- _id: string;
75
- cdn: CDN;
76
- content_type: string;
77
- created_by?: CreatedBy;
78
- created_on: string;
81
+ /** @returns {StartResponse} */
82
+ declare function StartResponse(): StartResponse;
83
+ type StartResponse = {
79
84
  file_name: string;
80
85
  file_path: string;
81
- modified_on: string;
86
+ content_type: string;
87
+ method?: string;
82
88
  namespace: string;
83
89
  operation: string;
84
90
  size: number;
85
- success: boolean;
86
- tags?: string[];
87
91
  upload: Upload;
92
+ cdn: CDN;
93
+ tags?: string[];
88
94
  };
89
- /** @returns {CreatedBy} */
90
- declare function CreatedBy(): CreatedBy;
91
- type CreatedBy = {
92
- username?: string;
93
- };
94
- /** @returns {FailedResponse} */
95
- declare function FailedResponse(): FailedResponse;
96
- type FailedResponse = {
97
- message: string;
95
+ /** @returns {Params} */
96
+ declare function Params(): Params;
97
+ type Params = {
98
+ /**
99
+ * - The subpath for the file.
100
+ */
101
+ subpath?: string;
98
102
  };
99
103
  /** @returns {StartRequest} */
100
104
  declare function StartRequest(): StartRequest;
101
105
  type StartRequest = {
102
- content_type: string;
103
106
  file_name: string;
104
- params?: any;
107
+ content_type: string;
105
108
  size: number;
106
109
  tags?: string[];
110
+ params?: Params;
107
111
  };
108
- /** @returns {StartResponse} */
109
- declare function StartResponse(): StartResponse;
110
- type StartResponse = {
111
- cdn: CDN;
112
- content_type: string;
112
+ /** @returns {CreatedBy} */
113
+ declare function CreatedBy(): CreatedBy;
114
+ type CreatedBy = {
115
+ username?: string;
116
+ };
117
+ /** @returns {CompleteResponse} */
118
+ declare function CompleteResponse(): CompleteResponse;
119
+ type CompleteResponse = {
120
+ _id: string;
113
121
  file_name: string;
114
122
  file_path: string;
115
- method?: string;
123
+ content_type: string;
116
124
  namespace: string;
117
125
  operation: string;
118
126
  size: number;
119
- tags?: string[];
120
127
  upload: Upload;
128
+ cdn: CDN;
129
+ success: boolean;
130
+ tags?: string[];
131
+ created_on: string;
132
+ modified_on: string;
133
+ created_by?: CreatedBy;
121
134
  };
122
- /** @returns {Upload} */
123
- declare function Upload(): Upload;
124
- type Upload = {
125
- expiry: number;
126
- url: string;
135
+ /** @returns {FailedResponse} */
136
+ declare function FailedResponse(): FailedResponse;
137
+ type FailedResponse = {
138
+ message: string;
127
139
  };