@fjell/client-api 4.4.44 → 4.4.45

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,5 +1,5 @@
1
- import { Item, LocKeyArray } from "@fjell/core";
1
+ import { CreateMethod, Item } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (item: Partial<Item<S, L1, L2, L3, L4, L5>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V>;
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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => CreateMethod<V, S, L1, L2, L3, L4, L5>;
@@ -11,6 +11,7 @@ export declare function shouldRetryError(error: any): boolean;
11
11
  export declare function calculateRetryDelay(attempt: number, config: any): number;
12
12
  /**
13
13
  * Enhances error with additional context information
14
+ * Preserves FjellHttpError without modification
14
15
  */
15
16
  export declare function enhanceError(error: any, context: any): any;
16
17
  /**
@@ -1,5 +1,5 @@
1
- import { ComKey, Item, PriKey } from "@fjell/core";
1
+ import { FacetOperationMethod, Item } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getFacetOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>, facet: string, params?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>) => Promise<any>;
5
+ export declare const getFacetOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => FacetOperationMethod<S, L1, L2, L3, L4, L5>;
@@ -1,5 +1,5 @@
1
- import { Item, LocKeyArray } from "@fjell/core";
1
+ import { FindMethod, Item } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getFindOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (finder: string, finderParams?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V[]>;
5
+ export declare const getFindOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => FindMethod<V, S, L1, L2, L3, L4, L5>;
@@ -1,5 +1,5 @@
1
- import { Item, LocKeyArray } from "@fjell/core";
1
+ import { FindOneMethod, Item } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getFindOneOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (finder: string, finderParams?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V>;
5
+ export declare const getFindOneOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => FindOneMethod<V, S, L1, L2, L3, L4, L5>;
package/dist/ops/get.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ComKey, Item, PriKey } from "@fjell/core";
1
+ import { GetMethod, Item } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getGetOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (ik: PriKey<S> | ComKey<S, never, never, never, never, never>) => Promise<V | null>;
5
+ export declare const getGetOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => GetMethod<V, S, L1, L2, L3, L4, L5>;
package/dist/ops/one.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Item, ItemQuery, LocKeyArray } from "@fjell/core";
1
+ import { Item, OneMethod } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getOneOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (query: ItemQuery, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V | null>;
5
+ export declare const getOneOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => OneMethod<V, S, L1, L2, L3, L4, L5>;
@@ -1,5 +1,5 @@
1
- import { ComKey, Item, PriKey } from "@fjell/core";
1
+ import { Item, RemoveMethod } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getRemoveOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (ik: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>) => Promise<boolean>;
5
+ export declare const getRemoveOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => RemoveMethod<V, S, L1, L2, L3, L4, L5>;
@@ -1,5 +1,5 @@
1
- import { ComKey, Item, PriKey } from "@fjell/core";
1
+ import { Item, UpdateMethod } from "@fjell/core";
2
2
  import { HttpApi } from "@fjell/http-api";
3
3
  import { ClientApiOptions } from "../ClientApiOptions";
4
4
  import { Utilities } from "../Utilities";
5
- export declare const getUpdateOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (ik: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>, item: Partial<Item<S, L1, L2, L3, L4, L5>>) => Promise<V>;
5
+ export declare const getUpdateOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => UpdateMethod<V, S, L1, L2, L3, L4, L5>;
@@ -0,0 +1,5 @@
1
+ import { Item, UpsertMethod } from "@fjell/core";
2
+ import { HttpApi } from "@fjell/http-api";
3
+ import { ClientApiOptions } from "../ClientApiOptions";
4
+ import { Utilities } from "../Utilities";
5
+ export declare const getUpsertOperation: <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>(api: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => UpsertMethod<V, S, L1, L2, L3, L4, L5>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fjell/client-api",
3
3
  "description": "Client API for Fjell",
4
- "version": "4.4.44",
4
+ "version": "4.4.45",
5
5
  "keywords": [
6
6
  "client",
7
7
  "api",
@@ -38,10 +38,10 @@
38
38
  "docs:test": "cd docs && npm run test"
39
39
  },
40
40
  "dependencies": {
41
- "@fjell/core": "^4.4.48",
42
- "@fjell/http-api": "^4.4.39",
43
- "@fjell/logging": "^4.4.47",
44
- "@fjell/registry": "^4.4.50",
41
+ "@fjell/core": "^4.4.49",
42
+ "@fjell/http-api": "^4.4.41",
43
+ "@fjell/logging": "^4.4.49",
44
+ "@fjell/registry": "^4.4.51",
45
45
  "deepmerge": "^4.3.1"
46
46
  },
47
47
  "devDependencies": {