@ember-data/legacy-compat 5.4.0-alpha.4 → 5.4.0-alpha.43

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 (32) hide show
  1. package/addon/{fetch-manager-0744e8e9.js → -private-DmhhlB_x.js} +83 -70
  2. package/addon/-private-DmhhlB_x.js.map +1 -0
  3. package/addon/-private.js +1 -1
  4. package/addon/index.js +309 -76
  5. package/addon/index.js.map +1 -1
  6. package/addon-main.js +1 -0
  7. package/package.json +74 -28
  8. package/unstable-preview-types/-private.d.ts +17 -0
  9. package/unstable-preview-types/-private.d.ts.map +1 -0
  10. package/unstable-preview-types/index.d.ts +154 -0
  11. package/unstable-preview-types/index.d.ts.map +1 -0
  12. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts +49 -0
  13. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts.map +1 -0
  14. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts +5 -0
  15. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts.map +1 -0
  16. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts +14 -0
  17. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts.map +1 -0
  18. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts +8 -0
  19. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts.map +1 -0
  20. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts +5 -0
  21. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts.map +1 -0
  22. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts +549 -0
  23. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts.map +1 -0
  24. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts +235 -0
  25. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts.map +1 -0
  26. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts +9 -0
  27. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts.map +1 -0
  28. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts +97 -0
  29. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts.map +1 -0
  30. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts +248 -0
  31. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts.map +1 -0
  32. package/addon/fetch-manager-0744e8e9.js.map +0 -1
@@ -0,0 +1,154 @@
1
+ /// <reference path="./-private.d.ts" />
2
+ /// <reference path="./legacy-network-handler/serializer-response.d.ts" />
3
+ /// <reference path="./legacy-network-handler/fetch-manager.d.ts" />
4
+ /// <reference path="./legacy-network-handler/legacy-data-fetch.d.ts" />
5
+ /// <reference path="./legacy-network-handler/minimum-adapter-interface.d.ts" />
6
+ /// <reference path="./legacy-network-handler/snapshot.d.ts" />
7
+ /// <reference path="./legacy-network-handler/snapshot-record-array.d.ts" />
8
+ /// <reference path="./legacy-network-handler/identifier-has-id.d.ts" />
9
+ /// <reference path="./legacy-network-handler/legacy-network-handler.d.ts" />
10
+ /// <reference path="./legacy-network-handler/minimum-serializer-interface.d.ts" />
11
+ /// <reference path="./legacy-network-handler/legacy-data-utils.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 function adapterFor(this: Store, modelName: string): MinimumAdapterInterface;
54
+ export 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 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 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 function pushPayload(this: Store, modelName: string, inputPayload: ObjectValue): void;
151
+ export function serializeRecord(this: Store, record: unknown, options?: SerializerOptions): unknown;
152
+ export function cleanup(this: Store): void;
153
+ }
154
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAgB,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACpE,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAAC;IAErG,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,0BAA0B,GAAG,IAAI,CAAC;IAE1G,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,WAAW,CAAC;IAChE,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3D,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAEvE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC1E,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CACjF,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;IAaI;AACJ,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;AACpF,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAAC;AA8CrH;;;;;;;;;;;;;;;;IAgBI;AACJ,wBAAgB,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAwC/F;AAED;;;;;;;;;;;;;;;;;;;IAmBI;AAEJ,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,4EAmB7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDI;AAEJ,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,GAAG,IAAI,CAgB3F;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAQlG;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,KAAK,QAgBlC"}
@@ -0,0 +1,49 @@
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 RequestStateService from '@ember-data/store/-private/network/request-cache';
5
+ import type { Request } from '@ember-data/store/-private/network/request-cache';
6
+ import type { FindRecordOptions } from '@ember-data/store/-types/q/store';
7
+ import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';
8
+ import type { TypeFromInstance } from '@warp-drive/core-types/record';
9
+ import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
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 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: ImmutableRequestInfo): Promise<StableExistingRecordIdentifier>;
42
+ getPendingFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions): Promise<StableExistingRecordIdentifier<string>> | undefined;
43
+ flushAllPendingFetches(): void;
44
+ fetchDataIfNeededForIdentifier(identifier: StableExistingRecordIdentifier, options: FindRecordOptions | undefined, request: ImmutableRequestInfo): Promise<StableExistingRecordIdentifier>;
45
+ destroy(): void;
46
+ }
47
+ export {};
48
+ }
49
+ //# sourceMappingURL=fetch-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-manager.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/fetch-manager.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAG3C,OAAO,KAAK,mBAAmB,MAAM,kDAAkD,CAAC;AACxF,OAAO,KAAK,EAAmB,OAAO,EAAsB,MAAM,kDAAkD,CAAC;AAErH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAA8B,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAQ1G,OAAO,QAAQ,MAAM,YAAY,CAAC;AAOlC,eAAO,MAAM,MAAM,EAAE,OAAO,MAAyB,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG;IAAE,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,cAAc,GAAG,cAAc,CAAA;CAAE,CAAC;AAEtH,UAAU,gBAAgB;IACxB,UAAU,EAAE,8BAA8B,CAAC;IAC3C,YAAY,EAAE,OAAO,CAAC;IAEtB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAClD;AAWD,MAAM,CAAC,OAAO,OAAO,YAAY;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,mBAAmB,CAAC;IAElC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,8BAA8B,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACpF,MAAM,EAAE,KAAK,CAAC;gBAEV,KAAK,EAAE,KAAK;IAQxB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAC,CAAC,CAAC;IACpH,cAAc,CAAC,UAAU,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,QAAQ;IAKzF;;;;;;;MAOE;IACF,YAAY,CACV,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC;IA2BzC,aAAa,CACX,UAAU,EAAE,8BAA8B,EAC1C,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,8BAA8B,CAAC;IA4G1C,eAAe,CAAC,UAAU,EAAE,8BAA8B,EAAE,OAAO,EAAE,iBAAiB;IAYtF,sBAAsB;IAUtB,8BAA8B,CAC5B,UAAU,EAAE,8BAA8B,EAC1C,OAAO,+BAAwB,EAC/B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,8BAA8B,CAAC;IAyB1C,OAAO;CAGR"}
@@ -0,0 +1,5 @@
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 function assertIdentifierHasId(identifier: unknown): asserts identifier is StableExistingRecordIdentifier;
4
+ }
5
+ //# sourceMappingURL=identifier-has-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier-has-id.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/identifier-has-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAExF,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,IAAI,8BAA8B,CAK/G"}
@@ -0,0 +1,14 @@
1
+ declare module '@ember-data/legacy-compat/legacy-network-handler/legacy-data-fetch' {
2
+ import type Store from '@ember-data/store';
3
+ import type { BaseFinderOptions } from '@ember-data/store/-types/q/store';
4
+ import type { StableRecordIdentifier } from '@warp-drive/core-types';
5
+ import type { RelationshipSchema } from '@warp-drive/core-types/schema';
6
+ import type { MinimumAdapterInterface } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface';
7
+ export function _findHasMany(adapter: MinimumAdapterInterface, store: Store, identifier: StableRecordIdentifier, link: string | null | {
8
+ href: string;
9
+ }, relationship: RelationshipSchema, options: BaseFinderOptions): Promise<import("@warp-drive/core-types/identifier").StableExistingRecordIdentifier<string> | import("@warp-drive/core-types/identifier").StableExistingRecordIdentifier<string>[] | null>;
10
+ export function _findBelongsTo(store: Store, identifier: StableRecordIdentifier, link: string | null | {
11
+ href: string;
12
+ }, relationship: RelationshipSchema, options: BaseFinderOptions): Promise<import("@warp-drive/core-types/identifier").StableExistingRecordIdentifier<string> | import("@warp-drive/core-types/identifier").StableExistingRecordIdentifier<string>[] | null>;
13
+ }
14
+ //# sourceMappingURL=legacy-data-fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-data-fetch.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/legacy-data-fetch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAKxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E,wBAAgB,YAAY,CAC1B,OAAO,EAAE,uBAAuB,EAChC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,sBAAsB,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACtC,YAAY,EAAE,kBAAkB,EAChC,OAAO,EAAE,iBAAiB,6LA0C3B;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,sBAAsB,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACtC,YAAY,EAAE,kBAAkB,EAChC,OAAO,EAAE,iBAAiB,6LA0C3B"}
@@ -0,0 +1,8 @@
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
+ type IteratorCB<T> = ((o: T, index: number) => T) | ((o: T) => T);
4
+ export function iterateData<T>(data: T[] | T, fn: IteratorCB<T>): T | T[];
5
+ export function payloadIsNotBlank<T>(adapterPayload: T | AdapterPayload): adapterPayload is AdapterPayload;
6
+ export {};
7
+ }
8
+ //# sourceMappingURL=legacy-data-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-data-utils.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/legacy-data-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAElE,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,WAM9D;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,cAAc,GAAG,cAAc,IAAI,cAAc,CAMzG"}
@@ -0,0 +1,5 @@
1
+ declare module '@ember-data/legacy-compat/legacy-network-handler/legacy-network-handler' {
2
+ import type { Handler } from '@ember-data/request';
3
+ export const LegacyNetworkHandler: Handler;
4
+ }
5
+ //# sourceMappingURL=legacy-network-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-network-handler.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/legacy-network-handler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAU,OAAO,EAAkC,MAAM,qBAAqB,CAAC;AA8C3F,eAAO,MAAM,oBAAoB,EAAE,OAoClC,CAAC"}