@flink-app/generic-auth-plugin 0.12.1-alpha.20 → 0.12.1-alpha.21

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.
@@ -1,4 +1,4 @@
1
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
1
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
2
2
  import { autoRegisteredHandlers, HttpMethod } from "@flink-app/flink";
3
3
  import * as UserCreate_0 from "../src/handlers/UserCreate";
4
4
  import * as UserLogin_0 from "../src/handlers/UserLogin";
@@ -1,4 +1,4 @@
1
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
1
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
2
2
  import { autoRegisteredJobs } from "@flink-app/flink";
3
3
  export const jobs = [];
4
4
  autoRegisteredJobs.push(...jobs);
@@ -1,4 +1,4 @@
1
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
1
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
2
2
  import { autoRegisteredRepos } from "@flink-app/flink";
3
3
  export const repos = [];
4
4
  autoRegisteredRepos.push(...repos);
@@ -264,6 +264,88 @@
264
264
  "invalidCode",
265
265
  "passwordError"
266
266
  ]
267
+ },
268
+ "user": {
269
+ "type": "object",
270
+ "properties": {
271
+ "_id": {
272
+ "type": "string"
273
+ },
274
+ "username": {
275
+ "type": "string"
276
+ },
277
+ "password": {
278
+ "type": "string"
279
+ },
280
+ "salt": {
281
+ "type": "string"
282
+ },
283
+ "pwdResetStartedAt": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "roles": {
290
+ "type": "array",
291
+ "items": {
292
+ "type": "string"
293
+ }
294
+ },
295
+ "authentificationMethod": {
296
+ "type": "string",
297
+ "enum": [
298
+ "password",
299
+ "sms"
300
+ ]
301
+ },
302
+ "profile": {
303
+ "type": "object"
304
+ },
305
+ "pushNotificationTokens": {
306
+ "type": "array",
307
+ "items": {
308
+ "type": "object",
309
+ "properties": {
310
+ "deviceId": {
311
+ "type": "string"
312
+ },
313
+ "token": {
314
+ "type": "string"
315
+ },
316
+ "platform": {
317
+ "type": "string",
318
+ "enum": [
319
+ "ios",
320
+ "android",
321
+ "web"
322
+ ]
323
+ },
324
+ "type": {
325
+ "type": "string",
326
+ "enum": [
327
+ "firebase",
328
+ "apn-voip"
329
+ ]
330
+ }
331
+ },
332
+ "required": [
333
+ "deviceId",
334
+ "token"
335
+ ],
336
+ "additionalProperties": false
337
+ }
338
+ }
339
+ },
340
+ "required": [
341
+ "_id",
342
+ "username",
343
+ "roles",
344
+ "authentificationMethod",
345
+ "profile",
346
+ "pushNotificationTokens"
347
+ ],
348
+ "additionalProperties": false
267
349
  }
268
350
  },
269
351
  "required": [
@@ -29,7 +29,7 @@ import { PutManagementUserRolesByUseridRes } from "../../src/schemas/Management/
29
29
  import { PutManagementUserUsernameByUseridReq } from "../../src/schemas/Management/PutUserUsernameByUseridReq";
30
30
  import { PutManagementUserUsernameByUseridRes } from "../../src/schemas/Management/PutUserUsernameByUseridRes";
31
31
 
32
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
32
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
33
33
  export interface UserCreate_7_ReqSchema extends UserCreateReq {}
34
34
 
35
35
  export interface UserCreate_7_ResSchema extends UserCreateRes {}
package/.flink/start.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
1
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
2
2
  import "./generatedHandlers";
3
3
  import "./generatedRepos";
4
4
  import "./generatedJobs";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handlers = void 0;
4
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
4
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
5
5
  var flink_1 = require("@flink-app/flink");
6
6
  exports.handlers = [];
7
7
  flink_1.autoRegisteredHandlers.push.apply(flink_1.autoRegisteredHandlers, exports.handlers);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jobs = void 0;
4
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
4
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
5
5
  var flink_1 = require("@flink-app/flink");
6
6
  exports.jobs = [];
7
7
  flink_1.autoRegisteredJobs.push.apply(flink_1.autoRegisteredJobs, exports.jobs);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.repos = void 0;
4
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
4
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
5
5
  var flink_1 = require("@flink-app/flink");
6
6
  exports.repos = [];
7
7
  flink_1.autoRegisteredRepos.push.apply(flink_1.autoRegisteredRepos, exports.repos);
@@ -264,6 +264,88 @@
264
264
  "invalidCode",
265
265
  "passwordError"
266
266
  ]
267
+ },
268
+ "user": {
269
+ "type": "object",
270
+ "properties": {
271
+ "_id": {
272
+ "type": "string"
273
+ },
274
+ "username": {
275
+ "type": "string"
276
+ },
277
+ "password": {
278
+ "type": "string"
279
+ },
280
+ "salt": {
281
+ "type": "string"
282
+ },
283
+ "pwdResetStartedAt": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "roles": {
290
+ "type": "array",
291
+ "items": {
292
+ "type": "string"
293
+ }
294
+ },
295
+ "authentificationMethod": {
296
+ "type": "string",
297
+ "enum": [
298
+ "password",
299
+ "sms"
300
+ ]
301
+ },
302
+ "profile": {
303
+ "type": "object"
304
+ },
305
+ "pushNotificationTokens": {
306
+ "type": "array",
307
+ "items": {
308
+ "type": "object",
309
+ "properties": {
310
+ "deviceId": {
311
+ "type": "string"
312
+ },
313
+ "token": {
314
+ "type": "string"
315
+ },
316
+ "platform": {
317
+ "type": "string",
318
+ "enum": [
319
+ "ios",
320
+ "android",
321
+ "web"
322
+ ]
323
+ },
324
+ "type": {
325
+ "type": "string",
326
+ "enum": [
327
+ "firebase",
328
+ "apn-voip"
329
+ ]
330
+ }
331
+ },
332
+ "required": [
333
+ "deviceId",
334
+ "token"
335
+ ],
336
+ "additionalProperties": false
337
+ }
338
+ }
339
+ },
340
+ "required": [
341
+ "_id",
342
+ "username",
343
+ "roles",
344
+ "authentificationMethod",
345
+ "profile",
346
+ "pushNotificationTokens"
347
+ ],
348
+ "additionalProperties": false
267
349
  }
268
350
  },
269
351
  "required": [
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // Generated Tue Aug 05 2025 10:03:13 GMT+0200 (Central European Summer Time)
3
+ // Generated Fri Aug 08 2025 18:12:36 GMT+0200 (Central European Summer Time)
4
4
  require("./generatedHandlers");
5
5
  require("./generatedRepos");
6
6
  require("./generatedJobs");
@@ -414,7 +414,7 @@ function passwordResetComplete(repo_1, auth_1, jwtSecret_1, passwordResetToken_1
414
414
  })];
415
415
  case 6:
416
416
  _a.sent();
417
- return [2 /*return*/, { status: "success" }];
417
+ return [2 /*return*/, { status: "success", user: user }];
418
418
  }
419
419
  });
420
420
  });
@@ -67,4 +67,4 @@ var postPasswordResetCompleteHandler = function (_a) { return __awaiter(void 0,
67
67
  }); };
68
68
  exports.default = postPasswordResetCompleteHandler;
69
69
  exports.__assumedHttpMethod = "", exports.__file = "UserPasswordResetComplete.ts", exports.__query = [], exports.__params = [];
70
- exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "passwordResetToken": { "type": "string" }, "code": { "type": "string" }, "password": { "type": "string" } }, "required": ["code", "password", "passwordResetToken"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "userNotFound", "invalidCode", "passwordError"] } }, "required": ["status"], "definitions": {} } };
70
+ exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "passwordResetToken": { "type": "string" }, "code": { "type": "string" }, "password": { "type": "string" } }, "required": ["code", "password", "passwordResetToken"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "userNotFound", "invalidCode", "passwordError"] }, "user": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" }, "password": { "type": "string" }, "salt": { "type": "string" }, "pwdResetStartedAt": { "type": ["string", "null"] }, "roles": { "type": "array", "items": { "type": "string" } }, "authentificationMethod": { "type": "string", "enum": ["password", "sms"] }, "profile": { "type": "object" }, "pushNotificationTokens": { "type": "array", "items": { "type": "object", "properties": { "deviceId": { "type": "string" }, "token": { "type": "string" }, "platform": { "type": "string", "enum": ["ios", "android", "web"] }, "type": { "type": "string", "enum": ["firebase", "apn-voip"] } }, "required": ["deviceId", "token"], "additionalProperties": false } } }, "required": ["_id", "username", "roles", "authentificationMethod", "profile", "pushNotificationTokens"], "additionalProperties": false } }, "required": ["status"], "definitions": {} } };
@@ -1,3 +1,8 @@
1
+ import { User } from "./User";
1
2
  export interface UserPasswordResetCompleteRes {
2
3
  status: "success" | "userNotFound" | "invalidCode" | "passwordError";
4
+ /**
5
+ * The user object is returned only if the status is "success".
6
+ */
7
+ user?: User;
3
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/generic-auth-plugin",
3
- "version": "0.12.1-alpha.20",
3
+ "version": "0.12.1-alpha.21",
4
4
  "description": "Flink plugin that provides a generic user authentification solution.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\"",
@@ -30,5 +30,5 @@
30
30
  "ts-node": "^9.1.1",
31
31
  "typescript": "5.4.5"
32
32
  },
33
- "gitHead": "133c6f50b3119f8264f6350e2043c171781b583f"
33
+ "gitHead": "baad28172eb929a54e5fd139d04ebaed74f20ac4"
34
34
  }
@@ -382,7 +382,7 @@ export async function passwordResetComplete(
382
382
  pwdResetStartedAt: null,
383
383
  });
384
384
 
385
- return { status: "success" };
385
+ return { status: "success", user };
386
386
  }
387
387
 
388
388
  function generate(n: number): string {
@@ -1,3 +1,10 @@
1
- export interface UserPasswordResetCompleteRes{
2
- status : "success" | "userNotFound" | "invalidCode" | "passwordError";
3
- }
1
+ import { User } from "./User";
2
+
3
+ export interface UserPasswordResetCompleteRes {
4
+ status: "success" | "userNotFound" | "invalidCode" | "passwordError";
5
+
6
+ /**
7
+ * The user object is returned only if the status is "success".
8
+ */
9
+ user?: User;
10
+ }