ggez-banking-sdk 0.1.22 → 0.1.24

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
- import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankBeneficiaryType, CommerceProductSourceType, DeviceType, DocumentType, Entity, EntityData, EntityStatus, OrderType, TicketType, TransactionType, ValidateType } from "../constants/enum";
1
+ import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankBeneficiaryType, CommerceProductSourceType, DeviceType, DocumentType, Entity, EntityData, EntityStatus, EntityVerificationStatus, OrderType, TicketType, TransactionType, ValidateType } from "../constants/enum";
2
2
  import { CreateDeviceInterface, UpdateDeviceInterface, DeleteDeviceInterface, VerifyDeviceInterface, ConfirmDeviceInterface, LogoutDeviceInterface } from "../interfaces/deviceInterface";
3
3
  import { SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
4
4
  import { DoTransactionInterface, GetTransactionInterface } from "../interfaces/accountInterface";
@@ -744,6 +744,8 @@ declare const Data: () => {
744
744
  sub_entity: {
745
745
  sub_entity: number;
746
746
  sub_entity_id: number;
747
+ status: EntityStatus;
748
+ verification_status: EntityVerificationStatus;
747
749
  }[];
748
750
  entity_data: EntityData;
749
751
  category: number;
@@ -589,6 +589,8 @@ const Data = () => {
589
589
  {
590
590
  sub_entity: values.subEntity,
591
591
  sub_entity_id: values.subEntityId,
592
+ status: enum_1.EntityStatus.Active,
593
+ verification_status: enum_1.EntityVerificationStatus.Not_Verified,
592
594
  },
593
595
  ],
594
596
  entity_data: enum_1.EntityData.Verification,
@@ -1,13 +1,21 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.GenerateSourceID = GenerateSourceID;
7
- const dayjs_1 = __importDefault(require("dayjs"));
8
4
  function GenerateSourceID() {
9
5
  const now = new Date();
10
- const timestamp = `${(0, dayjs_1.default)(now).format("DDMMYYYY")}.${(0, dayjs_1.default)(now).format("HHmmss")}.${(0, dayjs_1.default)(now).format("SSS")}`;
6
+ // Helper function to format numbers as two digits
7
+ const pad = (number) => String(number).padStart(2, "0");
8
+ // Helper function to format milliseconds as three digits
9
+ const padMilliseconds = (number) => String(number).padStart(3, "0");
10
+ // Format date and time components
11
+ const day = pad(now.getDate());
12
+ const month = pad(now.getMonth() + 1); // Months are zero-based
13
+ const year = now.getFullYear();
14
+ const hours = pad(now.getHours());
15
+ const minutes = pad(now.getMinutes());
16
+ const seconds = pad(now.getSeconds());
17
+ const milliseconds = padMilliseconds(now.getMilliseconds());
18
+ const timestamp = `${day}${month}${year}.${hours}${minutes}${seconds}.${milliseconds}`;
11
19
  const userId = localStorage.getItem("user_id") ?? "0";
12
20
  const source_id = `U.${userId}.${timestamp}`;
13
21
  return source_id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
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",