@remnawave/backend-contract 2.5.13 → 2.5.15

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 (21) hide show
  1. package/build/backend/commands/auth/get-status.command.d.ts +21 -20
  2. package/build/backend/commands/auth/get-status.command.d.ts.map +1 -1
  3. package/build/backend/commands/auth/oauth2/authorize.command.d.ts +3 -2
  4. package/build/backend/commands/auth/oauth2/authorize.command.d.ts.map +1 -1
  5. package/build/backend/commands/auth/oauth2/callback.command.d.ts +3 -2
  6. package/build/backend/commands/auth/oauth2/callback.command.d.ts.map +1 -1
  7. package/build/backend/commands/remnawave-settings/get-remnawave-settings.command.d.ts +88 -0
  8. package/build/backend/commands/remnawave-settings/get-remnawave-settings.command.d.ts.map +1 -1
  9. package/build/backend/commands/remnawave-settings/update-remnawave-settings.command.d.ts +156 -0
  10. package/build/backend/commands/remnawave-settings/update-remnawave-settings.command.d.ts.map +1 -1
  11. package/build/backend/constants/oauth2/providers.contants.d.ts +2 -1
  12. package/build/backend/constants/oauth2/providers.contants.d.ts.map +1 -1
  13. package/build/backend/constants/oauth2/providers.contants.js +1 -0
  14. package/build/backend/models/remnawave-settings/oauth2-settings.schema.d.ts +48 -0
  15. package/build/backend/models/remnawave-settings/oauth2-settings.schema.d.ts.map +1 -1
  16. package/build/backend/models/remnawave-settings/oauth2-settings.schema.js +32 -0
  17. package/build/backend/models/remnawave-settings/remnawave-settings.schema.d.ts +68 -0
  18. package/build/backend/models/remnawave-settings/remnawave-settings.schema.d.ts.map +1 -1
  19. package/build/frontend/constants/oauth2/providers.contants.js +1 -0
  20. package/build/frontend/models/remnawave-settings/oauth2-settings.schema.js +32 -0
  21. package/package.json +1 -1
@@ -31,11 +31,12 @@ export declare namespace GetStatusCommand {
31
31
  readonly POCKETID: "pocketid";
32
32
  readonly YANDEX: "yandex";
33
33
  readonly KEYCLOAK: "keycloak";
34
+ readonly GENERIC_OAUTH2: "oauth2";
34
35
  }>, z.ZodBoolean>;
35
36
  }, "strip", z.ZodTypeAny, {
36
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
37
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
37
38
  }, {
38
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
39
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
39
40
  }>;
40
41
  password: z.ZodObject<{
41
42
  enabled: z.ZodBoolean;
@@ -45,6 +46,9 @@ export declare namespace GetStatusCommand {
45
46
  enabled: boolean;
46
47
  }>;
47
48
  }, "strip", z.ZodTypeAny, {
49
+ oauth2: {
50
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
51
+ };
48
52
  passkey: {
49
53
  enabled: boolean;
50
54
  };
@@ -52,13 +56,13 @@ export declare namespace GetStatusCommand {
52
56
  enabled: boolean;
53
57
  botId: number | null;
54
58
  };
55
- oauth2: {
56
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
57
- };
58
59
  password: {
59
60
  enabled: boolean;
60
61
  };
61
62
  }, {
63
+ oauth2: {
64
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
65
+ };
62
66
  passkey: {
63
67
  enabled: boolean;
64
68
  };
@@ -66,9 +70,6 @@ export declare namespace GetStatusCommand {
66
70
  enabled: boolean;
67
71
  botId: number | null;
68
72
  };
69
- oauth2: {
70
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
71
- };
72
73
  password: {
73
74
  enabled: boolean;
74
75
  };
@@ -87,6 +88,9 @@ export declare namespace GetStatusCommand {
87
88
  isLoginAllowed: boolean;
88
89
  isRegisterAllowed: boolean;
89
90
  authentication: {
91
+ oauth2: {
92
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
93
+ };
90
94
  passkey: {
91
95
  enabled: boolean;
92
96
  };
@@ -94,9 +98,6 @@ export declare namespace GetStatusCommand {
94
98
  enabled: boolean;
95
99
  botId: number | null;
96
100
  };
97
- oauth2: {
98
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
99
- };
100
101
  password: {
101
102
  enabled: boolean;
102
103
  };
@@ -109,6 +110,9 @@ export declare namespace GetStatusCommand {
109
110
  isLoginAllowed: boolean;
110
111
  isRegisterAllowed: boolean;
111
112
  authentication: {
113
+ oauth2: {
114
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
115
+ };
112
116
  passkey: {
113
117
  enabled: boolean;
114
118
  };
@@ -116,9 +120,6 @@ export declare namespace GetStatusCommand {
116
120
  enabled: boolean;
117
121
  botId: number | null;
118
122
  };
119
- oauth2: {
120
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
121
- };
122
123
  password: {
123
124
  enabled: boolean;
124
125
  };
@@ -133,6 +134,9 @@ export declare namespace GetStatusCommand {
133
134
  isLoginAllowed: boolean;
134
135
  isRegisterAllowed: boolean;
135
136
  authentication: {
137
+ oauth2: {
138
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
139
+ };
136
140
  passkey: {
137
141
  enabled: boolean;
138
142
  };
@@ -140,9 +144,6 @@ export declare namespace GetStatusCommand {
140
144
  enabled: boolean;
141
145
  botId: number | null;
142
146
  };
143
- oauth2: {
144
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
145
- };
146
147
  password: {
147
148
  enabled: boolean;
148
149
  };
@@ -157,6 +158,9 @@ export declare namespace GetStatusCommand {
157
158
  isLoginAllowed: boolean;
158
159
  isRegisterAllowed: boolean;
159
160
  authentication: {
161
+ oauth2: {
162
+ providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak" | "oauth2", boolean>>;
163
+ };
160
164
  passkey: {
161
165
  enabled: boolean;
162
166
  };
@@ -164,9 +168,6 @@ export declare namespace GetStatusCommand {
164
168
  enabled: boolean;
165
169
  botId: number | null;
166
170
  };
167
- oauth2: {
168
- providers: Partial<Record<"github" | "pocketid" | "yandex" | "keycloak", boolean>>;
169
- };
170
171
  password: {
171
172
  enabled: boolean;
172
173
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-status.command.d.ts","sourceRoot":"","sources":["../../../../commands/auth/get-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAA2B,CAAC;IACrC,MAAM,OAAO,oBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-status.command.d.ts","sourceRoot":"","sources":["../../../../commands/auth/get-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAA2B,CAAC;IACrC,MAAM,OAAO,oBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -9,11 +9,12 @@ export declare namespace OAuth2AuthorizeCommand {
9
9
  readonly POCKETID: "pocketid";
10
10
  readonly YANDEX: "yandex";
11
11
  readonly KEYCLOAK: "keycloak";
12
+ readonly GENERIC_OAUTH2: "oauth2";
12
13
  }>;
13
14
  }, "strip", z.ZodTypeAny, {
14
- provider: "github" | "pocketid" | "yandex" | "keycloak";
15
+ provider: "github" | "pocketid" | "yandex" | "keycloak" | "oauth2";
15
16
  }, {
16
- provider: "github" | "pocketid" | "yandex" | "keycloak";
17
+ provider: "github" | "pocketid" | "yandex" | "keycloak" | "oauth2";
17
18
  }>;
18
19
  const ResponseSchema: z.ZodObject<{
19
20
  response: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"authorize.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/authorize.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,8BAAiC,CAAC;IAC3C,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;MAExB,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"authorize.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/authorize.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,8BAAiC,CAAC;IAC3C,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAExB,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -9,16 +9,17 @@ export declare namespace OAuth2CallbackCommand {
9
9
  readonly POCKETID: "pocketid";
10
10
  readonly YANDEX: "yandex";
11
11
  readonly KEYCLOAK: "keycloak";
12
+ readonly GENERIC_OAUTH2: "oauth2";
12
13
  }>;
13
14
  code: z.ZodString;
14
15
  state: z.ZodString;
15
16
  }, "strip", z.ZodTypeAny, {
16
17
  code: string;
17
- provider: "github" | "pocketid" | "yandex" | "keycloak";
18
+ provider: "github" | "pocketid" | "yandex" | "keycloak" | "oauth2";
18
19
  state: string;
19
20
  }, {
20
21
  code: string;
21
- provider: "github" | "pocketid" | "yandex" | "keycloak";
22
+ provider: "github" | "pocketid" | "yandex" | "keycloak" | "oauth2";
22
23
  state: string;
23
24
  }>;
24
25
  type Request = z.infer<typeof RequestSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"callback.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/callback.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,6BAAgC,CAAC;IAC1C,MAAM,OAAO,6BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;MAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"callback.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/callback.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,6BAAgC,CAAC;IAC1C,MAAM,OAAO,6BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;MAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -95,6 +95,34 @@ export declare namespace GetRemnawaveSettingsCommand {
95
95
  frontendDomain: string | null;
96
96
  keycloakDomain: string | null;
97
97
  }>>;
98
+ genericOAuth2: z.ZodDefault<z.ZodObject<{
99
+ enabled: z.ZodBoolean;
100
+ clientId: z.ZodNullable<z.ZodString>;
101
+ clientSecret: z.ZodNullable<z.ZodString>;
102
+ withPkce: z.ZodBoolean;
103
+ authorizationUrl: z.ZodNullable<z.ZodString>;
104
+ tokenUrl: z.ZodNullable<z.ZodString>;
105
+ frontendDomain: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
106
+ allowedEmails: z.ZodArray<z.ZodString, "many">;
107
+ }, "strip", z.ZodTypeAny, {
108
+ enabled: boolean;
109
+ authorizationUrl: string | null;
110
+ clientId: string | null;
111
+ clientSecret: string | null;
112
+ allowedEmails: string[];
113
+ frontendDomain: string | null;
114
+ withPkce: boolean;
115
+ tokenUrl: string | null;
116
+ }, {
117
+ enabled: boolean;
118
+ authorizationUrl: string | null;
119
+ clientId: string | null;
120
+ clientSecret: string | null;
121
+ allowedEmails: string[];
122
+ frontendDomain: string | null;
123
+ withPkce: boolean;
124
+ tokenUrl: string | null;
125
+ }>>;
98
126
  }, "strip", z.ZodTypeAny, {
99
127
  github: {
100
128
  enabled: boolean;
@@ -124,6 +152,16 @@ export declare namespace GetRemnawaveSettingsCommand {
124
152
  frontendDomain: string | null;
125
153
  keycloakDomain: string | null;
126
154
  };
155
+ genericOAuth2: {
156
+ enabled: boolean;
157
+ authorizationUrl: string | null;
158
+ clientId: string | null;
159
+ clientSecret: string | null;
160
+ allowedEmails: string[];
161
+ frontendDomain: string | null;
162
+ withPkce: boolean;
163
+ tokenUrl: string | null;
164
+ };
127
165
  }, {
128
166
  github: {
129
167
  enabled: boolean;
@@ -153,6 +191,16 @@ export declare namespace GetRemnawaveSettingsCommand {
153
191
  frontendDomain: string | null;
154
192
  keycloakDomain: string | null;
155
193
  } | undefined;
194
+ genericOAuth2?: {
195
+ enabled: boolean;
196
+ authorizationUrl: string | null;
197
+ clientId: string | null;
198
+ clientSecret: string | null;
199
+ allowedEmails: string[];
200
+ frontendDomain: string | null;
201
+ withPkce: boolean;
202
+ tokenUrl: string | null;
203
+ } | undefined;
156
204
  }>>;
157
205
  tgAuthSettings: z.ZodNullable<z.ZodObject<{
158
206
  enabled: z.ZodBoolean;
@@ -219,6 +267,16 @@ export declare namespace GetRemnawaveSettingsCommand {
219
267
  frontendDomain: string | null;
220
268
  keycloakDomain: string | null;
221
269
  };
270
+ genericOAuth2: {
271
+ enabled: boolean;
272
+ authorizationUrl: string | null;
273
+ clientId: string | null;
274
+ clientSecret: string | null;
275
+ allowedEmails: string[];
276
+ frontendDomain: string | null;
277
+ withPkce: boolean;
278
+ tokenUrl: string | null;
279
+ };
222
280
  } | null;
223
281
  tgAuthSettings: {
224
282
  enabled: boolean;
@@ -267,6 +325,16 @@ export declare namespace GetRemnawaveSettingsCommand {
267
325
  frontendDomain: string | null;
268
326
  keycloakDomain: string | null;
269
327
  } | undefined;
328
+ genericOAuth2?: {
329
+ enabled: boolean;
330
+ authorizationUrl: string | null;
331
+ clientId: string | null;
332
+ clientSecret: string | null;
333
+ allowedEmails: string[];
334
+ frontendDomain: string | null;
335
+ withPkce: boolean;
336
+ tokenUrl: string | null;
337
+ } | undefined;
270
338
  } | null;
271
339
  tgAuthSettings: {
272
340
  enabled: boolean;
@@ -317,6 +385,16 @@ export declare namespace GetRemnawaveSettingsCommand {
317
385
  frontendDomain: string | null;
318
386
  keycloakDomain: string | null;
319
387
  };
388
+ genericOAuth2: {
389
+ enabled: boolean;
390
+ authorizationUrl: string | null;
391
+ clientId: string | null;
392
+ clientSecret: string | null;
393
+ allowedEmails: string[];
394
+ frontendDomain: string | null;
395
+ withPkce: boolean;
396
+ tokenUrl: string | null;
397
+ };
320
398
  } | null;
321
399
  tgAuthSettings: {
322
400
  enabled: boolean;
@@ -367,6 +445,16 @@ export declare namespace GetRemnawaveSettingsCommand {
367
445
  frontendDomain: string | null;
368
446
  keycloakDomain: string | null;
369
447
  } | undefined;
448
+ genericOAuth2?: {
449
+ enabled: boolean;
450
+ authorizationUrl: string | null;
451
+ clientId: string | null;
452
+ clientSecret: string | null;
453
+ allowedEmails: string[];
454
+ frontendDomain: string | null;
455
+ withPkce: boolean;
456
+ tokenUrl: string | null;
457
+ } | undefined;
370
458
  } | null;
371
459
  tgAuthSettings: {
372
460
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"get-remnawave-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/remnawave-settings/get-remnawave-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAAmC,CAAC;IAC7C,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-remnawave-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/remnawave-settings/get-remnawave-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAAmC,CAAC;IAC7C,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -94,6 +94,34 @@ export declare namespace UpdateRemnawaveSettingsCommand {
94
94
  frontendDomain: string | null;
95
95
  keycloakDomain: string | null;
96
96
  }>>;
97
+ genericOAuth2: z.ZodDefault<z.ZodObject<{
98
+ enabled: z.ZodBoolean;
99
+ clientId: z.ZodNullable<z.ZodString>;
100
+ clientSecret: z.ZodNullable<z.ZodString>;
101
+ withPkce: z.ZodBoolean;
102
+ authorizationUrl: z.ZodNullable<z.ZodString>;
103
+ tokenUrl: z.ZodNullable<z.ZodString>;
104
+ frontendDomain: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
105
+ allowedEmails: z.ZodArray<z.ZodString, "many">;
106
+ }, "strip", z.ZodTypeAny, {
107
+ enabled: boolean;
108
+ authorizationUrl: string | null;
109
+ clientId: string | null;
110
+ clientSecret: string | null;
111
+ allowedEmails: string[];
112
+ frontendDomain: string | null;
113
+ withPkce: boolean;
114
+ tokenUrl: string | null;
115
+ }, {
116
+ enabled: boolean;
117
+ authorizationUrl: string | null;
118
+ clientId: string | null;
119
+ clientSecret: string | null;
120
+ allowedEmails: string[];
121
+ frontendDomain: string | null;
122
+ withPkce: boolean;
123
+ tokenUrl: string | null;
124
+ }>>;
97
125
  }, "strip", z.ZodTypeAny, {
98
126
  github: {
99
127
  enabled: boolean;
@@ -123,6 +151,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
123
151
  frontendDomain: string | null;
124
152
  keycloakDomain: string | null;
125
153
  };
154
+ genericOAuth2: {
155
+ enabled: boolean;
156
+ authorizationUrl: string | null;
157
+ clientId: string | null;
158
+ clientSecret: string | null;
159
+ allowedEmails: string[];
160
+ frontendDomain: string | null;
161
+ withPkce: boolean;
162
+ tokenUrl: string | null;
163
+ };
126
164
  }, {
127
165
  github: {
128
166
  enabled: boolean;
@@ -152,6 +190,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
152
190
  frontendDomain: string | null;
153
191
  keycloakDomain: string | null;
154
192
  } | undefined;
193
+ genericOAuth2?: {
194
+ enabled: boolean;
195
+ authorizationUrl: string | null;
196
+ clientId: string | null;
197
+ clientSecret: string | null;
198
+ allowedEmails: string[];
199
+ frontendDomain: string | null;
200
+ withPkce: boolean;
201
+ tokenUrl: string | null;
202
+ } | undefined;
155
203
  }>>;
156
204
  tgAuthSettings: z.ZodOptional<z.ZodObject<{
157
205
  enabled: z.ZodBoolean;
@@ -218,6 +266,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
218
266
  frontendDomain: string | null;
219
267
  keycloakDomain: string | null;
220
268
  };
269
+ genericOAuth2: {
270
+ enabled: boolean;
271
+ authorizationUrl: string | null;
272
+ clientId: string | null;
273
+ clientSecret: string | null;
274
+ allowedEmails: string[];
275
+ frontendDomain: string | null;
276
+ withPkce: boolean;
277
+ tokenUrl: string | null;
278
+ };
221
279
  } | undefined;
222
280
  tgAuthSettings?: {
223
281
  enabled: boolean;
@@ -266,6 +324,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
266
324
  frontendDomain: string | null;
267
325
  keycloakDomain: string | null;
268
326
  } | undefined;
327
+ genericOAuth2?: {
328
+ enabled: boolean;
329
+ authorizationUrl: string | null;
330
+ clientId: string | null;
331
+ clientSecret: string | null;
332
+ allowedEmails: string[];
333
+ frontendDomain: string | null;
334
+ withPkce: boolean;
335
+ tokenUrl: string | null;
336
+ } | undefined;
269
337
  } | undefined;
270
338
  tgAuthSettings?: {
271
339
  enabled: boolean;
@@ -373,6 +441,34 @@ export declare namespace UpdateRemnawaveSettingsCommand {
373
441
  frontendDomain: string | null;
374
442
  keycloakDomain: string | null;
375
443
  }>>;
444
+ genericOAuth2: z.ZodDefault<z.ZodObject<{
445
+ enabled: z.ZodBoolean;
446
+ clientId: z.ZodNullable<z.ZodString>;
447
+ clientSecret: z.ZodNullable<z.ZodString>;
448
+ withPkce: z.ZodBoolean;
449
+ authorizationUrl: z.ZodNullable<z.ZodString>;
450
+ tokenUrl: z.ZodNullable<z.ZodString>;
451
+ frontendDomain: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
452
+ allowedEmails: z.ZodArray<z.ZodString, "many">;
453
+ }, "strip", z.ZodTypeAny, {
454
+ enabled: boolean;
455
+ authorizationUrl: string | null;
456
+ clientId: string | null;
457
+ clientSecret: string | null;
458
+ allowedEmails: string[];
459
+ frontendDomain: string | null;
460
+ withPkce: boolean;
461
+ tokenUrl: string | null;
462
+ }, {
463
+ enabled: boolean;
464
+ authorizationUrl: string | null;
465
+ clientId: string | null;
466
+ clientSecret: string | null;
467
+ allowedEmails: string[];
468
+ frontendDomain: string | null;
469
+ withPkce: boolean;
470
+ tokenUrl: string | null;
471
+ }>>;
376
472
  }, "strip", z.ZodTypeAny, {
377
473
  github: {
378
474
  enabled: boolean;
@@ -402,6 +498,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
402
498
  frontendDomain: string | null;
403
499
  keycloakDomain: string | null;
404
500
  };
501
+ genericOAuth2: {
502
+ enabled: boolean;
503
+ authorizationUrl: string | null;
504
+ clientId: string | null;
505
+ clientSecret: string | null;
506
+ allowedEmails: string[];
507
+ frontendDomain: string | null;
508
+ withPkce: boolean;
509
+ tokenUrl: string | null;
510
+ };
405
511
  }, {
406
512
  github: {
407
513
  enabled: boolean;
@@ -431,6 +537,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
431
537
  frontendDomain: string | null;
432
538
  keycloakDomain: string | null;
433
539
  } | undefined;
540
+ genericOAuth2?: {
541
+ enabled: boolean;
542
+ authorizationUrl: string | null;
543
+ clientId: string | null;
544
+ clientSecret: string | null;
545
+ allowedEmails: string[];
546
+ frontendDomain: string | null;
547
+ withPkce: boolean;
548
+ tokenUrl: string | null;
549
+ } | undefined;
434
550
  }>>;
435
551
  tgAuthSettings: z.ZodNullable<z.ZodObject<{
436
552
  enabled: z.ZodBoolean;
@@ -497,6 +613,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
497
613
  frontendDomain: string | null;
498
614
  keycloakDomain: string | null;
499
615
  };
616
+ genericOAuth2: {
617
+ enabled: boolean;
618
+ authorizationUrl: string | null;
619
+ clientId: string | null;
620
+ clientSecret: string | null;
621
+ allowedEmails: string[];
622
+ frontendDomain: string | null;
623
+ withPkce: boolean;
624
+ tokenUrl: string | null;
625
+ };
500
626
  } | null;
501
627
  tgAuthSettings: {
502
628
  enabled: boolean;
@@ -545,6 +671,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
545
671
  frontendDomain: string | null;
546
672
  keycloakDomain: string | null;
547
673
  } | undefined;
674
+ genericOAuth2?: {
675
+ enabled: boolean;
676
+ authorizationUrl: string | null;
677
+ clientId: string | null;
678
+ clientSecret: string | null;
679
+ allowedEmails: string[];
680
+ frontendDomain: string | null;
681
+ withPkce: boolean;
682
+ tokenUrl: string | null;
683
+ } | undefined;
548
684
  } | null;
549
685
  tgAuthSettings: {
550
686
  enabled: boolean;
@@ -595,6 +731,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
595
731
  frontendDomain: string | null;
596
732
  keycloakDomain: string | null;
597
733
  };
734
+ genericOAuth2: {
735
+ enabled: boolean;
736
+ authorizationUrl: string | null;
737
+ clientId: string | null;
738
+ clientSecret: string | null;
739
+ allowedEmails: string[];
740
+ frontendDomain: string | null;
741
+ withPkce: boolean;
742
+ tokenUrl: string | null;
743
+ };
598
744
  } | null;
599
745
  tgAuthSettings: {
600
746
  enabled: boolean;
@@ -645,6 +791,16 @@ export declare namespace UpdateRemnawaveSettingsCommand {
645
791
  frontendDomain: string | null;
646
792
  keycloakDomain: string | null;
647
793
  } | undefined;
794
+ genericOAuth2?: {
795
+ enabled: boolean;
796
+ authorizationUrl: string | null;
797
+ clientId: string | null;
798
+ clientSecret: string | null;
799
+ allowedEmails: string[];
800
+ frontendDomain: string | null;
801
+ withPkce: boolean;
802
+ tokenUrl: string | null;
803
+ } | undefined;
648
804
  } | null;
649
805
  tgAuthSettings: {
650
806
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"update-remnawave-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/remnawave-settings/update-remnawave-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,4BAAsC,CAAC;IAChD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update-remnawave-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/remnawave-settings/update-remnawave-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,4BAAsC,CAAC;IAChD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -3,8 +3,9 @@ export declare const OAUTH2_PROVIDERS: {
3
3
  readonly POCKETID: "pocketid";
4
4
  readonly YANDEX: "yandex";
5
5
  readonly KEYCLOAK: "keycloak";
6
+ readonly GENERIC_OAUTH2: "oauth2";
6
7
  };
7
8
  export type TOAuth2Providers = [keyof typeof OAUTH2_PROVIDERS][number];
8
9
  export type TOAuth2ProvidersKeys = (typeof OAUTH2_PROVIDERS)[keyof typeof OAUTH2_PROVIDERS];
9
- export declare const OAUTH2_PROVIDERS_VALUES: ("github" | "pocketid" | "yandex" | "keycloak")[];
10
+ export declare const OAUTH2_PROVIDERS_VALUES: ("github" | "pocketid" | "yandex" | "keycloak" | "oauth2")[];
10
11
  //# sourceMappingURL=providers.contants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.contants.d.ts","sourceRoot":"","sources":["../../../../constants/oauth2/providers.contants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC5F,eAAO,MAAM,uBAAuB,mDAAkC,CAAC"}
1
+ {"version":3,"file":"providers.contants.d.ts","sourceRoot":"","sources":["../../../../constants/oauth2/providers.contants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC5F,eAAO,MAAM,uBAAuB,8DAAkC,CAAC"}
@@ -6,5 +6,6 @@ exports.OAUTH2_PROVIDERS = {
6
6
  POCKETID: 'pocketid',
7
7
  YANDEX: 'yandex',
8
8
  KEYCLOAK: 'keycloak',
9
+ GENERIC_OAUTH2: 'oauth2',
9
10
  };
10
11
  exports.OAUTH2_PROVIDERS_VALUES = Object.values(exports.OAUTH2_PROVIDERS);
@@ -76,6 +76,34 @@ export declare const Oauth2SettingsSchema: z.ZodObject<{
76
76
  frontendDomain: string | null;
77
77
  keycloakDomain: string | null;
78
78
  }>>;
79
+ genericOAuth2: z.ZodDefault<z.ZodObject<{
80
+ enabled: z.ZodBoolean;
81
+ clientId: z.ZodNullable<z.ZodString>;
82
+ clientSecret: z.ZodNullable<z.ZodString>;
83
+ withPkce: z.ZodBoolean;
84
+ authorizationUrl: z.ZodNullable<z.ZodString>;
85
+ tokenUrl: z.ZodNullable<z.ZodString>;
86
+ frontendDomain: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
87
+ allowedEmails: z.ZodArray<z.ZodString, "many">;
88
+ }, "strip", z.ZodTypeAny, {
89
+ enabled: boolean;
90
+ authorizationUrl: string | null;
91
+ clientId: string | null;
92
+ clientSecret: string | null;
93
+ allowedEmails: string[];
94
+ frontendDomain: string | null;
95
+ withPkce: boolean;
96
+ tokenUrl: string | null;
97
+ }, {
98
+ enabled: boolean;
99
+ authorizationUrl: string | null;
100
+ clientId: string | null;
101
+ clientSecret: string | null;
102
+ allowedEmails: string[];
103
+ frontendDomain: string | null;
104
+ withPkce: boolean;
105
+ tokenUrl: string | null;
106
+ }>>;
79
107
  }, "strip", z.ZodTypeAny, {
80
108
  github: {
81
109
  enabled: boolean;
@@ -105,6 +133,16 @@ export declare const Oauth2SettingsSchema: z.ZodObject<{
105
133
  frontendDomain: string | null;
106
134
  keycloakDomain: string | null;
107
135
  };
136
+ genericOAuth2: {
137
+ enabled: boolean;
138
+ authorizationUrl: string | null;
139
+ clientId: string | null;
140
+ clientSecret: string | null;
141
+ allowedEmails: string[];
142
+ frontendDomain: string | null;
143
+ withPkce: boolean;
144
+ tokenUrl: string | null;
145
+ };
108
146
  }, {
109
147
  github: {
110
148
  enabled: boolean;
@@ -134,6 +172,16 @@ export declare const Oauth2SettingsSchema: z.ZodObject<{
134
172
  frontendDomain: string | null;
135
173
  keycloakDomain: string | null;
136
174
  } | undefined;
175
+ genericOAuth2?: {
176
+ enabled: boolean;
177
+ authorizationUrl: string | null;
178
+ clientId: string | null;
179
+ clientSecret: string | null;
180
+ allowedEmails: string[];
181
+ frontendDomain: string | null;
182
+ withPkce: boolean;
183
+ tokenUrl: string | null;
184
+ } | undefined;
137
185
  }>;
138
186
  export type TOauth2Settings = z.infer<typeof Oauth2SettingsSchema>;
139
187
  //# sourceMappingURL=oauth2-settings.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth2-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/oauth2-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsF/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth2-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/oauth2-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgI/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -68,4 +68,36 @@ exports.Oauth2SettingsSchema = zod_1.default.object({
68
68
  clientSecret: null,
69
69
  allowedEmails: [],
70
70
  }),
71
+ genericOAuth2: zod_1.default
72
+ .object({
73
+ enabled: zod_1.default.boolean(),
74
+ clientId: zod_1.default.nullable(zod_1.default.string()),
75
+ clientSecret: zod_1.default.nullable(zod_1.default.string()),
76
+ withPkce: zod_1.default.boolean(),
77
+ authorizationUrl: zod_1.default.nullable(zod_1.default.string()),
78
+ tokenUrl: zod_1.default.nullable(zod_1.default.string()),
79
+ frontendDomain: zod_1.default.nullable(zod_1.default.string().refine((val) => {
80
+ if (val.startsWith('127.0.0.1') || val.startsWith('localhost')) {
81
+ return true;
82
+ }
83
+ const fqdnRegex = /(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\.)+[a-zA-Z]{2,63}$)/;
84
+ if (fqdnRegex.test(val)) {
85
+ return true;
86
+ }
87
+ return false;
88
+ }, {
89
+ message: 'Must be a valid fully qualified domain name (FQDN), e.g. "docs.rw"',
90
+ })),
91
+ allowedEmails: zod_1.default.array(zod_1.default.string()),
92
+ })
93
+ .default({
94
+ enabled: false,
95
+ frontendDomain: null,
96
+ tokenUrl: null,
97
+ clientId: null,
98
+ clientSecret: null,
99
+ withPkce: false,
100
+ authorizationUrl: null,
101
+ allowedEmails: [],
102
+ }),
71
103
  });
@@ -90,6 +90,34 @@ export declare const RemnawaveSettingsSchema: z.ZodObject<{
90
90
  frontendDomain: string | null;
91
91
  keycloakDomain: string | null;
92
92
  }>>;
93
+ genericOAuth2: z.ZodDefault<z.ZodObject<{
94
+ enabled: z.ZodBoolean;
95
+ clientId: z.ZodNullable<z.ZodString>;
96
+ clientSecret: z.ZodNullable<z.ZodString>;
97
+ withPkce: z.ZodBoolean;
98
+ authorizationUrl: z.ZodNullable<z.ZodString>;
99
+ tokenUrl: z.ZodNullable<z.ZodString>;
100
+ frontendDomain: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
101
+ allowedEmails: z.ZodArray<z.ZodString, "many">;
102
+ }, "strip", z.ZodTypeAny, {
103
+ enabled: boolean;
104
+ authorizationUrl: string | null;
105
+ clientId: string | null;
106
+ clientSecret: string | null;
107
+ allowedEmails: string[];
108
+ frontendDomain: string | null;
109
+ withPkce: boolean;
110
+ tokenUrl: string | null;
111
+ }, {
112
+ enabled: boolean;
113
+ authorizationUrl: string | null;
114
+ clientId: string | null;
115
+ clientSecret: string | null;
116
+ allowedEmails: string[];
117
+ frontendDomain: string | null;
118
+ withPkce: boolean;
119
+ tokenUrl: string | null;
120
+ }>>;
93
121
  }, "strip", z.ZodTypeAny, {
94
122
  github: {
95
123
  enabled: boolean;
@@ -119,6 +147,16 @@ export declare const RemnawaveSettingsSchema: z.ZodObject<{
119
147
  frontendDomain: string | null;
120
148
  keycloakDomain: string | null;
121
149
  };
150
+ genericOAuth2: {
151
+ enabled: boolean;
152
+ authorizationUrl: string | null;
153
+ clientId: string | null;
154
+ clientSecret: string | null;
155
+ allowedEmails: string[];
156
+ frontendDomain: string | null;
157
+ withPkce: boolean;
158
+ tokenUrl: string | null;
159
+ };
122
160
  }, {
123
161
  github: {
124
162
  enabled: boolean;
@@ -148,6 +186,16 @@ export declare const RemnawaveSettingsSchema: z.ZodObject<{
148
186
  frontendDomain: string | null;
149
187
  keycloakDomain: string | null;
150
188
  } | undefined;
189
+ genericOAuth2?: {
190
+ enabled: boolean;
191
+ authorizationUrl: string | null;
192
+ clientId: string | null;
193
+ clientSecret: string | null;
194
+ allowedEmails: string[];
195
+ frontendDomain: string | null;
196
+ withPkce: boolean;
197
+ tokenUrl: string | null;
198
+ } | undefined;
151
199
  }>>;
152
200
  tgAuthSettings: z.ZodNullable<z.ZodObject<{
153
201
  enabled: z.ZodBoolean;
@@ -214,6 +262,16 @@ export declare const RemnawaveSettingsSchema: z.ZodObject<{
214
262
  frontendDomain: string | null;
215
263
  keycloakDomain: string | null;
216
264
  };
265
+ genericOAuth2: {
266
+ enabled: boolean;
267
+ authorizationUrl: string | null;
268
+ clientId: string | null;
269
+ clientSecret: string | null;
270
+ allowedEmails: string[];
271
+ frontendDomain: string | null;
272
+ withPkce: boolean;
273
+ tokenUrl: string | null;
274
+ };
217
275
  } | null;
218
276
  tgAuthSettings: {
219
277
  enabled: boolean;
@@ -262,6 +320,16 @@ export declare const RemnawaveSettingsSchema: z.ZodObject<{
262
320
  frontendDomain: string | null;
263
321
  keycloakDomain: string | null;
264
322
  } | undefined;
323
+ genericOAuth2?: {
324
+ enabled: boolean;
325
+ authorizationUrl: string | null;
326
+ clientId: string | null;
327
+ clientSecret: string | null;
328
+ allowedEmails: string[];
329
+ frontendDomain: string | null;
330
+ withPkce: boolean;
331
+ tokenUrl: string | null;
332
+ } | undefined;
265
333
  } | null;
266
334
  tgAuthSettings: {
267
335
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"remnawave-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/remnawave-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"remnawave-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/remnawave-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -6,5 +6,6 @@ exports.OAUTH2_PROVIDERS = {
6
6
  POCKETID: 'pocketid',
7
7
  YANDEX: 'yandex',
8
8
  KEYCLOAK: 'keycloak',
9
+ GENERIC_OAUTH2: 'oauth2',
9
10
  };
10
11
  exports.OAUTH2_PROVIDERS_VALUES = Object.values(exports.OAUTH2_PROVIDERS);
@@ -68,4 +68,36 @@ exports.Oauth2SettingsSchema = zod_1.default.object({
68
68
  clientSecret: null,
69
69
  allowedEmails: [],
70
70
  }),
71
+ genericOAuth2: zod_1.default
72
+ .object({
73
+ enabled: zod_1.default.boolean(),
74
+ clientId: zod_1.default.nullable(zod_1.default.string()),
75
+ clientSecret: zod_1.default.nullable(zod_1.default.string()),
76
+ withPkce: zod_1.default.boolean(),
77
+ authorizationUrl: zod_1.default.nullable(zod_1.default.string()),
78
+ tokenUrl: zod_1.default.nullable(zod_1.default.string()),
79
+ frontendDomain: zod_1.default.nullable(zod_1.default.string().refine((val) => {
80
+ if (val.startsWith('127.0.0.1') || val.startsWith('localhost')) {
81
+ return true;
82
+ }
83
+ const fqdnRegex = /(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\.)+[a-zA-Z]{2,63}$)/;
84
+ if (fqdnRegex.test(val)) {
85
+ return true;
86
+ }
87
+ return false;
88
+ }, {
89
+ message: 'Must be a valid fully qualified domain name (FQDN), e.g. "docs.rw"',
90
+ })),
91
+ allowedEmails: zod_1.default.array(zod_1.default.string()),
92
+ })
93
+ .default({
94
+ enabled: false,
95
+ frontendDomain: null,
96
+ tokenUrl: null,
97
+ clientId: null,
98
+ clientSecret: null,
99
+ withPkce: false,
100
+ authorizationUrl: null,
101
+ allowedEmails: [],
102
+ }),
71
103
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.5.13",
3
+ "version": "2.5.15",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",