@ember-data/legacy-compat 5.6.0-alpha.5 → 5.6.0-beta.1

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 (50) hide show
  1. package/addon-main.cjs +1 -1
  2. package/dist/-private.js +1 -1
  3. package/dist/builders.js +1 -292
  4. package/dist/index.js +1 -1002
  5. package/dist/utils.js +1 -224
  6. package/package.json +7 -30
  7. package/unstable-preview-types/-private.d.ts +7 -13
  8. package/unstable-preview-types/builders.d.ts +9 -12
  9. package/unstable-preview-types/index.d.ts +2 -149
  10. package/unstable-preview-types/utils.d.ts +9 -138
  11. package/dist/-private-CVvkihLY.js +0 -1188
  12. package/dist/-private-CVvkihLY.js.map +0 -1
  13. package/dist/-private.js.map +0 -1
  14. package/dist/builders.js.map +0 -1
  15. package/dist/index.js.map +0 -1
  16. package/dist/utils.js.map +0 -1
  17. package/unstable-preview-types/-private.d.ts.map +0 -1
  18. package/unstable-preview-types/builders/find-all.d.ts +0 -35
  19. package/unstable-preview-types/builders/find-all.d.ts.map +0 -1
  20. package/unstable-preview-types/builders/find-record.d.ts +0 -56
  21. package/unstable-preview-types/builders/find-record.d.ts.map +0 -1
  22. package/unstable-preview-types/builders/query.d.ts +0 -63
  23. package/unstable-preview-types/builders/query.d.ts.map +0 -1
  24. package/unstable-preview-types/builders/save-record.d.ts +0 -34
  25. package/unstable-preview-types/builders/save-record.d.ts.map +0 -1
  26. package/unstable-preview-types/builders/utils.d.ts +0 -6
  27. package/unstable-preview-types/builders/utils.d.ts.map +0 -1
  28. package/unstable-preview-types/builders.d.ts.map +0 -1
  29. package/unstable-preview-types/index.d.ts.map +0 -1
  30. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts +0 -49
  31. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts.map +0 -1
  32. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts +0 -5
  33. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts.map +0 -1
  34. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts +0 -14
  35. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts.map +0 -1
  36. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts +0 -8
  37. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts.map +0 -1
  38. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts +0 -5
  39. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts.map +0 -1
  40. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts +0 -529
  41. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts.map +0 -1
  42. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts +0 -226
  43. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts.map +0 -1
  44. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts +0 -9
  45. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts.map +0 -1
  46. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts +0 -91
  47. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts.map +0 -1
  48. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts +0 -239
  49. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts.map +0 -1
  50. package/unstable-preview-types/utils.d.ts.map +0 -1
@@ -1,56 +0,0 @@
1
- declare module '@ember-data/legacy-compat/builders/find-record' {
2
- import type { StoreRequestInput } from '@ember-data/store';
3
- import type { FindRecordOptions } from '@ember-data/store/types';
4
- import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
5
- import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/json-api-raw';
6
- import type { RequestSignature } from '@warp-drive/core-types/symbols';
7
- type FindRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
8
- op: 'findRecord';
9
- data: {
10
- record: ResourceIdentifierObject<T>;
11
- options: FindRecordBuilderOptions;
12
- };
13
- [RequestSignature]?: RT;
14
- };
15
- type FindRecordBuilderOptions = Omit<FindRecordOptions, 'preload'>;
16
- /**
17
- This function builds a request config to find the record for a given identifier or type and id combination.
18
- When passed to `store.request`, this config will result in the same behavior as a `store.findRecord` request.
19
- Additionally, it takes the same options as `store.findRecord`, with the exception of `preload` (which is unsupported).
20
-
21
- **Example 1**
22
-
23
- ```ts
24
- import { findRecord } from '@ember-data/legacy-compat/builders';
25
- const { content: post } = await store.request<Post>(findRecord<Post>('post', '1'));
26
- ```
27
-
28
- **Example 2**
29
-
30
- `findRecord` can be called with a single identifier argument instead of the combination
31
- of `type` (modelName) and `id` as separate arguments. You may recognize this combo as
32
- the typical pairing from [JSON:API](https://jsonapi.org/format/#document-resource-object-identification)
33
-
34
- ```ts
35
- import { findRecord } from '@ember-data/legacy-compat/builders';
36
- const { content: post } = await store.request<Post>(findRecord<Post>({ type: 'post', id }));
37
- ```
38
-
39
- All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
40
- This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
41
- To that end, these builders are deprecated and will be removed in a future version of Ember Data.
42
-
43
- @deprecated
44
- @public
45
- @param {string|object} resource - either a string representing the name of the resource or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record
46
- @param {string|number|object} id - optional object with options for the request only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved
47
- @param {FindRecordBuilderOptions} [options] - if the first param is a string this will be the optional options for the request. See examples for available options.
48
- @return {FindRecordRequestInput} request config
49
- */
50
- export function findRecordBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, id: string, options?: FindRecordBuilderOptions): FindRecordRequestInput<TypeFromInstance<T>, T>;
51
- export function findRecordBuilder(type: string, id: string, options?: FindRecordBuilderOptions): FindRecordRequestInput;
52
- export function findRecordBuilder<T extends TypedRecordInstance>(resource: ResourceIdentifierObject<TypeFromInstance<T>>, options?: FindRecordBuilderOptions): FindRecordRequestInput<TypeFromInstance<T>, T>;
53
- export function findRecordBuilder(resource: ResourceIdentifierObject, options?: FindRecordBuilderOptions): FindRecordRequestInput;
54
- export {};
55
- }
56
- //# sourceMappingURL=find-record.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-record.d.ts","sourceRoot":"","sources":["../../src/builders/find-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,KAAK,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,IAAI,iBAAiB,GAAG;IACzF,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE;QACJ,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;QACpC,OAAO,EAAE,wBAAwB,CAAC;KACnC,CAAC;IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCE;AACF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,sBAAsB,CAAC;AACxH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,QAAQ,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EACvD,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,wBAAwB,EAClC,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC"}
@@ -1,63 +0,0 @@
1
- declare module '@ember-data/legacy-compat/builders/query' {
2
- import type { StoreRequestInput } from '@ember-data/store';
3
- import type { LegacyResourceQuery, QueryOptions } from '@ember-data/store/types';
4
- import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
5
- import type { RequestSignature } from '@warp-drive/core-types/symbols';
6
- type QueryRequestInput<T extends string = string, RT = unknown[]> = StoreRequestInput & {
7
- op: 'query';
8
- data: {
9
- type: T;
10
- query: LegacyResourceQuery;
11
- options: QueryBuilderOptions;
12
- };
13
- [RequestSignature]?: RT;
14
- };
15
- type QueryBuilderOptions = QueryOptions;
16
- /**
17
- This function builds a request config for a given type and query object.
18
- When passed to `store.request`, this config will result in the same behavior as a `store.query` request.
19
- Additionally, it takes the same options as `store.query`.
20
-
21
- All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
22
- This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
23
- To that end, these builders are deprecated and will be removed in a future version of Ember Data.
24
-
25
- @deprecated
26
- @public
27
- @param {String} type the name of the resource
28
- @param {Object} query a query to be used by the adapter
29
- @param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
30
- @return {QueryRequestInput} request config
31
- */
32
- export function queryBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, query: LegacyResourceQuery<T>, options?: QueryBuilderOptions): QueryRequestInput<TypeFromInstance<T>, T[]>;
33
- export function queryBuilder(type: string, query: LegacyResourceQuery, options?: QueryBuilderOptions): QueryRequestInput;
34
- type QueryRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
35
- op: 'queryRecord';
36
- data: {
37
- type: T;
38
- query: LegacyResourceQuery;
39
- options: QueryBuilderOptions;
40
- };
41
- [RequestSignature]?: RT;
42
- };
43
- /**
44
- This function builds a request config for a given type and query object.
45
- When passed to `store.request`, this config will result in the same behavior as a `store.queryRecord` request.
46
- Additionally, it takes the same options as `store.queryRecord`.
47
-
48
- All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
49
- This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
50
- To that end, these builders are deprecated and will be removed in a future version of Ember Data.
51
-
52
- @deprecated
53
- @public
54
- @param {String} type the name of the resource
55
- @param {Object} query a query to be used by the adapter
56
- @param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
57
- @return {QueryRecordRequestInput} request config
58
- */
59
- export function queryRecordBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, query: LegacyResourceQuery<T>, options?: QueryBuilderOptions): QueryRecordRequestInput<TypeFromInstance<T>, T | null>;
60
- export function queryRecordBuilder(type: string, query: LegacyResourceQuery, options?: QueryBuilderOptions): QueryRecordRequestInput;
61
- export {};
62
- }
63
- //# sourceMappingURL=query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/builders/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3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IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;EAeE;AACF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,EAC9D,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,uBAAuB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAC1D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,mBAAmB,EAC1B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,uBAAuB,CAAC"}
@@ -1,34 +0,0 @@
1
- declare module '@ember-data/legacy-compat/builders/save-record' {
2
- import { type StoreRequestInput } from '@ember-data/store';
3
- import type { StableRecordIdentifier } from '@warp-drive/core-types';
4
- import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
5
- import type { RequestSignature } from '@warp-drive/core-types/symbols';
6
- type SaveRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
7
- op: 'createRecord' | 'deleteRecord' | 'updateRecord';
8
- data: {
9
- record: StableRecordIdentifier<T>;
10
- options: SaveRecordBuilderOptions;
11
- };
12
- records: [StableRecordIdentifier<T>];
13
- [RequestSignature]?: RT;
14
- };
15
- type SaveRecordBuilderOptions = Record<string, unknown>;
16
- /**
17
- This function builds a request config for saving the given record (e.g. creating, updating, or deleting the record).
18
- When passed to `store.request`, this config will result in the same behavior as a legacy `store.saveRecord` request.
19
- Additionally, it takes the same options as `store.saveRecord`.
20
-
21
- All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
22
- This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
23
- To that end, these builders are deprecated and will be removed in a future version of Ember Data.
24
-
25
- @deprecated
26
- @public
27
- @param {Object} record a record to save
28
- @param {SaveRecordBuilderOptions} options optional, may include `adapterOptions` hash which will be passed to adapter.saveRecord
29
- @return {SaveRecordRequestInput} request config
30
- */
31
- export function saveRecordBuilder<T extends TypedRecordInstance>(record: T, options?: Record<string, unknown>): SaveRecordRequestInput<TypeFromInstance<T>, T>;
32
- export {};
33
- }
34
- //# sourceMappingURL=save-record.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"save-record.d.ts","sourceRoot":"","sources":["../../src/builders/save-record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,KAAK,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,IAAI,iBAAiB,GAAG;IACzF,EAAE,EAAE,cAAc,GAAG,cAAc,GAAG,cAAc,CAAC;IACrD,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,EAAE,wBAAwB,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAWxD;;;;;;;;;;;;;;EAcE;AACF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,MAAM,EAAE,CAAC,EACT,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAuChD"}
@@ -1,6 +0,0 @@
1
- declare module '@ember-data/legacy-compat/builders/utils' {
2
- import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/json-api-raw';
3
- export function isMaybeIdentifier(maybeIdentifier: string | ResourceIdentifierObject): maybeIdentifier is ResourceIdentifierObject;
4
- export function normalizeModelName(type: string): string;
5
- }
6
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/builders/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEzF,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,GAAG,wBAAwB,GACjD,eAAe,IAAI,wBAAwB,CAO7C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBvD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;EASE;AAEF,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,YAAY,IAAI,KAAK,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5F,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAgB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;IAYI;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;;;;;;;;;;;;;;;IAeI;AACJ,wBAAgB,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAwC/F;AAED;;;;;;;;;;;;;;;;;;IAkBI;AAEJ,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,6EAmB7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsDI;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"}
@@ -1,49 +0,0 @@
1
- declare module '@ember-data/legacy-compat/legacy-network-handler/fetch-manager' {
2
- import { createDeferred } from '@ember-data/request';
3
- import type Store from '@ember-data/store';
4
- import type { Request, RequestStateService } from '@ember-data/store/-private';
5
- import type { FindRecordOptions } from '@ember-data/store/types';
6
- import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';
7
- import type { TypeFromInstance } from '@warp-drive/core-types/record';
8
- import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
9
- import type { SingleResourceDocument } from '@warp-drive/core-types/spec/json-api-raw';
10
- import { Snapshot } from '@ember-data/legacy-compat/legacy-network-handler/snapshot';
11
- type Deferred<T> = ReturnType<typeof createDeferred<T>>;
12
- export const SaveOp: "___(unique) Symbol(SaveOp)";
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 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
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-manager.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/fetch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B,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,EAAE,iBAAiB,YAAK,EAC/B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,8BAA8B,CAAC;IAyB1C,OAAO;CAGR"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-has-id.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/identifier-has-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAExF,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,IAAI,8BAA8B,CAK/G"}
@@ -1,14 +0,0 @@
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';
4
- import type { StableRecordIdentifier } from '@warp-drive/core-types';
5
- import type { LegacyRelationshipField as RelationshipSchema } from '@warp-drive/core-types/schema/fields';
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacy-data-fetch.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/legacy-data-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,IAAI,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK1G,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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacy-network-handler.d.ts","sourceRoot":"","sources":["../../src/legacy-network-handler/legacy-network-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAU,OAAO,EAAkC,MAAM,qBAAqB,CAAC;AAiD3F,eAAO,MAAM,oBAAoB,EAAE,OAoClC,CAAC"}