@adobe/spacecat-shared-data-access 1.49.1 → 1.49.3

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
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.49.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.2...@adobe/spacecat-shared-data-access-v1.49.3) (2024-10-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency uuid to v11 ([#416](https://github.com/adobe/spacecat-shared/issues/416)) ([35c9f4a](https://github.com/adobe/spacecat-shared/commit/35c9f4ab24e12800e3227f59533fc8c06e71a705))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v1.49.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.1...@adobe/spacecat-shared-data-access-v1.49.2) (2024-10-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * configuration version should have numeric type ([e9b9dfc](https://github.com/adobe/spacecat-shared/commit/e9b9dfc6e35f9c1c383ec3941834b18a3179a237))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v1.49.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.0...@adobe/spacecat-shared-data-access-v1.49.1) (2024-10-26)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.49.1",
3
+ "version": "1.49.3",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -39,7 +39,7 @@
39
39
  "@aws-sdk/lib-dynamodb": "3.679.0",
40
40
  "@types/joi": "17.2.3",
41
41
  "joi": "17.13.3",
42
- "uuid": "10.0.0"
42
+ "uuid": "11.0.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "chai": "5.1.2",
package/src/index.d.ts CHANGED
@@ -394,9 +394,9 @@ export interface Organization {
394
394
  export interface Configuration {
395
395
  /**
396
396
  * Retrieves the configuration version.
397
- * @returns {string} The configuration version.
397
+ * @returns {number} The configuration version.
398
398
  */
399
- getVersion: () => string;
399
+ getVersion: () => number;
400
400
 
401
401
  /**
402
402
  * Retrieves the queues configuration.
@@ -855,7 +855,7 @@ export interface DataAccess {
855
855
  // configuration functions
856
856
  getConfiguration: () => Promise<Readonly<Configuration>>
857
857
  getConfigurations: () => Promise<Readonly<Configuration>[]>
858
- getConfigurationByVersion: (version: string) => Promise<Readonly<Configuration>>
858
+ getConfigurationByVersion: (version: number) => Promise<Readonly<Configuration>>
859
859
  updateConfiguration: (configurationData: object) => Promise<Readonly<Configuration>>
860
860
 
861
861
  // key events functions
@@ -142,7 +142,7 @@ const Configuration = (data = {}) => {
142
142
 
143
143
  export const checkConfiguration = (configuration) => {
144
144
  const schema = Joi.object({
145
- version: Joi.string().required(),
145
+ version: Joi.number().required(),
146
146
  queues: Joi.object().required(),
147
147
  handlers: Joi.object().pattern(Joi.string(), Joi.object(
148
148
  {
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import {
14
- hasText,
14
+ isInteger,
15
15
  isObject,
16
16
  } from '@adobe/spacecat-shared-utils';
17
17
 
@@ -88,10 +88,10 @@ export const getConfigurationByVersion = async (
88
88
  };
89
89
 
90
90
  function incrementVersion(version) {
91
- if (!hasText(version)) return 'v1';
91
+ if (!isInteger(version)) return 1;
92
92
 
93
- const versionNumber = parseInt(version.substring(1), 10);
94
- return `v${versionNumber + 1}`;
93
+ const versionNumber = parseInt(version, 10);
94
+ return versionNumber + 1;
95
95
  }
96
96
 
97
97
  /**