ggez-banking-sdk 0.0.12 → 0.0.14
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,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.GenerateSourceID = GenerateSourceID;
|
|
7
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
4
8
|
function GenerateSourceID() {
|
|
5
9
|
var _a;
|
|
6
10
|
const now = new Date();
|
|
7
|
-
const timestamp = now.
|
|
8
|
-
const randomNumber = Math.floor(Math.random() * 100);
|
|
11
|
+
const timestamp = `${(0, dayjs_1.default)(now).format("DDMMYYYY")}.${(0, dayjs_1.default)(now).format("HHmmss")}.${(0, dayjs_1.default)(now).format("SSS")}`;
|
|
9
12
|
const userId = (_a = localStorage.getItem("user_id")) !== null && _a !== void 0 ? _a : "0";
|
|
10
|
-
const source_id = `
|
|
13
|
+
const source_id = `U.${userId}${timestamp}`;
|
|
11
14
|
return source_id;
|
|
12
15
|
}
|
|
@@ -5,7 +5,8 @@ const useRegExp = () => {
|
|
|
5
5
|
return {
|
|
6
6
|
checkEmptyPattern: { required: true },
|
|
7
7
|
GeoCoordinatesPattern: /^(-?(?:1[0-7]|[1-9])?\d(?:\.\d{1,24})?|180(?:\.0{1,24})?)$/,
|
|
8
|
-
GGEZAddressRegexPattern: /^
|
|
8
|
+
GGEZAddressRegexPattern: /^ggez[A-Za-z0-9]{30,80}$/,
|
|
9
|
+
GGEZQuantityRegexPattern: /^(?!0(\.0{1,2})?$)(?!0\d)\d{1,16}(?:\.\d{1,6})?$/,
|
|
9
10
|
NameRegexPattern: /^(?!.*--)[\p{L}\p{N}][^\\\/*$%^+=<>|\n\r\b\t]{0,49}$/u,
|
|
10
11
|
EmailRegexPattern: /^([\w-+\.]{1,80})@([\w-+\.]{1,80})\.([a-zA-Z]{1,20})$/,
|
|
11
12
|
MoneyRegexPattern: /^(?!0(\.0{1,2})?$)(?!0\d)\d{1,7}(?:\.\d{1,2})?$/,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|