wabe 0.6.7 → 0.6.9

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 (68) hide show
  1. package/README.md +10 -7
  2. package/dist/authentication/OTP.d.ts +8 -0
  3. package/dist/authentication/Session.d.ts +5 -5
  4. package/dist/authentication/index.d.ts +1 -0
  5. package/dist/authentication/interface.d.ts +43 -26
  6. package/dist/authentication/oauth/GitHub.d.ts +1 -1
  7. package/dist/authentication/oauth/Google.d.ts +1 -1
  8. package/dist/authentication/oauth/Oauth2Client.d.ts +11 -11
  9. package/dist/authentication/oauth/utils.d.ts +1 -0
  10. package/dist/authentication/providers/EmailOTP.d.ts +2 -2
  11. package/dist/authentication/providers/EmailPassword.d.ts +3 -3
  12. package/dist/authentication/providers/EmailPasswordSRP.d.ts +21 -0
  13. package/dist/authentication/providers/GitHub.d.ts +3 -2
  14. package/dist/authentication/providers/Google.d.ts +3 -2
  15. package/dist/authentication/providers/OAuth.d.ts +2 -2
  16. package/dist/authentication/providers/PhonePassword.d.ts +3 -3
  17. package/dist/authentication/providers/QRCodeOTP.d.ts +11 -0
  18. package/dist/authentication/providers/index.d.ts +1 -0
  19. package/dist/authentication/resolvers/signInWithResolver.d.ts +4 -0
  20. package/dist/authentication/resolvers/signUpWithResolver.d.ts +4 -0
  21. package/dist/authentication/utils.d.ts +0 -1
  22. package/dist/cron/index.d.ts +8 -8
  23. package/dist/database/{controllers/DatabaseController.d.ts → DatabaseController.d.ts} +38 -36
  24. package/dist/database/index.d.ts +6 -9
  25. package/dist/database/{adapters/adaptersInterface.d.ts → interface.d.ts} +37 -47
  26. package/dist/email/DevAdapter.d.ts +1 -0
  27. package/dist/email/interface.d.ts +4 -4
  28. package/dist/{files → file}/FileController.d.ts +1 -1
  29. package/dist/{files → file}/FileDevAdapter.d.ts +1 -1
  30. package/dist/{files → file}/interface.d.ts +9 -3
  31. package/dist/graphql/GraphQLSchema.d.ts +32 -32
  32. package/dist/graphql/parser.d.ts +13 -13
  33. package/dist/graphql/pointerAndRelationFunction.d.ts +6 -6
  34. package/dist/graphql/resolvers.d.ts +5 -5
  35. package/dist/hooks/HookObject.d.ts +13 -12
  36. package/dist/hooks/createUser.d.ts +1 -0
  37. package/dist/hooks/deleteSession.d.ts +2 -0
  38. package/dist/hooks/hashFieldHook.d.ts +6 -0
  39. package/dist/hooks/index.d.ts +17 -13
  40. package/dist/hooks/setEmail.d.ts +2 -0
  41. package/dist/index.d.ts +1 -2
  42. package/dist/index.js +51013 -486
  43. package/dist/schema/Schema.d.ts +59 -57
  44. package/dist/schema/defaultResolvers.d.ts +2 -2
  45. package/dist/server/index.d.ts +20 -24
  46. package/dist/server/interface.d.ts +1 -0
  47. package/dist/server/routes/authHandler.d.ts +11 -0
  48. package/dist/utils/crypto.d.ts +11 -0
  49. package/dist/utils/export.d.ts +2 -0
  50. package/dist/utils/helper.d.ts +3 -6
  51. package/dist/utils/index.d.ts +20 -2
  52. package/generated/schema.graphql +87 -76
  53. package/generated/wabe.ts +49 -52
  54. package/package.json +52 -54
  55. package/dist/authentication/srp/processSRPChallenge.d.ts +0 -1
  56. package/dist/authentication/srp/signInWithSRP.d.ts +0 -1
  57. package/dist/authentication/srp/signUpWithSRP.d.ts +0 -1
  58. package/dist/database/adapters/MongoAdapter.d.ts +0 -64
  59. package/dist/database/adapters/index.d.ts +0 -2
  60. package/dist/database/controllers/index.d.ts +0 -1
  61. package/dist/payment/DevAdapter.d.ts +0 -17
  62. package/dist/payment/PaymentController.d.ts +0 -19
  63. package/dist/payment/index.d.ts +0 -2
  64. package/dist/payment/interface.d.ts +0 -235
  65. /package/dist/{files → file}/hookDeleteFile.d.ts +0 -0
  66. /package/dist/{files → file}/hookReadFile.d.ts +0 -0
  67. /package/dist/{files → file}/hookUploadFile.d.ts +0 -0
  68. /package/dist/{files → file}/index.d.ts +0 -0
@@ -1,4 +1,5 @@
1
1
  enum RoleEnum {
2
+ DashboardAdmin
2
3
  Admin
3
4
  Client
4
5
  }
@@ -12,6 +13,7 @@ enum AuthenticationProvider {
12
13
 
13
14
  enum SecondaryFactor {
14
15
  emailOTP
16
+ qrcodeOTP
15
17
  }
16
18
 
17
19
  """Object containing information about the file"""
@@ -65,11 +67,18 @@ type UserACLObjectRolesACL {
65
67
  }
66
68
 
67
69
  type UserAuthentication {
70
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRP
68
71
  phonePassword: UserAuthenticationPhonePassword
69
72
  emailPassword: UserAuthenticationEmailPassword
70
73
  google: UserAuthenticationGoogle
71
74
  github: UserAuthenticationGithub
72
- emailPasswordSRP: UserAuthenticationEmailPasswordSRP
75
+ }
76
+
77
+ type UserAuthenticationEmailPasswordSRP {
78
+ email: Email!
79
+ salt: String!
80
+ verifier: String!
81
+ serverSecret: String
73
82
  }
74
83
 
75
84
  type UserAuthenticationPhonePassword {
@@ -96,13 +105,8 @@ type UserAuthenticationGithub {
96
105
  username: String!
97
106
  }
98
107
 
99
- type UserAuthenticationEmailPasswordSRP {
100
- salt: String!
101
- verifier: String!
102
- serverSecret: String
103
- }
104
-
105
108
  type _SessionConnection {
109
+ ok: Boolean
106
110
  totalCount: Int
107
111
  edges: [_SessionEdge]
108
112
  }
@@ -152,11 +156,18 @@ input UserACLObjectRolesACLInput {
152
156
  }
153
157
 
154
158
  input UserAuthenticationInput {
159
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPInput
155
160
  phonePassword: UserAuthenticationPhonePasswordInput
156
161
  emailPassword: UserAuthenticationEmailPasswordInput
157
162
  google: UserAuthenticationGoogleInput
158
163
  github: UserAuthenticationGithubInput
159
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPInput
164
+ }
165
+
166
+ input UserAuthenticationEmailPasswordSRPInput {
167
+ email: Email!
168
+ salt: String!
169
+ verifier: String!
170
+ serverSecret: String
160
171
  }
161
172
 
162
173
  input UserAuthenticationPhonePasswordInput {
@@ -180,12 +191,6 @@ input UserAuthenticationGithubInput {
180
191
  username: String!
181
192
  }
182
193
 
183
- input UserAuthenticationEmailPasswordSRPInput {
184
- salt: String!
185
- verifier: String!
186
- serverSecret: String
187
- }
188
-
189
194
  input UserSecondFAInput {
190
195
  enabled: Boolean!
191
196
  provider: SecondaryFactor!
@@ -234,11 +239,18 @@ input UserACLObjectRolesACLCreateFieldsInput {
234
239
  }
235
240
 
236
241
  input UserAuthenticationCreateFieldsInput {
242
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPCreateFieldsInput
237
243
  phonePassword: UserAuthenticationPhonePasswordCreateFieldsInput
238
244
  emailPassword: UserAuthenticationEmailPasswordCreateFieldsInput
239
245
  google: UserAuthenticationGoogleCreateFieldsInput
240
246
  github: UserAuthenticationGithubCreateFieldsInput
241
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPCreateFieldsInput
247
+ }
248
+
249
+ input UserAuthenticationEmailPasswordSRPCreateFieldsInput {
250
+ email: Email
251
+ salt: String
252
+ verifier: String
253
+ serverSecret: String
242
254
  }
243
255
 
244
256
  input UserAuthenticationPhonePasswordCreateFieldsInput {
@@ -262,12 +274,6 @@ input UserAuthenticationGithubCreateFieldsInput {
262
274
  username: String
263
275
  }
264
276
 
265
- input UserAuthenticationEmailPasswordSRPCreateFieldsInput {
266
- salt: String
267
- verifier: String
268
- serverSecret: String
269
- }
270
-
271
277
  input UserSecondFACreateFieldsInput {
272
278
  enabled: Boolean
273
279
  provider: SecondaryFactor
@@ -294,6 +300,7 @@ type Post {
294
300
  }
295
301
 
296
302
  type UserConnection {
303
+ ok: Boolean
297
304
  totalCount: Int
298
305
  edges: [UserEdge]
299
306
  }
@@ -828,15 +835,24 @@ input SearchWhereInput {
828
835
  scalar Search
829
836
 
830
837
  input UserAuthenticationWhereInput {
838
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPWhereInput
831
839
  phonePassword: UserAuthenticationPhonePasswordWhereInput
832
840
  emailPassword: UserAuthenticationEmailPasswordWhereInput
833
841
  google: UserAuthenticationGoogleWhereInput
834
842
  github: UserAuthenticationGithubWhereInput
835
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPWhereInput
836
843
  OR: [UserAuthenticationWhereInput]
837
844
  AND: [UserAuthenticationWhereInput]
838
845
  }
839
846
 
847
+ input UserAuthenticationEmailPasswordSRPWhereInput {
848
+ email: EmailWhereInput
849
+ salt: StringWhereInput
850
+ verifier: StringWhereInput
851
+ serverSecret: StringWhereInput
852
+ OR: [UserAuthenticationEmailPasswordSRPWhereInput]
853
+ AND: [UserAuthenticationEmailPasswordSRPWhereInput]
854
+ }
855
+
840
856
  input UserAuthenticationPhonePasswordWhereInput {
841
857
  phone: PhoneWhereInput
842
858
  password: StringWhereInput
@@ -873,14 +889,6 @@ input UserAuthenticationGithubWhereInput {
873
889
  AND: [UserAuthenticationGithubWhereInput]
874
890
  }
875
891
 
876
- input UserAuthenticationEmailPasswordSRPWhereInput {
877
- salt: StringWhereInput
878
- verifier: StringWhereInput
879
- serverSecret: StringWhereInput
880
- OR: [UserAuthenticationEmailPasswordSRPWhereInput]
881
- AND: [UserAuthenticationEmailPasswordSRPWhereInput]
882
- }
883
-
884
892
  input AnyWhereInput {
885
893
  equalTo: Any
886
894
  notEqualTo: Any
@@ -1003,6 +1011,7 @@ enum UserOrder {
1003
1011
  }
1004
1012
 
1005
1013
  type PostConnection {
1014
+ ok: Boolean
1006
1015
  totalCount: Int
1007
1016
  edges: [PostEdge]
1008
1017
  }
@@ -1109,6 +1118,7 @@ enum _SessionOrder {
1109
1118
  }
1110
1119
 
1111
1120
  type RoleConnection {
1121
+ ok: Boolean
1112
1122
  totalCount: Int
1113
1123
  edges: [RoleEdge]
1114
1124
  }
@@ -1133,6 +1143,7 @@ enum RoleOrder {
1133
1143
  }
1134
1144
 
1135
1145
  type _InternalConfigConnection {
1146
+ ok: Boolean
1136
1147
  totalCount: Int
1137
1148
  edges: [_InternalConfigEdge]
1138
1149
  }
@@ -1244,15 +1255,6 @@ type Mutation {
1244
1255
  customMutation(input: CustomMutationInput!): Int
1245
1256
  secondCustomMutation(input: SecondCustomMutationInput!): Int
1246
1257
 
1247
- """Sign up with SRP authentication method"""
1248
- signUpWithSRP(input: SignUpWithSRPInput!): Boolean
1249
-
1250
- """Sign in with SRP authentication method"""
1251
- signInWithSRP(input: SignInWithSRPInput!): SignInWithSRPOutput
1252
-
1253
- """Process the server session proof"""
1254
- processSRPChallenge(input: ProcessSRPChallengeInput!): ProcessSRPChallengeOutput
1255
-
1256
1258
  """Mutation to reset the password of the user"""
1257
1259
  resetPassword(input: ResetPasswordInput!): Boolean
1258
1260
 
@@ -1330,11 +1332,18 @@ input UserACLObjectRolesACLUpdateFieldsInput {
1330
1332
  }
1331
1333
 
1332
1334
  input UserAuthenticationUpdateFieldsInput {
1335
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPUpdateFieldsInput
1333
1336
  phonePassword: UserAuthenticationPhonePasswordUpdateFieldsInput
1334
1337
  emailPassword: UserAuthenticationEmailPasswordUpdateFieldsInput
1335
1338
  google: UserAuthenticationGoogleUpdateFieldsInput
1336
1339
  github: UserAuthenticationGithubUpdateFieldsInput
1337
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPUpdateFieldsInput
1340
+ }
1341
+
1342
+ input UserAuthenticationEmailPasswordSRPUpdateFieldsInput {
1343
+ email: Email
1344
+ salt: String
1345
+ verifier: String
1346
+ serverSecret: String
1338
1347
  }
1339
1348
 
1340
1349
  input UserAuthenticationPhonePasswordUpdateFieldsInput {
@@ -1358,12 +1367,6 @@ input UserAuthenticationGithubUpdateFieldsInput {
1358
1367
  username: String
1359
1368
  }
1360
1369
 
1361
- input UserAuthenticationEmailPasswordSRPUpdateFieldsInput {
1362
- salt: String
1363
- verifier: String
1364
- serverSecret: String
1365
- }
1366
-
1367
1370
  input UserSecondFAUpdateFieldsInput {
1368
1371
  enabled: Boolean
1369
1372
  provider: SecondaryFactor
@@ -1720,32 +1723,6 @@ input SecondCustomMutationSumInput {
1720
1723
  b: Int!
1721
1724
  }
1722
1725
 
1723
- input SignUpWithSRPInput {
1724
- email: Email!
1725
- salt: String!
1726
- verifier: String!
1727
- }
1728
-
1729
- type SignInWithSRPOutput {
1730
- salt: String!
1731
- serverPublic: String!
1732
- }
1733
-
1734
- input SignInWithSRPInput {
1735
- email: Email!
1736
- clientPublic: String!
1737
- }
1738
-
1739
- type ProcessSRPChallengeOutput {
1740
- serverSessionProof: String!
1741
- }
1742
-
1743
- input ProcessSRPChallengeInput {
1744
- email: Email!
1745
- clientPublic: String!
1746
- clientSessionProof: String!
1747
- }
1748
-
1749
1726
  input ResetPasswordInput {
1750
1727
  password: String!
1751
1728
  email: Email
@@ -1766,9 +1743,15 @@ input SendEmailInput {
1766
1743
  }
1767
1744
 
1768
1745
  type SignInWithOutput {
1769
- id: String
1746
+ user: User
1770
1747
  accessToken: String
1771
1748
  refreshToken: String
1749
+ srp: SignInWithOutputSRPOutputSignInWith
1750
+ }
1751
+
1752
+ type SignInWithOutputSRPOutputSignInWith {
1753
+ salt: String
1754
+ serverPublic: String
1772
1755
  }
1773
1756
 
1774
1757
  input SignInWithInput {
@@ -1776,12 +1759,20 @@ input SignInWithInput {
1776
1759
  }
1777
1760
 
1778
1761
  input SignInWithAuthenticationInput {
1762
+ emailPasswordSRP: SignInWithAuthenticationEmailPasswordSRPInput
1779
1763
  phonePassword: SignInWithAuthenticationPhonePasswordInput
1780
1764
  emailPassword: SignInWithAuthenticationEmailPasswordInput
1781
1765
  google: SignInWithAuthenticationGoogleInput
1782
1766
  github: SignInWithAuthenticationGithubInput
1783
1767
  }
1784
1768
 
1769
+ input SignInWithAuthenticationEmailPasswordSRPInput {
1770
+ email: Email!
1771
+ clientPublic: String
1772
+ salt: String
1773
+ verifier: String
1774
+ }
1775
+
1785
1776
  input SignInWithAuthenticationPhonePasswordInput {
1786
1777
  phone: Phone!
1787
1778
  password: String!
@@ -1813,12 +1804,20 @@ input SignUpWithInput {
1813
1804
  }
1814
1805
 
1815
1806
  input SignUpWithAuthenticationInput {
1807
+ emailPasswordSRP: SignUpWithAuthenticationEmailPasswordSRPInput
1816
1808
  phonePassword: SignUpWithAuthenticationPhonePasswordInput
1817
1809
  emailPassword: SignUpWithAuthenticationEmailPasswordInput
1818
1810
  google: SignUpWithAuthenticationGoogleInput
1819
1811
  github: SignUpWithAuthenticationGithubInput
1820
1812
  }
1821
1813
 
1814
+ input SignUpWithAuthenticationEmailPasswordSRPInput {
1815
+ email: Email!
1816
+ clientPublic: String
1817
+ salt: String
1818
+ verifier: String
1819
+ }
1820
+
1822
1821
  input SignUpWithAuthenticationPhonePasswordInput {
1823
1822
  phone: Phone!
1824
1823
  password: String!
@@ -1851,6 +1850,11 @@ input RefreshInput {
1851
1850
 
1852
1851
  type VerifyChallengeOutput {
1853
1852
  accessToken: String
1853
+ srp: VerifyChallengeOutputSRPOutputVerifyChallenge
1854
+ }
1855
+
1856
+ type VerifyChallengeOutputSRPOutputVerifyChallenge {
1857
+ serverSessionProof: String!
1854
1858
  }
1855
1859
 
1856
1860
  input VerifyChallengeInput {
@@ -1858,8 +1862,15 @@ input VerifyChallengeInput {
1858
1862
  }
1859
1863
 
1860
1864
  input VerifyChallengeSecondaryFactorAuthenticationInput {
1865
+ emailPasswordSRPChallenge: VerifyChallengeSecondaryFactorAuthenticationEmailPasswordSRPChallengeInput
1861
1866
  emailOTP: VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput
1862
- EmailOTp: VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput
1867
+ qrCodeOTP: VerifyChallengeSecondaryFactorAuthenticationQrCodeOTPInput
1868
+ }
1869
+
1870
+ input VerifyChallengeSecondaryFactorAuthenticationEmailPasswordSRPChallengeInput {
1871
+ email: Email!
1872
+ clientPublic: String!
1873
+ clientSessionProof: String!
1863
1874
  }
1864
1875
 
1865
1876
  input VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput {
@@ -1867,7 +1878,7 @@ input VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput {
1867
1878
  otp: String!
1868
1879
  }
1869
1880
 
1870
- input VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput {
1881
+ input VerifyChallengeSecondaryFactorAuthenticationQrCodeOTPInput {
1871
1882
  email: Email!
1872
- code: String!
1883
+ otp: String!
1873
1884
  }
package/generated/wabe.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export enum RoleEnum {
2
+ DashboardAdmin = "DashboardAdmin",
2
3
  Admin = "Admin",
3
4
  Client = "Client"
4
5
  }
@@ -11,7 +12,8 @@ export enum AuthenticationProvider {
11
12
  }
12
13
 
13
14
  export enum SecondaryFactor {
14
- emailOTP = "emailOTP"
15
+ emailOTP = "emailOTP",
16
+ qrcodeOTP = "qrcodeOTP"
15
17
  }
16
18
 
17
19
  export type ACLObjectUsersACL = {
@@ -31,17 +33,24 @@ export type ACLObjectRolesACL = {
31
33
  write: boolean
32
34
  }
33
35
 
34
- export type AuthenticationPhonePassword = {
35
- phone: string,
36
- password: string
36
+ export type AuthenticationEmailPasswordSRP = {
37
+ email: string,
38
+ salt: string,
39
+ verifier: string,
40
+ serverSecret?: string
37
41
  }
38
42
 
39
43
  export type Authentication = {
44
+ emailPasswordSRP?: AuthenticationEmailPasswordSRP,
40
45
  phonePassword?: AuthenticationPhonePassword,
41
46
  emailPassword?: AuthenticationEmailPassword,
42
47
  google?: AuthenticationGoogle,
43
- github?: AuthenticationGithub,
44
- emailPasswordSRP?: AuthenticationEmailPasswordSRP
48
+ github?: AuthenticationGithub
49
+ }
50
+
51
+ export type AuthenticationPhonePassword = {
52
+ phone: string,
53
+ password: string
45
54
  }
46
55
 
47
56
  export type AuthenticationEmailPassword = {
@@ -60,12 +69,6 @@ export type AuthenticationGithub = {
60
69
  username: string
61
70
  }
62
71
 
63
- export type AuthenticationEmailPasswordSRP = {
64
- salt: string,
65
- verifier: string,
66
- serverSecret?: string
67
- }
68
-
69
72
  export type SecondFA = {
70
73
  enabled: boolean,
71
74
  provider: SecondaryFactor
@@ -239,35 +242,6 @@ export type SecondCustomMutationSum = {
239
242
  b: number
240
243
  }
241
244
 
242
- export type SignUpWithSRPInput = {
243
- email: string,
244
- salt: string,
245
- verifier: string
246
- }
247
-
248
- export type MutationSignUpWithSRPArgs = {
249
- input: SignUpWithSRPInput
250
- }
251
-
252
- export type SignInWithSRPInput = {
253
- email: string,
254
- clientPublic: string
255
- }
256
-
257
- export type MutationSignInWithSRPArgs = {
258
- input: SignInWithSRPInput
259
- }
260
-
261
- export type ProcessSRPChallengeInput = {
262
- email: string,
263
- clientPublic: string,
264
- clientSessionProof: string
265
- }
266
-
267
- export type MutationProcessSRPChallengeArgs = {
268
- input: ProcessSRPChallengeInput
269
- }
270
-
271
245
  export type ResetPasswordInput = {
272
246
  password: string,
273
247
  email?: string,
@@ -307,18 +281,26 @@ export type MutationSignInWithArgs = {
307
281
  input: SignInWithInput
308
282
  }
309
283
 
310
- export type SignInWithAuthenticationPhonePassword = {
311
- phone: string,
312
- password: string
284
+ export type SignInWithAuthenticationEmailPasswordSRP = {
285
+ email: string,
286
+ clientPublic?: string,
287
+ salt?: string,
288
+ verifier?: string
313
289
  }
314
290
 
315
291
  export type SignInWithAuthentication = {
292
+ emailPasswordSRP?: SignInWithAuthenticationEmailPasswordSRP,
316
293
  phonePassword?: SignInWithAuthenticationPhonePassword,
317
294
  emailPassword?: SignInWithAuthenticationEmailPassword,
318
295
  google?: SignInWithAuthenticationGoogle,
319
296
  github?: SignInWithAuthenticationGithub
320
297
  }
321
298
 
299
+ export type SignInWithAuthenticationPhonePassword = {
300
+ phone: string,
301
+ password: string
302
+ }
303
+
322
304
  export type SignInWithAuthenticationEmailPassword = {
323
305
  email: string,
324
306
  password: string
@@ -342,18 +324,26 @@ export type MutationSignUpWithArgs = {
342
324
  input: SignUpWithInput
343
325
  }
344
326
 
345
- export type SignUpWithAuthenticationPhonePassword = {
346
- phone: string,
347
- password: string
327
+ export type SignUpWithAuthenticationEmailPasswordSRP = {
328
+ email: string,
329
+ clientPublic?: string,
330
+ salt?: string,
331
+ verifier?: string
348
332
  }
349
333
 
350
334
  export type SignUpWithAuthentication = {
335
+ emailPasswordSRP?: SignUpWithAuthenticationEmailPasswordSRP,
351
336
  phonePassword?: SignUpWithAuthenticationPhonePassword,
352
337
  emailPassword?: SignUpWithAuthenticationEmailPassword,
353
338
  google?: SignUpWithAuthenticationGoogle,
354
339
  github?: SignUpWithAuthenticationGithub
355
340
  }
356
341
 
342
+ export type SignUpWithAuthenticationPhonePassword = {
343
+ phone: string,
344
+ password: string
345
+ }
346
+
357
347
  export type SignUpWithAuthenticationEmailPassword = {
358
348
  email: string,
359
349
  password: string
@@ -394,19 +384,26 @@ export type MutationVerifyChallengeArgs = {
394
384
  input: VerifyChallengeInput
395
385
  }
396
386
 
397
- export type VerifyChallengeSecondFAEmailOTP = {
387
+ export type VerifyChallengeSecondFAEmailPasswordSRPChallenge = {
398
388
  email: string,
399
- otp: string
389
+ clientPublic: string,
390
+ clientSessionProof: string
400
391
  }
401
392
 
402
393
  export type VerifyChallengeSecondFA = {
394
+ emailPasswordSRPChallenge?: VerifyChallengeSecondFAEmailPasswordSRPChallenge,
403
395
  emailOTP?: VerifyChallengeSecondFAEmailOTP,
404
- EmailOTp?: VerifyChallengeSecondFAEmailOTp
396
+ qrCodeOTP?: VerifyChallengeSecondFAQrCodeOTP
397
+ }
398
+
399
+ export type VerifyChallengeSecondFAEmailOTP = {
400
+ email: string,
401
+ otp: string
405
402
  }
406
403
 
407
- export type VerifyChallengeSecondFAEmailOTp = {
404
+ export type VerifyChallengeSecondFAQrCodeOTP = {
408
405
  email: string,
409
- code: string
406
+ otp: string
410
407
  }
411
408
 
412
409
  export type QueryHelloWorldArgs = {
package/package.json CHANGED
@@ -1,56 +1,54 @@
1
1
  {
2
- "name": "wabe",
3
- "version": "0.6.7",
4
- "description": "Your backend in minutes not days",
5
- "homepage": "https://wabe.dev",
6
- "author": {
7
- "name": "coratgerl",
8
- "url": "https://github.com/coratgerl"
9
- },
10
- "license": "Apache-2.0",
11
- "keywords": [
12
- "backend",
13
- "wabe",
14
- "graphql",
15
- "baas"
16
- ],
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/palixir/wabe.git"
20
- },
21
- "main": "dist/index.js",
22
- "scripts": {
23
- "build": "bun --filter wabe-build build:package $(pwd)",
24
- "check": "tsc --project $(pwd)/tsconfig.json",
25
- "lint": "biome lint . --no-errors-on-unmatched --config-path=../../",
26
- "ci": "bun generate:codegen && bun lint $(pwd) && bun check && bun test src",
27
- "format": "biome format --write . --config-path=../../",
28
- "dev": "bun run --watch dev/index.ts",
29
- "generate:codegen": "touch generated/wabe.ts && CODEGEN=true bun dev/index.ts"
30
- },
31
- "dependencies": {
32
- "@graphql-yoga/plugin-disable-introspection": "2.10.9",
33
- "@node-rs/argon2": "2.0.2",
34
- "croner": "9.0.0",
35
- "js-srp6a": "1.0.2",
36
- "jsonwebtoken": "9.0.2",
37
- "libphonenumber-js": "1.11.18",
38
- "mongodb": "6.13.1",
39
- "otplib": "12.0.1",
40
- "p-retry": "6.2.1",
41
- "wobe": "1.1.10",
42
- "wobe-graphql-yoga": "1.2.6"
43
- },
44
- "devDependencies": {
45
- "@parcel/watcher": "2.3.0",
46
- "@types/bun": "latest",
47
- "@types/jsonwebtoken": "9.0.6",
48
- "@types/uuid": "9.0.6",
49
- "get-port": "7.1.0",
50
- "graphql-request": "6.1.0",
51
- "uuid": "10.0.0",
52
- "wabe-mongodb-launcher": "workspace:*",
53
- "wabe-pluralize": "workspace:*",
54
- "wabe-build": "workspace:*"
55
- }
2
+ "name": "wabe",
3
+ "version": "0.6.9",
4
+ "description": "Your backend in minutes not days",
5
+ "homepage": "https://wabe.dev",
6
+ "author": {
7
+ "name": "coratgerl",
8
+ "url": "https://github.com/coratgerl"
9
+ },
10
+ "license": "Apache-2.0",
11
+ "keywords": [
12
+ "backend",
13
+ "wabe",
14
+ "graphql",
15
+ "baas"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/palixir/wabe.git"
20
+ },
21
+ "main": "dist/index.js",
22
+ "scripts": {
23
+ "build": "bun --filter wabe-build build:package $(pwd)",
24
+ "check": "tsc --project $(pwd)/tsconfig.json",
25
+ "lint": "biome lint . --no-errors-on-unmatched --config-path=../../",
26
+ "ci": "bun generate:codegen && bun lint $(pwd) && bun check && bun test src",
27
+ "format": "biome format --write . --config-path=../../",
28
+ "dev": "bun run --watch dev/index.ts",
29
+ "generate:codegen": "touch generated/wabe.ts && CODEGEN=true bun dev/index.ts"
30
+ },
31
+ "dependencies": {
32
+ "@graphql-yoga/plugin-disable-introspection": "2.10.9",
33
+ "croner": "9.0.0",
34
+ "js-srp6a": "1.0.2",
35
+ "jsonwebtoken": "9.0.2",
36
+ "libphonenumber-js": "1.11.18",
37
+ "otplib": "12.0.1",
38
+ "p-retry": "6.2.1",
39
+ "wobe": "1.1.10",
40
+ "wobe-graphql-yoga": "1.2.6"
41
+ },
42
+ "devDependencies": {
43
+ "@types/jsonwebtoken": "9.0.6",
44
+ "@types/uuid": "9.0.6",
45
+ "graphql-request": "6.1.0",
46
+ "get-port": "7.1.0",
47
+ "uuid": "10.0.0",
48
+ "wabe-mongodb-launcher": "workspace:*",
49
+ "wabe-pluralize": "workspace:*",
50
+ "wabe-build": "workspace:*",
51
+ "wabe-mongodb": "workspace:*",
52
+ "wabe": "workspace:*"
53
+ }
56
54
  }
@@ -1 +0,0 @@
1
- export declare const processSRPChallenge: unknown;
@@ -1 +0,0 @@
1
- export declare const signInWithSRP: unknown;
@@ -1 +0,0 @@
1
- export declare const signUpWithSRP: unknown;