@data-client/core 0.14.0 → 0.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/README.md +2 -1
- package/lib/state/reducer/setReducer.d.ts +26 -1
- package/lib/state/reducer/setReducer.d.ts.map +1 -1
- package/lib/state/reducer/setResponseReducer.d.ts +28 -1
- package/lib/state/reducer/setResponseReducer.d.ts.map +1 -1
- package/package.json +2 -2
- package/ts3.4/state/reducer/setReducer.d.ts +26 -1
- package/ts3.4/state/reducer/setResponseReducer.d.ts +28 -1
package/README.md
CHANGED
|
@@ -14,7 +14,8 @@ automatic expiry policies, data normalization. Consumes [TypeScript Standard End
|
|
|
14
14
|
|
|
15
15
|
**[📖Read The Docs](https://dataclient.io/docs)** | [🏁Getting Started](https://dataclient.io/docs/getting-started/installation) |
|
|
16
16
|
[🎮Todo Demo](https://stackblitz.com/github/reactive/data-client/tree/master/examples/todo-app?file=src%2Fpages%2FHome%2FTodoList.tsx) |
|
|
17
|
-
[🎮Github Demo](https://stackblitz.com/github/reactive/data-client/tree/master/examples/github-app?file=src%2Fpages%2FIssueList.tsx)
|
|
17
|
+
[🎮Github Demo](https://stackblitz.com/github/reactive/data-client/tree/master/examples/github-app?file=src%2Fpages%2FIssueList.tsx) |
|
|
18
|
+
[🎮NextJS SSR Demo](https://stackblitz.com/github/reactive/data-client/tree/master/examples/nextjs?file=components%2Ftodo%2FTodoList.tsx)
|
|
18
19
|
|
|
19
20
|
</div>
|
|
20
21
|
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
import Controller from '../../controller/Controller.js';
|
|
2
2
|
import type { State, SetAction } from '../../types.js';
|
|
3
|
-
export declare function setReducer(state: State<unknown>, action: SetAction, controller: Controller): State<unknown
|
|
3
|
+
export declare function setReducer(state: State<unknown>, action: SetAction, controller: Controller): State<unknown> | {
|
|
4
|
+
entities: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
};
|
|
7
|
+
indexes: import("@data-client/normalizr").NormalizedIndex;
|
|
8
|
+
endpoints: {
|
|
9
|
+
readonly [key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
entityMeta: import("packages/normalizr/lib/types.js").EntitiesToMeta<{
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}>;
|
|
14
|
+
meta: {
|
|
15
|
+
readonly [key: string]: {
|
|
16
|
+
readonly date: number;
|
|
17
|
+
readonly expiresAt: number;
|
|
18
|
+
readonly prevExpiresAt?: number;
|
|
19
|
+
readonly error?: import("@data-client/normalizr").ErrorTypes;
|
|
20
|
+
readonly invalidated?: boolean;
|
|
21
|
+
readonly errorPolicy?: "hard" | "soft" | undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
optimistic: (import("../../actions.js").SetResponseAction | import("../../actions.js").OptimisticAction<import("@data-client/normalizr").EndpointInterface<import("@data-client/normalizr").FetchFunction, import("@data-client/normalizr").Schema | undefined, boolean | undefined> & {
|
|
25
|
+
update?: import("../../index.js").EndpointUpdateFunction<import("@data-client/normalizr").EndpointInterface>;
|
|
26
|
+
}>)[];
|
|
27
|
+
lastReset: number;
|
|
28
|
+
};
|
|
4
29
|
//# sourceMappingURL=setReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setReducer.d.ts","sourceRoot":"","sources":["../../../src/state/reducer/setReducer.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEvD,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"setReducer.d.ts","sourceRoot":"","sources":["../../../src/state/reducer/setReducer.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEvD,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAoCvB"}
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import type Controller from '../../controller/Controller.js';
|
|
2
2
|
import type { State, SetResponseAction, OptimisticAction } from '../../types.js';
|
|
3
|
-
export declare function setResponseReducer(state: State<unknown>, action: OptimisticAction | SetResponseAction, controller: Controller): State<unknown
|
|
3
|
+
export declare function setResponseReducer(state: State<unknown>, action: OptimisticAction | SetResponseAction, controller: Controller): State<unknown> | {
|
|
4
|
+
entities: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
};
|
|
7
|
+
indexes: import("@data-client/normalizr").NormalizedIndex;
|
|
8
|
+
endpoints: Record<string, unknown>;
|
|
9
|
+
entityMeta: import("packages/normalizr/lib/types.js").EntitiesToMeta<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}>;
|
|
12
|
+
meta: {
|
|
13
|
+
[x: string]: {
|
|
14
|
+
readonly date: number;
|
|
15
|
+
readonly expiresAt: number;
|
|
16
|
+
readonly prevExpiresAt?: number;
|
|
17
|
+
readonly error?: import("@data-client/normalizr").ErrorTypes;
|
|
18
|
+
readonly invalidated?: boolean;
|
|
19
|
+
readonly errorPolicy?: "hard" | "soft" | undefined;
|
|
20
|
+
} | {
|
|
21
|
+
date: number;
|
|
22
|
+
expiresAt: number;
|
|
23
|
+
prevExpiresAt: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
optimistic: (SetResponseAction | OptimisticAction<import("@data-client/normalizr").EndpointInterface<import("@data-client/normalizr").FetchFunction, import("@data-client/normalizr").Schema | undefined, boolean | undefined> & {
|
|
27
|
+
update?: import("../../index.js").EndpointUpdateFunction<import("@data-client/normalizr").EndpointInterface>;
|
|
28
|
+
}>)[];
|
|
29
|
+
lastReset: number;
|
|
30
|
+
};
|
|
4
31
|
//# sourceMappingURL=setResponseReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/state/reducer/setResponseReducer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,EAC5C,UAAU,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"setResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/state/reducer/setResponseReducer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,EAC5C,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-client/core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "High performance mutable data framework.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@babel/runtime": "^7.17.0",
|
|
124
|
-
"@data-client/normalizr": "^0.14.
|
|
124
|
+
"@data-client/normalizr": "^0.14.1",
|
|
125
125
|
"flux-standard-action": "^2.1.1"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
import Controller from '../../controller/Controller.js';
|
|
2
2
|
import { State, SetAction } from '../../types.js';
|
|
3
|
-
export declare function setReducer(state: State<unknown>, action: SetAction, controller: Controller): State<unknown
|
|
3
|
+
export declare function setReducer(state: State<unknown>, action: SetAction, controller: Controller): State<unknown> | {
|
|
4
|
+
entities: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
};
|
|
7
|
+
indexes: import("@data-client/normalizr").NormalizedIndex;
|
|
8
|
+
endpoints: {
|
|
9
|
+
readonly [key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
entityMeta: import("packages/normalizr/lib/types.js").EntitiesToMeta<{
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}>;
|
|
14
|
+
meta: {
|
|
15
|
+
readonly [key: string]: {
|
|
16
|
+
readonly date: number;
|
|
17
|
+
readonly expiresAt: number;
|
|
18
|
+
readonly prevExpiresAt?: number;
|
|
19
|
+
readonly error?: import("@data-client/normalizr").ErrorTypes;
|
|
20
|
+
readonly invalidated?: boolean;
|
|
21
|
+
readonly errorPolicy?: "hard" | "soft" | undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
optimistic: (import("../../actions.js").SetResponseAction | import("../../actions.js").OptimisticAction<import("@data-client/normalizr").EndpointInterface<import("@data-client/normalizr").FetchFunction, import("@data-client/normalizr").Schema | undefined, boolean | undefined> & {
|
|
25
|
+
update?: import("../../index.js").EndpointUpdateFunction<import("@data-client/normalizr").EndpointInterface>;
|
|
26
|
+
}>)[];
|
|
27
|
+
lastReset: number;
|
|
28
|
+
};
|
|
4
29
|
//# sourceMappingURL=setReducer.d.ts.map
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import Controller from '../../controller/Controller.js';
|
|
2
2
|
import { State, SetResponseAction, OptimisticAction } from '../../types.js';
|
|
3
|
-
export declare function setResponseReducer(state: State<unknown>, action: OptimisticAction | SetResponseAction, controller: Controller): State<unknown
|
|
3
|
+
export declare function setResponseReducer(state: State<unknown>, action: OptimisticAction | SetResponseAction, controller: Controller): State<unknown> | {
|
|
4
|
+
entities: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
};
|
|
7
|
+
indexes: import("@data-client/normalizr").NormalizedIndex;
|
|
8
|
+
endpoints: Record<string, unknown>;
|
|
9
|
+
entityMeta: import("packages/normalizr/lib/types.js").EntitiesToMeta<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}>;
|
|
12
|
+
meta: {
|
|
13
|
+
[x: string]: {
|
|
14
|
+
readonly date: number;
|
|
15
|
+
readonly expiresAt: number;
|
|
16
|
+
readonly prevExpiresAt?: number;
|
|
17
|
+
readonly error?: import("@data-client/normalizr").ErrorTypes;
|
|
18
|
+
readonly invalidated?: boolean;
|
|
19
|
+
readonly errorPolicy?: "hard" | "soft" | undefined;
|
|
20
|
+
} | {
|
|
21
|
+
date: number;
|
|
22
|
+
expiresAt: number;
|
|
23
|
+
prevExpiresAt: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
optimistic: (SetResponseAction | OptimisticAction<import("@data-client/normalizr").EndpointInterface<import("@data-client/normalizr").FetchFunction, import("@data-client/normalizr").Schema | undefined, boolean | undefined> & {
|
|
27
|
+
update?: import("../../index.js").EndpointUpdateFunction<import("@data-client/normalizr").EndpointInterface>;
|
|
28
|
+
}>)[];
|
|
29
|
+
lastReset: number;
|
|
30
|
+
};
|
|
4
31
|
//# sourceMappingURL=setResponseReducer.d.ts.map
|