wabe 0.6.3 → 0.6.5

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 (90) hide show
  1. package/README.md +2 -1
  2. package/dist/ai/index.d.ts +1 -0
  3. package/dist/ai/interface.d.ts +9 -0
  4. package/dist/authentication/OTP.d.ts +8 -0
  5. package/dist/authentication/Session.d.ts +21 -0
  6. package/dist/authentication/defaultAuthentication.d.ts +3 -0
  7. package/dist/authentication/index.d.ts +2 -0
  8. package/dist/authentication/interface.d.ts +118 -0
  9. package/dist/authentication/oauth/GitHub.d.ts +13 -0
  10. package/dist/authentication/oauth/Google.d.ts +13 -0
  11. package/dist/authentication/oauth/Oauth2Client.d.ts +33 -0
  12. package/dist/authentication/oauth/index.d.ts +2 -0
  13. package/dist/authentication/oauth/utils.d.ts +14 -0
  14. package/dist/authentication/providers/EmailOTP.d.ts +11 -0
  15. package/dist/authentication/providers/EmailPassword.d.ts +13 -0
  16. package/dist/authentication/providers/GitHub.d.ts +12 -0
  17. package/dist/authentication/providers/Google.d.ts +12 -0
  18. package/dist/authentication/providers/OAuth.d.ts +6 -0
  19. package/dist/authentication/providers/PhonePassword.d.ts +13 -0
  20. package/dist/authentication/providers/index.d.ts +5 -0
  21. package/dist/authentication/resolvers/refreshResolver.d.ts +1 -0
  22. package/dist/authentication/resolvers/signInWithResolver.d.ts +1 -0
  23. package/dist/authentication/resolvers/signOutResolver.d.ts +1 -0
  24. package/dist/authentication/resolvers/signUpWithResolver.d.ts +1 -0
  25. package/dist/authentication/resolvers/verifyChallenge.d.ts +1 -0
  26. package/dist/authentication/roles.d.ts +1 -0
  27. package/dist/authentication/srp/processSRPChallenge.d.ts +1 -0
  28. package/dist/authentication/srp/signInWithSRP.d.ts +1 -0
  29. package/dist/authentication/srp/signUpWithSRP.d.ts +1 -0
  30. package/dist/authentication/utils.d.ts +8 -0
  31. package/dist/cron/index.d.ts +32 -0
  32. package/dist/database/adapters/MongoAdapter.d.ts +64 -0
  33. package/dist/database/adapters/adaptersInterface.d.ts +263 -0
  34. package/dist/database/adapters/index.d.ts +2 -0
  35. package/dist/database/controllers/DatabaseController.d.ts +90 -0
  36. package/dist/database/controllers/index.d.ts +1 -0
  37. package/dist/database/index.d.ts +10 -0
  38. package/dist/email/DevAdapter.d.ts +4 -0
  39. package/dist/email/EmailController.d.ts +6 -0
  40. package/dist/email/index.d.ts +2 -0
  41. package/dist/email/interface.d.ts +35 -0
  42. package/dist/email/templates/sendOtpCode.d.ts +1 -0
  43. package/dist/files/FileController.d.ts +10 -0
  44. package/dist/files/FileDevAdapter.d.ts +8 -0
  45. package/dist/files/hookDeleteFile.d.ts +1 -0
  46. package/dist/files/hookReadFile.d.ts +1 -0
  47. package/dist/files/hookUploadFile.d.ts +2 -0
  48. package/dist/files/index.d.ts +2 -0
  49. package/dist/files/interface.d.ts +30 -0
  50. package/dist/graphql/GraphQLSchema.d.ts +75 -0
  51. package/dist/graphql/index.d.ts +2 -0
  52. package/dist/graphql/parser.d.ts +38 -0
  53. package/dist/graphql/pointerAndRelationFunction.d.ts +20 -0
  54. package/dist/graphql/resolvers.d.ts +20 -0
  55. package/dist/graphql/types.d.ts +18 -0
  56. package/dist/hooks/HookObject.d.ts +39 -0
  57. package/dist/hooks/authentication.d.ts +2 -0
  58. package/dist/hooks/defaultFields.d.ts +3 -0
  59. package/dist/hooks/deleteSession.d.ts +1 -0
  60. package/dist/hooks/index.d.ts +41 -0
  61. package/dist/hooks/permissions.d.ts +6 -0
  62. package/dist/hooks/protected.d.ts +3 -0
  63. package/dist/hooks/searchableFields.d.ts +3 -0
  64. package/dist/hooks/session.d.ts +3 -0
  65. package/dist/hooks/setEmail.d.ts +2 -0
  66. package/dist/hooks/setupAcl.d.ts +2 -0
  67. package/dist/index.d.ts +11 -1459
  68. package/dist/index.js +486 -76812
  69. package/dist/payment/DevAdapter.d.ts +17 -0
  70. package/dist/payment/PaymentController.d.ts +19 -0
  71. package/dist/payment/index.d.ts +2 -0
  72. package/dist/payment/interface.d.ts +235 -0
  73. package/dist/schema/Schema.d.ts +164 -0
  74. package/dist/schema/defaultResolvers.d.ts +7 -0
  75. package/dist/schema/index.d.ts +1 -0
  76. package/dist/schema/resolvers/meResolver.d.ts +1 -0
  77. package/dist/schema/resolvers/resetPassword.d.ts +1 -0
  78. package/dist/schema/resolvers/sendEmail.d.ts +1 -0
  79. package/dist/schema/resolvers/sendOtpCode.d.ts +1 -0
  80. package/dist/server/defaultHandlers.d.ts +1 -0
  81. package/dist/server/generateCodegen.d.ts +1 -0
  82. package/dist/server/index.d.ts +77 -0
  83. package/dist/server/routes/authHandler.d.ts +2 -0
  84. package/dist/server/routes/index.d.ts +8 -0
  85. package/dist/utils/export.d.ts +2 -0
  86. package/dist/utils/helper.d.ts +21 -0
  87. package/dist/utils/index.d.ts +17 -0
  88. package/generated/schema.graphql +126 -21
  89. package/generated/wabe.ts +135 -25
  90. package/package.json +8 -7
@@ -11,7 +11,7 @@ enum AuthenticationProvider {
11
11
  }
12
12
 
13
13
  enum SecondaryFactor {
14
- EmailOTP
14
+ emailOTP
15
15
  }
16
16
 
17
17
  """Object containing information about the file"""
@@ -41,6 +41,7 @@ type User {
41
41
  verifiedEmail: Boolean
42
42
  role: Role
43
43
  sessions: _SessionConnection
44
+ secondFA: UserSecondFA
44
45
  }
45
46
 
46
47
  """Email scalar type"""
@@ -68,6 +69,7 @@ type UserAuthentication {
68
69
  emailPassword: UserAuthenticationEmailPassword
69
70
  google: UserAuthenticationGoogle
70
71
  github: UserAuthenticationGithub
72
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRP
71
73
  }
72
74
 
73
75
  type UserAuthenticationPhonePassword {
@@ -94,6 +96,12 @@ type UserAuthenticationGithub {
94
96
  username: String!
95
97
  }
96
98
 
99
+ type UserAuthenticationEmailPasswordSRP {
100
+ salt: String!
101
+ verifier: String!
102
+ serverSecret: String
103
+ }
104
+
97
105
  type _SessionConnection {
98
106
  totalCount: Int
99
107
  edges: [_SessionEdge]
@@ -103,6 +111,11 @@ type _SessionEdge {
103
111
  node: _Session!
104
112
  }
105
113
 
114
+ type UserSecondFA {
115
+ enabled: Boolean!
116
+ provider: SecondaryFactor!
117
+ }
118
+
106
119
  """User class"""
107
120
  input UserInput {
108
121
  name: String
@@ -118,6 +131,7 @@ input UserInput {
118
131
  verifiedEmail: Boolean
119
132
  role: RolePointerInput
120
133
  sessions: _SessionRelationInput
134
+ secondFA: UserSecondFAInput
121
135
  }
122
136
 
123
137
  input UserACLObjectInput {
@@ -142,6 +156,7 @@ input UserAuthenticationInput {
142
156
  emailPassword: UserAuthenticationEmailPasswordInput
143
157
  google: UserAuthenticationGoogleInput
144
158
  github: UserAuthenticationGithubInput
159
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPInput
145
160
  }
146
161
 
147
162
  input UserAuthenticationPhonePasswordInput {
@@ -165,6 +180,17 @@ input UserAuthenticationGithubInput {
165
180
  username: String!
166
181
  }
167
182
 
183
+ input UserAuthenticationEmailPasswordSRPInput {
184
+ salt: String!
185
+ verifier: String!
186
+ serverSecret: String
187
+ }
188
+
189
+ input UserSecondFAInput {
190
+ enabled: Boolean!
191
+ provider: SecondaryFactor!
192
+ }
193
+
168
194
  """Input to link an object to a pointer User"""
169
195
  input UserPointerInput {
170
196
  unlink: Boolean
@@ -187,6 +213,7 @@ input UserCreateFieldsInput {
187
213
  verifiedEmail: Boolean
188
214
  role: RolePointerInput
189
215
  sessions: _SessionRelationInput
216
+ secondFA: UserSecondFACreateFieldsInput
190
217
  }
191
218
 
192
219
  input UserACLObjectCreateFieldsInput {
@@ -211,6 +238,7 @@ input UserAuthenticationCreateFieldsInput {
211
238
  emailPassword: UserAuthenticationEmailPasswordCreateFieldsInput
212
239
  google: UserAuthenticationGoogleCreateFieldsInput
213
240
  github: UserAuthenticationGithubCreateFieldsInput
241
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPCreateFieldsInput
214
242
  }
215
243
 
216
244
  input UserAuthenticationPhonePasswordCreateFieldsInput {
@@ -234,6 +262,17 @@ input UserAuthenticationGithubCreateFieldsInput {
234
262
  username: String
235
263
  }
236
264
 
265
+ input UserAuthenticationEmailPasswordSRPCreateFieldsInput {
266
+ salt: String
267
+ verifier: String
268
+ serverSecret: String
269
+ }
270
+
271
+ input UserSecondFACreateFieldsInput {
272
+ enabled: Boolean
273
+ provider: SecondaryFactor
274
+ }
275
+
237
276
  """Input to add a relation to the class User"""
238
277
  input UserRelationInput {
239
278
  add: [ID!]
@@ -703,6 +742,7 @@ input UserWhereInput {
703
742
  verifiedEmail: BooleanWhereInput
704
743
  role: RoleWhereInput
705
744
  sessions: _SessionWhereInput
745
+ secondFA: UserSecondFAWhereInput
706
746
  OR: [UserWhereInput]
707
747
  AND: [UserWhereInput]
708
748
  }
@@ -792,6 +832,7 @@ input UserAuthenticationWhereInput {
792
832
  emailPassword: UserAuthenticationEmailPasswordWhereInput
793
833
  google: UserAuthenticationGoogleWhereInput
794
834
  github: UserAuthenticationGithubWhereInput
835
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPWhereInput
795
836
  OR: [UserAuthenticationWhereInput]
796
837
  AND: [UserAuthenticationWhereInput]
797
838
  }
@@ -832,6 +873,14 @@ input UserAuthenticationGithubWhereInput {
832
873
  AND: [UserAuthenticationGithubWhereInput]
833
874
  }
834
875
 
876
+ input UserAuthenticationEmailPasswordSRPWhereInput {
877
+ salt: StringWhereInput
878
+ verifier: StringWhereInput
879
+ serverSecret: StringWhereInput
880
+ OR: [UserAuthenticationEmailPasswordSRPWhereInput]
881
+ AND: [UserAuthenticationEmailPasswordSRPWhereInput]
882
+ }
883
+
835
884
  input AnyWhereInput {
836
885
  equalTo: Any
837
886
  notEqualTo: Any
@@ -915,6 +964,13 @@ input _SessionACLObjectRolesACLWhereInput {
915
964
  AND: [_SessionACLObjectRolesACLWhereInput]
916
965
  }
917
966
 
967
+ input UserSecondFAWhereInput {
968
+ enabled: BooleanWhereInput
969
+ provider: AnyWhereInput
970
+ OR: [UserSecondFAWhereInput]
971
+ AND: [UserSecondFAWhereInput]
972
+ }
973
+
918
974
  enum UserOrder {
919
975
  name_ASC
920
976
  name_DESC
@@ -942,6 +998,8 @@ enum UserOrder {
942
998
  role_DESC
943
999
  sessions_ASC
944
1000
  sessions_DESC
1001
+ secondFA_ASC
1002
+ secondFA_DESC
945
1003
  }
946
1004
 
947
1005
  type PostConnection {
@@ -1186,6 +1244,15 @@ type Mutation {
1186
1244
  customMutation(input: CustomMutationInput!): Int
1187
1245
  secondCustomMutation(input: SecondCustomMutationInput!): Int
1188
1246
 
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
+
1189
1256
  """Mutation to reset the password of the user"""
1190
1257
  resetPassword(input: ResetPasswordInput!): Boolean
1191
1258
 
@@ -1198,7 +1265,7 @@ type Mutation {
1198
1265
  signUpWith(input: SignUpWithInput!): SignUpWithOutput
1199
1266
  signOut: Boolean
1200
1267
  refresh(input: RefreshInput!): RefreshSessionOutput
1201
- verifyChallenge(input: VerifyChallengeInput!): Boolean
1268
+ verifyChallenge(input: VerifyChallengeInput!): VerifyChallengeOutput
1202
1269
  }
1203
1270
 
1204
1271
  type CreateUserPayload {
@@ -1242,6 +1309,7 @@ input UserUpdateFieldsInput {
1242
1309
  verifiedEmail: Boolean
1243
1310
  role: RolePointerInput
1244
1311
  sessions: _SessionRelationInput
1312
+ secondFA: UserSecondFAUpdateFieldsInput
1245
1313
  }
1246
1314
 
1247
1315
  input UserACLObjectUpdateFieldsInput {
@@ -1266,6 +1334,7 @@ input UserAuthenticationUpdateFieldsInput {
1266
1334
  emailPassword: UserAuthenticationEmailPasswordUpdateFieldsInput
1267
1335
  google: UserAuthenticationGoogleUpdateFieldsInput
1268
1336
  github: UserAuthenticationGithubUpdateFieldsInput
1337
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPUpdateFieldsInput
1269
1338
  }
1270
1339
 
1271
1340
  input UserAuthenticationPhonePasswordUpdateFieldsInput {
@@ -1289,6 +1358,17 @@ input UserAuthenticationGithubUpdateFieldsInput {
1289
1358
  username: String
1290
1359
  }
1291
1360
 
1361
+ input UserAuthenticationEmailPasswordSRPUpdateFieldsInput {
1362
+ salt: String
1363
+ verifier: String
1364
+ serverSecret: String
1365
+ }
1366
+
1367
+ input UserSecondFAUpdateFieldsInput {
1368
+ enabled: Boolean
1369
+ provider: SecondaryFactor
1370
+ }
1371
+
1292
1372
  input UpdateUsersInput {
1293
1373
  fields: UserUpdateFieldsInput
1294
1374
  where: UserWhereInput
@@ -1640,11 +1720,37 @@ input SecondCustomMutationSumInput {
1640
1720
  b: Int!
1641
1721
  }
1642
1722
 
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
+
1643
1749
  input ResetPasswordInput {
1644
1750
  password: String!
1645
- email: Email!
1751
+ email: Email
1752
+ phone: String
1646
1753
  otp: String!
1647
- provider: AuthenticationProvider!
1648
1754
  }
1649
1755
 
1650
1756
  input SendOtpCodeInput {
@@ -1674,8 +1780,6 @@ input SignInWithAuthenticationInput {
1674
1780
  emailPassword: SignInWithAuthenticationEmailPasswordInput
1675
1781
  google: SignInWithAuthenticationGoogleInput
1676
1782
  github: SignInWithAuthenticationGithubInput
1677
- otp: SignInWithAuthenticationOtpInput
1678
- secondaryFactor: SecondaryFactor
1679
1783
  }
1680
1784
 
1681
1785
  input SignInWithAuthenticationPhonePasswordInput {
@@ -1698,10 +1802,6 @@ input SignInWithAuthenticationGithubInput {
1698
1802
  codeVerifier: String!
1699
1803
  }
1700
1804
 
1701
- input SignInWithAuthenticationOtpInput {
1702
- code: String
1703
- }
1704
-
1705
1805
  type SignUpWithOutput {
1706
1806
  id: String
1707
1807
  accessToken: String!
@@ -1717,8 +1817,6 @@ input SignUpWithAuthenticationInput {
1717
1817
  emailPassword: SignUpWithAuthenticationEmailPasswordInput
1718
1818
  google: SignUpWithAuthenticationGoogleInput
1719
1819
  github: SignUpWithAuthenticationGithubInput
1720
- otp: SignUpWithAuthenticationOtpInput
1721
- secondaryFactor: SecondaryFactor
1722
1820
  }
1723
1821
 
1724
1822
  input SignUpWithAuthenticationPhonePasswordInput {
@@ -1741,10 +1839,6 @@ input SignUpWithAuthenticationGithubInput {
1741
1839
  codeVerifier: String!
1742
1840
  }
1743
1841
 
1744
- input SignUpWithAuthenticationOtpInput {
1745
- code: String
1746
- }
1747
-
1748
1842
  type RefreshSessionOutput {
1749
1843
  accessToken: String!
1750
1844
  refreshToken: String!
@@ -1755,14 +1849,25 @@ input RefreshInput {
1755
1849
  refreshToken: String!
1756
1850
  }
1757
1851
 
1852
+ type VerifyChallengeOutput {
1853
+ accessToken: String
1854
+ }
1855
+
1758
1856
  input VerifyChallengeInput {
1759
- factor: VerifyChallengeFactorInput
1857
+ secondFA: VerifyChallengeSecondaryFactorAuthenticationInput
1858
+ }
1859
+
1860
+ input VerifyChallengeSecondaryFactorAuthenticationInput {
1861
+ emailOTP: VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput
1862
+ EmailOTp: VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput
1760
1863
  }
1761
1864
 
1762
- input VerifyChallengeFactorInput {
1763
- otp: VerifyChallengeFactorOtpInput
1865
+ input VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput {
1866
+ email: Email!
1867
+ otp: String!
1764
1868
  }
1765
1869
 
1766
- input VerifyChallengeFactorOtpInput {
1767
- code: String
1870
+ input VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput {
1871
+ email: Email!
1872
+ code: String!
1768
1873
  }
package/generated/wabe.ts CHANGED
@@ -11,7 +11,7 @@ export enum AuthenticationProvider {
11
11
  }
12
12
 
13
13
  export enum SecondaryFactor {
14
- EmailOTP = "emailOTP"
14
+ emailOTP = "emailOTP"
15
15
  }
16
16
 
17
17
  export type ACLObjectUsersACL = {
@@ -40,7 +40,8 @@ export type Authentication = {
40
40
  phonePassword?: AuthenticationPhonePassword,
41
41
  emailPassword?: AuthenticationEmailPassword,
42
42
  google?: AuthenticationGoogle,
43
- github?: AuthenticationGithub
43
+ github?: AuthenticationGithub,
44
+ emailPasswordSRP?: AuthenticationEmailPasswordSRP
44
45
  }
45
46
 
46
47
  export type AuthenticationEmailPassword = {
@@ -59,6 +60,17 @@ export type AuthenticationGithub = {
59
60
  username: string
60
61
  }
61
62
 
63
+ export type AuthenticationEmailPasswordSRP = {
64
+ salt: string,
65
+ verifier: string,
66
+ serverSecret?: string
67
+ }
68
+
69
+ export type SecondFA = {
70
+ enabled: boolean,
71
+ provider: SecondaryFactor
72
+ }
73
+
62
74
  export type User = {
63
75
  id: string,
64
76
  name?: string,
@@ -73,7 +85,8 @@ export type User = {
73
85
  isOauth?: boolean,
74
86
  verifiedEmail?: boolean,
75
87
  role?: Role,
76
- sessions?: Array<_Session>
88
+ sessions?: Array<_Session>,
89
+ secondFA?: SecondFA
77
90
  }
78
91
 
79
92
  export type Experience = {
@@ -131,6 +144,71 @@ export type _InternalConfig = {
131
144
  search?: Array<string>
132
145
  }
133
146
 
147
+ export type WhereUser = {
148
+ id: string,
149
+ name?: string,
150
+ age?: number,
151
+ email?: string,
152
+ acl?: ACLObject,
153
+ createdAt?: Date,
154
+ updatedAt?: Date,
155
+ search?: Array<string>,
156
+ authentication?: Authentication,
157
+ provider?: AuthenticationProvider,
158
+ isOauth?: boolean,
159
+ verifiedEmail?: boolean,
160
+ role?: Role,
161
+ sessions?: Array<_Session>,
162
+ secondFA?: SecondFA
163
+ }
164
+
165
+ export type WherePost = {
166
+ id: string,
167
+ name: string,
168
+ test2?: RoleEnum,
169
+ test3: Array<User>,
170
+ test4: User,
171
+ experiences?: Array<Experience>,
172
+ acl?: ACLObject,
173
+ createdAt?: Date,
174
+ updatedAt?: Date,
175
+ search?: Array<string>
176
+ }
177
+
178
+ export type Where_Session = {
179
+ id: string,
180
+ user: User,
181
+ accessToken: string,
182
+ accessTokenExpiresAt: Date,
183
+ refreshToken?: string,
184
+ refreshTokenExpiresAt: Date,
185
+ acl?: ACLObject,
186
+ createdAt?: Date,
187
+ updatedAt?: Date,
188
+ search?: Array<string>
189
+ }
190
+
191
+ export type WhereRole = {
192
+ id: string,
193
+ name: string,
194
+ users?: Array<User>,
195
+ acl?: ACLObject,
196
+ createdAt?: Date,
197
+ updatedAt?: Date,
198
+ search?: Array<string>
199
+ }
200
+
201
+ export type Where_InternalConfig = {
202
+ id: string,
203
+ configKey: string,
204
+ configValue: string,
205
+ description?: string,
206
+ acl?: ACLObject,
207
+ createdAt?: Date,
208
+ updatedAt?: Date,
209
+ search?: Array<string>
210
+ }
211
+
134
212
  export type CreateMutationInput = {
135
213
  name: number
136
214
  }
@@ -161,11 +239,40 @@ export type SecondCustomMutationSum = {
161
239
  b: number
162
240
  }
163
241
 
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
+
164
271
  export type ResetPasswordInput = {
165
272
  password: string,
166
- email: string,
167
- otp: string,
168
- provider: AuthenticationProvider
273
+ email?: string,
274
+ phone?: string,
275
+ otp: string
169
276
  }
170
277
 
171
278
  export type MutationResetPasswordArgs = {
@@ -209,9 +316,7 @@ export type SignInWithAuthentication = {
209
316
  phonePassword?: SignInWithAuthenticationPhonePassword,
210
317
  emailPassword?: SignInWithAuthenticationEmailPassword,
211
318
  google?: SignInWithAuthenticationGoogle,
212
- github?: SignInWithAuthenticationGithub,
213
- otp?: SignInWithAuthenticationOtp,
214
- secondaryFactor?: SecondaryFactor
319
+ github?: SignInWithAuthenticationGithub
215
320
  }
216
321
 
217
322
  export type SignInWithAuthenticationEmailPassword = {
@@ -229,10 +334,6 @@ export type SignInWithAuthenticationGithub = {
229
334
  codeVerifier: string
230
335
  }
231
336
 
232
- export type SignInWithAuthenticationOtp = {
233
- code?: string
234
- }
235
-
236
337
  export type SignUpWithInput = {
237
338
  authentication: SignUpWithAuthentication
238
339
  }
@@ -250,9 +351,7 @@ export type SignUpWithAuthentication = {
250
351
  phonePassword?: SignUpWithAuthenticationPhonePassword,
251
352
  emailPassword?: SignUpWithAuthenticationEmailPassword,
252
353
  google?: SignUpWithAuthenticationGoogle,
253
- github?: SignUpWithAuthenticationGithub,
254
- otp?: SignUpWithAuthenticationOtp,
255
- secondaryFactor?: SecondaryFactor
354
+ github?: SignUpWithAuthenticationGithub
256
355
  }
257
356
 
258
357
  export type SignUpWithAuthenticationEmailPassword = {
@@ -270,10 +369,6 @@ export type SignUpWithAuthenticationGithub = {
270
369
  codeVerifier: string
271
370
  }
272
371
 
273
- export type SignUpWithAuthenticationOtp = {
274
- code?: string
275
- }
276
-
277
372
  export type SignOutInput = {
278
373
 
279
374
  }
@@ -292,19 +387,26 @@ export type MutationRefreshArgs = {
292
387
  }
293
388
 
294
389
  export type VerifyChallengeInput = {
295
- factor?: VerifyChallengeFactor
390
+ secondFA?: VerifyChallengeSecondFA
296
391
  }
297
392
 
298
393
  export type MutationVerifyChallengeArgs = {
299
394
  input: VerifyChallengeInput
300
395
  }
301
396
 
302
- export type VerifyChallengeFactorOtp = {
303
- code?: string
397
+ export type VerifyChallengeSecondFAEmailOTP = {
398
+ email: string,
399
+ otp: string
304
400
  }
305
401
 
306
- export type VerifyChallengeFactor = {
307
- otp?: VerifyChallengeFactorOtp
402
+ export type VerifyChallengeSecondFA = {
403
+ emailOTP?: VerifyChallengeSecondFAEmailOTP,
404
+ EmailOTp?: VerifyChallengeSecondFAEmailOTp
405
+ }
406
+
407
+ export type VerifyChallengeSecondFAEmailOTp = {
408
+ email: string,
409
+ code: string
308
410
  }
309
411
 
310
412
  export type QueryHelloWorldArgs = {
@@ -329,4 +431,12 @@ export type WabeSchemaTypes = {
329
431
  _Session: _Session,
330
432
  Role: Role,
331
433
  _InternalConfig: _InternalConfig
434
+ }
435
+
436
+ export type WabeSchemaWhereTypes = {
437
+ User: WhereUser,
438
+ Post: WherePost,
439
+ _Session: Where_Session,
440
+ Role: WhereRole,
441
+ _InternalConfig: Where_InternalConfig
332
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wabe",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Your backend in minutes not days",
5
5
  "homepage": "https://wabe.dev",
6
6
  "author": {
@@ -20,8 +20,7 @@
20
20
  },
21
21
  "main": "dist/index.js",
22
22
  "scripts": {
23
- "build": "bun generate:codegen && bun build $(pwd)/src/index.ts --outdir dist/ --target=node --external=@node-rs/argon2 && bun generate:types",
24
- "generate:types": "dts-bundle-generator -o dist/index.d.ts src/index.ts --no-check --external-imports=wobe",
23
+ "build": "bun --filter wabe-build build:package $(pwd)",
25
24
  "check": "tsc --project $(pwd)/tsconfig.json",
26
25
  "lint": "biome lint . --no-errors-on-unmatched --config-path=../../",
27
26
  "ci": "bun generate:codegen && bun lint $(pwd) && bun check && bun test src",
@@ -31,10 +30,12 @@
31
30
  },
32
31
  "dependencies": {
33
32
  "@graphql-yoga/plugin-disable-introspection": "2.10.9",
34
- "@node-rs/argon2": "2.0.0",
33
+ "@node-rs/argon2": "2.0.2",
34
+ "croner": "9.0.0",
35
+ "js-srp6a": "1.0.2",
35
36
  "jsonwebtoken": "9.0.2",
36
37
  "libphonenumber-js": "1.11.18",
37
- "mongodb": "6.8.0",
38
+ "mongodb": "6.13.1",
38
39
  "otplib": "12.0.1",
39
40
  "p-retry": "6.2.1",
40
41
  "wobe": "1.1.10",
@@ -45,11 +46,11 @@
45
46
  "@types/bun": "latest",
46
47
  "@types/jsonwebtoken": "9.0.6",
47
48
  "@types/uuid": "9.0.6",
48
- "dts-bundle-generator": "9.5.1",
49
49
  "get-port": "7.1.0",
50
50
  "graphql-request": "6.1.0",
51
51
  "uuid": "10.0.0",
52
52
  "wabe-mongodb-launcher": "workspace:*",
53
- "wabe-pluralize": "workspace:*"
53
+ "wabe-pluralize": "workspace:*",
54
+ "wabe-build": "workspace:*"
54
55
  }
55
56
  }