@ember-data/legacy-compat 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.
- package/package.json +15 -15
- package/unstable-preview-types/-private.d.ts +16 -14
- package/unstable-preview-types/index.d.ts +153 -140
- package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts +47 -45
- package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts +4 -2
- package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts +4 -2
- package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts +5 -3
- package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts +4 -2
- package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts +547 -545
- package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts +233 -231
- package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts +8 -6
- package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts +86 -84
- package/unstable-preview-types/legacy-network-handler/snapshot.d.ts +246 -244
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/legacy-compat",
|
|
3
3
|
"description": "Compatibility Shims for Older EmberData",
|
|
4
|
-
"version": "5.4.0-alpha.
|
|
4
|
+
"version": "5.4.0-alpha.34",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"version": 1
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ember-data/private-build-infra": "5.4.0-alpha.
|
|
38
|
+
"@ember-data/private-build-infra": "5.4.0-alpha.34",
|
|
39
39
|
"@embroider/macros": "^1.13.5",
|
|
40
40
|
"ember-cli-babel": "^8.2.0",
|
|
41
41
|
"pnpm-sync-dependencies-meta-injected": "0.0.10"
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@ember-data/graph": "5.4.0-alpha.
|
|
77
|
-
"@ember-data/json-api": "5.4.0-alpha.
|
|
78
|
-
"@ember-data/request": "5.4.0-alpha.
|
|
79
|
-
"@ember-data/store": "5.4.0-alpha.
|
|
80
|
-
"@warp-drive/core-types": "0.0.0-alpha.
|
|
76
|
+
"@ember-data/graph": "5.4.0-alpha.34",
|
|
77
|
+
"@ember-data/json-api": "5.4.0-alpha.34",
|
|
78
|
+
"@ember-data/request": "5.4.0-alpha.34",
|
|
79
|
+
"@ember-data/store": "5.4.0-alpha.34",
|
|
80
|
+
"@warp-drive/core-types": "0.0.0-alpha.20"
|
|
81
81
|
},
|
|
82
82
|
"peerDependenciesMeta": {
|
|
83
83
|
"@ember-data/graph": {
|
|
@@ -98,19 +98,19 @@
|
|
|
98
98
|
"@babel/preset-env": "^7.23.9",
|
|
99
99
|
"@babel/preset-typescript": "^7.23.3",
|
|
100
100
|
"@babel/runtime": "^7.23.9",
|
|
101
|
-
"@ember-data/graph": "5.4.0-alpha.
|
|
102
|
-
"@ember-data/json-api": "5.4.0-alpha.
|
|
103
|
-
"@ember-data/request": "5.4.0-alpha.
|
|
104
|
-
"@ember-data/request-utils": "5.4.0-alpha.
|
|
105
|
-
"@ember-data/store": "5.4.0-alpha.
|
|
106
|
-
"@ember-data/tracking": "5.4.0-alpha.
|
|
101
|
+
"@ember-data/graph": "5.4.0-alpha.34",
|
|
102
|
+
"@ember-data/json-api": "5.4.0-alpha.34",
|
|
103
|
+
"@ember-data/request": "5.4.0-alpha.34",
|
|
104
|
+
"@ember-data/request-utils": "5.4.0-alpha.34",
|
|
105
|
+
"@ember-data/store": "5.4.0-alpha.34",
|
|
106
|
+
"@ember-data/tracking": "5.4.0-alpha.34",
|
|
107
107
|
"@ember/string": "^3.1.1",
|
|
108
108
|
"@embroider/addon-dev": "^4.1.2",
|
|
109
109
|
"@glimmer/component": "^1.1.2",
|
|
110
110
|
"@rollup/plugin-babel": "^6.0.4",
|
|
111
111
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
112
|
-
"@warp-drive/core-types": "0.0.0-alpha.
|
|
113
|
-
"@warp-drive/internal-config": "5.4.0-alpha.
|
|
112
|
+
"@warp-drive/core-types": "0.0.0-alpha.20",
|
|
113
|
+
"@warp-drive/internal-config": "5.4.0-alpha.34",
|
|
114
114
|
"ember-inflector": "^4.0.2",
|
|
115
115
|
"ember-source": "~5.6.0",
|
|
116
116
|
"rollup": "^4.9.6",
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export { default as
|
|
14
|
-
export
|
|
1
|
+
declare module '@ember-data/legacy-compat/-private' {
|
|
2
|
+
import type Store from '@ember-data/store';
|
|
3
|
+
import type { CompatStore } from '@ember-data/legacy-compat';
|
|
4
|
+
/**
|
|
5
|
+
* Utilities - often temporary - for maintaining backwards compatibility with
|
|
6
|
+
* older parts of EmberData.
|
|
7
|
+
*
|
|
8
|
+
@module @ember-data/legacy-compat
|
|
9
|
+
@main @ember-data/legacy-compat
|
|
10
|
+
*/
|
|
11
|
+
export { default as SnapshotRecordArray } from '@ember-data/legacy-compat/legacy-network-handler/snapshot-record-array';
|
|
12
|
+
export { SaveOp } from '@ember-data/legacy-compat/legacy-network-handler/fetch-manager';
|
|
13
|
+
export { default as FetchManager } from '@ember-data/legacy-compat/legacy-network-handler/fetch-manager';
|
|
14
|
+
export { default as Snapshot } from '@ember-data/legacy-compat/legacy-network-handler/snapshot';
|
|
15
|
+
export declare function upgradeStore(store: Store): asserts store is CompatStore;
|
|
16
|
+
}
|
|
15
17
|
//# sourceMappingURL=-private.d.ts.map
|
|
@@ -1,141 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
1
|
+
/// <reference path="./-private.d.ts" />
|
|
2
|
+
/// <reference path="./legacy-network-handler/identifier-has-id.d.ts" />
|
|
3
|
+
/// <reference path="./legacy-network-handler/legacy-data-fetch.d.ts" />
|
|
4
|
+
/// <reference path="./legacy-network-handler/snapshot-record-array.d.ts" />
|
|
5
|
+
/// <reference path="./legacy-network-handler/serializer-response.d.ts" />
|
|
6
|
+
/// <reference path="./legacy-network-handler/snapshot.d.ts" />
|
|
7
|
+
/// <reference path="./legacy-network-handler/fetch-manager.d.ts" />
|
|
8
|
+
/// <reference path="./legacy-network-handler/legacy-network-handler.d.ts" />
|
|
9
|
+
/// <reference path="./legacy-network-handler/minimum-serializer-interface.d.ts" />
|
|
10
|
+
/// <reference path="./legacy-network-handler/legacy-data-utils.d.ts" />
|
|
11
|
+
/// <reference path="./legacy-network-handler/minimum-adapter-interface.d.ts" />
|
|
12
|
+
declare module '@ember-data/legacy-compat' {
|
|
13
|
+
import type Store from '@ember-data/store';
|
|
14
|
+
import type { ObjectValue } from '@warp-drive/core-types/json/raw';
|
|
15
|
+
import { FetchManager } from '@ember-data/legacy-compat/-private';
|
|
16
|
+
import type { MinimumAdapterInterface } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface';
|
|
17
|
+
import type { MinimumSerializerInterface, SerializerOptions } from '@ember-data/legacy-compat/legacy-network-handler/minimum-serializer-interface';
|
|
18
|
+
export { LegacyNetworkHandler } from '@ember-data/legacy-compat/legacy-network-handler/legacy-network-handler';
|
|
19
|
+
/**
|
|
20
|
+
* @module @ember-data/store
|
|
21
|
+
* @class Store
|
|
22
|
+
*/
|
|
23
|
+
export type LegacyStoreCompat = {
|
|
24
|
+
_fetchManager: FetchManager;
|
|
25
|
+
adapterFor(this: Store, modelName: string): MinimumAdapterInterface;
|
|
26
|
+
adapterFor(this: Store, modelName: string, _allowMissing: true): MinimumAdapterInterface | undefined;
|
|
27
|
+
serializerFor<K extends string>(modelName: K, _allowMissing?: boolean): MinimumSerializerInterface | null;
|
|
28
|
+
normalize(modelName: string, payload: ObjectValue): ObjectValue;
|
|
29
|
+
pushPayload(modelName: string, payload: ObjectValue): void;
|
|
30
|
+
serializeRecord(record: unknown, options?: SerializerOptions): unknown;
|
|
31
|
+
_adapterCache: Record<string, MinimumAdapterInterface & {
|
|
32
|
+
store: Store;
|
|
33
|
+
}>;
|
|
34
|
+
_serializerCache: Record<string, MinimumSerializerInterface & {
|
|
35
|
+
store: Store;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export type CompatStore = Store & LegacyStoreCompat;
|
|
39
|
+
/**
|
|
40
|
+
Returns an instance of the adapter for a given type. For
|
|
41
|
+
example, `adapterFor('person')` will return an instance of
|
|
42
|
+
the adapter located at `app/adapters/person.js`
|
|
43
|
+
|
|
44
|
+
If no `person` adapter is found, this method will look
|
|
45
|
+
for an `application` adapter (the default adapter for
|
|
46
|
+
your entire application).
|
|
47
|
+
|
|
48
|
+
@method adapterFor
|
|
49
|
+
@public
|
|
50
|
+
@param {String} modelName
|
|
51
|
+
@return Adapter
|
|
52
|
+
*/
|
|
53
|
+
export declare function adapterFor(this: Store, modelName: string): MinimumAdapterInterface;
|
|
54
|
+
export declare function adapterFor(this: Store, modelName: string, _allowMissing: true): MinimumAdapterInterface | undefined;
|
|
55
|
+
/**
|
|
56
|
+
Returns an instance of the serializer for a given type. For
|
|
57
|
+
example, `serializerFor('person')` will return an instance of
|
|
58
|
+
`App.PersonSerializer`.
|
|
59
|
+
|
|
60
|
+
If no `App.PersonSerializer` is found, this method will look
|
|
61
|
+
for an `App.ApplicationSerializer` (the default serializer for
|
|
62
|
+
your entire application).
|
|
63
|
+
|
|
64
|
+
If a serializer cannot be found on the adapter, it will fall back
|
|
65
|
+
to an instance of `JSONSerializer`.
|
|
66
|
+
|
|
67
|
+
@method serializerFor
|
|
68
|
+
@public
|
|
69
|
+
@param {String} modelName the record to serialize
|
|
70
|
+
@return {Serializer}
|
|
71
|
+
*/
|
|
72
|
+
export declare function serializerFor(this: Store, modelName: string): MinimumSerializerInterface | null;
|
|
73
|
+
/**
|
|
74
|
+
`normalize` converts a json payload into the normalized form that
|
|
75
|
+
[push](../methods/push?anchor=push) expects.
|
|
76
|
+
|
|
77
|
+
Example
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
socket.on('message', function(message) {
|
|
81
|
+
let modelName = message.model;
|
|
82
|
+
let data = message.data;
|
|
83
|
+
store.push(store.normalize(modelName, data));
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
@method normalize
|
|
88
|
+
@public
|
|
89
|
+
@param {String} modelName The name of the model type for this payload
|
|
90
|
+
@param {Object} payload
|
|
91
|
+
@return {Object} The normalized payload
|
|
92
|
+
*/
|
|
93
|
+
export declare function normalize(this: Store, modelName: string, payload: ObjectValue): import("@warp-drive/core-types/spec/raw").SingleResourceDocument<string>;
|
|
94
|
+
/**
|
|
95
|
+
Push some raw data into the store.
|
|
96
|
+
|
|
97
|
+
This method can be used both to push in brand new
|
|
98
|
+
records, as well as to update existing records. You
|
|
99
|
+
can push in more than one type of object at once.
|
|
100
|
+
All objects should be in the format expected by the
|
|
101
|
+
serializer.
|
|
102
|
+
|
|
103
|
+
```app/serializers/application.js
|
|
104
|
+
import RESTSerializer from '@ember-data/serializer/rest';
|
|
105
|
+
|
|
106
|
+
export default class ApplicationSerializer extends RESTSerializer;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
let pushData = {
|
|
111
|
+
posts: [
|
|
112
|
+
{ id: 1, postTitle: "Great post", commentIds: [2] }
|
|
113
|
+
],
|
|
114
|
+
comments: [
|
|
115
|
+
{ id: 2, commentBody: "Insightful comment" }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
store.pushPayload(pushData);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
By default, the data will be deserialized using a default
|
|
123
|
+
serializer (the application serializer if it exists).
|
|
124
|
+
|
|
125
|
+
Alternatively, `pushPayload` will accept a model type which
|
|
126
|
+
will determine which serializer will process the payload.
|
|
127
|
+
|
|
128
|
+
```app/serializers/application.js
|
|
129
|
+
import RESTSerializer from '@ember-data/serializer/rest';
|
|
130
|
+
|
|
131
|
+
export default class ApplicationSerializer extends RESTSerializer;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```app/serializers/post.js
|
|
135
|
+
import JSONSerializer from '@ember-data/serializer/json';
|
|
136
|
+
|
|
137
|
+
export default JSONSerializer;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
store.pushPayload(pushData); // Will use the application serializer
|
|
142
|
+
store.pushPayload('post', pushData); // Will use the post serializer
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
@method pushPayload
|
|
146
|
+
@public
|
|
147
|
+
@param {String} modelName Optionally, a model type used to determine which serializer will be used
|
|
148
|
+
@param {Object} inputPayload
|
|
149
|
+
*/
|
|
150
|
+
export declare function pushPayload(this: Store, modelName: string, inputPayload: ObjectValue): void;
|
|
151
|
+
export declare function serializeRecord(this: Store, record: unknown, options?: SerializerOptions): unknown;
|
|
152
|
+
export declare function cleanup(this: Store): void;
|
|
153
|
+
}
|
|
141
154
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
4
|
-
import type
|
|
5
|
-
import type
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
declare module '@ember-data/legacy-compat/legacy-network-handler/fetch-manager' {
|
|
2
|
+
import type { Deferred } from '@ember-data/request/-private/types';
|
|
3
|
+
import type Store from '@ember-data/store';
|
|
4
|
+
import type { StoreRequestInfo } from '@ember-data/store/-private/cache-handler';
|
|
5
|
+
import type RequestStateService from '@ember-data/store/-private/network/request-cache';
|
|
6
|
+
import type { Request } from '@ember-data/store/-private/network/request-cache';
|
|
7
|
+
import type { FindRecordOptions } from '@ember-data/store/-types/q/store';
|
|
8
|
+
import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';
|
|
9
|
+
import type { TypeFromInstance } from '@warp-drive/core-types/record';
|
|
10
|
+
import type { SingleResourceDocument } from '@warp-drive/core-types/spec/raw';
|
|
11
|
+
import Snapshot from '@ember-data/legacy-compat/legacy-network-handler/snapshot';
|
|
12
|
+
export declare const SaveOp: unique symbol;
|
|
13
|
+
export type FetchMutationOptions = FindRecordOptions & {
|
|
14
|
+
[SaveOp]: 'createRecord' | 'deleteRecord' | 'updateRecord';
|
|
15
|
+
};
|
|
16
|
+
interface PendingFetchItem {
|
|
17
|
+
identifier: StableExistingRecordIdentifier;
|
|
18
|
+
queryRequest: Request;
|
|
19
|
+
resolver: Deferred<any>;
|
|
20
|
+
options: FindRecordOptions;
|
|
21
|
+
trace?: unknown;
|
|
22
|
+
promise: Promise<StableExistingRecordIdentifier>;
|
|
23
|
+
}
|
|
24
|
+
export default class FetchManager {
|
|
25
|
+
isDestroyed: boolean;
|
|
26
|
+
requestCache: RequestStateService;
|
|
27
|
+
_pendingFetch: Map<string, Map<StableExistingRecordIdentifier, PendingFetchItem[]>>;
|
|
28
|
+
_store: Store;
|
|
29
|
+
constructor(store: Store);
|
|
30
|
+
createSnapshot<T>(identifier: StableRecordIdentifier<TypeFromInstance<T>>, options?: FindRecordOptions): Snapshot<T>;
|
|
31
|
+
createSnapshot(identifier: StableRecordIdentifier, options?: FindRecordOptions): Snapshot;
|
|
32
|
+
/**
|
|
33
|
+
This method is called by `record.save`, and gets passed a
|
|
34
|
+
resolver for the promise that `record.save` returns.
|
|
35
|
+
|
|
36
|
+
It schedules saving to happen at the end of the run loop.
|
|
37
|
+
|
|
38
|
+
@internal
|
|
39
|
+
*/
|
|
40
|
+
scheduleSave(identifier: StableRecordIdentifier, options: FetchMutationOptions): Promise<null | SingleResourceDocument>;
|
|
41
|
+
scheduleFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions, request: StoreRequestInfo): Promise<StableExistingRecordIdentifier>;
|
|
42
|
+
getPendingFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions): Promise<StableExistingRecordIdentifier<string>> | undefined;
|
|
43
|
+
flushAllPendingFetches(): void;
|
|
44
|
+
fetchDataIfNeededForIdentifier(identifier: StableExistingRecordIdentifier, options: FindRecordOptions | undefined, request: StoreRequestInfo): Promise<StableExistingRecordIdentifier>;
|
|
45
|
+
destroy(): void;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
22
48
|
}
|
|
23
|
-
export default class FetchManager {
|
|
24
|
-
isDestroyed: boolean;
|
|
25
|
-
requestCache: RequestStateService;
|
|
26
|
-
_pendingFetch: Map<string, Map<StableExistingRecordIdentifier, PendingFetchItem[]>>;
|
|
27
|
-
_store: Store;
|
|
28
|
-
constructor(store: Store);
|
|
29
|
-
createSnapshot<T>(identifier: StableRecordIdentifier<TypeFromInstance<T>>, options?: FindRecordOptions): Snapshot<T>;
|
|
30
|
-
createSnapshot(identifier: StableRecordIdentifier, options?: FindRecordOptions): Snapshot;
|
|
31
|
-
/**
|
|
32
|
-
This method is called by `record.save`, and gets passed a
|
|
33
|
-
resolver for the promise that `record.save` returns.
|
|
34
|
-
|
|
35
|
-
It schedules saving to happen at the end of the run loop.
|
|
36
|
-
|
|
37
|
-
@internal
|
|
38
|
-
*/
|
|
39
|
-
scheduleSave(identifier: StableRecordIdentifier, options: FetchMutationOptions): Promise<null | SingleResourceDocument>;
|
|
40
|
-
scheduleFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions, request: StoreRequestInfo): Promise<StableExistingRecordIdentifier>;
|
|
41
|
-
getPendingFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions): Promise<StableExistingRecordIdentifier<string>> | undefined;
|
|
42
|
-
flushAllPendingFetches(): void;
|
|
43
|
-
fetchDataIfNeededForIdentifier(identifier: StableExistingRecordIdentifier, options: FindRecordOptions | undefined, request: StoreRequestInfo): Promise<StableExistingRecordIdentifier>;
|
|
44
|
-
destroy(): void;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
47
49
|
//# sourceMappingURL=fetch-manager.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare module '@ember-data/legacy-compat/legacy-network-handler/identifier-has-id' {
|
|
2
|
+
import type { StableExistingRecordIdentifier } from '@warp-drive/core-types/identifier';
|
|
3
|
+
export declare function assertIdentifierHasId(identifier: unknown): asserts identifier is StableExistingRecordIdentifier;
|
|
4
|
+
}
|
|
3
5
|
//# sourceMappingURL=identifier-has-id.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export function
|
|
1
|
+
declare module '@ember-data/legacy-compat/legacy-network-handler/legacy-data-fetch' {
|
|
2
|
+
export function _findHasMany(adapter: any, store: any, identifier: any, link: any, relationship: any, options: any): Promise<any>;
|
|
3
|
+
export function _findBelongsTo(store: any, identifier: any, link: any, relationship: any, options: any): Promise<any>;
|
|
4
|
+
}
|
|
3
5
|
//# sourceMappingURL=legacy-data-fetch.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
1
|
+
declare module '@ember-data/legacy-compat/legacy-network-handler/legacy-data-utils' {
|
|
2
|
+
import type { AdapterPayload } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface';
|
|
3
|
+
export declare function iterateData<T>(data: T[] | T, fn: (o: T, index?: number) => T): T | T[];
|
|
4
|
+
export declare function payloadIsNotBlank<T>(adapterPayload: T | AdapterPayload): adapterPayload is AdapterPayload;
|
|
5
|
+
}
|
|
4
6
|
//# sourceMappingURL=legacy-data-utils.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare module '@ember-data/legacy-compat/legacy-network-handler/legacy-network-handler' {
|
|
2
|
+
import type { Handler } from '@ember-data/request';
|
|
3
|
+
export declare const LegacyNetworkHandler: Handler;
|
|
4
|
+
}
|
|
3
5
|
//# sourceMappingURL=legacy-network-handler.d.ts.map
|