@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.js +0 -18
  8. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
  9. package/sdk/application/Cart/CartApplicationClient.js +27 -1203
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -142
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +40 -1344
  12. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
  13. package/sdk/application/Common/CommonApplicationClient.js +2 -92
  14. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  15. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
  18. package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
  19. package/sdk/application/Content/ContentApplicationClient.js +23 -941
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -11
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.js +4 -134
  22. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
  23. package/sdk/application/Lead/LeadApplicationClient.js +5 -217
  24. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
  25. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -496
  26. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
  27. package/sdk/application/Order/OrderApplicationClient.js +11 -505
  28. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
  29. package/sdk/application/Payment/PaymentApplicationClient.js +46 -2106
  30. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
  31. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -311
  32. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  33. package/sdk/application/Share/ShareApplicationClient.js +7 -309
  34. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  35. package/sdk/application/Theme/ThemeApplicationClient.js +4 -174
  36. package/sdk/application/User/UserApplicationClient.d.ts +85 -136
  37. package/sdk/application/User/UserApplicationClient.js +42 -1818
  38. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
  39. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -50
  40. package/sdk/application/index.d.ts +0 -18
  41. package/sdk/application/index.js +0 -33
  42. package/sdk/partner/OAuthClient.js +1 -0
  43. package/sdk/platform/Cart/CartPlatformModel.d.ts +7 -0
  44. package/sdk/platform/Cart/CartPlatformModel.js +3 -0
  45. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
  46. package/sdk/platform/Catalog/CatalogPlatformModel.js +0 -3
  47. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
  48. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
  49. package/sdk/public/Configuration/ConfigurationPublicClient.js +4 -2
  50. package/sdk/public/Content/ContentPublicClient.js +4 -2
  51. package/sdk/public/Partner/PartnerPublicClient.js +4 -2
  52. package/sdk/public/Webhook/WebhookPublicClient.js +4 -2
  53. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
  54. package/sdk/application/Cart/CartApplicationModel.js +0 -2497
  55. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
  56. package/sdk/application/Cart/CartApplicationValidator.js +0 -530
  57. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
  58. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
  59. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  60. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  61. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  62. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  63. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  64. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  65. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  66. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  67. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  68. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  69. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
  71. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  73. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
  74. package/sdk/application/Content/ContentApplicationModel.js +0 -1589
  75. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
  76. package/sdk/application/Content/ContentApplicationValidator.js +0 -264
  77. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
  78. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
  79. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  80. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  81. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  82. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  83. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  84. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  85. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
  86. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
  87. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
  88. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
  89. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
  90. package/sdk/application/Order/OrderApplicationModel.js +0 -1471
  91. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
  92. package/sdk/application/Order/OrderApplicationValidator.js +0 -197
  93. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
  94. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
  95. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  96. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  97. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  98. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  99. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  100. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  101. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  102. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  103. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  104. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  105. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
  106. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
  107. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
  108. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
  109. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  110. package/sdk/application/User/UserApplicationModel.js +0 -1382
  111. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  112. package/sdk/application/User/UserApplicationValidator.js +0 -573
  113. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
  114. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
  115. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  116. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  117. package/sdk/common/Clickstream.d.ts +0 -1
  118. package/sdk/common/Clickstream.js +0 -464
@@ -1,573 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- const UserApplicationModel = require("./UserApplicationModel");
4
-
5
- /**
6
- * @typedef AddEmailParam
7
- * @property {string} [platform] - ID of the application.
8
- * @property {UserApplicationModel.EditEmailRequestSchema} body
9
- */
10
-
11
- /**
12
- * @typedef AddMobileNumberParam
13
- * @property {string} [platform] - ID of the application.
14
- * @property {UserApplicationModel.EditMobileRequestSchema} body
15
- */
16
-
17
- /**
18
- * @typedef DeleteEmailParam
19
- * @property {string} [platform] - ID of the application.
20
- * @property {boolean} active - Boolean value to check if email id is active 1.
21
- * True - email id is active 2.False - email id is inactive.
22
- * @property {boolean} primary - Boolean value to check if email id is primary
23
- * (main email id) 1. True - email id is primary 2.False - email id is not primary.
24
- * @property {boolean} verified - Boolean value to check if email id is verified
25
- * 1. True - email id is verified 2.False - email id is not verified yet.
26
- * @property {string} email - The email id to delete.
27
- */
28
-
29
- /**
30
- * @typedef DeleteMobileNumberParam
31
- * @property {string} [platform] - ID of the application.
32
- * @property {boolean} active - This is a boolean value to check if mobile
33
- * number is active 1.True - number is active 2. False - number is inactive.
34
- * @property {boolean} primary - This is a boolean value to check if mobile
35
- * number is primary number (main number) 1. True - number is primary 2. False
36
- * - number is not primary.
37
- * @property {boolean} verified - This is a boolean value to check if mobile
38
- * number is verified 1. True - number is verified 2.False - number is not
39
- * verified yet.
40
- * @property {string} countryCode - Country code of the phone number, e.g. 91.
41
- * @property {string} phone - Phone number.
42
- */
43
-
44
- /**
45
- * @typedef DeleteUserParam
46
- * @property {UserApplicationModel.DeleteApplicationUserRequestSchema} body
47
- */
48
-
49
- /**
50
- * @typedef ForgotPasswordParam
51
- * @property {UserApplicationModel.ForgotPasswordRequestSchema} body
52
- */
53
-
54
- /** @typedef GetListOfActiveSessionsParam */
55
-
56
- /** @typedef GetLoggedInUserParam */
57
-
58
- /**
59
- * @typedef GetPlatformConfigParam
60
- * @property {string} [name] - Name of the application, e.g. Fynd.
61
- */
62
-
63
- /**
64
- * @typedef GetUserAttributesParam
65
- * @property {string} [slug] - Filter by attribute slug.
66
- */
67
-
68
- /** @typedef HasPasswordParam */
69
-
70
- /**
71
- * @typedef LoginWithAppleIOSParam
72
- * @property {string} [platform] - ID of the application.
73
- * @property {UserApplicationModel.OAuthRequestAppleSchema} body
74
- */
75
-
76
- /**
77
- * @typedef LoginWithEmailAndPasswordParam
78
- * @property {UserApplicationModel.PasswordLoginRequestSchema} body
79
- */
80
-
81
- /**
82
- * @typedef LoginWithFacebookParam
83
- * @property {string} [platform] - ID of the application.
84
- * @property {UserApplicationModel.OAuthRequestSchema} body
85
- */
86
-
87
- /**
88
- * @typedef LoginWithGoogleParam
89
- * @property {string} [platform] - ID of the application.
90
- * @property {UserApplicationModel.OAuthRequestSchema} body
91
- */
92
-
93
- /**
94
- * @typedef LoginWithGoogleAndroidParam
95
- * @property {string} [platform] - ID of the application.
96
- * @property {UserApplicationModel.OAuthRequestSchema} body
97
- */
98
-
99
- /**
100
- * @typedef LoginWithGoogleIOSParam
101
- * @property {string} [platform] - ID of the application.
102
- * @property {UserApplicationModel.OAuthRequestSchema} body
103
- */
104
-
105
- /**
106
- * @typedef LoginWithOTPParam
107
- * @property {string} [platform] - ID of the application.
108
- * @property {UserApplicationModel.SendOtpRequestSchema} body
109
- */
110
-
111
- /**
112
- * @typedef LoginWithTokenParam
113
- * @property {UserApplicationModel.TokenRequestBodySchema} body
114
- */
115
-
116
- /** @typedef LogoutParam */
117
-
118
- /**
119
- * @typedef RegisterWithFormParam
120
- * @property {string} [platform] - ID of the application.
121
- * @property {UserApplicationModel.FormRegisterRequestSchema} body
122
- */
123
-
124
- /**
125
- * @typedef ResetForgotPasswordParam
126
- * @property {UserApplicationModel.ForgotPasswordRequestSchema} body
127
- */
128
-
129
- /**
130
- * @typedef SendForgotOTPOnEmailParam
131
- * @property {string} [platform] - ID of the application.
132
- * @property {UserApplicationModel.SendEmailForgotOtpRequestSchema} body
133
- */
134
-
135
- /**
136
- * @typedef SendForgotOTPOnMobileParam
137
- * @property {string} [platform] - ID of the application.
138
- * @property {UserApplicationModel.SendMobileForgotOtpRequestSchema} body
139
- */
140
-
141
- /**
142
- * @typedef SendOTPOnEmailParam
143
- * @property {string} [platform] - ID of the application.
144
- * @property {UserApplicationModel.SendEmailOtpRequestSchema} body
145
- */
146
-
147
- /**
148
- * @typedef SendOTPOnMobileParam
149
- * @property {string} [platform] - ID of the application.
150
- * @property {UserApplicationModel.SendMobileOtpRequestSchema} body
151
- */
152
-
153
- /**
154
- * @typedef SendResetPasswordEmailParam
155
- * @property {string} [platform] - ID of the application.
156
- * @property {UserApplicationModel.SendResetPasswordEmailRequestSchema} body
157
- */
158
-
159
- /**
160
- * @typedef SendResetPasswordMobileParam
161
- * @property {string} [platform] - ID of the application.
162
- * @property {UserApplicationModel.SendResetPasswordMobileRequestSchema} body
163
- */
164
-
165
- /**
166
- * @typedef SendResetTokenParam
167
- * @property {UserApplicationModel.CodeRequestBodySchema} body
168
- */
169
-
170
- /**
171
- * @typedef SendVerificationLinkToEmailParam
172
- * @property {string} [platform] - ID of the application.
173
- * @property {UserApplicationModel.EditEmailRequestSchema} body
174
- */
175
-
176
- /**
177
- * @typedef SendVerificationLinkToMobileParam
178
- * @property {string} [platform] - ID of the application.
179
- * @property {UserApplicationModel.SendVerificationLinkMobileRequestSchema} body
180
- */
181
-
182
- /**
183
- * @typedef SetEmailAsPrimaryParam
184
- * @property {UserApplicationModel.EditEmailRequestSchema} body
185
- */
186
-
187
- /**
188
- * @typedef SetMobileNumberAsPrimaryParam
189
- * @property {UserApplicationModel.SendVerificationLinkMobileRequestSchema} body
190
- */
191
-
192
- /**
193
- * @typedef UpdatePasswordParam
194
- * @property {UserApplicationModel.UpdatePasswordRequestSchema} body
195
- */
196
-
197
- /**
198
- * @typedef UpdateProfileParam
199
- * @property {string} [platform] - ID of the application.
200
- * @property {UserApplicationModel.EditProfileRequestSchema} body
201
- */
202
-
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
- /**
214
- * @typedef VerifyEmailParam
215
- * @property {UserApplicationModel.CodeRequestBodySchema} body
216
- */
217
-
218
- /**
219
- * @typedef VerifyEmailForgotOTPParam
220
- * @property {string} [platform] - ID of the application.
221
- * @property {UserApplicationModel.VerifyEmailForgotOtpRequestSchema} body
222
- */
223
-
224
- /**
225
- * @typedef VerifyEmailOTPParam
226
- * @property {string} [platform] - ID of the application.
227
- * @property {UserApplicationModel.VerifyEmailOtpRequestSchema} body
228
- */
229
-
230
- /**
231
- * @typedef VerifyMobileParam
232
- * @property {UserApplicationModel.CodeRequestBodySchema} body
233
- */
234
-
235
- /**
236
- * @typedef VerifyMobileForgotOTPParam
237
- * @property {string} [platform] - ID of the application.
238
- * @property {UserApplicationModel.VerifyMobileForgotOtpRequestSchema} body
239
- */
240
-
241
- /**
242
- * @typedef VerifyMobileOTPParam
243
- * @property {string} [platform] - ID of the application.
244
- * @property {UserApplicationModel.VerifyOtpRequestSchema} body
245
- */
246
-
247
- class UserApplicationValidator {
248
- /** @returns {AddEmailParam} */
249
- static addEmail() {
250
- return Joi.object({
251
- platform: Joi.string().allow(""),
252
- body: UserApplicationModel.EditEmailRequestSchema().required(),
253
- }).required();
254
- }
255
-
256
- /** @returns {AddMobileNumberParam} */
257
- static addMobileNumber() {
258
- return Joi.object({
259
- platform: Joi.string().allow(""),
260
- body: UserApplicationModel.EditMobileRequestSchema().required(),
261
- }).required();
262
- }
263
-
264
- /** @returns {DeleteEmailParam} */
265
- static deleteEmail() {
266
- return Joi.object({
267
- platform: Joi.string().allow(""),
268
- active: Joi.boolean().required(),
269
- primary: Joi.boolean().required(),
270
- verified: Joi.boolean().required(),
271
- email: Joi.string().allow("").required(),
272
- }).required();
273
- }
274
-
275
- /** @returns {DeleteMobileNumberParam} */
276
- static deleteMobileNumber() {
277
- return Joi.object({
278
- platform: Joi.string().allow(""),
279
- active: Joi.boolean().required(),
280
- primary: Joi.boolean().required(),
281
- verified: Joi.boolean().required(),
282
- countryCode: Joi.string().allow("").required(),
283
- phone: Joi.string().allow("").required(),
284
- }).required();
285
- }
286
-
287
- /** @returns {DeleteUserParam} */
288
- static deleteUser() {
289
- return Joi.object({
290
- body: UserApplicationModel.DeleteApplicationUserRequestSchema().required(),
291
- }).required();
292
- }
293
-
294
- /** @returns {ForgotPasswordParam} */
295
- static forgotPassword() {
296
- return Joi.object({
297
- body: UserApplicationModel.ForgotPasswordRequestSchema().required(),
298
- }).required();
299
- }
300
-
301
- /** @returns {GetListOfActiveSessionsParam} */
302
- static getListOfActiveSessions() {
303
- return Joi.object({});
304
- }
305
-
306
- /** @returns {GetLoggedInUserParam} */
307
- static getLoggedInUser() {
308
- return Joi.object({});
309
- }
310
-
311
- /** @returns {GetPlatformConfigParam} */
312
- static getPlatformConfig() {
313
- return Joi.object({
314
- name: Joi.string().allow(""),
315
- });
316
- }
317
-
318
- /** @returns {GetUserAttributesParam} */
319
- static getUserAttributes() {
320
- return Joi.object({
321
- slug: Joi.string().allow(""),
322
- });
323
- }
324
-
325
- /** @returns {HasPasswordParam} */
326
- static hasPassword() {
327
- return Joi.object({});
328
- }
329
-
330
- /** @returns {LoginWithAppleIOSParam} */
331
- static loginWithAppleIOS() {
332
- return Joi.object({
333
- platform: Joi.string().allow(""),
334
- body: UserApplicationModel.OAuthRequestAppleSchema().required(),
335
- }).required();
336
- }
337
-
338
- /** @returns {LoginWithEmailAndPasswordParam} */
339
- static loginWithEmailAndPassword() {
340
- return Joi.object({
341
- body: UserApplicationModel.PasswordLoginRequestSchema().required(),
342
- }).required();
343
- }
344
-
345
- /** @returns {LoginWithFacebookParam} */
346
- static loginWithFacebook() {
347
- return Joi.object({
348
- platform: Joi.string().allow(""),
349
- body: UserApplicationModel.OAuthRequestSchema().required(),
350
- }).required();
351
- }
352
-
353
- /** @returns {LoginWithGoogleParam} */
354
- static loginWithGoogle() {
355
- return Joi.object({
356
- platform: Joi.string().allow(""),
357
- body: UserApplicationModel.OAuthRequestSchema().required(),
358
- }).required();
359
- }
360
-
361
- /** @returns {LoginWithGoogleAndroidParam} */
362
- static loginWithGoogleAndroid() {
363
- return Joi.object({
364
- platform: Joi.string().allow(""),
365
- body: UserApplicationModel.OAuthRequestSchema().required(),
366
- }).required();
367
- }
368
-
369
- /** @returns {LoginWithGoogleIOSParam} */
370
- static loginWithGoogleIOS() {
371
- return Joi.object({
372
- platform: Joi.string().allow(""),
373
- body: UserApplicationModel.OAuthRequestSchema().required(),
374
- }).required();
375
- }
376
-
377
- /** @returns {LoginWithOTPParam} */
378
- static loginWithOTP() {
379
- return Joi.object({
380
- platform: Joi.string().allow(""),
381
- body: UserApplicationModel.SendOtpRequestSchema().required(),
382
- }).required();
383
- }
384
-
385
- /** @returns {LoginWithTokenParam} */
386
- static loginWithToken() {
387
- return Joi.object({
388
- body: UserApplicationModel.TokenRequestBodySchema().required(),
389
- }).required();
390
- }
391
-
392
- /** @returns {LogoutParam} */
393
- static logout() {
394
- return Joi.object({});
395
- }
396
-
397
- /** @returns {RegisterWithFormParam} */
398
- static registerWithForm() {
399
- return Joi.object({
400
- platform: Joi.string().allow(""),
401
- body: UserApplicationModel.FormRegisterRequestSchema().required(),
402
- }).required();
403
- }
404
-
405
- /** @returns {ResetForgotPasswordParam} */
406
- static resetForgotPassword() {
407
- return Joi.object({
408
- body: UserApplicationModel.ForgotPasswordRequestSchema().required(),
409
- }).required();
410
- }
411
-
412
- /** @returns {SendForgotOTPOnEmailParam} */
413
- static sendForgotOTPOnEmail() {
414
- return Joi.object({
415
- platform: Joi.string().allow(""),
416
- body: UserApplicationModel.SendEmailForgotOtpRequestSchema().required(),
417
- }).required();
418
- }
419
-
420
- /** @returns {SendForgotOTPOnMobileParam} */
421
- static sendForgotOTPOnMobile() {
422
- return Joi.object({
423
- platform: Joi.string().allow(""),
424
- body: UserApplicationModel.SendMobileForgotOtpRequestSchema().required(),
425
- }).required();
426
- }
427
-
428
- /** @returns {SendOTPOnEmailParam} */
429
- static sendOTPOnEmail() {
430
- return Joi.object({
431
- platform: Joi.string().allow(""),
432
- body: UserApplicationModel.SendEmailOtpRequestSchema().required(),
433
- }).required();
434
- }
435
-
436
- /** @returns {SendOTPOnMobileParam} */
437
- static sendOTPOnMobile() {
438
- return Joi.object({
439
- platform: Joi.string().allow(""),
440
- body: UserApplicationModel.SendMobileOtpRequestSchema().required(),
441
- }).required();
442
- }
443
-
444
- /** @returns {SendResetPasswordEmailParam} */
445
- static sendResetPasswordEmail() {
446
- return Joi.object({
447
- platform: Joi.string().allow(""),
448
- body: UserApplicationModel.SendResetPasswordEmailRequestSchema().required(),
449
- }).required();
450
- }
451
-
452
- /** @returns {SendResetPasswordMobileParam} */
453
- static sendResetPasswordMobile() {
454
- return Joi.object({
455
- platform: Joi.string().allow(""),
456
- body: UserApplicationModel.SendResetPasswordMobileRequestSchema().required(),
457
- }).required();
458
- }
459
-
460
- /** @returns {SendResetTokenParam} */
461
- static sendResetToken() {
462
- return Joi.object({
463
- body: UserApplicationModel.CodeRequestBodySchema().required(),
464
- }).required();
465
- }
466
-
467
- /** @returns {SendVerificationLinkToEmailParam} */
468
- static sendVerificationLinkToEmail() {
469
- return Joi.object({
470
- platform: Joi.string().allow(""),
471
- body: UserApplicationModel.EditEmailRequestSchema().required(),
472
- }).required();
473
- }
474
-
475
- /** @returns {SendVerificationLinkToMobileParam} */
476
- static sendVerificationLinkToMobile() {
477
- return Joi.object({
478
- platform: Joi.string().allow(""),
479
- body: UserApplicationModel.SendVerificationLinkMobileRequestSchema().required(),
480
- }).required();
481
- }
482
-
483
- /** @returns {SetEmailAsPrimaryParam} */
484
- static setEmailAsPrimary() {
485
- return Joi.object({
486
- body: UserApplicationModel.EditEmailRequestSchema().required(),
487
- }).required();
488
- }
489
-
490
- /** @returns {SetMobileNumberAsPrimaryParam} */
491
- static setMobileNumberAsPrimary() {
492
- return Joi.object({
493
- body: UserApplicationModel.SendVerificationLinkMobileRequestSchema().required(),
494
- }).required();
495
- }
496
-
497
- /** @returns {UpdatePasswordParam} */
498
- static updatePassword() {
499
- return Joi.object({
500
- body: UserApplicationModel.UpdatePasswordRequestSchema().required(),
501
- }).required();
502
- }
503
-
504
- /** @returns {UpdateProfileParam} */
505
- static updateProfile() {
506
- return Joi.object({
507
- platform: Joi.string().allow(""),
508
- body: UserApplicationModel.EditProfileRequestSchema().required(),
509
- }).required();
510
- }
511
-
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
- /** @returns {VerifyEmailParam} */
527
- static verifyEmail() {
528
- return Joi.object({
529
- body: UserApplicationModel.CodeRequestBodySchema().required(),
530
- }).required();
531
- }
532
-
533
- /** @returns {VerifyEmailForgotOTPParam} */
534
- static verifyEmailForgotOTP() {
535
- return Joi.object({
536
- platform: Joi.string().allow(""),
537
- body: UserApplicationModel.VerifyEmailForgotOtpRequestSchema().required(),
538
- }).required();
539
- }
540
-
541
- /** @returns {VerifyEmailOTPParam} */
542
- static verifyEmailOTP() {
543
- return Joi.object({
544
- platform: Joi.string().allow(""),
545
- body: UserApplicationModel.VerifyEmailOtpRequestSchema().required(),
546
- }).required();
547
- }
548
-
549
- /** @returns {VerifyMobileParam} */
550
- static verifyMobile() {
551
- return Joi.object({
552
- body: UserApplicationModel.CodeRequestBodySchema().required(),
553
- }).required();
554
- }
555
-
556
- /** @returns {VerifyMobileForgotOTPParam} */
557
- static verifyMobileForgotOTP() {
558
- return Joi.object({
559
- platform: Joi.string().allow(""),
560
- body: UserApplicationModel.VerifyMobileForgotOtpRequestSchema().required(),
561
- }).required();
562
- }
563
-
564
- /** @returns {VerifyMobileOTPParam} */
565
- static verifyMobileOTP() {
566
- return Joi.object({
567
- platform: Joi.string().allow(""),
568
- body: UserApplicationModel.VerifyOtpRequestSchema().required(),
569
- }).required();
570
- }
571
- }
572
-
573
- module.exports = UserApplicationValidator;
@@ -1,52 +0,0 @@
1
- export = WebhookApplicationModel;
2
- /**
3
- * @typedef ClickEventBatch
4
- * @property {string} [event_name] - Name of click event.
5
- */
6
- /**
7
- * @typedef ClickEventRequest
8
- * @property {ClickEventBatch[]} [batch] - List of click events captured.
9
- */
10
- /**
11
- * @typedef ClickEventResponse
12
- * @property {number} [success_count] - Count of valid events.
13
- * @property {number} [failed_count] - Count of events failed in schema validation.
14
- * @property {ClickEventBatch[]} [failed_events] - List of failed events with error.
15
- */
16
- declare class WebhookApplicationModel {
17
- }
18
- declare namespace WebhookApplicationModel {
19
- export { ClickEventBatch, ClickEventRequest, ClickEventResponse };
20
- }
21
- /** @returns {ClickEventBatch} */
22
- declare function ClickEventBatch(): ClickEventBatch;
23
- type ClickEventBatch = {
24
- /**
25
- * - Name of click event.
26
- */
27
- event_name?: string;
28
- };
29
- /** @returns {ClickEventRequest} */
30
- declare function ClickEventRequest(): ClickEventRequest;
31
- type ClickEventRequest = {
32
- /**
33
- * - List of click events captured.
34
- */
35
- batch?: ClickEventBatch[];
36
- };
37
- /** @returns {ClickEventResponse} */
38
- declare function ClickEventResponse(): ClickEventResponse;
39
- type ClickEventResponse = {
40
- /**
41
- * - Count of valid events.
42
- */
43
- success_count?: number;
44
- /**
45
- * - Count of events failed in schema validation.
46
- */
47
- failed_count?: number;
48
- /**
49
- * - List of failed events with error.
50
- */
51
- failed_events?: ClickEventBatch[];
52
- };
@@ -1,46 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- /**
4
- * @typedef ClickEventBatch
5
- * @property {string} [event_name] - Name of click event.
6
- */
7
-
8
- /**
9
- * @typedef ClickEventRequest
10
- * @property {ClickEventBatch[]} [batch] - List of click events captured.
11
- */
12
-
13
- /**
14
- * @typedef ClickEventResponse
15
- * @property {number} [success_count] - Count of valid events.
16
- * @property {number} [failed_count] - Count of events failed in schema validation.
17
- * @property {ClickEventBatch[]} [failed_events] - List of failed events with error.
18
- */
19
-
20
- class WebhookApplicationModel {
21
- /** @returns {ClickEventBatch} */
22
- static ClickEventBatch() {
23
- return Joi.object({
24
- event_name: Joi.string().allow(""),
25
- });
26
- }
27
-
28
- /** @returns {ClickEventRequest} */
29
- static ClickEventRequest() {
30
- return Joi.object({
31
- batch: Joi.array().items(WebhookApplicationModel.ClickEventBatch()),
32
- });
33
- }
34
-
35
- /** @returns {ClickEventResponse} */
36
- static ClickEventResponse() {
37
- return Joi.object({
38
- success_count: Joi.number(),
39
- failed_count: Joi.number(),
40
- failed_events: Joi.array().items(
41
- WebhookApplicationModel.ClickEventBatch()
42
- ),
43
- });
44
- }
45
- }
46
- module.exports = WebhookApplicationModel;
@@ -1,16 +0,0 @@
1
- export = WebhookApplicationValidator;
2
- /**
3
- * @typedef SaveClickEventParam
4
- * @property {WebhookApplicationModel.ClickEventRequest} body
5
- */
6
- declare class WebhookApplicationValidator {
7
- /** @returns {SaveClickEventParam} */
8
- static saveClickEvent(): SaveClickEventParam;
9
- }
10
- declare namespace WebhookApplicationValidator {
11
- export { SaveClickEventParam };
12
- }
13
- type SaveClickEventParam = {
14
- body: WebhookApplicationModel.ClickEventRequest;
15
- };
16
- import WebhookApplicationModel = require("./WebhookApplicationModel");
@@ -1,19 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- const WebhookApplicationModel = require("./WebhookApplicationModel");
4
-
5
- /**
6
- * @typedef SaveClickEventParam
7
- * @property {WebhookApplicationModel.ClickEventRequest} body
8
- */
9
-
10
- class WebhookApplicationValidator {
11
- /** @returns {SaveClickEventParam} */
12
- static saveClickEvent() {
13
- return Joi.object({
14
- body: WebhookApplicationModel.ClickEventRequest().required(),
15
- }).required();
16
- }
17
- }
18
-
19
- module.exports = WebhookApplicationValidator;
@@ -1 +0,0 @@
1
- export {};