wabe 0.6.6 → 0.6.8

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 (67) hide show
  1. package/README.md +8 -7
  2. package/bucket/b.txt +1 -0
  3. package/dist/authentication/OTP.d.ts +5 -0
  4. package/dist/authentication/Session.d.ts +4 -4
  5. package/dist/authentication/index.d.ts +1 -0
  6. package/dist/authentication/interface.d.ts +40 -25
  7. package/dist/authentication/oauth/GitHub.d.ts +1 -1
  8. package/dist/authentication/oauth/Google.d.ts +1 -1
  9. package/dist/authentication/oauth/Oauth2Client.d.ts +11 -11
  10. package/dist/authentication/oauth/utils.d.ts +1 -0
  11. package/dist/authentication/providers/EmailOTP.d.ts +2 -2
  12. package/dist/authentication/providers/EmailPassword.d.ts +3 -3
  13. package/dist/authentication/providers/EmailPasswordSRP.d.ts +21 -0
  14. package/dist/authentication/providers/GitHub.d.ts +3 -2
  15. package/dist/authentication/providers/Google.d.ts +3 -2
  16. package/dist/authentication/providers/OAuth.d.ts +2 -2
  17. package/dist/authentication/providers/PhonePassword.d.ts +3 -3
  18. package/dist/authentication/providers/QRCodeOTP.d.ts +11 -0
  19. package/dist/authentication/providers/index.d.ts +1 -0
  20. package/dist/authentication/resolvers/signInWithResolver.d.ts +4 -0
  21. package/dist/authentication/resolvers/signUpWithResolver.d.ts +4 -0
  22. package/dist/cron/index.d.ts +8 -8
  23. package/dist/database/{controllers/DatabaseController.d.ts → DatabaseController.d.ts} +29 -27
  24. package/dist/database/index.d.ts +6 -9
  25. package/dist/database/{adapters/adaptersInterface.d.ts → interface.d.ts} +33 -35
  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 +50770 -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/routes/authHandler.d.ts +11 -0
  47. package/dist/utils/export.d.ts +1 -0
  48. package/dist/utils/helper.d.ts +3 -6
  49. package/dist/utils/index.d.ts +6 -1
  50. package/generated/schema.graphql +85 -75
  51. package/generated/wabe.ts +47 -51
  52. package/package.json +5 -6
  53. package/dist/authentication/srp/processSRPChallenge.d.ts +0 -1
  54. package/dist/authentication/srp/signInWithSRP.d.ts +0 -1
  55. package/dist/authentication/srp/signUpWithSRP.d.ts +0 -1
  56. package/dist/database/adapters/MongoAdapter.d.ts +0 -64
  57. package/dist/database/adapters/index.d.ts +0 -2
  58. package/dist/database/controllers/index.d.ts +0 -1
  59. package/dist/hooks/authentication.d.ts +0 -2
  60. package/dist/payment/DevAdapter.d.ts +0 -17
  61. package/dist/payment/PaymentController.d.ts +0 -19
  62. package/dist/payment/index.d.ts +0 -2
  63. package/dist/payment/interface.d.ts +0 -235
  64. /package/dist/{files → file}/hookDeleteFile.d.ts +0 -0
  65. /package/dist/{files → file}/hookReadFile.d.ts +0 -0
  66. /package/dist/{files → file}/hookUploadFile.d.ts +0 -0
  67. /package/dist/{files → file}/index.d.ts +0 -0
@@ -1,101 +1,103 @@
1
1
  import type { WabeConfig, WabeTypes } from "../server";
2
2
  import type { HookObject } from "../hooks/HookObject";
3
- export type WabePrimaryTypes = "String" | "Int" | "Float" | "Boolean" | "Email" | "Phone" | "Date" | "File";
3
+ export type WabePrimaryTypes = "String" | "Int" | "Float" | "Boolean" | "Email" | "Phone" | "Date" | "File" | "Hash";
4
4
  export type WabeCustomTypes = "Array" | "Object";
5
5
  export type WabeRelationTypes = "Pointer" | "Relation";
6
- type WabeFieldTypes = WabeCustomTypes | WabePrimaryTypes | WabeRelationTypes;
6
+ export type WabeFieldTypes = WabeCustomTypes | WabePrimaryTypes | WabeRelationTypes;
7
7
  export type WabeObject<T extends WabeTypes> = {
8
- name: string
9
- fields: SchemaFields<T>
10
- description?: string
11
- required?: boolean
8
+ name: string;
9
+ fields: SchemaFields<T>;
10
+ description?: string;
11
+ required?: boolean;
12
12
  };
13
13
  type FieldBase<T extends WabeTypes> = {
14
- required?: boolean
15
- description?: string
14
+ required?: boolean;
15
+ description?: string;
16
16
  protected?: {
17
- authorizedRoles: Array<T["enums"]["RoleEnum"] | "rootOnly">
18
- protectedOperations: Array<"create" | "read" | "update">
19
- }
17
+ authorizedRoles: Array<T["enums"]["RoleEnum"] | "rootOnly">;
18
+ protectedOperations: Array<"create" | "read" | "update">;
19
+ };
20
20
  };
21
21
  type TypeFieldBase<
22
22
  U,
23
23
  K extends WabeFieldTypes
24
24
  > = {
25
- type: K
26
- defaultValue?: U
25
+ type: K;
26
+ defaultValue?: U;
27
27
  };
28
28
  type TypeFieldArray<T extends WabeTypes> = {
29
- type: "Array"
30
- requiredValue?: boolean
31
- defaultValue?: any[]
29
+ type: "Array";
30
+ requiredValue?: boolean;
31
+ defaultValue?: any[];
32
32
  } & ({
33
- typeValue: WabePrimaryTypes
33
+ // For the moment we only keep object and not array because we don't
34
+ // support array of array
35
+ typeValue: WabePrimaryTypes;
34
36
  } | {
35
- typeValue: "Object"
36
- object: WabeObject<T>
37
+ typeValue: "Object";
38
+ object: WabeObject<T>;
37
39
  });
38
40
  type TypeFieldObject<T extends WabeTypes> = {
39
- type: "Object"
40
- object: WabeObject<T>
41
- defaultValue?: any
41
+ type: "Object";
42
+ object: WabeObject<T>;
43
+ defaultValue?: any;
42
44
  };
43
45
  type TypeFieldPointer<T extends WabeTypes> = {
44
- type: "Pointer"
45
- class: keyof T["types"]
46
+ type: "Pointer";
47
+ class: keyof T["types"];
46
48
  };
47
49
  type TypeFieldRelation<T extends WabeTypes> = {
48
- type: "Relation"
49
- class: keyof T["types"]
50
+ type: "Relation";
51
+ class: keyof T["types"];
50
52
  };
51
53
  type TypeFieldFile = {
52
- type: "File"
54
+ type: "File";
53
55
  };
54
56
  type TypeFieldCustomScalars<T extends WabeTypes> = {
55
- type: T["scalars"]
56
- required?: boolean
57
- defaultValue?: any
57
+ type: T["scalars"];
58
+ required?: boolean;
59
+ defaultValue?: any;
58
60
  };
59
61
  type TypeFieldCustomEnums<T extends WabeTypes> = {
60
- type: keyof T["enums"]
61
- defaultValue?: any
62
+ type: keyof T["enums"];
63
+ defaultValue?: any;
62
64
  };
63
- export type TypeField<T extends WabeTypes> = (TypeFieldBase<string, "String"> | TypeFieldBase<number, "Int"> | TypeFieldBase<number, "Float"> | TypeFieldBase<boolean, "Boolean"> | TypeFieldBase<Date, "Date"> | TypeFieldBase<string, "Email"> | TypeFieldBase<string, "Phone"> | TypeFieldArray<T> | TypeFieldObject<T> | TypeFieldPointer<T> | TypeFieldRelation<T> | TypeFieldFile | TypeFieldCustomScalars<T> | TypeFieldCustomEnums<T>) & FieldBase<T>;
65
+ export type TypeField<T extends WabeTypes> = (TypeFieldBase<string, "String"> | TypeFieldBase<number, "Int"> | TypeFieldBase<number, "Float"> | TypeFieldBase<boolean, "Boolean"> | TypeFieldBase<Date, "Date"> | TypeFieldBase<string, "Email"> | TypeFieldBase<string, "Phone"> | TypeFieldBase<string, "Hash"> | TypeFieldArray<T> | TypeFieldObject<T> | TypeFieldPointer<T> | TypeFieldRelation<T> | TypeFieldFile | TypeFieldCustomScalars<T> | TypeFieldCustomEnums<T>) & FieldBase<T>;
64
66
  export type SchemaFields<T extends WabeTypes> = Record<string, TypeField<T>>;
65
67
  export type ResolverType<T extends WabeTypes> = {
66
- required?: boolean
67
- description?: string
68
- resolve: (...args: any) => any
68
+ required?: boolean;
69
+ description?: string;
70
+ resolve: (...args: any) => any;
69
71
  } & ({
70
- type: WabePrimaryTypes | T["enums"] | T["scalars"]
72
+ type: WabePrimaryTypes | T["enums"] | T["scalars"];
71
73
  } | {
72
- type: "Object"
73
- outputObject: ClassInterface<T>
74
+ type: "Object";
75
+ outputObject: ClassInterface<T>;
74
76
  } | {
75
- type: "Array"
76
- typeValue: WabePrimaryTypes
77
- typeValueRequired?: boolean
77
+ type: "Array";
78
+ typeValue: WabePrimaryTypes;
79
+ typeValueRequired?: boolean;
78
80
  } | {
79
- type: "Array"
80
- typeValue: "Object"
81
- outputObject: ClassInterface<T>
82
- typeValueRequired?: boolean
81
+ type: "Array";
82
+ typeValue: "Object";
83
+ outputObject: ClassInterface<T>;
84
+ typeValueRequired?: boolean;
83
85
  });
84
86
  export type QueryResolver<T extends WabeTypes> = {
85
- args?: SchemaFields<T>
87
+ args?: SchemaFields<T>;
86
88
  } & ResolverType<T>;
87
89
  export type MutationResolver<T extends WabeTypes> = {
88
90
  args?: {
89
- input: SchemaFields<T>
90
- }
91
+ input: SchemaFields<T>;
92
+ };
91
93
  } & ResolverType<T>;
92
94
  export type TypeResolver<T extends WabeTypes> = {
93
95
  queries?: {
94
- [key: string]: QueryResolver<T>
95
- }
96
+ [key: string]: QueryResolver<T>;
97
+ };
96
98
  mutations?: {
97
- [key: string]: MutationResolver<T>
98
- }
99
+ [key: string]: MutationResolver<T>;
100
+ };
99
101
  };
100
102
  export type PermissionsOperations = "create" | "read" | "update" | "delete";
101
103
  export interface PermissionProperties<T extends WabeTypes> {
@@ -112,13 +114,13 @@ export interface PermissionProperties<T extends WabeTypes> {
112
114
  */
113
115
  export type ACLProperties = (hookObject: HookObject<any, any>) => void | Promise<void>;
114
116
  export type ClassPermissions<T extends WabeTypes> = Partial<Record<PermissionsOperations, PermissionProperties<T>> & {
115
- acl: ACLProperties
117
+ acl: ACLProperties;
116
118
  }>;
117
119
  export type SearchableFields = Array<string>;
118
120
  export type ClassIndexes = Array<{
119
- field: string
120
- order: "ASC" | "DESC"
121
- unique?: boolean
121
+ field: string;
122
+ order: "ASC" | "DESC";
123
+ unique?: boolean;
122
124
  }>;
123
125
  export interface ClassInterface<T extends WabeTypes> {
124
126
  name: string;
@@ -1,7 +1,7 @@
1
1
  import type { MutationResolver, QueryResolver } from "./Schema";
2
2
  export declare const defaultQueries: {
3
- [key: string]: QueryResolver<any>
3
+ [key: string]: QueryResolver<any>;
4
4
  };
5
5
  export declare const defaultMutations: {
6
- [key: string]: MutationResolver<any>
6
+ [key: string]: MutationResolver<any>;
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import type { DatabaseConfig } from "../database";
2
- import { DatabaseController } from "../database/controllers/DatabaseController";
2
+ import { DatabaseController } from "../database/DatabaseController";
3
3
  import { type SchemaInterface } from "../schema/Schema";
4
4
  import { GraphQLSchema } from "graphql";
5
5
  import type { AuthenticationConfig } from "../authentication/interface";
@@ -9,18 +9,16 @@ import { generateCodegen } from "./generateCodegen";
9
9
  import { Wobe } from "wobe";
10
10
  import type { Context, CorsOptions, RateLimitOptions } from "wobe";
11
11
  import type { WabeContext } from "./interface";
12
- import type { FileConfig } from "../files";
13
12
  import type { EmailConfig } from "../email";
14
13
  import { EmailController } from "../email/EmailController";
15
- import type { PaymentConfig } from "../payment/interface";
16
- import { PaymentController } from "../payment/PaymentController";
17
14
  import type { AIConfig } from "../ai";
18
- import { FileController } from "../files/FileController";
15
+ import { FileController } from "../file/FileController";
19
16
  import type { CronConfig } from "../cron";
17
+ import type { FileConfig } from "../file";
20
18
  type SecurityConfig = {
21
- corsOptions?: CorsOptions
22
- rateLimit?: RateLimitOptions
23
- maskErrorMessage?: boolean
19
+ corsOptions?: CorsOptions;
20
+ rateLimit?: RateLimitOptions;
21
+ hideSensitiveErrorMessage?: boolean;
24
22
  };
25
23
  export * from "./interface";
26
24
  export * from "./routes";
@@ -31,43 +29,41 @@ export interface WabeConfig<T extends WabeTypes> {
31
29
  security?: SecurityConfig;
32
30
  schema?: SchemaInterface<T>;
33
31
  graphqlSchema?: GraphQLSchema;
34
- database: DatabaseConfig;
32
+ database: DatabaseConfig<T>;
35
33
  codegen?: {
36
- enabled: true
37
- path: string
34
+ enabled: true;
35
+ path: string;
38
36
  } | {
39
- enabled?: false
37
+ enabled?: false;
40
38
  };
41
39
  authentication?: AuthenticationConfig<T>;
42
40
  routes?: WabeRoute[];
43
41
  rootKey: string;
44
42
  hooks?: Hook<T, any>[];
45
43
  email?: EmailConfig;
46
- payment?: PaymentConfig;
47
44
  ai?: AIConfig;
48
- file?: FileConfig;
45
+ file?: FileConfig<T>;
49
46
  crons?: CronConfig<T>;
50
47
  }
51
48
  export type WabeTypes = {
52
- types: Record<any, any>
53
- where: Record<any, any>
54
- scalars: string
55
- enums: Record<any, any>
49
+ types: Record<any, any>;
50
+ where: Record<any, any>;
51
+ scalars: string;
52
+ enums: Record<any, any>;
56
53
  };
57
54
  export type WobeCustomContext<T extends WabeTypes> = Context & {
58
- wabe: WabeContext<T>
55
+ wabe: WabeContext<T>;
59
56
  };
60
57
  type WabeControllers<T extends WabeTypes> = {
61
- database: DatabaseController<T>
62
- email?: EmailController
63
- payment?: PaymentController
64
- file?: FileController
58
+ database: DatabaseController<T>;
59
+ email?: EmailController;
60
+ file?: FileController;
65
61
  };
66
62
  export declare class Wabe<T extends WabeTypes> {
67
63
  server: Wobe<WobeCustomContext<T>>;
68
64
  config: WabeConfig<T>;
69
65
  controllers: WabeControllers<T>;
70
- constructor({ isProduction, port, hostname, security, schema, database, authentication, rootKey, codegen, hooks, file, email, payment, routes, crons }: WabeConfig<T>);
66
+ constructor({ isProduction, port, hostname, security, schema, database, authentication, rootKey, codegen, hooks, file, email, routes, crons }: WabeConfig<T>);
71
67
  loadCrons();
72
68
  loadRoleEnum();
73
69
  loadAuthenticationMethods();
@@ -1,2 +1,13 @@
1
+ /*
2
+ - Generate code verifier (back)
3
+ - Sent post request to a route on back with code verifier in url (back)
4
+ - Generate code challenge (back)
5
+ - Redirect the user to google auth page with code challenge (back -> front)
6
+ - User sign in with google (front)
7
+ - The user is redirected to the route with the code (front -> back)
8
+ - Get the code from the url (back)
9
+ - Validate and sign in with google provider (back)
10
+ */
11
+ // https://www.rfc-editor.org/rfc/rfc7636#section-4.4 not precise the storage of codeVerifier
1
12
  export declare const oauthHandlerCallback: unknown;
2
13
  export declare const authHandler: unknown;
@@ -1,2 +1,3 @@
1
1
  import type { WabeContext } from "../server/interface";
2
2
  export declare const contextWithRoot: (context: WabeContext<any>) => WabeContext<any>;
3
+ export declare const notEmpty: <T>(value: T | null | undefined) => value is T;
@@ -1,6 +1,6 @@
1
1
  import { GraphQLClient } from "graphql-request";
2
2
  import { type WabeSchemaWhereTypes, type WabeSchemaEnums, type WabeSchemaScalars, type WabeSchemaTypes } from "../../generated/wabe";
3
- import { Wabe, type WabeTypes } from "../server";
3
+ import type { Wabe, WabeTypes } from "../server";
4
4
  export interface DevWabeTypes extends WabeTypes {
5
5
  types: WabeSchemaTypes;
6
6
  scalars: WabeSchemaScalars;
@@ -8,14 +8,11 @@ export interface DevWabeTypes extends WabeTypes {
8
8
  where: WabeSchemaWhereTypes;
9
9
  }
10
10
  export declare const firstLetterUpperCase: (str: string) => string;
11
- export declare const notEmpty: <T>(value: T | null | undefined) => value is T;
12
11
  export declare const getGraphqlClient: (port: number) => GraphQLClient;
13
12
  export declare const getAnonymousClient: (port: number) => GraphQLClient;
14
13
  export declare const getUserClient: (port: number, accessToken: string) => GraphQLClient;
15
14
  export declare const getAdminUserClient: (port: number, wabe: Wabe<DevWabeTypes>, { email, password }: {
16
- email: string
17
- password: string
15
+ email: string;
16
+ password: string;
18
17
  }) => Promise<GraphQLClient>;
19
- export declare const setupTests: unknown;
20
- export declare const closeTests: unknown;
21
18
  export declare const createUserAndUpdateRole: unknown;
@@ -1,15 +1,20 @@
1
1
  import type { ClassInterface } from "../schema";
2
2
  import type { WabeTypes, WabeConfig } from "../server";
3
+ export declare const toBase32: (stringToEncode: string) => string;
4
+ export declare const getNewObjectAfterUpdateNestedProperty: unknown;
5
+ export declare const getNestedProperty: unknown;
6
+ export declare const isArgon2Hash: (value: string) => boolean;
3
7
  export declare const firstLetterInUpperCase: unknown;
4
8
  export declare const firstLetterInLowerCase: unknown;
5
9
  export declare const getClassFromClassName: <T extends WabeTypes>(className: string, config: WabeConfig<any>) => ClassInterface<T>;
10
+ // TODO: Put this in wobe
6
11
  export declare const getCookieInRequestHeaders: unknown;
7
12
  /**
8
13
  * This apply the following transformations on string:
9
14
  * - lowercase
10
15
  * - normalize with NFD
11
16
  * - remove diacritics and accents characters
12
- * - replace matching abbreviation with long version (if disableAbbrevations is not set)
17
+ * - replace matching abbreviation with long version (if disableAbbreviations is not set)
13
18
  * - replace 2 or more spaces by one
14
19
  * - replace all non alpha characters by a space
15
20
  * - trim
@@ -1,4 +1,5 @@
1
1
  enum RoleEnum {
2
+ DashboardAdmin
2
3
  Admin
3
4
  Client
4
5
  }
@@ -65,11 +66,18 @@ type UserACLObjectRolesACL {
65
66
  }
66
67
 
67
68
  type UserAuthentication {
69
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRP
68
70
  phonePassword: UserAuthenticationPhonePassword
69
71
  emailPassword: UserAuthenticationEmailPassword
70
72
  google: UserAuthenticationGoogle
71
73
  github: UserAuthenticationGithub
72
- emailPasswordSRP: UserAuthenticationEmailPasswordSRP
74
+ }
75
+
76
+ type UserAuthenticationEmailPasswordSRP {
77
+ email: Email!
78
+ salt: String!
79
+ verifier: String!
80
+ serverSecret: String
73
81
  }
74
82
 
75
83
  type UserAuthenticationPhonePassword {
@@ -96,13 +104,8 @@ type UserAuthenticationGithub {
96
104
  username: String!
97
105
  }
98
106
 
99
- type UserAuthenticationEmailPasswordSRP {
100
- salt: String!
101
- verifier: String!
102
- serverSecret: String
103
- }
104
-
105
107
  type _SessionConnection {
108
+ ok: Boolean
106
109
  totalCount: Int
107
110
  edges: [_SessionEdge]
108
111
  }
@@ -152,11 +155,18 @@ input UserACLObjectRolesACLInput {
152
155
  }
153
156
 
154
157
  input UserAuthenticationInput {
158
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPInput
155
159
  phonePassword: UserAuthenticationPhonePasswordInput
156
160
  emailPassword: UserAuthenticationEmailPasswordInput
157
161
  google: UserAuthenticationGoogleInput
158
162
  github: UserAuthenticationGithubInput
159
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPInput
163
+ }
164
+
165
+ input UserAuthenticationEmailPasswordSRPInput {
166
+ email: Email!
167
+ salt: String!
168
+ verifier: String!
169
+ serverSecret: String
160
170
  }
161
171
 
162
172
  input UserAuthenticationPhonePasswordInput {
@@ -180,12 +190,6 @@ input UserAuthenticationGithubInput {
180
190
  username: String!
181
191
  }
182
192
 
183
- input UserAuthenticationEmailPasswordSRPInput {
184
- salt: String!
185
- verifier: String!
186
- serverSecret: String
187
- }
188
-
189
193
  input UserSecondFAInput {
190
194
  enabled: Boolean!
191
195
  provider: SecondaryFactor!
@@ -234,11 +238,18 @@ input UserACLObjectRolesACLCreateFieldsInput {
234
238
  }
235
239
 
236
240
  input UserAuthenticationCreateFieldsInput {
241
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPCreateFieldsInput
237
242
  phonePassword: UserAuthenticationPhonePasswordCreateFieldsInput
238
243
  emailPassword: UserAuthenticationEmailPasswordCreateFieldsInput
239
244
  google: UserAuthenticationGoogleCreateFieldsInput
240
245
  github: UserAuthenticationGithubCreateFieldsInput
241
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPCreateFieldsInput
246
+ }
247
+
248
+ input UserAuthenticationEmailPasswordSRPCreateFieldsInput {
249
+ email: Email
250
+ salt: String
251
+ verifier: String
252
+ serverSecret: String
242
253
  }
243
254
 
244
255
  input UserAuthenticationPhonePasswordCreateFieldsInput {
@@ -262,12 +273,6 @@ input UserAuthenticationGithubCreateFieldsInput {
262
273
  username: String
263
274
  }
264
275
 
265
- input UserAuthenticationEmailPasswordSRPCreateFieldsInput {
266
- salt: String
267
- verifier: String
268
- serverSecret: String
269
- }
270
-
271
276
  input UserSecondFACreateFieldsInput {
272
277
  enabled: Boolean
273
278
  provider: SecondaryFactor
@@ -294,6 +299,7 @@ type Post {
294
299
  }
295
300
 
296
301
  type UserConnection {
302
+ ok: Boolean
297
303
  totalCount: Int
298
304
  edges: [UserEdge]
299
305
  }
@@ -828,15 +834,24 @@ input SearchWhereInput {
828
834
  scalar Search
829
835
 
830
836
  input UserAuthenticationWhereInput {
837
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPWhereInput
831
838
  phonePassword: UserAuthenticationPhonePasswordWhereInput
832
839
  emailPassword: UserAuthenticationEmailPasswordWhereInput
833
840
  google: UserAuthenticationGoogleWhereInput
834
841
  github: UserAuthenticationGithubWhereInput
835
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPWhereInput
836
842
  OR: [UserAuthenticationWhereInput]
837
843
  AND: [UserAuthenticationWhereInput]
838
844
  }
839
845
 
846
+ input UserAuthenticationEmailPasswordSRPWhereInput {
847
+ email: EmailWhereInput
848
+ salt: StringWhereInput
849
+ verifier: StringWhereInput
850
+ serverSecret: StringWhereInput
851
+ OR: [UserAuthenticationEmailPasswordSRPWhereInput]
852
+ AND: [UserAuthenticationEmailPasswordSRPWhereInput]
853
+ }
854
+
840
855
  input UserAuthenticationPhonePasswordWhereInput {
841
856
  phone: PhoneWhereInput
842
857
  password: StringWhereInput
@@ -873,14 +888,6 @@ input UserAuthenticationGithubWhereInput {
873
888
  AND: [UserAuthenticationGithubWhereInput]
874
889
  }
875
890
 
876
- input UserAuthenticationEmailPasswordSRPWhereInput {
877
- salt: StringWhereInput
878
- verifier: StringWhereInput
879
- serverSecret: StringWhereInput
880
- OR: [UserAuthenticationEmailPasswordSRPWhereInput]
881
- AND: [UserAuthenticationEmailPasswordSRPWhereInput]
882
- }
883
-
884
891
  input AnyWhereInput {
885
892
  equalTo: Any
886
893
  notEqualTo: Any
@@ -1003,6 +1010,7 @@ enum UserOrder {
1003
1010
  }
1004
1011
 
1005
1012
  type PostConnection {
1013
+ ok: Boolean
1006
1014
  totalCount: Int
1007
1015
  edges: [PostEdge]
1008
1016
  }
@@ -1109,6 +1117,7 @@ enum _SessionOrder {
1109
1117
  }
1110
1118
 
1111
1119
  type RoleConnection {
1120
+ ok: Boolean
1112
1121
  totalCount: Int
1113
1122
  edges: [RoleEdge]
1114
1123
  }
@@ -1133,6 +1142,7 @@ enum RoleOrder {
1133
1142
  }
1134
1143
 
1135
1144
  type _InternalConfigConnection {
1145
+ ok: Boolean
1136
1146
  totalCount: Int
1137
1147
  edges: [_InternalConfigEdge]
1138
1148
  }
@@ -1244,15 +1254,6 @@ type Mutation {
1244
1254
  customMutation(input: CustomMutationInput!): Int
1245
1255
  secondCustomMutation(input: SecondCustomMutationInput!): Int
1246
1256
 
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
1257
  """Mutation to reset the password of the user"""
1257
1258
  resetPassword(input: ResetPasswordInput!): Boolean
1258
1259
 
@@ -1330,11 +1331,18 @@ input UserACLObjectRolesACLUpdateFieldsInput {
1330
1331
  }
1331
1332
 
1332
1333
  input UserAuthenticationUpdateFieldsInput {
1334
+ emailPasswordSRP: UserAuthenticationEmailPasswordSRPUpdateFieldsInput
1333
1335
  phonePassword: UserAuthenticationPhonePasswordUpdateFieldsInput
1334
1336
  emailPassword: UserAuthenticationEmailPasswordUpdateFieldsInput
1335
1337
  google: UserAuthenticationGoogleUpdateFieldsInput
1336
1338
  github: UserAuthenticationGithubUpdateFieldsInput
1337
- emailPasswordSRP: UserAuthenticationEmailPasswordSRPUpdateFieldsInput
1339
+ }
1340
+
1341
+ input UserAuthenticationEmailPasswordSRPUpdateFieldsInput {
1342
+ email: Email
1343
+ salt: String
1344
+ verifier: String
1345
+ serverSecret: String
1338
1346
  }
1339
1347
 
1340
1348
  input UserAuthenticationPhonePasswordUpdateFieldsInput {
@@ -1358,12 +1366,6 @@ input UserAuthenticationGithubUpdateFieldsInput {
1358
1366
  username: String
1359
1367
  }
1360
1368
 
1361
- input UserAuthenticationEmailPasswordSRPUpdateFieldsInput {
1362
- salt: String
1363
- verifier: String
1364
- serverSecret: String
1365
- }
1366
-
1367
1369
  input UserSecondFAUpdateFieldsInput {
1368
1370
  enabled: Boolean
1369
1371
  provider: SecondaryFactor
@@ -1720,32 +1722,6 @@ input SecondCustomMutationSumInput {
1720
1722
  b: Int!
1721
1723
  }
1722
1724
 
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
1725
  input ResetPasswordInput {
1750
1726
  password: String!
1751
1727
  email: Email
@@ -1769,6 +1745,12 @@ type SignInWithOutput {
1769
1745
  id: String
1770
1746
  accessToken: String
1771
1747
  refreshToken: String
1748
+ srp: SignInWithOutputSRPOutputSignInWith
1749
+ }
1750
+
1751
+ type SignInWithOutputSRPOutputSignInWith {
1752
+ salt: String
1753
+ serverPublic: String
1772
1754
  }
1773
1755
 
1774
1756
  input SignInWithInput {
@@ -1776,12 +1758,20 @@ input SignInWithInput {
1776
1758
  }
1777
1759
 
1778
1760
  input SignInWithAuthenticationInput {
1761
+ emailPasswordSRP: SignInWithAuthenticationEmailPasswordSRPInput
1779
1762
  phonePassword: SignInWithAuthenticationPhonePasswordInput
1780
1763
  emailPassword: SignInWithAuthenticationEmailPasswordInput
1781
1764
  google: SignInWithAuthenticationGoogleInput
1782
1765
  github: SignInWithAuthenticationGithubInput
1783
1766
  }
1784
1767
 
1768
+ input SignInWithAuthenticationEmailPasswordSRPInput {
1769
+ email: Email!
1770
+ clientPublic: String
1771
+ salt: String
1772
+ verifier: String
1773
+ }
1774
+
1785
1775
  input SignInWithAuthenticationPhonePasswordInput {
1786
1776
  phone: Phone!
1787
1777
  password: String!
@@ -1813,12 +1803,20 @@ input SignUpWithInput {
1813
1803
  }
1814
1804
 
1815
1805
  input SignUpWithAuthenticationInput {
1806
+ emailPasswordSRP: SignUpWithAuthenticationEmailPasswordSRPInput
1816
1807
  phonePassword: SignUpWithAuthenticationPhonePasswordInput
1817
1808
  emailPassword: SignUpWithAuthenticationEmailPasswordInput
1818
1809
  google: SignUpWithAuthenticationGoogleInput
1819
1810
  github: SignUpWithAuthenticationGithubInput
1820
1811
  }
1821
1812
 
1813
+ input SignUpWithAuthenticationEmailPasswordSRPInput {
1814
+ email: Email!
1815
+ clientPublic: String
1816
+ salt: String
1817
+ verifier: String
1818
+ }
1819
+
1822
1820
  input SignUpWithAuthenticationPhonePasswordInput {
1823
1821
  phone: Phone!
1824
1822
  password: String!
@@ -1851,6 +1849,11 @@ input RefreshInput {
1851
1849
 
1852
1850
  type VerifyChallengeOutput {
1853
1851
  accessToken: String
1852
+ srp: VerifyChallengeOutputSRPOutputVerifyChallenge
1853
+ }
1854
+
1855
+ type VerifyChallengeOutputSRPOutputVerifyChallenge {
1856
+ serverSessionProof: String!
1854
1857
  }
1855
1858
 
1856
1859
  input VerifyChallengeInput {
@@ -1858,8 +1861,15 @@ input VerifyChallengeInput {
1858
1861
  }
1859
1862
 
1860
1863
  input VerifyChallengeSecondaryFactorAuthenticationInput {
1864
+ emailPasswordSRPChallenge: VerifyChallengeSecondaryFactorAuthenticationEmailPasswordSRPChallengeInput
1861
1865
  emailOTP: VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput
1862
- EmailOTp: VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput
1866
+ qrCodeOTP: VerifyChallengeSecondaryFactorAuthenticationQrCodeOTPInput
1867
+ }
1868
+
1869
+ input VerifyChallengeSecondaryFactorAuthenticationEmailPasswordSRPChallengeInput {
1870
+ email: Email!
1871
+ clientPublic: String!
1872
+ clientSessionProof: String!
1863
1873
  }
1864
1874
 
1865
1875
  input VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput {
@@ -1867,7 +1877,7 @@ input VerifyChallengeSecondaryFactorAuthenticationEmailOTPInput {
1867
1877
  otp: String!
1868
1878
  }
1869
1879
 
1870
- input VerifyChallengeSecondaryFactorAuthenticationEmailOTpInput {
1880
+ input VerifyChallengeSecondaryFactorAuthenticationQrCodeOTPInput {
1871
1881
  email: Email!
1872
- code: String!
1882
+ otp: String!
1873
1883
  }