@warp-drive/core 5.7.0-alpha.14 → 5.7.0-alpha.16
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/declarations/graph/-private/-diff.d.ts +8 -8
- package/declarations/graph/-private/-edge-definition.d.ts +2 -2
- package/declarations/graph/-private/-state.d.ts +2 -2
- package/declarations/graph/-private/-utils.d.ts +5 -5
- package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +3 -3
- package/declarations/graph/-private/edges/collection.d.ts +10 -10
- package/declarations/graph/-private/edges/implicit.d.ts +5 -5
- package/declarations/graph/-private/edges/resource.d.ts +5 -5
- package/declarations/graph/-private/graph.d.ts +15 -15
- package/declarations/graph/-private/operations/replace-related-records.d.ts +4 -4
- package/declarations/graph/-private/operations/update-relationship.d.ts +3 -3
- package/declarations/index.d.ts +1 -1
- package/declarations/reactive/-private/default-mode.d.ts +2 -2
- package/declarations/reactive/-private/document.d.ts +6 -16
- package/declarations/reactive/-private/fields/managed-array.d.ts +2 -2
- package/declarations/reactive/-private/fields/many-array-manager.d.ts +2 -2
- package/declarations/reactive/-private/hooks.d.ts +2 -2
- package/declarations/reactive/-private/record.d.ts +44 -5
- package/declarations/reactive/-private/schema.d.ts +12 -12
- package/declarations/reactive/-private/symbols.d.ts +1 -0
- package/declarations/reactive.d.ts +277 -1
- package/declarations/request/-private/context.d.ts +2 -2
- package/declarations/request/-private/manager.d.ts +2 -2
- package/declarations/request/-private/types.d.ts +4 -4
- package/declarations/store/-private/cache-handler/types.d.ts +9 -9
- package/declarations/store/-private/cache-handler/utils.d.ts +4 -4
- package/declarations/store/-private/caches/instance-cache.d.ts +18 -18
- package/declarations/store/-private/default-cache-policy.d.ts +25 -38
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +13 -11
- package/declarations/store/-private/{caches/identifier-cache.d.ts → managers/cache-key-manager.d.ts} +21 -19
- package/declarations/store/-private/managers/cache-manager.d.ts +46 -94
- package/declarations/store/-private/managers/notification-manager.d.ts +21 -22
- package/declarations/store/-private/managers/record-array-manager.d.ts +15 -15
- package/declarations/store/-private/network/request-cache.d.ts +11 -11
- package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
- package/declarations/store/-private/new-core-tmp/request-state.d.ts +1 -1
- package/declarations/store/-private/record-arrays/-utils.d.ts +3 -3
- package/declarations/store/-private/record-arrays/legacy-live-array.d.ts +2 -2
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +2 -2
- package/declarations/store/-private/record-arrays/resource-array.d.ts +9 -9
- package/declarations/store/-private/store-service.d.ts +19 -16
- package/declarations/store/-private.d.ts +1 -1
- package/declarations/store/-types/q/cache-capabilities-manager.d.ts +15 -24
- package/declarations/store/-types/q/identifier.d.ts +9 -6
- package/declarations/store/-types/q/schema-service.d.ts +9 -9
- package/declarations/store/deprecated/-private.d.ts +5 -5
- package/declarations/types/-private.d.ts +1 -1
- package/declarations/types/cache/aliases.d.ts +2 -2
- package/declarations/types/cache/change.d.ts +2 -2
- package/declarations/types/cache/mutations.d.ts +13 -13
- package/declarations/types/cache/operations.d.ts +20 -20
- package/declarations/types/cache/relationship.d.ts +4 -4
- package/declarations/types/cache.d.ts +51 -113
- package/declarations/types/graph.d.ts +12 -12
- package/declarations/types/identifier.d.ts +60 -76
- package/declarations/types/request.d.ts +6 -6
- package/declarations/types/schema/concepts.d.ts +2 -2
- package/declarations/types/spec/document.d.ts +6 -6
- package/dist/graph/-private.js +125 -125
- package/dist/index.js +2 -2
- package/dist/reactive/-private.js +1 -1
- package/dist/reactive.js +126 -4
- package/dist/{request-state-CCrTjb0Z.js → request-state-CQ0Q6d1V.js} +3493 -3483
- package/dist/store/-private.js +1 -1
- package/dist/store.js +30 -43
- package/dist/{symbols-C5p2hcy9.js → symbols-sql1_mdx.js} +2 -1
- package/dist/types/-private.js +1 -1
- package/dist/types/identifier.js +19 -45
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResourceKey } from "./identifier.js";
|
|
2
2
|
import type { QueryParamsSerializationOptions } from "./params.js";
|
|
3
3
|
import type { ExtractSuggestedCacheTypes, TypedRecordInstance, TypeFromInstanceOrString } from "./record.js";
|
|
4
4
|
import type { ResourceIdentifierObject } from "./spec/json-api-raw.js";
|
|
@@ -105,14 +105,14 @@ export type DeleteRequestOptions<
|
|
|
105
105
|
op: "deleteRecord";
|
|
106
106
|
body?: string | BodyInit | FormData;
|
|
107
107
|
data: {
|
|
108
|
-
record:
|
|
108
|
+
record: ResourceKey<TypeFromInstanceOrString<T>>;
|
|
109
109
|
};
|
|
110
110
|
records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];
|
|
111
111
|
[RequestSignature]?: RT;
|
|
112
112
|
};
|
|
113
113
|
type ImmutableRequest<T> = Readonly<T> & {
|
|
114
114
|
readonly headers: ImmutableHeaders;
|
|
115
|
-
readonly records: [
|
|
115
|
+
readonly records: [ResourceKey];
|
|
116
116
|
};
|
|
117
117
|
export type UpdateRequestOptions<
|
|
118
118
|
RT = unknown,
|
|
@@ -124,7 +124,7 @@ export type UpdateRequestOptions<
|
|
|
124
124
|
op: "updateRecord";
|
|
125
125
|
body?: string | BodyInit | FormData;
|
|
126
126
|
data: {
|
|
127
|
-
record:
|
|
127
|
+
record: ResourceKey<TypeFromInstanceOrString<T>>;
|
|
128
128
|
};
|
|
129
129
|
records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];
|
|
130
130
|
[RequestSignature]?: RT;
|
|
@@ -139,7 +139,7 @@ export type CreateRequestOptions<
|
|
|
139
139
|
op: "createRecord";
|
|
140
140
|
body?: string | BodyInit | FormData;
|
|
141
141
|
data: {
|
|
142
|
-
record:
|
|
142
|
+
record: ResourceKey<TypeFromInstanceOrString<T>>;
|
|
143
143
|
};
|
|
144
144
|
records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];
|
|
145
145
|
[RequestSignature]?: RT;
|
|
@@ -292,7 +292,7 @@ export interface RequestInfo<
|
|
|
292
292
|
* operations on the store.
|
|
293
293
|
*
|
|
294
294
|
*/
|
|
295
|
-
records?:
|
|
295
|
+
records?: ResourceKey[];
|
|
296
296
|
disableTestWaiter?: boolean;
|
|
297
297
|
/**
|
|
298
298
|
* data that a handler should convert into
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResourceKey } from "../identifier.js";
|
|
2
2
|
import type { ObjectValue, Value } from "../json/raw.js";
|
|
3
3
|
import type { OpaqueRecordInstance } from "../record.js";
|
|
4
4
|
import type { Type } from "../symbols.js";
|
|
@@ -8,7 +8,7 @@ export type Transformation<
|
|
|
8
8
|
> = {
|
|
9
9
|
serialize(value: PT, options: ObjectValue | null, record: OpaqueRecordInstance): T;
|
|
10
10
|
hydrate(value: T | undefined, options: ObjectValue | null, record: OpaqueRecordInstance): PT;
|
|
11
|
-
defaultValue?(options: ObjectValue | null, identifier:
|
|
11
|
+
defaultValue?(options: ObjectValue | null, identifier: ResourceKey): T;
|
|
12
12
|
[Type]: string;
|
|
13
13
|
};
|
|
14
14
|
export type Derivation<
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PersistedResourceKey } from "../identifier.js";
|
|
2
2
|
import type { ApiError } from "./error.js";
|
|
3
3
|
import type { Links, Meta, PaginationLinks } from "./json-api-raw.js";
|
|
4
4
|
export interface ResourceMetaDocument {
|
|
@@ -8,8 +8,8 @@ export interface ResourceMetaDocument {
|
|
|
8
8
|
links?: Links | PaginationLinks;
|
|
9
9
|
}
|
|
10
10
|
export interface SingleResourceDataDocument<
|
|
11
|
-
T =
|
|
12
|
-
R =
|
|
11
|
+
T = PersistedResourceKey,
|
|
12
|
+
R = PersistedResourceKey
|
|
13
13
|
> {
|
|
14
14
|
// the url or cache-key associated with the structured document
|
|
15
15
|
lid?: string;
|
|
@@ -18,7 +18,7 @@ export interface SingleResourceDataDocument<
|
|
|
18
18
|
data: T | null;
|
|
19
19
|
included?: R[];
|
|
20
20
|
}
|
|
21
|
-
export interface CollectionResourceDataDocument<T =
|
|
21
|
+
export interface CollectionResourceDataDocument<T = PersistedResourceKey> {
|
|
22
22
|
// the url or cache-key associated with the structured document
|
|
23
23
|
lid?: string;
|
|
24
24
|
links?: Links | PaginationLinks;
|
|
@@ -26,7 +26,7 @@ export interface CollectionResourceDataDocument<T = StableExistingRecordIdentifi
|
|
|
26
26
|
data: T[];
|
|
27
27
|
included?: T[];
|
|
28
28
|
}
|
|
29
|
-
export type ResourceDataDocument<T =
|
|
29
|
+
export type ResourceDataDocument<T = PersistedResourceKey> = SingleResourceDataDocument<T> | CollectionResourceDataDocument<T>;
|
|
30
30
|
export interface ResourceErrorDocument {
|
|
31
31
|
// the url or cache-key associated with the structured document
|
|
32
32
|
lid?: string;
|
|
@@ -34,4 +34,4 @@ export interface ResourceErrorDocument {
|
|
|
34
34
|
meta?: Meta;
|
|
35
35
|
errors: ApiError[];
|
|
36
36
|
}
|
|
37
|
-
export type ResourceDocument<T =
|
|
37
|
+
export type ResourceDocument<T = PersistedResourceKey> = ResourceMetaDocument | SingleResourceDataDocument<T> | CollectionResourceDataDocument<T> | ResourceErrorDocument;
|