@fjell/lib-sequelize 4.4.1 → 4.4.2

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 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,4 +2,5 @@ import { ItemProperties } from '@fjell/core';
2
2
  export declare const createEvents: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
3
3
  export declare const updateEvents: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
4
4
  export declare const populateEvents: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
5
+ export declare const extractEvents: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
5
6
  export declare const removeEvents: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
@@ -1,3 +1,4 @@
1
1
  import { AllItemTypeArrays, Item, ItemProperties } from '@fjell/core';
2
+ import { Model } from 'sequelize';
2
3
  export declare const removeKey: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: ItemProperties<S, L1, L2, L3, L4, L5>) => ItemProperties<S, L1, L2, L3, L4, L5>;
3
- export declare const addKey: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(item: Partial<Item<S, L1, L2, L3, L4, L5>>, keyTypes: AllItemTypeArrays<S, L1, L2, L3, L4, L5>) => Item<S, L1, L2, L3, L4, L5>;
4
+ export declare const addKey: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(model: Model<any, any>, item: Partial<Item<S, L1, L2, L3, L4, L5>>, keyTypes: AllItemTypeArrays<S, L1, L2, L3, L4, L5>) => Item<S, L1, L2, L3, L4, L5>;
@@ -5,6 +5,7 @@ export type QueryOptions = {
5
5
  limit?: number;
6
6
  offset?: number;
7
7
  order?: Array<[string, string]>;
8
+ include?: Array<any>;
8
9
  };
9
10
  export declare const addCompoundCondition: (options: any, compoundCondition: CompoundCondition, model: ModelStatic<any>) => any;
10
11
  export declare const addCondition: (conditions: Record<string, any>, condition: Condition, model: ModelStatic<any>) => Record<string, any>;
@@ -1,6 +1,6 @@
1
1
  import { ComKey, Item, LocKeyArray, PriKey, TypesProperties } from '@fjell/core';
2
- import { ModelStatic } from 'sequelize';
3
2
  import { Definition } from '../Definition';
3
+ import { ModelStatic } from 'sequelize';
4
4
  import * as Library from "@fjell/lib";
5
5
  export declare const getCreateOperation: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(models: ModelStatic<any>[], definition: Definition<V, S, L1, L2, L3, L4, L5>, registry: Library.Registry) => (item: TypesProperties<V, S, L1, L2, L3, L4, L5>, options?: {
6
6
  key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>;
@@ -0,0 +1,21 @@
1
+ import { ModelStatic } from 'sequelize';
2
+ export interface RelationshipChainResult {
3
+ success: boolean;
4
+ path?: string;
5
+ includes?: any[];
6
+ }
7
+ export interface RelationshipPathResult {
8
+ found: boolean;
9
+ path?: string;
10
+ includes?: any[];
11
+ isDirect?: boolean;
12
+ }
13
+ /**
14
+ * Helper function to build relationship chain includes
15
+ */
16
+ export declare const buildRelationshipChain: (targetModel: ModelStatic<any>, kta: string[], currentIndex: number, targetIndex: number) => RelationshipChainResult;
17
+ /**
18
+ * Helper function to build relationship path for a locator
19
+ * @param includeIsDirect Whether to include the isDirect flag in the result
20
+ */
21
+ export declare const buildRelationshipPath: (targetModel: ModelStatic<any>, locatorType: string, kta: string[], includeIsDirect?: boolean) => RelationshipPathResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjell/lib-sequelize",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Sequelize Library for Fjell",
6
6
  "engines": {
@@ -22,11 +22,11 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@fjell/core": "^4.4.3",
25
- "@fjell/lib": "^4.4.1",
25
+ "@fjell/lib": "^4.4.2",
26
26
  "@fjell/logging": "^4.4.3",
27
27
  "dayjs": "^1.11.13",
28
28
  "deepmerge": "^4.3.1",
29
- "multer": "1.4.5-lts.2",
29
+ "multer": "2.0.1",
30
30
  "sequelize": "^6.37.7",
31
31
  "specifier-resolution-node": "^1.1.4",
32
32
  "winston": "^3.17.0"
@@ -37,15 +37,15 @@
37
37
  "@babel/preset-typescript": "^7.27.1",
38
38
  "@eslint/eslintrc": "^3.3.1",
39
39
  "@eslint/js": "^9.29.0",
40
- "@swc/core": "^1.12.1",
41
- "@tsconfig/recommended": "^1.0.9",
40
+ "@swc/core": "^1.12.5",
41
+ "@tsconfig/recommended": "^1.0.10",
42
42
  "@types/multer": "^1.4.13",
43
- "@types/node": "^20.19.1",
43
+ "@types/node": "^24.0.3",
44
44
  "@typescript-eslint/eslint-plugin": "^8.34.1",
45
45
  "@typescript-eslint/parser": "^8.34.1",
46
46
  "@vitest/coverage-v8": "^3.2.4",
47
47
  "@vitest/ui": "^3.2.4",
48
- "concurrently": "^8.2.2",
48
+ "concurrently": "^9.1.2",
49
49
  "eslint": "^9.29.0",
50
50
  "nodemon": "^3.1.10",
51
51
  "rimraf": "^6.0.1",