@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.
@@ -1,233 +1,235 @@
1
- /**
2
- @module @ember-data/experimental-preview-types
3
- */
4
- import type Store from '@ember-data/store';
5
- import type { ModelSchema } from '@ember-data/store/-types/q/ds-model';
6
- import type { ObjectValue } from '@warp-drive/core-types/json/raw';
7
- import type { JsonApiDocument, SingleResourceDocument } from '@warp-drive/core-types/spec/raw';
8
- import type { AdapterPayload } from './minimum-adapter-interface';
9
- import type Snapshot from './snapshot';
10
- export type SerializerOptions = {
11
- includeId?: boolean;
12
- };
13
- export type RequestType = 'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord';
14
- /**
15
- * <blockquote style="margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;">
16
- <p>
17
- ⚠️ <strong>This is LEGACY documentation</strong> for a feature that is no longer encouraged to be used.
18
- If starting a new app or thinking of implementing a new adapter, consider writing a
19
- <a href="/ember-data/release/classes/%3CInterface%3E%20Handler">Handler</a> instead to be used with the <a href="https://github.com/emberjs/data/tree/main/packages/request#readme">RequestManager</a>
20
- </p>
21
- </blockquote>
22
-
23
- The following documentation describes the methods an application
24
- serializer should implement with descriptions around when an
25
- application might expect these methods to be called.
26
-
27
- Methods that are not required are marked as **optional**.
28
-
29
- @class <Interface> Serializer
30
- @public
31
- */
32
- export interface MinimumSerializerInterface {
33
- /**
34
- * This method is responsible for normalizing the value resolved from the promise returned
35
- * by an Adapter request into the format expected by the `Store`.
36
- *
37
- * The output should be a [JSON:API Document](https://jsonapi.org/format/#document-structure)
38
- * with the following additional restrictions:
39
- *
40
- * - `type` should be formatted in the `singular` `dasherized` `lowercase` form
41
- * - `members` (the property names of attributes and relationships) should be formatted
42
- * to match their definition in the corresponding `Model` definition. Typically this
43
- * will be `camelCase`.
44
- * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
45
- * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
46
- * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
47
- *
48
- * @method normalizeResponse
49
- * @public
50
- * @param {Store} store The store service that initiated the request being normalized
51
- * @param {ModelSchema} schema An object with methods for accessing information about
52
- * the type, attributes and relationships of the primary type associated with the request.
53
- * @param {JSONObject} rawPayload The raw JSON response data returned from an API request.
54
- * This correlates to the value the promise returned by the adapter method that performed
55
- * the request resolved to.
56
- * @param {string|null} id For a findRecord request, this is the id initially provided
57
- * in the call to store.findRecord. Else this value is null.
58
- * @param {'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord'} requestType The
59
- * type of request the Adapter had been asked to perform.
60
- *
61
- * @return {JsonApiDocument} a document following the structure of a JSON:API Document.
62
- */
63
- normalizeResponse(store: Store, schema: ModelSchema, rawPayload: AdapterPayload, id: string | null, requestType: 'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord'): JsonApiDocument;
64
- /**
65
- * This method is responsible for serializing an individual record
66
- * via a [Snapshot](Snapshot) into the format expected by the API.
67
- *
68
- * This method is called by `snapshot.serialize()`.
69
- *
70
- * When using `Model`, this method is called by `record.serialize()`.
71
- *
72
- * When using `JSONAPIAdapter` or `RESTAdapter` this method is called
73
- * by `updateRecord` and `createRecord` if `Serializer.serializeIntoHash`
74
- * is not implemented.
75
- *
76
- * @method serialize
77
- * @public
78
- * @param {Snapshot} snapshot A Snapshot for the record to serialize
79
- * @param {object} [options]
80
- */
81
- serialize(snapshot: Snapshot, options?: SerializerOptions): ObjectValue;
82
- /**
83
- * This method is intended to normalize data into a [JSON:API Document](https://jsonapi.org/format/#document-structure)
84
- * with a data member containing a single [Resource](https://jsonapi.org/format/#document-resource-objects).
85
- *
86
- * - `type` should be formatted in the singular, dasherized and lowercase form
87
- * - `members` (the property names of attributes and relationships) should be formatted
88
- * to match their definition in the corresponding `Model` definition. Typically this
89
- * will be `camelCase`.
90
- * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
91
- * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
92
- * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
93
- *
94
- * This method is called by the `Store` when `store.normalize(modelName, payload)` is
95
- * called. It is recommended to use `store.serializerFor(modelName).normalizeResponse`
96
- * over `store.normalize`.
97
- *
98
- * This method may be called when also using the `RESTSerializer`
99
- * when `serializer.pushPayload` is called by `store.pushPayload`.
100
- * However, it is recommended to use `store.push` over `store.pushPayload` after normalizing
101
- * the payload directly.
102
- *
103
- * Example:
104
- * ```js
105
- * function pushPayload(store, modelName, rawPayload) {
106
- * const ModelClass = store.modelFor(modelName);
107
- * const serializer = store.serializerFor(modelName);
108
- * const jsonApiPayload = serializer.normalizeResponse(store, ModelClass, rawPayload, null, 'query');
109
- *
110
- * return store.push(jsonApiPayload);
111
- * }
112
- * ```
113
- *
114
- * This method may be called when also using the `JSONAPISerializer`
115
- * when normalizing included records. If mixing serializer usage in this way
116
- * we recommend implementing this method, but caution that it may lead
117
- * to unexpected mixing of formats.
118
- *
119
- * This method may also be called when normalizing embedded relationships when
120
- * using the `EmbeddedRecordsMixin`. If using this mixin in a serializer in
121
- * your application we recommend implementing this method, but caution that
122
- * it may lead to unexpected mixing of formats.
123
- *
124
- * @method normalize [OPTIONAL]
125
- * @public
126
- * @optional
127
- * @param {ModelSchema} schema An object with methods for accessing information about
128
- * the type, attributes and relationships of the primary type associated with the request.
129
- * @param {JSONObject} rawPayload Some raw JSON data to be normalized into a JSON:API Resource.
130
- * @param {string} [prop] When called by the EmbeddedRecordsMixin this param will be the
131
- * property at which the object provided as rawPayload was found.
132
- * @return {SingleResourceDocument} A JSON:API Document
133
- * containing a single JSON:API Resource
134
- * as its primary data.
135
- */
136
- normalize?(schema: ModelSchema, rawPayload: ObjectValue, prop?: string): SingleResourceDocument;
137
- /**
138
- * When using `JSONAPIAdapter` or `RESTAdapter` this method is called
139
- * by `adapter.updateRecord` and `adapter.createRecord` if `serializer.serializeIntoHash`
140
- * is implemented. If this method is not implemented, `serializer.serialize`
141
- * will be called in this case.
142
- *
143
- * You can use this method to customize the root keys serialized into the payload.
144
- * The hash property should be modified by reference.
145
- *
146
- * For instance, your API may expect resources to be keyed by underscored type in the payload:
147
- *
148
- * ```js
149
- * {
150
- * _user: {
151
- * type: 'user',
152
- * id: '1'
153
- * }
154
- * }
155
- * ```
156
- *
157
- * Which when using these adapters can be achieved by implementing this method similar
158
- * to the following:
159
- *
160
- * ```js
161
- * serializeIntoHash(hash, ModelClass, snapshot, options) {
162
- * hash[`_${snapshot.modelName}`] = this.serialize(snapshot, options).data;
163
- * }
164
- * ```
165
- *
166
- * @method serializeIntoHash [OPTIONAL]
167
- * @public
168
- * @optional
169
- * @param hash A top most object of the request payload onto
170
- * which to append the serialized record
171
- * @param {ModelSchema} schema An object with methods for accessing information about
172
- * the type, attributes and relationships of the primary type associated with the request.
173
- * @param {Snapshot} snapshot A Snapshot for the record to serialize
174
- * @param [options]
175
- * @return {void}
176
- */
177
- serializeIntoHash?(hash: object, schema: ModelSchema, snapshot: Snapshot, options?: SerializerOptions): void;
178
- /**
179
- * This method allows for normalization of data when `store.pushPayload` is called
180
- * and should be implemented if you want to use that method.
181
- *
182
- * The method is responsible for pushing new data to the store using `store.push`
183
- * once any necessary normalization has occurred, and no data in the store will be
184
- * updated unless it does so.
185
- *
186
- * The normalized form pushed to the store should be a [JSON:API Document](https://jsonapi.org/format/#document-structure)
187
- * with the following additional restrictions:
188
- *
189
- * - `type` should be formatted in the singular, dasherized and lowercase form
190
- * - `members` (the property names of attributes and relationships) should be formatted
191
- * to match their definition in the corresponding `Model` definition. Typically this
192
- * will be `camelCase`.
193
- * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
194
- * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
195
- * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
196
- *
197
- * If you need better control over normalization or want access to the records being added or updated
198
- * in the store, we recommended using `store.push` over `store.pushPayload` after normalizing
199
- * the payload directly. This can even take advantage of an existing serializer for the format
200
- * the data is in, for example:
201
- *
202
- * ```js
203
- * function pushPayload(store, modelName, rawPayload) {
204
- * const ModelClass = store.modelFor(modelName);
205
- * const serializer = store.serializerFor(modelName);
206
- * const jsonApiPayload = serializer.normalizeResponse(store, ModelClass, rawPayload, null, 'query');
207
- *
208
- * return store.push(jsonApiPayload);
209
- * }
210
- * ```
211
- *
212
- * @method pushPayload [OPTIONAL]
213
- * @public
214
- * @optional
215
- * @param {Store} store The store service that initiated the request being normalized
216
- * @param {object} rawPayload The raw JSON response data returned from an API request.
217
- * This JSON should be in the API format expected by the serializer.
218
- * @return {void}
219
- */
220
- pushPayload?(store: Store, rawPayload: ObjectValue): void;
221
- /**
222
- * In some situations the serializer may need to perform cleanup when destroyed,
223
- * that cleanup can be done in `destroy`.
224
- *
225
- * If not implemented, the store does not inform the serializer of destruction.
226
- *
227
- * @method destroy [OPTIONAL]
228
- * @public
229
- * @optional
230
- */
231
- destroy?(): void;
1
+ declare module '@ember-data/legacy-compat/legacy-network-handler/minimum-serializer-interface' {
2
+ /**
3
+ @module @ember-data/experimental-preview-types
4
+ */
5
+ import type Store from '@ember-data/store';
6
+ import type { ModelSchema } from '@ember-data/store/-types/q/ds-model';
7
+ import type { ObjectValue } from '@warp-drive/core-types/json/raw';
8
+ import type { JsonApiDocument, SingleResourceDocument } from '@warp-drive/core-types/spec/raw';
9
+ import type { AdapterPayload } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface';
10
+ import type Snapshot from '@ember-data/legacy-compat/legacy-network-handler/snapshot';
11
+ export type SerializerOptions = {
12
+ includeId?: boolean;
13
+ };
14
+ export type RequestType = 'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord';
15
+ /**
16
+ * <blockquote style="margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;">
17
+ <p>
18
+ ⚠️ <strong>This is LEGACY documentation</strong> for a feature that is no longer encouraged to be used.
19
+ If starting a new app or thinking of implementing a new adapter, consider writing a
20
+ <a href="/ember-data/release/classes/%3CInterface%3E%20Handler">Handler</a> instead to be used with the <a href="https://github.com/emberjs/data/tree/main/packages/request#readme">RequestManager</a>
21
+ </p>
22
+ </blockquote>
23
+
24
+ The following documentation describes the methods an application
25
+ serializer should implement with descriptions around when an
26
+ application might expect these methods to be called.
27
+
28
+ Methods that are not required are marked as **optional**.
29
+
30
+ @class <Interface> Serializer
31
+ @public
32
+ */
33
+ export interface MinimumSerializerInterface {
34
+ /**
35
+ * This method is responsible for normalizing the value resolved from the promise returned
36
+ * by an Adapter request into the format expected by the `Store`.
37
+ *
38
+ * The output should be a [JSON:API Document](https://jsonapi.org/format/#document-structure)
39
+ * with the following additional restrictions:
40
+ *
41
+ * - `type` should be formatted in the `singular` `dasherized` `lowercase` form
42
+ * - `members` (the property names of attributes and relationships) should be formatted
43
+ * to match their definition in the corresponding `Model` definition. Typically this
44
+ * will be `camelCase`.
45
+ * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
46
+ * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
47
+ * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
48
+ *
49
+ * @method normalizeResponse
50
+ * @public
51
+ * @param {Store} store The store service that initiated the request being normalized
52
+ * @param {ModelSchema} schema An object with methods for accessing information about
53
+ * the type, attributes and relationships of the primary type associated with the request.
54
+ * @param {JSONObject} rawPayload The raw JSON response data returned from an API request.
55
+ * This correlates to the value the promise returned by the adapter method that performed
56
+ * the request resolved to.
57
+ * @param {string|null} id For a findRecord request, this is the id initially provided
58
+ * in the call to store.findRecord. Else this value is null.
59
+ * @param {'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord'} requestType The
60
+ * type of request the Adapter had been asked to perform.
61
+ *
62
+ * @return {JsonApiDocument} a document following the structure of a JSON:API Document.
63
+ */
64
+ normalizeResponse(store: Store, schema: ModelSchema, rawPayload: AdapterPayload, id: string | null, requestType: 'findRecord' | 'queryRecord' | 'findAll' | 'findBelongsTo' | 'findHasMany' | 'findMany' | 'query' | 'createRecord' | 'deleteRecord' | 'updateRecord'): JsonApiDocument;
65
+ /**
66
+ * This method is responsible for serializing an individual record
67
+ * via a [Snapshot](Snapshot) into the format expected by the API.
68
+ *
69
+ * This method is called by `snapshot.serialize()`.
70
+ *
71
+ * When using `Model`, this method is called by `record.serialize()`.
72
+ *
73
+ * When using `JSONAPIAdapter` or `RESTAdapter` this method is called
74
+ * by `updateRecord` and `createRecord` if `Serializer.serializeIntoHash`
75
+ * is not implemented.
76
+ *
77
+ * @method serialize
78
+ * @public
79
+ * @param {Snapshot} snapshot A Snapshot for the record to serialize
80
+ * @param {object} [options]
81
+ */
82
+ serialize(snapshot: Snapshot, options?: SerializerOptions): ObjectValue;
83
+ /**
84
+ * This method is intended to normalize data into a [JSON:API Document](https://jsonapi.org/format/#document-structure)
85
+ * with a data member containing a single [Resource](https://jsonapi.org/format/#document-resource-objects).
86
+ *
87
+ * - `type` should be formatted in the singular, dasherized and lowercase form
88
+ * - `members` (the property names of attributes and relationships) should be formatted
89
+ * to match their definition in the corresponding `Model` definition. Typically this
90
+ * will be `camelCase`.
91
+ * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
92
+ * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
93
+ * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
94
+ *
95
+ * This method is called by the `Store` when `store.normalize(modelName, payload)` is
96
+ * called. It is recommended to use `store.serializerFor(modelName).normalizeResponse`
97
+ * over `store.normalize`.
98
+ *
99
+ * This method may be called when also using the `RESTSerializer`
100
+ * when `serializer.pushPayload` is called by `store.pushPayload`.
101
+ * However, it is recommended to use `store.push` over `store.pushPayload` after normalizing
102
+ * the payload directly.
103
+ *
104
+ * Example:
105
+ * ```js
106
+ * function pushPayload(store, modelName, rawPayload) {
107
+ * const ModelClass = store.modelFor(modelName);
108
+ * const serializer = store.serializerFor(modelName);
109
+ * const jsonApiPayload = serializer.normalizeResponse(store, ModelClass, rawPayload, null, 'query');
110
+ *
111
+ * return store.push(jsonApiPayload);
112
+ * }
113
+ * ```
114
+ *
115
+ * This method may be called when also using the `JSONAPISerializer`
116
+ * when normalizing included records. If mixing serializer usage in this way
117
+ * we recommend implementing this method, but caution that it may lead
118
+ * to unexpected mixing of formats.
119
+ *
120
+ * This method may also be called when normalizing embedded relationships when
121
+ * using the `EmbeddedRecordsMixin`. If using this mixin in a serializer in
122
+ * your application we recommend implementing this method, but caution that
123
+ * it may lead to unexpected mixing of formats.
124
+ *
125
+ * @method normalize [OPTIONAL]
126
+ * @public
127
+ * @optional
128
+ * @param {ModelSchema} schema An object with methods for accessing information about
129
+ * the type, attributes and relationships of the primary type associated with the request.
130
+ * @param {JSONObject} rawPayload Some raw JSON data to be normalized into a JSON:API Resource.
131
+ * @param {string} [prop] When called by the EmbeddedRecordsMixin this param will be the
132
+ * property at which the object provided as rawPayload was found.
133
+ * @return {SingleResourceDocument} A JSON:API Document
134
+ * containing a single JSON:API Resource
135
+ * as its primary data.
136
+ */
137
+ normalize?(schema: ModelSchema, rawPayload: ObjectValue, prop?: string): SingleResourceDocument;
138
+ /**
139
+ * When using `JSONAPIAdapter` or `RESTAdapter` this method is called
140
+ * by `adapter.updateRecord` and `adapter.createRecord` if `serializer.serializeIntoHash`
141
+ * is implemented. If this method is not implemented, `serializer.serialize`
142
+ * will be called in this case.
143
+ *
144
+ * You can use this method to customize the root keys serialized into the payload.
145
+ * The hash property should be modified by reference.
146
+ *
147
+ * For instance, your API may expect resources to be keyed by underscored type in the payload:
148
+ *
149
+ * ```js
150
+ * {
151
+ * _user: {
152
+ * type: 'user',
153
+ * id: '1'
154
+ * }
155
+ * }
156
+ * ```
157
+ *
158
+ * Which when using these adapters can be achieved by implementing this method similar
159
+ * to the following:
160
+ *
161
+ * ```js
162
+ * serializeIntoHash(hash, ModelClass, snapshot, options) {
163
+ * hash[`_${snapshot.modelName}`] = this.serialize(snapshot, options).data;
164
+ * }
165
+ * ```
166
+ *
167
+ * @method serializeIntoHash [OPTIONAL]
168
+ * @public
169
+ * @optional
170
+ * @param hash A top most object of the request payload onto
171
+ * which to append the serialized record
172
+ * @param {ModelSchema} schema An object with methods for accessing information about
173
+ * the type, attributes and relationships of the primary type associated with the request.
174
+ * @param {Snapshot} snapshot A Snapshot for the record to serialize
175
+ * @param [options]
176
+ * @return {void}
177
+ */
178
+ serializeIntoHash?(hash: object, schema: ModelSchema, snapshot: Snapshot, options?: SerializerOptions): void;
179
+ /**
180
+ * This method allows for normalization of data when `store.pushPayload` is called
181
+ * and should be implemented if you want to use that method.
182
+ *
183
+ * The method is responsible for pushing new data to the store using `store.push`
184
+ * once any necessary normalization has occurred, and no data in the store will be
185
+ * updated unless it does so.
186
+ *
187
+ * The normalized form pushed to the store should be a [JSON:API Document](https://jsonapi.org/format/#document-structure)
188
+ * with the following additional restrictions:
189
+ *
190
+ * - `type` should be formatted in the singular, dasherized and lowercase form
191
+ * - `members` (the property names of attributes and relationships) should be formatted
192
+ * to match their definition in the corresponding `Model` definition. Typically this
193
+ * will be `camelCase`.
194
+ * - [`lid`](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md) is
195
+ * a valid optional sibling to `id` and `type` in both [Resources](https://jsonapi.org/format/#document-resource-objects)
196
+ * and [Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
197
+ *
198
+ * If you need better control over normalization or want access to the records being added or updated
199
+ * in the store, we recommended using `store.push` over `store.pushPayload` after normalizing
200
+ * the payload directly. This can even take advantage of an existing serializer for the format
201
+ * the data is in, for example:
202
+ *
203
+ * ```js
204
+ * function pushPayload(store, modelName, rawPayload) {
205
+ * const ModelClass = store.modelFor(modelName);
206
+ * const serializer = store.serializerFor(modelName);
207
+ * const jsonApiPayload = serializer.normalizeResponse(store, ModelClass, rawPayload, null, 'query');
208
+ *
209
+ * return store.push(jsonApiPayload);
210
+ * }
211
+ * ```
212
+ *
213
+ * @method pushPayload [OPTIONAL]
214
+ * @public
215
+ * @optional
216
+ * @param {Store} store The store service that initiated the request being normalized
217
+ * @param {object} rawPayload The raw JSON response data returned from an API request.
218
+ * This JSON should be in the API format expected by the serializer.
219
+ * @return {void}
220
+ */
221
+ pushPayload?(store: Store, rawPayload: ObjectValue): void;
222
+ /**
223
+ * In some situations the serializer may need to perform cleanup when destroyed,
224
+ * that cleanup can be done in `destroy`.
225
+ *
226
+ * If not implemented, the store does not inform the serializer of destruction.
227
+ *
228
+ * @method destroy [OPTIONAL]
229
+ * @public
230
+ * @optional
231
+ */
232
+ destroy?(): void;
233
+ }
232
234
  }
233
235
  //# sourceMappingURL=minimum-serializer-interface.d.ts.map
@@ -1,7 +1,9 @@
1
- import type Store from '@ember-data/store';
2
- import type { ModelSchema } from '@ember-data/store/-types/q/ds-model';
3
- import type { JsonApiDocument } from '@warp-drive/core-types/spec/raw';
4
- import type { AdapterPayload } from './minimum-adapter-interface';
5
- import type { MinimumSerializerInterface, RequestType } from './minimum-serializer-interface';
6
- export declare function normalizeResponseHelper(serializer: MinimumSerializerInterface | null, store: Store, modelClass: ModelSchema, payload: AdapterPayload, id: string | null, requestType: RequestType): JsonApiDocument;
1
+ declare module '@ember-data/legacy-compat/legacy-network-handler/serializer-response' {
2
+ import type Store from '@ember-data/store';
3
+ import type { ModelSchema } from '@ember-data/store/-types/q/ds-model';
4
+ import type { JsonApiDocument } from '@warp-drive/core-types/spec/raw';
5
+ import type { AdapterPayload } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface';
6
+ import type { MinimumSerializerInterface, RequestType } from '@ember-data/legacy-compat/legacy-network-handler/minimum-serializer-interface';
7
+ export declare function normalizeResponseHelper(serializer: MinimumSerializerInterface | null, store: Store, modelClass: ModelSchema, payload: AdapterPayload, id: string | null, requestType: RequestType): JsonApiDocument;
8
+ }
7
9
  //# sourceMappingURL=serializer-response.d.ts.map