@flink-app/generic-auth-plugin 0.11.10 → 0.11.11

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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
1
+ // Generated Thu Feb 13 2025 14:49:55 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
1
+ // Generated Thu Feb 13 2025 14:49:56 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
1
+ // Generated Thu Feb 13 2025 14:49:55 GMT+0100 (Central European Standard Time)
2
2
  import { autoRegisteredRepos } from "@flink-app/flink";
3
3
  export const repos = [];
4
4
  autoRegisteredRepos.push(...repos);
@@ -345,6 +345,14 @@
345
345
  "android",
346
346
  "web"
347
347
  ]
348
+ },
349
+ "type": {
350
+ "type": "string",
351
+ "enum": [
352
+ "firebase",
353
+ "apn-voip"
354
+ ],
355
+ "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\""
348
356
  }
349
357
  },
350
358
  "required": [
@@ -389,6 +397,14 @@
389
397
  "android",
390
398
  "web"
391
399
  ]
400
+ },
401
+ "type": {
402
+ "type": "string",
403
+ "enum": [
404
+ "firebase",
405
+ "apn-voip"
406
+ ],
407
+ "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\""
392
408
  }
393
409
  },
394
410
  "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 Wed Feb 05 2025 23:31:39 GMT+0100 (Central European Standard Time)
32
+ // Generated Thu Feb 13 2025 14:49:56 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
1
+ // Generated Thu Feb 13 2025 14:49:56 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
4
+ // Generated Thu Feb 13 2025 14:49:55 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
4
+ // Generated Thu Feb 13 2025 14:49:56 GMT+0100 (Central European Standard 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 Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
4
+ // Generated Thu Feb 13 2025 14:49:55 GMT+0100 (Central European Standard 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);
@@ -345,6 +345,14 @@
345
345
  "android",
346
346
  "web"
347
347
  ]
348
+ },
349
+ "type": {
350
+ "type": "string",
351
+ "enum": [
352
+ "firebase",
353
+ "apn-voip"
354
+ ],
355
+ "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\""
348
356
  }
349
357
  },
350
358
  "required": [
@@ -389,6 +397,14 @@
389
397
  "android",
390
398
  "web"
391
399
  ]
400
+ },
401
+ "type": {
402
+ "type": "string",
403
+ "enum": [
404
+ "firebase",
405
+ "apn-voip"
406
+ ],
407
+ "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\""
392
408
  }
393
409
  },
394
410
  "required": [
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // Generated Wed Feb 05 2025 23:31:38 GMT+0100 (Central European Standard Time)
3
+ // Generated Thu Feb 13 2025 14:49:56 GMT+0100 (Central European Standard Time)
4
4
  require("./generatedHandlers");
5
5
  require("./generatedRepos");
6
6
  require("./generatedJobs");
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -62,7 +73,7 @@ var postUserPushRegisterTokenHandler = function (_a) {
62
73
  exToken.token = req.body.token;
63
74
  }
64
75
  else {
65
- user.pushNotificationTokens.push(req.body);
76
+ user.pushNotificationTokens.push(__assign(__assign({}, req.body), { type: req.body.type || "firebase" }));
66
77
  }
67
78
  if (!allowMultipleDevices) {
68
79
  // Filter out all other devices except the newly registered one
@@ -112,4 +123,4 @@ var postUserPushRegisterTokenHandler = function (_a) {
112
123
  };
113
124
  exports.default = postUserPushRegisterTokenHandler;
114
125
  exports.__assumedHttpMethod = "", exports.__file = "UserPushRegisterToken.ts", exports.__query = [], exports.__params = [];
115
- exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "token": { "type": "string" }, "platform": { "type": "string", "enum": ["ios", "android", "web"] } }, "required": ["deviceId", "token"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "failed"] } }, "required": ["status"], "definitions": {} } };
126
+ exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "token": { "type": "string" }, "platform": { "type": "string", "enum": ["ios", "android", "web"] }, "type": { "type": "string", "enum": ["firebase", "apn-voip"], "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\"" } }, "required": ["deviceId", "token"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "failed"] } }, "required": ["status"], "definitions": {} } };
@@ -66,4 +66,4 @@ var postUserRemoveTokenHandler = function (_a) {
66
66
  };
67
67
  exports.default = postUserRemoveTokenHandler;
68
68
  exports.__assumedHttpMethod = "", exports.__file = "UserPushRemoveToken.ts", exports.__query = [], exports.__params = [];
69
- exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "token": { "type": "string" }, "platform": { "type": "string", "enum": ["ios", "android", "web"] } }, "required": ["deviceId", "token"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "failed"] } }, "required": ["status"], "definitions": {} } };
69
+ exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "token": { "type": "string" }, "platform": { "type": "string", "enum": ["ios", "android", "web"] }, "type": { "type": "string", "enum": ["firebase", "apn-voip"], "description": "The type of the token. This is used to determine which push notification service to use. Default is \"firebase\"" } }, "required": ["deviceId", "token"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["success", "failed"] } }, "required": ["status"], "definitions": {} } };
@@ -2,4 +2,9 @@ export interface PushNotificationToken {
2
2
  deviceId: string;
3
3
  token: string;
4
4
  platform?: "ios" | "android" | "web";
5
+ /**
6
+ * The type of the token. This is used to determine which push notification service to use.
7
+ * Default is "firebase"
8
+ */
9
+ type?: "firebase" | "apn-voip";
5
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/generic-auth-plugin",
3
- "version": "0.11.10",
3
+ "version": "0.11.11",
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": "^4.2.4"
32
32
  },
33
- "gitHead": "bda7469d8216f4f2efcec25ec2b2a25b2c235180"
33
+ "gitHead": "0eb9b8d88342ba6c868ba70eed1dddb818d1f6dc"
34
34
  }
@@ -27,7 +27,7 @@ const postUserPushRegisterTokenHandler: Handler<FlinkContext<genericAuthContext>
27
27
  if (exToken != null) {
28
28
  exToken.token = req.body.token;
29
29
  } else {
30
- user.pushNotificationTokens.push(req.body);
30
+ user.pushNotificationTokens.push({ ...req.body, type: req.body.type || "firebase" });
31
31
  }
32
32
 
33
33
  if (!allowMultipleDevices) {
@@ -2,4 +2,10 @@ export interface PushNotificationToken {
2
2
  deviceId: string;
3
3
  token: string;
4
4
  platform?: "ios" | "android" | "web";
5
+
6
+ /**
7
+ * The type of the token. This is used to determine which push notification service to use.
8
+ * Default is "firebase"
9
+ */
10
+ type?: "firebase" | "apn-voip";
5
11
  }