@opinio-dev/models 1.1.1-item-types.1 → 1.1.1-item-types.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.
@@ -1,4 +1,4 @@
1
- import { ItemType } from '../Items/ItemType';
1
+ import { ItemType } from '../items/ItemType';
2
2
  export interface ILeaderboardItem {
3
3
  id: string;
4
4
  itemId: string;
@@ -1,4 +1,4 @@
1
- import { ItemType } from '../Items/ItemType';
1
+ import { ItemType } from '../items/ItemType';
2
2
  import { ILeaderboardItem } from './LeaderboardItem';
3
3
  export interface ILeaderboardSnapshot {
4
4
  id: string;
@@ -3,8 +3,8 @@ export interface IValidator<T> {
3
3
  /**
4
4
  * Validates a passed item against pre-defined rules.
5
5
  * @param {Partial<T>} item The item to validate.
6
- * @param {Array<keyof T>} ignoredFields Fields to ignore during validation.
6
+ * @param {Array<keyof T>=} ignoredFields Fields to ignore during validation.
7
7
  * @returns {IValidationResult} The result of the validation.
8
8
  */
9
- validate(item: Partial<T>, ignoredFields: Array<keyof T>): IValidationResult;
9
+ validate(item: Partial<T>, ignoredFields?: Array<keyof T>): IValidationResult;
10
10
  }
@@ -16,8 +16,8 @@ export declare class ValidatorRegistry<T> {
16
16
  * Validates an item using a registered validator.
17
17
  * @param {string} key The key of the validator to use.
18
18
  * @param {Partial<T>} item The item to validate.
19
- * @param {Array<keyof T>} ignoredFields Fields to ignore during validation.
19
+ * @param {Array<keyof T>=} ignoredFields Fields to ignore during validation.
20
20
  * @returns {IValidationResult} The result of the validation.
21
21
  */
22
- validate(key: string, item: Partial<T>, ignoredFields: Array<keyof T>): IValidationResult;
22
+ validate(key: string, item: Partial<T>, ignoredFields?: Array<keyof T>): IValidationResult;
23
23
  }
@@ -1,4 +1,4 @@
1
- import { Item } from '../../types/Items/Item';
1
+ import { Item } from '../../types/items/Item';
2
2
  import { BaseValidator } from '../BaseValidator';
3
3
  /**
4
4
  * A base validator for items, providing common validation logic.
@@ -1,4 +1,4 @@
1
- import { IBook } from '../../types/Items/Book';
1
+ import { IBook } from '../../types/items/Book';
2
2
  import { BaseItemValidator } from './BaseItemValidator';
3
3
  /**
4
4
  * A validator for book items.
@@ -1,4 +1,4 @@
1
- import { IGame } from '../../types/Items/Game';
1
+ import { IGame } from '../../types/items/Game';
2
2
  import { BaseItemValidator } from './BaseItemValidator';
3
3
  /**
4
4
  * A validator for game items.
@@ -1,3 +1,3 @@
1
- import { Item } from '../../types/Items/Item';
1
+ import { Item } from '../../types/items/Item';
2
2
  import { ValidatorRegistry } from '../ValidatorRegistry';
3
3
  export declare const ItemValidatorRegistry: ValidatorRegistry<Item>;
@@ -1,4 +1,4 @@
1
- import { IMovie } from '../../types/Items/Movie';
1
+ import { IMovie } from '../../types/items/Movie';
2
2
  import { BaseItemValidator } from './BaseItemValidator';
3
3
  /**
4
4
  * A validator for movie items.
@@ -1,4 +1,4 @@
1
- import { ISeries } from '../../types/Items/Series';
1
+ import { ISeries } from '../../types/items/Series';
2
2
  import { BaseItemValidator } from './BaseItemValidator';
3
3
  /**
4
4
  * A validator for series items.
@@ -1,4 +1,4 @@
1
- import { ILeaderboardItem } from '../../types/Rating/LeaderboardItem';
1
+ import { ILeaderboardItem } from '../../types/ratings/LeaderboardItem';
2
2
  import { BaseValidator } from '../BaseValidator';
3
3
  /**
4
4
  * A validator for item leaderboardItems.
@@ -1,4 +1,4 @@
1
- import { ILeaderboardSnapshot } from '../../types/Rating/LeaderboardSnapshot';
1
+ import { ILeaderboardSnapshot } from '../../types/ratings/LeaderboardSnapshot';
2
2
  import { BaseValidator } from '../BaseValidator';
3
3
  /**
4
4
  * A validator for item leaderboardSnapshots.
@@ -1,4 +1,4 @@
1
- import { IRating } from '../../types/Rating/Rating';
1
+ import { IRating } from '../../types/ratings/Rating';
2
2
  import { BaseValidator } from '../BaseValidator';
3
3
  /**
4
4
  * A validator for item ratings.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opinio-dev/models",
3
- "version": "1.1.1-item-types.1",
3
+ "version": "1.1.1-item-types.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes