@wildix/xbees-conversations-utils 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAnonymousUserEmail = exports.generateAnonymousUserEmail = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const ANONYMOUS_USER_EMAIL_REGEXP = /^anonymous-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}@wildix\.com$/i;
|
|
6
|
+
function generateAnonymousUserEmail() {
|
|
7
|
+
return `anonymous-${(0, uuid_1.v4)()}@wildix.com`;
|
|
8
|
+
}
|
|
9
|
+
exports.generateAnonymousUserEmail = generateAnonymousUserEmail;
|
|
10
|
+
function isAnonymousUserEmail(value) {
|
|
11
|
+
return ANONYMOUS_USER_EMAIL_REGEXP.test(value);
|
|
12
|
+
}
|
|
13
|
+
exports.isAnonymousUserEmail = isAnonymousUserEmail;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./anonymousEmail"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./normalization"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./stream"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./streamRateLimitHandlingProxy"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { v4 } from 'uuid';
|
|
2
|
+
const ANONYMOUS_USER_EMAIL_REGEXP = /^anonymous-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}@wildix\.com$/i;
|
|
3
|
+
export function generateAnonymousUserEmail() {
|
|
4
|
+
return `anonymous-${v4()}@wildix.com`;
|
|
5
|
+
}
|
|
6
|
+
export function isAnonymousUserEmail(value) {
|
|
7
|
+
return ANONYMOUS_USER_EMAIL_REGEXP.test(value);
|
|
8
|
+
}
|
package/dist-es/index.js
CHANGED
package/dist-types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-conversations-utils",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -25,15 +25,17 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@wildix/xbees-conversations-client": "1.2.13",
|
|
29
28
|
"@aws-lambda-powertools/logger": "2.18.0",
|
|
29
|
+
"@wildix/xbees-conversations-client": "1.2.13",
|
|
30
30
|
"ioredis": "5.10.0",
|
|
31
31
|
"stream-chat": "8.12.1",
|
|
32
|
-
"tslib": "
|
|
32
|
+
"tslib": "2.5.0",
|
|
33
|
+
"uuid": "10.0.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@tsconfig/node18": "18.2.4",
|
|
36
37
|
"@tsconfig/recommended": "1.0.1",
|
|
38
|
+
"@types/uuid": "10.0.0",
|
|
37
39
|
"@wildix/eslint-config-style-guide": "1.2.1",
|
|
38
40
|
"concurrently": "7.0.0",
|
|
39
41
|
"downlevel-dts": "0.10.1",
|