@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.
Files changed (69) hide show
  1. package/declarations/graph/-private/-diff.d.ts +8 -8
  2. package/declarations/graph/-private/-edge-definition.d.ts +2 -2
  3. package/declarations/graph/-private/-state.d.ts +2 -2
  4. package/declarations/graph/-private/-utils.d.ts +5 -5
  5. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +3 -3
  6. package/declarations/graph/-private/edges/collection.d.ts +10 -10
  7. package/declarations/graph/-private/edges/implicit.d.ts +5 -5
  8. package/declarations/graph/-private/edges/resource.d.ts +5 -5
  9. package/declarations/graph/-private/graph.d.ts +15 -15
  10. package/declarations/graph/-private/operations/replace-related-records.d.ts +4 -4
  11. package/declarations/graph/-private/operations/update-relationship.d.ts +3 -3
  12. package/declarations/index.d.ts +1 -1
  13. package/declarations/reactive/-private/default-mode.d.ts +2 -2
  14. package/declarations/reactive/-private/document.d.ts +6 -16
  15. package/declarations/reactive/-private/fields/managed-array.d.ts +2 -2
  16. package/declarations/reactive/-private/fields/many-array-manager.d.ts +2 -2
  17. package/declarations/reactive/-private/hooks.d.ts +2 -2
  18. package/declarations/reactive/-private/record.d.ts +44 -5
  19. package/declarations/reactive/-private/schema.d.ts +12 -12
  20. package/declarations/reactive/-private/symbols.d.ts +1 -0
  21. package/declarations/reactive.d.ts +277 -1
  22. package/declarations/request/-private/context.d.ts +2 -2
  23. package/declarations/request/-private/manager.d.ts +2 -2
  24. package/declarations/request/-private/types.d.ts +4 -4
  25. package/declarations/store/-private/cache-handler/types.d.ts +9 -9
  26. package/declarations/store/-private/cache-handler/utils.d.ts +4 -4
  27. package/declarations/store/-private/caches/instance-cache.d.ts +18 -18
  28. package/declarations/store/-private/default-cache-policy.d.ts +25 -38
  29. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +13 -11
  30. package/declarations/store/-private/{caches/identifier-cache.d.ts → managers/cache-key-manager.d.ts} +21 -19
  31. package/declarations/store/-private/managers/cache-manager.d.ts +46 -94
  32. package/declarations/store/-private/managers/notification-manager.d.ts +21 -22
  33. package/declarations/store/-private/managers/record-array-manager.d.ts +15 -15
  34. package/declarations/store/-private/network/request-cache.d.ts +11 -11
  35. package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
  36. package/declarations/store/-private/new-core-tmp/request-state.d.ts +1 -1
  37. package/declarations/store/-private/record-arrays/-utils.d.ts +3 -3
  38. package/declarations/store/-private/record-arrays/legacy-live-array.d.ts +2 -2
  39. package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +2 -2
  40. package/declarations/store/-private/record-arrays/resource-array.d.ts +9 -9
  41. package/declarations/store/-private/store-service.d.ts +19 -16
  42. package/declarations/store/-private.d.ts +1 -1
  43. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +15 -24
  44. package/declarations/store/-types/q/identifier.d.ts +9 -6
  45. package/declarations/store/-types/q/schema-service.d.ts +9 -9
  46. package/declarations/store/deprecated/-private.d.ts +5 -5
  47. package/declarations/types/-private.d.ts +1 -1
  48. package/declarations/types/cache/aliases.d.ts +2 -2
  49. package/declarations/types/cache/change.d.ts +2 -2
  50. package/declarations/types/cache/mutations.d.ts +13 -13
  51. package/declarations/types/cache/operations.d.ts +20 -20
  52. package/declarations/types/cache/relationship.d.ts +4 -4
  53. package/declarations/types/cache.d.ts +51 -113
  54. package/declarations/types/graph.d.ts +12 -12
  55. package/declarations/types/identifier.d.ts +60 -76
  56. package/declarations/types/request.d.ts +6 -6
  57. package/declarations/types/schema/concepts.d.ts +2 -2
  58. package/declarations/types/spec/document.d.ts +6 -6
  59. package/dist/graph/-private.js +125 -125
  60. package/dist/index.js +2 -2
  61. package/dist/reactive/-private.js +1 -1
  62. package/dist/reactive.js +126 -4
  63. package/dist/{request-state-CCrTjb0Z.js → request-state-CQ0Q6d1V.js} +3493 -3483
  64. package/dist/store/-private.js +1 -1
  65. package/dist/store.js +30 -43
  66. package/dist/{symbols-C5p2hcy9.js → symbols-sql1_mdx.js} +2 -1
  67. package/dist/types/-private.js +1 -1
  68. package/dist/types/identifier.js +19 -45
  69. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import type { StableRecordIdentifier } from "./identifier.js";
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: StableRecordIdentifier<TypeFromInstanceOrString<T>>;
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: [StableRecordIdentifier];
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: StableRecordIdentifier<TypeFromInstanceOrString<T>>;
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: StableRecordIdentifier<TypeFromInstanceOrString<T>>;
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?: StableRecordIdentifier[];
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 { StableRecordIdentifier } from "../identifier.js";
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: StableRecordIdentifier): T;
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 { StableExistingRecordIdentifier } from "../identifier.js";
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 = StableExistingRecordIdentifier,
12
- R = StableExistingRecordIdentifier
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 = StableExistingRecordIdentifier> {
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 = StableExistingRecordIdentifier> = SingleResourceDataDocument<T> | CollectionResourceDataDocument<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 = StableExistingRecordIdentifier> = ResourceMetaDocument | SingleResourceDataDocument<T> | CollectionResourceDataDocument<T> | ResourceErrorDocument;
37
+ export type ResourceDocument<T = PersistedResourceKey> = ResourceMetaDocument | SingleResourceDataDocument<T> | CollectionResourceDataDocument<T> | ResourceErrorDocument;