@ember-data/store 5.4.0-alpha.32 → 5.4.0-alpha.34

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 (45) hide show
  1. package/addon/-private.js +1 -1
  2. package/addon/{cache-handler-oB00-31L.js → cache-handler-k7I5KvcC.js} +11 -1
  3. package/addon/cache-handler-k7I5KvcC.js.map +1 -0
  4. package/addon/index.js +1 -1
  5. package/package.json +9 -9
  6. package/unstable-preview-types/-private/cache-handler.d.ts +99 -97
  7. package/unstable-preview-types/-private/caches/cache-utils.d.ts +10 -8
  8. package/unstable-preview-types/-private/caches/identifier-cache.d.ts +179 -177
  9. package/unstable-preview-types/-private/caches/instance-cache.d.ts +61 -59
  10. package/unstable-preview-types/-private/caches/resource-utils.d.ts +11 -9
  11. package/unstable-preview-types/-private/document.d.ts +144 -142
  12. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +176 -174
  13. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +17 -15
  14. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +27 -25
  15. package/unstable-preview-types/-private/managers/cache-manager.d.ts +440 -438
  16. package/unstable-preview-types/-private/managers/notification-manager.d.ts +96 -94
  17. package/unstable-preview-types/-private/managers/record-array-manager.d.ts +95 -93
  18. package/unstable-preview-types/-private/network/request-cache.d.ts +107 -105
  19. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +128 -130
  20. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
  21. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
  22. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  23. package/unstable-preview-types/-private/store-service.d.ts +1501 -1499
  24. package/unstable-preview-types/-private/utils/coerce-id.d.ts +9 -7
  25. package/unstable-preview-types/-private/utils/construct-resource.d.ts +9 -7
  26. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +6 -4
  27. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +3 -1
  28. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +3 -1
  29. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +3 -1
  30. package/unstable-preview-types/-private.d.ts +18 -1
  31. package/unstable-preview-types/-private.d.ts.map +1 -1
  32. package/unstable-preview-types/-types/overview.d.ts +20 -18
  33. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts +105 -103
  34. package/unstable-preview-types/-types/q/cache.d.ts +45 -43
  35. package/unstable-preview-types/-types/q/ds-model.d.ts +13 -11
  36. package/unstable-preview-types/-types/q/identifier.d.ts +167 -165
  37. package/unstable-preview-types/-types/q/promise-proxies.d.ts +3 -1
  38. package/unstable-preview-types/-types/q/record-data-json-api.d.ts +34 -32
  39. package/unstable-preview-types/-types/q/record-instance.d.ts +28 -26
  40. package/unstable-preview-types/-types/q/schema-service.d.ts +212 -210
  41. package/unstable-preview-types/-types/q/store.d.ts +15 -13
  42. package/unstable-preview-types/index.d.ts +219 -184
  43. package/addon/cache-handler-oB00-31L.js.map +0 -1
  44. package/unstable-preview-types/-private/index.d.ts +0 -16
  45. package/unstable-preview-types/-private/index.d.ts.map +0 -1
@@ -1,135 +1,133 @@
1
- import type { Signal } from '@ember-data/tracking/-private';
2
- import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
3
- import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
4
- import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
5
- import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/raw';
6
- import type RecordArrayManager from '../managers/record-array-manager';
7
- import type Store from '../store-service';
8
- export declare const ARRAY_SIGNAL: unique symbol;
9
- export declare const SOURCE: unique symbol;
10
- export declare const MUTATE: unique symbol;
11
- export declare const NOTIFY: unique symbol;
12
- declare const IS_COLLECTION: unique symbol;
13
- export declare function notifyArray(arr: IdentifierArray): void;
14
- declare global {
15
- interface ProxyConstructor {
16
- new <TSource extends object, TTarget extends object>(target: TSource, handler: ProxyHandler<TSource>): TTarget;
17
- }
18
- }
19
- export type IdentifierArrayCreateOptions<T = unknown> = {
20
- identifiers: StableRecordIdentifier[];
21
- type?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
22
- store: Store;
23
- allowMutation: boolean;
24
- manager: RecordArrayManager;
25
- links?: Links | PaginationLinks | null;
26
- meta?: Record<string, unknown> | null;
27
- };
28
- /**
29
- A record array is an array that contains records of a certain type (or modelName).
30
- The record array materializes records as needed when they are retrieved for the first
31
- time. You should not create record arrays yourself. Instead, an instance of
32
- `RecordArray` or its subclasses will be returned by your application's store
33
- in response to queries.
34
-
35
- This class should not be imported and instantiated by consuming applications.
36
-
37
- @class RecordArray
38
- @public
39
- */
40
- interface IdentifierArray<T = unknown> extends Omit<Array<T>, '[]'> {
41
- [MUTATE]?(target: StableRecordIdentifier[], receiver: typeof Proxy<StableRecordIdentifier[], T[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
42
- }
43
- declare class IdentifierArray<T = unknown> {
44
- DEPRECATED_CLASS_NAME: string;
45
- /**
46
- The flag to signal a `RecordArray` is currently loading data.
47
- Example
48
- ```javascript
49
- let people = store.peekAll('person');
50
- people.isUpdating; // false
51
- people.update();
52
- people.isUpdating; // true
53
- ```
54
- @property isUpdating
55
- @public
56
- @type Boolean
57
- */
58
- isUpdating: boolean;
59
- isLoaded: boolean;
60
- isDestroying: boolean;
61
- isDestroyed: boolean;
62
- _updatingPromise: Promise<IdentifierArray<T>> | null;
63
- [IS_COLLECTION]: boolean;
64
- [ARRAY_SIGNAL]: Signal;
65
- [SOURCE]: StableRecordIdentifier[];
66
- [NOTIFY](): void;
67
- links: Links | PaginationLinks | null;
68
- meta: Record<string, unknown> | null;
69
- modelName?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
70
- /**
71
- The store that created this record array.
72
-
73
- @property store
74
- @private
75
- @type Store
76
- */
77
- store: Store;
78
- _manager: RecordArrayManager;
79
- destroy(clear: boolean): void;
80
- get length(): number;
81
- set length(value: number);
82
- constructor(options: IdentifierArrayCreateOptions<T>);
83
- /**
84
- Used to get the latest version of all of the records in this array
85
- from the adapter.
1
+ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
2
+ import type { Signal } from '@ember-data/tracking/-private';
3
+ import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
4
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
5
+ import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
6
+ import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/raw';
7
+ import type RecordArrayManager from '@ember-data/store/-private/managers/record-array-manager';
8
+ import type Store from '@ember-data/store/-private/store-service';
9
+ import { NativeProxy } from '@ember-data/store/-private/record-arrays/native-proxy-type-fix';
10
+ export declare const ARRAY_SIGNAL: unique symbol;
11
+ export declare const SOURCE: unique symbol;
12
+ export declare const MUTATE: unique symbol;
13
+ export declare const NOTIFY: unique symbol;
14
+ declare const IS_COLLECTION: unique symbol;
15
+ export declare function notifyArray(arr: IdentifierArray): void;
16
+ export type IdentifierArrayCreateOptions<T = unknown> = {
17
+ identifiers: StableRecordIdentifier[];
18
+ type?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
19
+ store: Store;
20
+ allowMutation: boolean;
21
+ manager: RecordArrayManager;
22
+ links?: Links | PaginationLinks | null;
23
+ meta?: Record<string, unknown> | null;
24
+ };
25
+ /**
26
+ A record array is an array that contains records of a certain type (or modelName).
27
+ The record array materializes records as needed when they are retrieved for the first
28
+ time. You should not create record arrays yourself. Instead, an instance of
29
+ `RecordArray` or its subclasses will be returned by your application's store
30
+ in response to queries.
86
31
 
87
- Example
32
+ This class should not be imported and instantiated by consuming applications.
88
33
 
89
- ```javascript
90
- let people = store.peekAll('person');
91
- people.isUpdating; // false
92
-
93
- people.update().then(function() {
34
+ @class RecordArray
35
+ @public
36
+ */
37
+ interface IdentifierArray<T = unknown> extends Omit<Array<T>, '[]'> {
38
+ [MUTATE]?(target: StableRecordIdentifier[], receiver: typeof NativeProxy<StableRecordIdentifier[], T[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
39
+ }
40
+ declare class IdentifierArray<T = unknown> {
41
+ DEPRECATED_CLASS_NAME: string;
42
+ /**
43
+ The flag to signal a `RecordArray` is currently loading data.
44
+ Example
45
+ ```javascript
46
+ let people = store.peekAll('person');
94
47
  people.isUpdating; // false
95
- });
96
-
97
- people.isUpdating; // true
98
- ```
99
-
100
- @method update
101
- @public
102
- */
103
- update(): Promise<IdentifierArray<T>>;
104
- _update(): Promise<IdentifierArray<T>>;
105
- /**
106
- Saves all of the records in the `RecordArray`.
107
-
108
- Example
109
-
110
- ```javascript
111
- let messages = store.peekAll('message');
112
- messages.forEach(function(message) {
113
- message.hasBeenSeen = true;
114
- });
115
- messages.save();
116
- ```
117
-
118
- @method save
119
- @public
120
- @return {Promise<IdentifierArray>} promise
121
- */
122
- save(): Promise<IdentifierArray>;
123
- }
124
- export default IdentifierArray;
125
- export type CollectionCreateOptions = IdentifierArrayCreateOptions & {
126
- query: ImmutableRequestInfo | Record<string, unknown> | null;
127
- isLoaded: boolean;
128
- };
129
- export declare class Collection<T = unknown> extends IdentifierArray<T> {
130
- query: ImmutableRequestInfo | Record<string, unknown> | null;
131
- constructor(options: CollectionCreateOptions);
132
- _update(): Promise<Collection<T>>;
133
- destroy(clear: boolean): void;
48
+ people.update();
49
+ people.isUpdating; // true
50
+ ```
51
+ @property isUpdating
52
+ @public
53
+ @type Boolean
54
+ */
55
+ isUpdating: boolean;
56
+ isLoaded: boolean;
57
+ isDestroying: boolean;
58
+ isDestroyed: boolean;
59
+ _updatingPromise: Promise<IdentifierArray<T>> | null;
60
+ [IS_COLLECTION]: boolean;
61
+ [ARRAY_SIGNAL]: Signal;
62
+ [SOURCE]: StableRecordIdentifier[];
63
+ [NOTIFY](): void;
64
+ links: Links | PaginationLinks | null;
65
+ meta: Record<string, unknown> | null;
66
+ modelName?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
67
+ /**
68
+ The store that created this record array.
69
+
70
+ @property store
71
+ @private
72
+ @type Store
73
+ */
74
+ store: Store;
75
+ _manager: RecordArrayManager;
76
+ destroy(clear: boolean): void;
77
+ get length(): number;
78
+ set length(value: number);
79
+ constructor(options: IdentifierArrayCreateOptions<T>);
80
+ /**
81
+ Used to get the latest version of all of the records in this array
82
+ from the adapter.
83
+
84
+ Example
85
+
86
+ ```javascript
87
+ let people = store.peekAll('person');
88
+ people.isUpdating; // false
89
+
90
+ people.update().then(function() {
91
+ people.isUpdating; // false
92
+ });
93
+
94
+ people.isUpdating; // true
95
+ ```
96
+
97
+ @method update
98
+ @public
99
+ */
100
+ update(): Promise<IdentifierArray<T>>;
101
+ _update(): Promise<IdentifierArray<T>>;
102
+ /**
103
+ Saves all of the records in the `RecordArray`.
104
+
105
+ Example
106
+
107
+ ```javascript
108
+ let messages = store.peekAll('message');
109
+ messages.forEach(function(message) {
110
+ message.hasBeenSeen = true;
111
+ });
112
+ messages.save();
113
+ ```
114
+
115
+ @method save
116
+ @public
117
+ @return {Promise<IdentifierArray>} promise
118
+ */
119
+ save(): Promise<IdentifierArray>;
120
+ }
121
+ export default IdentifierArray;
122
+ export type CollectionCreateOptions = IdentifierArrayCreateOptions & {
123
+ query: ImmutableRequestInfo | Record<string, unknown> | null;
124
+ isLoaded: boolean;
125
+ };
126
+ export declare class Collection<T = unknown> extends IdentifierArray<T> {
127
+ query: ImmutableRequestInfo | Record<string, unknown> | null;
128
+ constructor(options: CollectionCreateOptions);
129
+ _update(): Promise<Collection<T>>;
130
+ destroy(clear: boolean): void;
131
+ }
134
132
  }
135
133
  //# sourceMappingURL=identifier-array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-array.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/identifier-array.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAQ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AAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC7D,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAQ;gBAExD,OAAO,EAAE,uBAAuB;IAM5C,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAejC,OAAO,CAAC,KAAK,EAAE,OAAO;CAKvB"}
@@ -0,0 +1,118 @@
1
+ declare module '@ember-data/store/-private/record-arrays/native-proxy-type-fix' {
2
+ interface ProxyHandler<T extends object> {
3
+ /**
4
+ * A trap method for a function call.
5
+ * @param target The original callable object which is being proxied.
6
+ * @internal
7
+ */
8
+ apply?(target: T, thisArg: any, argArray: any[]): any;
9
+ /**
10
+ * A trap for the `new` operator.
11
+ * @param target The original object which is being proxied.
12
+ * @param newTarget The constructor that was originally called.
13
+ * @internal
14
+ */
15
+ construct?(target: T, argArray: any[], newTarget: Function): object;
16
+ /**
17
+ * A trap for `Object.defineProperty()`.
18
+ * @param target The original object which is being proxied.
19
+ * @returns A `Boolean` indicating whether or not the property has been defined.
20
+ * @internal
21
+ */
22
+ defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean;
23
+ /**
24
+ * A trap for the `delete` operator.
25
+ * @param target The original object which is being proxied.
26
+ * @param p The name or `Symbol` of the property to delete.
27
+ * @returns A `Boolean` indicating whether or not the property was deleted.
28
+ * @internal
29
+ */
30
+ deleteProperty?(target: T, p: string | symbol): boolean;
31
+ /**
32
+ * A trap for getting a property value.
33
+ * @param target The original object which is being proxied.
34
+ * @param p The name or `Symbol` of the property to get.
35
+ * @param receiver The proxy or an object that inherits from the proxy.
36
+ * @internal
37
+ */
38
+ get?(target: T, p: string | symbol, receiver: any): any;
39
+ /**
40
+ * A trap for `Object.getOwnPropertyDescriptor()`.
41
+ * @param target The original object which is being proxied.
42
+ * @param p The name of the property whose description should be retrieved.
43
+ * @internal
44
+ */
45
+ getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
46
+ /**
47
+ * A trap for the `[[GetPrototypeOf]]` internal method.
48
+ * @param target The original object which is being proxied.
49
+ * @internal
50
+ */
51
+ getPrototypeOf?(target: T): object | null;
52
+ /**
53
+ * A trap for the `in` operator.
54
+ * @param target The original object which is being proxied.
55
+ * @param p The name or `Symbol` of the property to check for existence.
56
+ * @internal
57
+ */
58
+ has?(target: T, p: string | symbol): boolean;
59
+ /**
60
+ * A trap for `Object.isExtensible()`.
61
+ * @param target The original object which is being proxied.
62
+ * @internal
63
+ */
64
+ isExtensible?(target: T): boolean;
65
+ /**
66
+ * A trap for `Reflect.ownKeys()`.
67
+ * @param target The original object which is being proxied.
68
+ * @internal
69
+ */
70
+ ownKeys?(target: T): ArrayLike<string | symbol>;
71
+ /**
72
+ * A trap for `Object.preventExtensions()`.
73
+ * @param target The original object which is being proxied.
74
+ * @internal
75
+ */
76
+ preventExtensions?(target: T): boolean;
77
+ /**
78
+ * A trap for setting a property value.
79
+ * @param target The original object which is being proxied.
80
+ * @param p The name or `Symbol` of the property to set.
81
+ * @param receiver The object to which the assignment was originally directed.
82
+ * @returns A `Boolean` indicating whether or not the property was set.
83
+ * @internal
84
+ */
85
+ set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
86
+ /**
87
+ * A trap for `Object.setPrototypeOf()`.
88
+ * @param target The original object which is being proxied.
89
+ * @param newPrototype The object's new prototype or `null`.
90
+ * @internal
91
+ */
92
+ setPrototypeOf?(target: T, v: object | null): boolean;
93
+ }
94
+ interface ProxyConstructor {
95
+ /**
96
+ * Creates a revocable Proxy object.
97
+ * @param target A target object to wrap with Proxy.
98
+ * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
99
+ * @internal
100
+ */
101
+ revocable<T extends object>(target: T, handler: ProxyHandler<T>): {
102
+ proxy: T;
103
+ revoke: () => void;
104
+ };
105
+ /**
106
+ * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the
107
+ * original object, but which may redefine fundamental Object operations like getting, setting, and defining
108
+ * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs.
109
+ * @param target A target object to wrap with Proxy.
110
+ * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
111
+ * @internal
112
+ */
113
+ new <TSource extends object, TTarget extends object>(target: TSource, handler: ProxyHandler<TSource>): TTarget;
114
+ }
115
+ export declare const NativeProxy: ProxyConstructor;
116
+ export {};
117
+ }
118
+ //# sourceMappingURL=native-proxy-type-fix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-proxy-type-fix.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/native-proxy-type-fix.ts"],"names":[],"mappings":"AAOA,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM;IACrC;;;;OAIG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAEtD;;;;;OAKG;IAEH,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM,CAAC;IAEpE;;;;;OAKG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAE/F;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAExD;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,GAAG,CAAC;IAExD;;;;;OAKG;IACH,wBAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,k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