@zauru-sdk/common 2.14.0 → 2.14.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.14.1](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.14.0...v2.14.1) (2025-08-13)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/common
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.14.0](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.13.0...v2.14.0) (2025-08-08)
7
15
 
8
16
  **Note:** Version bump only for package @zauru-sdk/common
package/dist/common.d.ts CHANGED
@@ -165,21 +165,6 @@ export declare function calculateTimeDifference(timestamp: string): {
165
165
  minutes: number;
166
166
  label: string;
167
167
  };
168
- /**
169
- * Creates a unique code with a compact date format in uppercase.
170
- *
171
- * @param {string | null} suffix - An optional prefix to add to the code.
172
- * @returns {string} A unique code consisting of a timestamp and an optional suffix.
173
- *
174
- * @example
175
- * // Without suffix
176
- * createCode(null); // Returns something like "1A2B3C4D"
177
- *
178
- * @example
179
- * // With suffix
180
- * createCode("INV"); // Returns something like "INV-1A2B3C4D"
181
- */
182
- export declare function createCode(suffix?: string | null): string;
183
168
  /**
184
169
  * Parses a code generated by createCode function to extract its components.
185
170
  *
@@ -20,7 +20,6 @@ exports.capitalLetter = capitalLetter;
20
20
  exports.handlePossibleAxiosErrors = handlePossibleAxiosErrors;
21
21
  exports.createPostgresUrl = createPostgresUrl;
22
22
  exports.calculateTimeDifference = calculateTimeDifference;
23
- exports.createCode = createCode;
24
23
  exports.parseCode = parseCode;
25
24
  const moment_1 = __importDefault(require("moment"));
26
25
  require("moment-timezone");
@@ -633,27 +632,6 @@ function calculateTimeDifference(timestamp) {
633
632
  label: `${hours > 0 ? `${hours} ${hours > 1 ? "horas" : "hora"}` : ""}${hours > 0 && minutes > 0 ? " y " : ""}${minutes > 0 ? `${minutes} ${minutes > 1 ? "minutos" : "minuto"}` : ""}.`,
634
633
  };
635
634
  }
636
- /**
637
- * Creates a unique code with a compact date format in uppercase.
638
- *
639
- * @param {string | null} suffix - An optional prefix to add to the code.
640
- * @returns {string} A unique code consisting of a timestamp and an optional suffix.
641
- *
642
- * @example
643
- * // Without suffix
644
- * createCode(null); // Returns something like "1A2B3C4D"
645
- *
646
- * @example
647
- * // With suffix
648
- * createCode("INV"); // Returns something like "INV-1A2B3C4D"
649
- */
650
- function createCode(suffix) {
651
- const timestamp = Math.floor(Date.now() / 1000)
652
- .toString(36)
653
- .toUpperCase(); // Timestamp in base 36 and converted to uppercase
654
- const code = `${timestamp}`;
655
- return suffix ? `${suffix}-${code}` : code;
656
- }
657
635
  /**
658
636
  * Parses a code generated by createCode function to extract its components.
659
637
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/common",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "description": "Funciones de uso común en el desarrollo de webapps en Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -20,9 +20,9 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@remix-run/node": "^2.8.1",
23
- "@zauru-sdk/types": "^2.14.0",
23
+ "@zauru-sdk/types": "^2.14.1",
24
24
  "moment": "^2.30.1",
25
25
  "moment-timezone": "^0.5.45"
26
26
  },
27
- "gitHead": "280469a3b4600c9ee61233f8618bab7e015daa2f"
27
+ "gitHead": "a2f6a13f6411df24c4fed8f8b434f2d7c7fb3143"
28
28
  }
package/src/common.ts CHANGED
@@ -727,29 +727,6 @@ export function calculateTimeDifference(timestamp: string): {
727
727
  };
728
728
  }
729
729
 
730
- /**
731
- * Creates a unique code with a compact date format in uppercase.
732
- *
733
- * @param {string | null} suffix - An optional prefix to add to the code.
734
- * @returns {string} A unique code consisting of a timestamp and an optional suffix.
735
- *
736
- * @example
737
- * // Without suffix
738
- * createCode(null); // Returns something like "1A2B3C4D"
739
- *
740
- * @example
741
- * // With suffix
742
- * createCode("INV"); // Returns something like "INV-1A2B3C4D"
743
- */
744
- export function createCode(suffix?: string | null): string {
745
- const timestamp = Math.floor(Date.now() / 1000)
746
- .toString(36)
747
- .toUpperCase(); // Timestamp in base 36 and converted to uppercase
748
- const code = `${timestamp}`;
749
-
750
- return suffix ? `${suffix}-${code}` : code;
751
- }
752
-
753
730
  /**
754
731
  * Parses a code generated by createCode function to extract its components.
755
732
  *