@warp-drive/legacy 5.10.0-alpha.1 → 5.10.0-alpha.2
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/dist/adapter/-private.d.ts +6 -6
- package/dist/adapter/-private.d.ts.map +1 -1
- package/dist/compat/utils.d.ts +11 -12
- package/dist/compat/utils.d.ts.map +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/model/migration-support.d.ts +8 -9
- package/dist/model/migration-support.d.ts.map +1 -1
- package/dist/model-fragments.d.ts +11 -11
- package/dist/model-fragments.d.ts.map +1 -1
- package/dist/model.d.ts +17 -17
- package/dist/model.d.ts.map +1 -1
- package/dist/serializer/rest.d.ts +2 -2
- package/dist/serializer/rest.d.ts.map +1 -1
- package/dist/serializer/transform.d.ts +10 -11
- package/dist/serializer/transform.d.ts.map +1 -1
- package/dist/serializer.d.ts +1 -2
- package/dist/serializer.d.ts.map +1 -1
- package/dist/store.d.ts +2 -2
- package/dist/store.d.ts.map +1 -1
- package/dist/unpkg/dev/{compat-BqmMZNci.js → compat-DNQT2TQx.js} +2 -2
- package/dist/unpkg/dev/{compat-BqmMZNci.js.map → compat-DNQT2TQx.js.map} +1 -1
- package/dist/unpkg/dev/compat.js +1 -1
- package/dist/unpkg/dev/index.js +1 -1
- package/dist/unpkg/dev-deprecated/compat/builders.js +1 -1
- package/dist/unpkg/dev-deprecated/{compat-D_T7cGfd.js → compat-CeT0PnVX.js} +2 -2
- package/dist/unpkg/dev-deprecated/{compat-D_T7cGfd.js.map → compat-CeT0PnVX.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/compat.js +1 -1
- package/dist/unpkg/dev-deprecated/index.js +3 -3
- package/dist/unpkg/dev-deprecated/model/migration-support.js +1 -1
- package/dist/unpkg/dev-deprecated/{model-CdGKb7bA.js → model-BeGORt6h.js} +4 -4
- package/dist/unpkg/dev-deprecated/{model-CdGKb7bA.js.map → model-BeGORt6h.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/model.js +2 -2
- package/dist/unpkg/dev-deprecated/{schema-provider-C9wc6vGC.js → schema-provider-NmtdR4n_.js} +2 -2
- package/dist/unpkg/dev-deprecated/{schema-provider-C9wc6vGC.js.map → schema-provider-NmtdR4n_.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/{store-BX7GvXC_.js → store-BCOLSC6z.js} +3 -3
- package/dist/unpkg/dev-deprecated/{store-BX7GvXC_.js.map → store-BCOLSC6z.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/store.js +1 -1
- package/dist/unpkg/dev-deprecated/{util-9mgEBJ3W.js → util-CXA3RNYH.js} +2 -2
- package/dist/unpkg/dev-deprecated/{util-9mgEBJ3W.js.map → util-CXA3RNYH.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/{utils-Cl86-e7F.js → utils-DQkMqhDv.js} +2 -2
- package/dist/unpkg/dev-deprecated/{utils-Cl86-e7F.js.map → utils-DQkMqhDv.js.map} +1 -1
- package/package.json +9 -9
|
@@ -3,17 +3,17 @@ import { a as RequestData } from "../rest-0NhtexIq.js";
|
|
|
3
3
|
import { Store } from "@warp-drive/core";
|
|
4
4
|
import { ModelSchema } from "@warp-drive/core/types";
|
|
5
5
|
//#region src/adapter/-private/utils/parse-response-headers.d.ts
|
|
6
|
-
declare function parseResponseHeaders(headersString: string): Record<string, string>;
|
|
6
|
+
export declare function parseResponseHeaders(headersString: string): Record<string, string>;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/adapter/-private/utils/determine-body-promise.d.ts
|
|
9
9
|
type Payload = Error | Record<string, unknown> | unknown[] | string | undefined;
|
|
10
|
-
declare function determineBodyPromise(response: Response, requestData: RequestData): Promise<Payload>;
|
|
10
|
+
export declare function determineBodyPromise(response: Response, requestData: RequestData): Promise<Payload>;
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/adapter/-private/utils/serialize-query-params.d.ts
|
|
13
13
|
interface PlainObject {
|
|
14
14
|
[key: string]: string | PlainObject | PlainObject[] | string[];
|
|
15
15
|
}
|
|
16
|
-
declare function serializeQueryParams(queryParamsObject: PlainObject | string): string;
|
|
16
|
+
export declare function serializeQueryParams(queryParamsObject: PlainObject | string): string;
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/adapter/-private/utils/fetch.d.ts
|
|
19
19
|
type FetchFunction = (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
@@ -22,12 +22,12 @@ type MockRequest = {
|
|
|
22
22
|
get(key: string): string | undefined;
|
|
23
23
|
};
|
|
24
24
|
declare function getFetchFunction(): FetchFunction;
|
|
25
|
-
declare function setupFastboot(fastBootRequest: MockRequest): void;
|
|
25
|
+
export declare function setupFastboot(fastBootRequest: MockRequest): void;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/adapter/-private/utils/serialize-into-hash.d.ts
|
|
28
|
-
declare function serializeIntoHash(store: Store, modelClass: ModelSchema, snapshot: Snapshot, options?: {
|
|
28
|
+
export declare function serializeIntoHash(store: Store, modelClass: ModelSchema, snapshot: Snapshot, options?: {
|
|
29
29
|
includeId?: boolean;
|
|
30
30
|
}): object;
|
|
31
31
|
//#endregion
|
|
32
|
-
export {
|
|
32
|
+
export { getFetchFunction as fetch };
|
|
33
33
|
//# sourceMappingURL=-private.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"-private.d.ts","names":[],"sources":["../../src/adapter/-private/utils/parse-response-headers.ts","../../src/adapter/-private/utils/determine-body-promise.ts","../../src/adapter/-private/utils/serialize-query-params.ts","../../src/adapter/-private/utils/fetch.ts","../../src/adapter/-private/utils/serialize-into-hash.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"-private.d.ts","names":[],"sources":["../../src/adapter/-private/utils/parse-response-headers.ts","../../src/adapter/-private/utils/determine-body-promise.ts","../../src/adapter/-private/utils/serialize-query-params.ts","../../src/adapter/-private/utils/fetch.ts","../../src/adapter/-private/utils/serialize-into-hash.ts"],"mappings":";;;;;wBAEgB,qBAAqB,wBAAwB;;;KCKxD,UAAU,QAAQ;wBA2DP,qBAAqB,UAAU,UAAU,aAAa,cAAc,QAAQ;;;UC9DlF;GACgB,uBAAA,cAAc;;wBA8DxB,qBAAqB,mBAAmB;;;KCjEnD,iBAAiB,OAAO,aAAa,OAAO,gBAAgB,QAAQ;KAGpE;EAAgB;EAAmB,IAAI;;iBAG5B,oBAAoB;wBAkEpB,cAAc,iBAAiB;;;wBC/D/B,kBACd,OAAO,OACP,YAAY,aACZ,UAAU,UACV;EAAW"}
|
package/dist/compat/utils.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type Reporter = (type: "formatted-id" | "formatted-type", actual: unknown, expec
|
|
|
8
8
|
* @param fn - a function which takes a mismatch-type ('formatted-id' | 'formatted-type'), actual, and expected value
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
declare function configureMismatchReporter(fn: Reporter): void;
|
|
11
|
+
export declare function configureMismatchReporter(fn: Reporter): void;
|
|
12
12
|
/**
|
|
13
13
|
* Configure a function to be called when an id or type
|
|
14
14
|
* fails validation. This is useful for instrumenting
|
|
@@ -17,7 +17,7 @@ declare function configureMismatchReporter(fn: Reporter): void;
|
|
|
17
17
|
* @param fn - a function which takes a message and a condition
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
declare function configureAssertFn(fn: (message: string, condition: unknown) => void): void;
|
|
20
|
+
export declare function configureAssertFn(fn: (message: string, condition: unknown) => void): void;
|
|
21
21
|
/**
|
|
22
22
|
* Configure a function to be called to normalize
|
|
23
23
|
* a resource type string. Used by both formattedType
|
|
@@ -31,7 +31,7 @@ declare function configureAssertFn(fn: (message: string, condition: unknown) =>
|
|
|
31
31
|
* @param fn - a function which takes a string and returns a string
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
declare function configureTypeNormalization(fn: (type: string) => string): void;
|
|
34
|
+
export declare function configureTypeNormalization(fn: (type: string) => string): void;
|
|
35
35
|
/**
|
|
36
36
|
* Converts a potentially unnormalized type into the format expected
|
|
37
37
|
* by our WarpDrive Cache. Currently this is singular-dasherized.
|
|
@@ -61,7 +61,7 @@ declare function configureTypeNormalization(fn: (type: string) => string): void;
|
|
|
61
61
|
* @return the normalized type
|
|
62
62
|
* @public
|
|
63
63
|
*/
|
|
64
|
-
declare function formattedType<T extends string>(type: T | string): T;
|
|
64
|
+
export declare function formattedType<T extends string>(type: T | string): T;
|
|
65
65
|
/**
|
|
66
66
|
* Format an id to the format expected by the WarpDrive Cache.
|
|
67
67
|
* Currently this means that id should be `string | null`.
|
|
@@ -82,22 +82,22 @@ declare function formattedType<T extends string>(type: T | string): T;
|
|
|
82
82
|
* @return the normalized id
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
|
-
declare function formattedId(id: string | number): string;
|
|
86
|
-
declare function formattedId(id: null): null;
|
|
87
|
-
declare function formattedId(id: string | number | null): string | null;
|
|
85
|
+
export declare function formattedId(id: string | number): string;
|
|
86
|
+
export declare function formattedId(id: null): null;
|
|
87
|
+
export declare function formattedId(id: string | number | null): string | null;
|
|
88
88
|
/**
|
|
89
89
|
* Like {@link formattedId}, but asserts that `id` is not `null` rather
|
|
90
90
|
* than allowing and passing through `null`.
|
|
91
91
|
*
|
|
92
92
|
* @public
|
|
93
93
|
*/
|
|
94
|
-
declare function expectId(id: string | number): string;
|
|
94
|
+
export declare function expectId(id: string | number): string;
|
|
95
95
|
/**
|
|
96
96
|
* Throws, since `id` is `null`.
|
|
97
97
|
*
|
|
98
98
|
* @public
|
|
99
99
|
*/
|
|
100
|
-
declare function expectId(id: null): never;
|
|
100
|
+
export declare function expectId(id: null): never;
|
|
101
101
|
/**
|
|
102
102
|
* Compares two types for strict equality, converting them to
|
|
103
103
|
* the format expected by the WarpDrive Cache to ensure
|
|
@@ -123,7 +123,7 @@ declare function expectId(id: null): never;
|
|
|
123
123
|
* @return true if the types are equivalent
|
|
124
124
|
* @public
|
|
125
125
|
*/
|
|
126
|
-
declare function isEquivType(expected: string, actual: string): boolean;
|
|
126
|
+
export declare function isEquivType(expected: string, actual: string): boolean;
|
|
127
127
|
/**
|
|
128
128
|
* Compares two IDs for strict equality, converting them to
|
|
129
129
|
* the format expected by the WarpDrive Cache to ensure
|
|
@@ -145,7 +145,6 @@ declare function isEquivType(expected: string, actual: string): boolean;
|
|
|
145
145
|
* @return true if the ids are equivalent
|
|
146
146
|
* @public
|
|
147
147
|
*/
|
|
148
|
-
declare function isEquivId(expected: string | number, actual: string | number | null): boolean;
|
|
148
|
+
export declare function isEquivId(expected: string | number, actual: string | number | null): boolean;
|
|
149
149
|
//#endregion
|
|
150
|
-
export { configureAssertFn, configureMismatchReporter, configureTypeNormalization, expectId, formattedId, formattedType, isEquivId, isEquivType };
|
|
151
150
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/compat/utils.ts"],"mappings":";KAcK,YAAY,yCAAyC,iBAAiB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/compat/utils.ts"],"mappings":";KAcK,YAAY,yCAAyC,iBAAiB;;;;;;;;;wBA0B3D,0BAA0B,IAAI;;;;;;;;;wBAY9B,kBAAkB,KAAK,iBAAiB;;;;;;;;;;;;;;wBAiBxC,2BAA2B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmChC,cAAc,kBAAkB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;wBAuCnD,YAAY;wBACZ,YAAY;wBACZ,YAAY;;;;;;;wBA0BZ,SAAS;;;;;;wBAMT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgCT,YAAY,kBAAkB;;;;;;;;;;;;;;;;;;;;;;wBAmC9B,UAAU,2BAA2B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface _LegacyStoreSetupOptions<T extends Cache> extends Omit<StoreSetupOptio
|
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
interface LegacyModelStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
31
|
+
export interface LegacyModelStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
32
32
|
/**
|
|
33
33
|
* If true, it is presumed that no requests require use of the LegacyNetworkHandler
|
|
34
34
|
* and associated adapters/serializer methods.
|
|
@@ -55,7 +55,7 @@ interface LegacyModelStoreSetupOptions<T extends Cache> extends _LegacyStoreSetu
|
|
|
55
55
|
*
|
|
56
56
|
* @public
|
|
57
57
|
*/
|
|
58
|
-
interface LegacyModelAndNetworkStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
58
|
+
export interface LegacyModelAndNetworkStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
59
59
|
/**
|
|
60
60
|
* If true, it is presumed that no requests require use of the LegacyNetworkHandler
|
|
61
61
|
* and associated adapters/serializer methods.
|
|
@@ -80,7 +80,7 @@ interface LegacyModelAndNetworkStoreSetupOptions<T extends Cache> extends _Legac
|
|
|
80
80
|
*
|
|
81
81
|
* @public
|
|
82
82
|
*/
|
|
83
|
-
interface LegacyModelAndNetworkAndRequestStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
83
|
+
export interface LegacyModelAndNetworkAndRequestStoreSetupOptions<T extends Cache> extends _LegacyStoreSetupOptions<T> {
|
|
84
84
|
/**
|
|
85
85
|
* If true, it is presumed that no requests require use of the LegacyNetworkHandler
|
|
86
86
|
* and associated adapters/serializer methods.
|
|
@@ -106,8 +106,8 @@ interface LegacyModelAndNetworkAndRequestStoreSetupOptions<T extends Cache> exte
|
|
|
106
106
|
* - {@link LegacyModelAndNetworkStoreSetupOptions}
|
|
107
107
|
* - {@link LegacyModelAndNetworkAndRequestStoreSetupOptions}
|
|
108
108
|
*/
|
|
109
|
-
type LegacyStoreSetupOptions<T extends Cache = Cache> = LegacyModelStoreSetupOptions<T> | LegacyModelAndNetworkStoreSetupOptions<T> | LegacyModelAndNetworkAndRequestStoreSetupOptions<T>;
|
|
110
|
-
declare class ConfiguredStore<T extends {
|
|
109
|
+
export type LegacyStoreSetupOptions<T extends Cache = Cache> = LegacyModelStoreSetupOptions<T> | LegacyModelAndNetworkStoreSetupOptions<T> | LegacyModelAndNetworkAndRequestStoreSetupOptions<T>;
|
|
110
|
+
export declare class ConfiguredStore<T extends {
|
|
111
111
|
/**
|
|
112
112
|
* The {@link Cache} implementation this store was configured with.
|
|
113
113
|
*/
|
|
@@ -229,15 +229,14 @@ declare class ConfiguredStore<T extends {
|
|
|
229
229
|
* explicitly, so a handler relying on it should treat it as optional (as
|
|
230
230
|
* `LoggingHandler` does above).
|
|
231
231
|
*/
|
|
232
|
-
declare function useLegacyStore<T extends Cache>(options: LegacyModelStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
232
|
+
export declare function useLegacyStore<T extends Cache>(options: LegacyModelStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
233
233
|
cache: T;
|
|
234
234
|
}>;
|
|
235
|
-
declare function useLegacyStore<T extends Cache>(options: LegacyModelAndNetworkStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
235
|
+
export declare function useLegacyStore<T extends Cache>(options: LegacyModelAndNetworkStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
236
236
|
cache: T;
|
|
237
237
|
}>;
|
|
238
|
-
declare function useLegacyStore<T extends Cache>(options: LegacyModelAndNetworkAndRequestStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
238
|
+
export declare function useLegacyStore<T extends Cache>(options: LegacyModelAndNetworkAndRequestStoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
239
239
|
cache: T;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
|
-
export { ConfiguredStore, LegacyModelAndNetworkAndRequestStoreSetupOptions, LegacyModelAndNetworkStoreSetupOptions, LegacyModelStoreSetupOptions, LegacyStoreSetupOptions, useLegacyStore };
|
|
243
242
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;UA2CU,yBAAyB,UAAU,eAAe,KAAK,kBAAkB;;;;;;;;;;;EAWjF,UAAU,MAAM,iBAAiB;;;;;;EAOjC;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;UA2CU,yBAAyB,UAAU,eAAe,KAAK,kBAAkB;;;;;;;;;;;EAWjF,UAAU,MAAM,iBAAiB;;;;;;EAOjC;;;;;;;;iBASe,6BAA6B,UAAU,eAAe,yBAAyB;;;;;;;;;EAS9F;;;;;;;;;EASA;;;;;;;;;iBAUe,uCAAuC,UAAU,eAAe,yBAAyB;;;;;;;EAOxG;;;;;;;;;EASA;;;;;;;;;iBAUe,iDAAiD,UAAU,eAAe,yBAAyB;;;;;;;EAOlH;;;;;;;;;EASA;;;;;;;;;;YAaU,wBAAwB,UAAU,QAAQ,SAClD,6BAA6B,KAC7B,uCAAuC,KACvC,iDAAiD;qBAEhC,gBACnB;;;;EAIE,OAAO;WAED;EAER,YAAY,cAAc,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqHvC,eAAe,UAAU,OACvC,SAAS,6BAA6B,IACtC,oBAAoB,eACZ;EAAkB,OAAO;;wBACnB,eAAe,UAAU,OACvC,SAAS,uCAAuC,IAChD,oBAAoB,eACZ;EAAkB,OAAO;;wBACnB,eAAe,UAAU,OACvC,SAAS,iDAAiD,IAC1D,oBAAoB,eACZ;EAAkB,OAAO"}
|
|
@@ -17,7 +17,7 @@ import { Derivation, HashFn, Transformation } from "@warp-drive/core/types/schem
|
|
|
17
17
|
* {@link TypedRecordInstance}, for use when migrating a resource from
|
|
18
18
|
* `Model` to a schema-based record while preserving these APIs.
|
|
19
19
|
*/
|
|
20
|
-
type WithLegacyDerivations<T extends TypedRecordInstance> = T & MinimalLegacyRecord & {
|
|
20
|
+
export type WithLegacyDerivations<T extends TypedRecordInstance> = T & MinimalLegacyRecord & {
|
|
21
21
|
/**
|
|
22
22
|
* see {@link belongsTo}
|
|
23
23
|
*/
|
|
@@ -102,7 +102,7 @@ interface LegacyModeRecord<T extends TypedRecordInstance> {
|
|
|
102
102
|
* ```
|
|
103
103
|
*
|
|
104
104
|
*/
|
|
105
|
-
type WithLegacy<T extends TypedRecordInstance> = T & LegacyModeRecord<T>;
|
|
105
|
+
export type WithLegacy<T extends TypedRecordInstance> = T & LegacyModeRecord<T>;
|
|
106
106
|
/**
|
|
107
107
|
* A function which adds the necessary fields to a schema and marks it as
|
|
108
108
|
* being in LegacyMode. This is used to support the legacy features of
|
|
@@ -157,7 +157,7 @@ type WithLegacy<T extends TypedRecordInstance> = T & LegacyModeRecord<T>;
|
|
|
157
157
|
* @return The schema with legacy support added.
|
|
158
158
|
* @public
|
|
159
159
|
*/
|
|
160
|
-
declare function withDefaults(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): LegacyResourceSchema;
|
|
160
|
+
export declare function withDefaults(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): LegacyResourceSchema;
|
|
161
161
|
/**
|
|
162
162
|
* Adds the necessasary fields to the schema for supporting
|
|
163
163
|
* the deprecated request methods on LegacyMode schemas.
|
|
@@ -177,7 +177,7 @@ declare function withDefaults(schema: WithPartial<LegacyResourceSchema, "legacy"
|
|
|
177
177
|
* });
|
|
178
178
|
* ```
|
|
179
179
|
*/
|
|
180
|
-
declare function withRestoredDeprecatedModelRequestBehaviors(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): LegacyResourceSchema;
|
|
180
|
+
export declare function withRestoredDeprecatedModelRequestBehaviors(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): LegacyResourceSchema;
|
|
181
181
|
/**
|
|
182
182
|
* A function which registers the necessary derivations to support
|
|
183
183
|
* the LegacyMode features of @warp-drive/legacy/model while migrating to WarpDrive.
|
|
@@ -188,7 +188,7 @@ declare function withRestoredDeprecatedModelRequestBehaviors(schema: WithPartial
|
|
|
188
188
|
* @param schema The schema service to register the derivations with.
|
|
189
189
|
* @public
|
|
190
190
|
*/
|
|
191
|
-
declare function registerDerivations(schema: SchemaService$1): void;
|
|
191
|
+
export declare function registerDerivations(schema: SchemaService$1): void;
|
|
192
192
|
/**
|
|
193
193
|
* A class which provides a schema service that delegates between
|
|
194
194
|
* a primary schema service and one that supports legacy model
|
|
@@ -220,7 +220,7 @@ declare function registerDerivations(schema: SchemaService$1): void;
|
|
|
220
220
|
* @class DelegatingSchemaService
|
|
221
221
|
* @public
|
|
222
222
|
*/
|
|
223
|
-
interface DelegatingSchemaService {
|
|
223
|
+
export interface DelegatingSchemaService {
|
|
224
224
|
/**
|
|
225
225
|
* Delegates to whichever of the primary/fallback schema services has a
|
|
226
226
|
* schema for the resource, preferring the primary. See {@link DelegatingSchemaService.isDelegated | isDelegated}.
|
|
@@ -244,7 +244,7 @@ interface DelegatingSchemaService {
|
|
|
244
244
|
/**
|
|
245
245
|
* See the {@link DelegatingSchemaService | class documentation above} for usage.
|
|
246
246
|
*/
|
|
247
|
-
declare class DelegatingSchemaService implements SchemaService$1 {
|
|
247
|
+
export declare class DelegatingSchemaService implements SchemaService$1 {
|
|
248
248
|
/** @internal */
|
|
249
249
|
_preferred: SchemaService$1;
|
|
250
250
|
/** @internal */
|
|
@@ -326,10 +326,9 @@ declare class DelegatingSchemaService implements SchemaService$1 {
|
|
|
326
326
|
/**
|
|
327
327
|
* @internal
|
|
328
328
|
*/
|
|
329
|
-
interface PrivateDelegatingSchemaService extends DelegatingSchemaService {
|
|
329
|
+
export interface PrivateDelegatingSchemaService extends DelegatingSchemaService {
|
|
330
330
|
_preferred: SchemaService$1;
|
|
331
331
|
_secondary: SchemaService$1;
|
|
332
332
|
}
|
|
333
333
|
//#endregion
|
|
334
|
-
export { DelegatingSchemaService, PrivateDelegatingSchemaService, WithLegacy, WithLegacyDerivations, registerDerivations, withDefaults, withRestoredDeprecatedModelRequestBehaviors };
|
|
335
334
|
//# sourceMappingURL=migration-support.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-support.d.ts","names":[],"sources":["../../src/model/migration-support.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"migration-support.d.ts","names":[],"sources":["../../src/model/migration-support.ts"],"mappings":";;;;;;;;;;;;;;;;;;;YAsFY,sBAAsB,UAAU,uBAAuB,IACjE;;;;EAIE,kBAAkB;;;;EAIlB,gBAAgB;;KAGf,mBAAmB,WAAW,QAAQ;KACtC,sBAAsB,WAAW,QAAQ;UAEpC,iBAAiB,UAAU;EACnC;EAEA,UAAU,UAAU;EACpB,cAAc,UAAU,0BAA0B;EAClD;EACA,qBAAqB;EACrB;EACA,mBAAmB,SAAS;EAC5B,KAAK,UAAU,0BAA0B;EACzC,OAAO,UAAU,0BAA0B,QAAQ;EACnD,UAAU,UAAU,sBAAsB,IAAI,MAAM,IAAI,mBAAmB,GAAG;EAC9E,QAAQ,UAAU,mBAAmB,IAAI,MAAM,IAAI,iBAAiB,GAAG;EACvE;EAEA;EACA;IAAe,WAAW,iBAAiB;;EAC3C,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyEU,WAAW,UAAU,uBAAuB,IAAI,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqI7D,aAAa,QAAQ,YAAY,+CAA+C;;;;;;;;;;;;;;;;;;;;wBAqDhF,4CACd,QAAQ,YAAY,+CACnB;;;;;;;;;;;wBA2Ca,oBAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyH3B;;;;;EAKf,yBAAyB,UAAU;IAAgB;MAAiB;;;;;EAKpE,4BAA4B,UAAU;IAAgB;MAAiB;;;;;EAKvE,eAAe;;;;;qBAKJ,mCAAmC;;EAE9C,YAAa;;EAEb,YAAa;EAEb,YAAY,OAAO,OAAO,QAAQ;;;;;EASlC,YAAY,UAAU;IAAgB;;EAItC,iBAAiB;EAIjB,YAAY,UAAU;IAAgB;;EAGtC,SAAS;EAMT,iBAAiB,UAAU;IAAgB;KAAgB;EAM3D,OAAO,UAAU;IAAgB;MAAiB,YAAY;EAM9D,aAAa;IAAY;MAAiB,YAAY,QAAQ,sBAAsB;EASpF,eAAe,OAAO,eAAe,cAAc;IAAe;MAAiB;EAGnF,OAAO,OAAO;IAAc;MAAiB;EAG7C,WAAW,OAAO;IAAiB;MAAiB;EAGpD,SAAS,UAAU;IAAgB;MAAiB,iBAAiB;EAMrE,kBAAkB,SAAS,MAAM,iBAAiB;EAGlD,iBAAiB,QAAQ,iBAAiB;EAG1C,uBAAuB,WAAW;EAGlC,mBAAmB,GAAG,GAAG,WAAW,oBAAoB,YAAY,WAAW,GAAG,GAAG;EAGrF,eAAe,QAAQ;EAIvB,sCAAsC;IAAO;IAA0B;;EAIvE,2CAA2C,WAAW;EAItD,4CACE,UAAU;IAAgB;aAClB;EAIV,0CACE,OAAO,iBACP,qCACQ;EAIV,yCAAyC,OAAO,yBAAyB;;;;;;;;;;;;EAezE,cAAc,cAAc;;;;;;;;;;;;EAiB5B,MAAM,cAAc;;;;;iBAUL,uCAAuC;EACtD,YAAY;EACZ,YAAY"}
|
|
@@ -15,7 +15,7 @@ import "@ember/application/instance";
|
|
|
15
15
|
* @param primitiveType The primitive type of items in the array (optional)
|
|
16
16
|
* @returns The schema for an array
|
|
17
17
|
*/
|
|
18
|
-
declare function withArrayDefaults<ArrayName extends string, PrimitiveType extends string>(arrayName: ArrayName, primitiveType?: PrimitiveType): PrimitiveType extends undefined ? {
|
|
18
|
+
export declare function withArrayDefaults<ArrayName extends string, PrimitiveType extends string>(arrayName: ArrayName, primitiveType?: PrimitiveType): PrimitiveType extends undefined ? {
|
|
19
19
|
/**
|
|
20
20
|
* This field is an `'array'` schema field.
|
|
21
21
|
*/
|
|
@@ -70,7 +70,7 @@ declare function withArrayDefaults<ArrayName extends string, PrimitiveType exten
|
|
|
70
70
|
* @param fragmentName The optional name of the fragment. If not provided, it will default to the fragmentType.
|
|
71
71
|
* @returns The schema for a fragment
|
|
72
72
|
*/
|
|
73
|
-
declare function withFragmentDefaults<FragmentType extends string, FragmentName extends string>(fragmentType: FragmentType, fragmentName?: FragmentName): {
|
|
73
|
+
export declare function withFragmentDefaults<FragmentType extends string, FragmentName extends string>(fragmentType: FragmentType, fragmentName?: FragmentName): {
|
|
74
74
|
/**
|
|
75
75
|
* This field is a `'schema-object'` field, a single fragment.
|
|
76
76
|
*/
|
|
@@ -103,7 +103,7 @@ declare function withFragmentDefaults<FragmentType extends string, FragmentName
|
|
|
103
103
|
* @param fragmentArrayName The name of the fragment-array
|
|
104
104
|
* @returns The schema for a fragment-array
|
|
105
105
|
*/
|
|
106
|
-
declare function withFragmentArrayDefaults<FragmentArrayType extends string, FragmentArrayName extends string>(fragmentArrayType: FragmentArrayType, fragmentArrayName?: FragmentArrayName): {
|
|
106
|
+
export declare function withFragmentArrayDefaults<FragmentArrayType extends string, FragmentArrayName extends string>(fragmentArrayType: FragmentArrayType, fragmentArrayName?: FragmentArrayName): {
|
|
107
107
|
/**
|
|
108
108
|
* This field is a `'schema-array'` field, an array of fragments.
|
|
109
109
|
*/
|
|
@@ -140,7 +140,7 @@ declare function withFragmentArrayDefaults<FragmentArrayType extends string, Fra
|
|
|
140
140
|
* @param schema the partial legacy resource schema to complete
|
|
141
141
|
* @returns the completed resource schema
|
|
142
142
|
*/
|
|
143
|
-
declare function withLegacy(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): ResourceSchema;
|
|
143
|
+
export declare function withLegacy(schema: WithPartial<LegacyResourceSchema, "legacy" | "identity">): ResourceSchema;
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/model-fragments/instance-initializers/fragment-extensions.d.ts
|
|
146
146
|
/**
|
|
@@ -149,7 +149,7 @@ declare function withLegacy(schema: WithPartial<LegacyResourceSchema, "legacy" |
|
|
|
149
149
|
*
|
|
150
150
|
* @public
|
|
151
151
|
*/
|
|
152
|
-
declare function registerFragmentExtensions(schema: SchemaService): void;
|
|
152
|
+
export declare function registerFragmentExtensions(schema: SchemaService): void;
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/model-fragments/hooks/model-for.d.ts
|
|
155
155
|
type KeyOrString<T> = keyof T & string extends never ? string : keyof T & string;
|
|
@@ -172,14 +172,14 @@ declare function fragmentsModelFor<T extends TypedRecordInstance>(this: Store, m
|
|
|
172
172
|
*
|
|
173
173
|
* @public
|
|
174
174
|
*/
|
|
175
|
-
declare const modelFor: typeof fragmentsModelFor;
|
|
175
|
+
export declare const modelFor: typeof fragmentsModelFor;
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/model-fragments/extensions/fragment.d.ts
|
|
178
178
|
/**
|
|
179
179
|
* The features added to an object resource by {@link FragmentExtension}, providing
|
|
180
180
|
* a subset of the legacy `ModelFragments` fragment API for migrated resources.
|
|
181
181
|
*/
|
|
182
|
-
declare class Fragment {
|
|
182
|
+
export declare class Fragment {
|
|
183
183
|
/**
|
|
184
184
|
* Whether this fragment is in the process of being destroyed.
|
|
185
185
|
*/
|
|
@@ -209,7 +209,7 @@ declare class Fragment {
|
|
|
209
209
|
* A schema extension that adds the {@link Fragment} API to migrated
|
|
210
210
|
* `ModelFragments` object resources.
|
|
211
211
|
*/
|
|
212
|
-
declare const FragmentExtension: {
|
|
212
|
+
export declare const FragmentExtension: {
|
|
213
213
|
/**
|
|
214
214
|
* This extension applies to `'object'` schemas.
|
|
215
215
|
*/
|
|
@@ -229,7 +229,7 @@ declare const FragmentExtension: {
|
|
|
229
229
|
* The features added to an array resource by {@link FragmentArrayExtension}, providing
|
|
230
230
|
* a subset of the legacy `ModelFragments` fragment-array API for migrated resources.
|
|
231
231
|
*/
|
|
232
|
-
declare class FragmentArray<T extends Fragment> {
|
|
232
|
+
export declare class FragmentArray<T extends Fragment> {
|
|
233
233
|
/**
|
|
234
234
|
* Whether this fragment array is in the process of being destroyed.
|
|
235
235
|
*/
|
|
@@ -263,7 +263,7 @@ declare class FragmentArray<T extends Fragment> {
|
|
|
263
263
|
* A schema extension that adds the {@link FragmentArray} API to migrated
|
|
264
264
|
* `ModelFragments` array resources.
|
|
265
265
|
*/
|
|
266
|
-
declare const FragmentArrayExtension: {
|
|
266
|
+
export declare const FragmentArrayExtension: {
|
|
267
267
|
/**
|
|
268
268
|
* This extension applies to `'array'` schemas.
|
|
269
269
|
*/
|
|
@@ -290,5 +290,5 @@ type WithFragment<T> = T & WithEmberObject<T> & Fragment;
|
|
|
290
290
|
*/
|
|
291
291
|
type WithFragmentArray<T extends Fragment> = T & WithArrayLike<T> & FragmentArray<T>;
|
|
292
292
|
//#endregion
|
|
293
|
-
export {
|
|
293
|
+
export type { WithFragment, WithFragmentArray };
|
|
294
294
|
//# sourceMappingURL=model-fragments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-fragments.d.ts","names":[],"sources":["../src/model-fragments/utilities/with-array-defaults.ts","../src/model-fragments/utilities/with-fragment-defaults.ts","../src/model-fragments/utilities/with-fragment-array-defaults.ts","../src/model-fragments/utilities/with-legacy.ts","../src/model-fragments/instance-initializers/fragment-extensions.ts","../src/model-fragments/hooks/model-for.ts","../src/model-fragments/extensions/fragment.ts","../src/model-fragments/extensions/fragment-array.ts","../src/model-fragments/index.ts"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"model-fragments.d.ts","names":[],"sources":["../src/model-fragments/utilities/with-array-defaults.ts","../src/model-fragments/utilities/with-fragment-defaults.ts","../src/model-fragments/utilities/with-fragment-array-defaults.ts","../src/model-fragments/utilities/with-legacy.ts","../src/model-fragments/instance-initializers/fragment-extensions.ts","../src/model-fragments/hooks/model-for.ts","../src/model-fragments/extensions/fragment.ts","../src/model-fragments/extensions/fragment-array.ts","../src/model-fragments/index.ts"],"mappings":";;;;;;;;;;;;;;;;;wBAQgB,kBAAkB,0BAA0B,8BAC1D,WAAW,WACX,gBAAgB,gBACf;;;;EAKG;;;;EAIA,MAAM;;;;EAIN;;;;EAIA;;;;IAIE;;;;;;EAOF;;;;EAIA,MAAM;;;;EAIN,eAAe;;;;EAIf;;;;IAIE;;;;;;;;;;;;;wBC/CQ,qBAAqB,6BAA6B,6BAChE,cAAc,cACd,eAAe;;;;EAKf;;;;EAIA,kBAAkB;;;;EAIlB,MAAM,eAAe;;;;EAIrB;;;;IAIE;;;;;;;;;;;;;wBCrBY,0BAA0B,kCAAkC,kCAC1E,mBAAmB,mBACnB,oBAAoB;;;;EAKpB;;;;EAIA;;;;EAIA;;;;EAIA;;;;IAIE;;;;IAIA;;;;;;;;;;;;;wBCxBY,WAAW,QAAQ,YAAY,+CAA+C;;;;;;;;;wBCC9E,2BAA2B,QAAQ;;;KCR9C,YAAY,WAAW,0CAA0C;cA4BzD,eAAe,wBAAwB,YAAY;EAC9D,SAAiB;EACjB,WAAmB,UAAU,sBAAsB,iBAAiB;EACpE,YAAY,OAAO,OAAO,WAAW,UAAU,sBAAsB,iBAAiB;MAKlF,UAAU,IAAI,YAAY;MAgB1B,cAAc,IAAI,YAAY,IAAI;MAqBlC,uBAAuB,IAAI,YAAY,IAAI;EAa/C,cAAc,UAAU,YAAY,IAClC,WAAW,KAAK,GAAG,WAAW,+BAC9B,UAAU;EAOZ,iBAAiB,UAAU,YAAY,IACrC,WAAW,KAAK,GAAG,cAAc,kCACjC,UAAU;EASZ,yBAAyB,UAAU,YAAY,IAC7C,WAAW,KAAK,GAAG,8BACnB,UAAU;;iBAWE,kBAAkB,UAAU,qBAAA,MACpC,OACN,WAAW,UAAU,sBAAsB,iBAAiB,cAC3D,eAAe;;;;;;;;qBAWL,iBAAiB;;;;;;;qBC9HjB;;;;EAKX;;;;EAIA;;;;MAMI;;;;MAeA;;;;MAOA;;;;EAQJ,mBAAA,MAAyB;;;;;;qBAcd;;;;EAIX;;;;EAIA;;;;EAIA,iBAAiB;;;;;;;;qBCvEN,cAAc,UAAU;;;;EAKnC;;;;EAIA;;;;MAMI;;;;EAiBJ,YAAY,WAAW,IAAI;;;;EAW3B,eAAe,WAAW,IAAI;;;;EAW9B,eAAe,WAAW;;;;EAe1B;;;;;;qBAYW;;;;EAIX;;;;EAIA;;;;EAIA,iBAAiB;;;;;;;;KClGP,aAAa,KAAK,IAAI,gBAAgB,KAAK;;;;;KAK3C,kBAAkB,UAAU,YAAY,IAAI,cAAc,KAAK,cAAc"}
|
package/dist/model.d.ts
CHANGED
|
@@ -186,13 +186,13 @@ return new this();
|
|
|
186
186
|
@param type the attribute type
|
|
187
187
|
@param options a hash of options
|
|
188
188
|
*/
|
|
189
|
-
declare function attr(): DataDecorator;
|
|
190
|
-
declare function attr<T>(type: TypeFromInstance$1<T>): DataDecorator;
|
|
191
|
-
declare function attr(type: string): DataDecorator;
|
|
192
|
-
declare function attr(options: AttrOptions): DataDecorator;
|
|
193
|
-
declare function attr<T>(type: TypeFromInstance$1<T>, options?: OptionsFromInstance<T>): DataDecorator;
|
|
194
|
-
declare function attr(type: string, options?: AttrOptions & object): DataDecorator;
|
|
195
|
-
declare function attr(target: object, key: string | symbol, desc?: PropertyDescriptor): void;
|
|
189
|
+
export declare function attr(): DataDecorator;
|
|
190
|
+
export declare function attr<T>(type: TypeFromInstance$1<T>): DataDecorator;
|
|
191
|
+
export declare function attr(type: string): DataDecorator;
|
|
192
|
+
export declare function attr(options: AttrOptions): DataDecorator;
|
|
193
|
+
export declare function attr<T>(type: TypeFromInstance$1<T>, options?: OptionsFromInstance<T>): DataDecorator;
|
|
194
|
+
export declare function attr(type: string, options?: AttrOptions & object): DataDecorator;
|
|
195
|
+
export declare function attr(target: object, key: string | symbol, desc?: PropertyDescriptor): void;
|
|
196
196
|
//#endregion
|
|
197
197
|
//#region src/model/-private/has-many.d.ts
|
|
198
198
|
/**
|
|
@@ -351,10 +351,10 @@ type each record satisfies on both sides.
|
|
|
351
351
|
@param type the name of the related resource
|
|
352
352
|
@param options a hash of options
|
|
353
353
|
*/
|
|
354
|
-
declare function hasMany(): never;
|
|
355
|
-
declare function hasMany(type: string): never;
|
|
356
|
-
declare function hasMany<T>(type: TypeFromInstance<NoNull<T>>, options: RelationshipOptions<T, boolean>): RelationshipDecorator<T>;
|
|
357
|
-
declare function hasMany(type: string, options: RelationshipOptions<unknown, boolean>): RelationshipDecorator<unknown>;
|
|
354
|
+
export declare function hasMany(): never;
|
|
355
|
+
export declare function hasMany(type: string): never;
|
|
356
|
+
export declare function hasMany<T>(type: TypeFromInstance<NoNull<T>>, options: RelationshipOptions<T, boolean>): RelationshipDecorator<T>;
|
|
357
|
+
export declare function hasMany(type: string, options: RelationshipOptions<unknown, boolean>): RelationshipDecorator<unknown>;
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/model/-private/hooks.d.ts
|
|
360
360
|
/**
|
|
@@ -364,7 +364,7 @@ declare function hasMany(type: string, options: RelationshipOptions<unknown, boo
|
|
|
364
364
|
*
|
|
365
365
|
* @public
|
|
366
366
|
*/
|
|
367
|
-
declare function instantiateRecord(this: Store$1, identifier: ResourceKey$1, createRecordArgs?: {
|
|
367
|
+
export declare function instantiateRecord(this: Store$1, identifier: ResourceKey$1, createRecordArgs?: {
|
|
368
368
|
[key: string]: unknown;
|
|
369
369
|
}): Model;
|
|
370
370
|
/**
|
|
@@ -374,7 +374,7 @@ declare function instantiateRecord(this: Store$1, identifier: ResourceKey$1, cre
|
|
|
374
374
|
*
|
|
375
375
|
* @public
|
|
376
376
|
*/
|
|
377
|
-
declare function teardownRecord(record: Model): void;
|
|
377
|
+
export declare function teardownRecord(record: Model): void;
|
|
378
378
|
/**
|
|
379
379
|
* The `modelFor` implementation for use with `Model`, exposed on the store
|
|
380
380
|
* as `store.modelFor(type)` when the store is configured to use `Model`.
|
|
@@ -382,13 +382,13 @@ declare function teardownRecord(record: Model): void;
|
|
|
382
382
|
*
|
|
383
383
|
* @public
|
|
384
384
|
*/
|
|
385
|
-
declare function modelFor<T>(type: TypeFromInstance<T>): typeof Model | void;
|
|
385
|
+
export declare function modelFor<T>(type: TypeFromInstance<T>): typeof Model | void;
|
|
386
386
|
/**
|
|
387
387
|
* Overload accepting a raw type string instead of a typed record instance.
|
|
388
388
|
*
|
|
389
389
|
* @public
|
|
390
390
|
*/
|
|
391
|
-
declare function modelFor(type: string): typeof Model | void;
|
|
391
|
+
export declare function modelFor(type: string): typeof Model | void;
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region src/model/-private/schema-provider.d.ts
|
|
394
394
|
/**
|
|
@@ -398,7 +398,7 @@ declare function modelFor(type: string): typeof Model | void;
|
|
|
398
398
|
*
|
|
399
399
|
* @public
|
|
400
400
|
*/
|
|
401
|
-
declare function buildSchema(store: Store): SchemaService;
|
|
401
|
+
export declare function buildSchema(store: Store): SchemaService;
|
|
402
402
|
//#endregion
|
|
403
|
-
export { type PromiseBelongsTo as AsyncBelongsTo, type PromiseManyArray as AsyncHasMany, type HasMany, type ManyArray, Model, Model as default,
|
|
403
|
+
export { type PromiseBelongsTo as AsyncBelongsTo, type PromiseManyArray as AsyncHasMany, type HasMany, type ManyArray, Model, Model as default, belongsTo, restoreDeprecatedModelRequestBehaviors };
|
|
404
404
|
//# sourceMappingURL=model.d.ts.map
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","names":[],"sources":["../src/model/-private/util.ts","../src/model/-private/attr.ts","../src/model/-private/has-many.ts","../src/model/-private/hooks.ts","../src/model/-private/schema-provider.ts"],"mappings":";;;;;;;;;;;KAKY,+BAA+B;EAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;KC+BtD,YAAY,KAAK;;;;;;;;;;;EAW3B,eAAe,WAAW,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;EAsBtD;;KA8EG,uBAAuB,GAAG,KAAK;;;;;EAOlC,YAAY,OAAO,GAAG,iBAAiB;;;;;EAOvC,cAAc,OAAO,KAAK,iBAAiB;GAE1C,gBAAgB;;KAEP;GAAsB;;KAEtB,uBAAuB,GAAG,oBAClC,uBAAuB,WAAW,KAClC,uBAAuB,WAAW,KAClC,uBAAuB,YAAY,KACnC,uBAAuB,SAAS,KAChC,uBAAuB,GAAG,aAAa,KACvC,uBAAuB,GAAG,YAAY,KACtC,uBAAuB,kBAAkB,KACzC,uBAAuB,kBAAkB,KACzC,uBAAuB,mBAAmB,KAC1C,uBAAuB,GAAG,oBAAoB,KAC9C,uBAAuB,GAAG,mBAAmB;KAIrC,yBAAyB,KAAK;EAAY,iBAAiB;IACnE,WAAW;KAGH,mBAAiB,KAAK,UAAU,mBAAmB,SAAS;KAG5D,oBAAoB,KAC9B,mBAAiB,2BAEb,yBAAyB,2BAEvB,UAAU,uBAAuB,yBAAyB,IAAI,mBAAiB,MAC7E,WAAW,uBAAuB,WAAW,qBAAqB,YAAY,WAAW;;;;;;;KASvF,iBAAiB,gBAAgB,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"model.d.ts","names":[],"sources":["../src/model/-private/util.ts","../src/model/-private/attr.ts","../src/model/-private/has-many.ts","../src/model/-private/hooks.ts","../src/model/-private/schema-provider.ts"],"mappings":";;;;;;;;;;;KAKY,+BAA+B;EAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;KC+BtD,YAAY,KAAK;;;;;;;;;;;EAW3B,eAAe,WAAW,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;EAsBtD;;KA8EG,uBAAuB,GAAG,KAAK;;;;;EAOlC,YAAY,OAAO,GAAG,iBAAiB;;;;;EAOvC,cAAc,OAAO,KAAK,iBAAiB;GAE1C,gBAAgB;;KAEP;GAAsB;;KAEtB,uBAAuB,GAAG,oBAClC,uBAAuB,WAAW,KAClC,uBAAuB,WAAW,KAClC,uBAAuB,YAAY,KACnC,uBAAuB,SAAS,KAChC,uBAAuB,GAAG,aAAa,KACvC,uBAAuB,GAAG,YAAY,KACtC,uBAAuB,kBAAkB,KACzC,uBAAuB,kBAAkB,KACzC,uBAAuB,mBAAmB,KAC1C,uBAAuB,GAAG,oBAAoB,KAC9C,uBAAuB,GAAG,mBAAmB;KAIrC,yBAAyB,KAAK;EAAY,iBAAiB;IACnE,WAAW;KAGH,mBAAiB,KAAK,UAAU,mBAAmB,SAAS;KAG5D,oBAAoB,KAC9B,mBAAiB,2BAEb,yBAAyB,2BAEvB,UAAU,uBAAuB,yBAAyB,IAAI,mBAAiB,MAC7E,WAAW,uBAAuB,WAAW,qBAAqB,YAAY,WAAW;;;;;;;KASvF,iBAAiB,gBAAgB,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwFjD,QAAQ;wBACR,KAAK,GAAG,MAAM,mBAAiB,KAAK;wBACpC,KAAK,eAAe;wBACpB,KAAK,SAAS,cAAc;wBAC5B,KAAK,GAAG,MAAM,mBAAiB,IAAI,UAAU,oBAAoB,KAAK;wBACtE,KAAK,cAAc,UAAU,uBAAuB;wBACpD,KAAK,gBAAgB,sBAAsB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBC9ClD;wBACA,QAAQ;wBACR,QAAQ,GACtB,MAAM,iBAAiB,OAAO,KAC9B,SAAS,oBAAoB,cAC5B,sBAAsB;wBAKT,QAAQ,cAAc,SAAS,wCAAwC;;;;;;;;;;wBClPvE,kBAAA,MACR,SACN,YAAY,eACZ;;IACC;;;;;;;;wBA+Ba,eAAe,QAAQ;;;;;;;;wBAevB,SAAS,GAAG,MAAM,iBAAiB,YAAY;;;;;;wBAM/C,SAAS,sBAAsB;;;;;;;;;;wBCqM/B,YAAY,OAAO,QAAQ"}
|
|
@@ -89,7 +89,7 @@ to modify it to fit your specific needs.**
|
|
|
89
89
|
@class EmbeddedRecordsMixin
|
|
90
90
|
@public
|
|
91
91
|
*/
|
|
92
|
-
declare const EmbeddedRecordsMixin: Mixin;
|
|
92
|
+
export declare const EmbeddedRecordsMixin: Mixin;
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region src/serializer/rest.d.ts
|
|
95
95
|
/**
|
|
@@ -142,5 +142,5 @@ the method (`serialize` or `deserialize`) as the third parameter.
|
|
|
142
142
|
*/
|
|
143
143
|
declare const RESTSerializer: any;
|
|
144
144
|
//#endregion
|
|
145
|
-
export {
|
|
145
|
+
export { RESTSerializer };
|
|
146
146
|
//# sourceMappingURL=rest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest.d.ts","names":[],"sources":["../../src/serializer/-private/embedded-records-mixin.ts","../../src/serializer/rest.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rest.d.ts","names":[],"sources":["../../src/serializer/-private/embedded-records-mixin.ts","../../src/serializer/rest.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqGa,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCzB7B"}
|
|
@@ -2,7 +2,7 @@ import EmberObject from "@ember/object";
|
|
|
2
2
|
import { TransformName } from "@warp-drive/core/types/symbols";
|
|
3
3
|
import { LegacyAttributeField } from "@warp-drive/core/types/schema/fields";
|
|
4
4
|
//#region src/serializer/-private/transforms/transform.d.ts
|
|
5
|
-
interface Transform {
|
|
5
|
+
export interface Transform {
|
|
6
6
|
/**
|
|
7
7
|
When given a deserialized value from a record attribute this
|
|
8
8
|
method must return the serialized value.
|
|
@@ -117,10 +117,10 @@ return new this();
|
|
|
117
117
|
@class Transform
|
|
118
118
|
@public
|
|
119
119
|
*/
|
|
120
|
-
declare const Transform: typeof EmberObject;
|
|
120
|
+
export declare const Transform: typeof EmberObject;
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region src/serializer/-private/transforms/boolean.d.ts
|
|
123
|
-
interface BooleanTransform {
|
|
123
|
+
export interface BooleanTransform {
|
|
124
124
|
/**
|
|
125
125
|
* see {@link TransformName}
|
|
126
126
|
*/
|
|
@@ -160,7 +160,7 @@ export default class UserModel extends Model {
|
|
|
160
160
|
|
|
161
161
|
@public
|
|
162
162
|
*/
|
|
163
|
-
declare class BooleanTransform {
|
|
163
|
+
export declare class BooleanTransform {
|
|
164
164
|
/**
|
|
165
165
|
* Converts a serialized (raw payload) value into a `boolean` (or `null`
|
|
166
166
|
* when `allowNull` is set and the value is nullish).
|
|
@@ -181,7 +181,7 @@ declare class BooleanTransform {
|
|
|
181
181
|
}
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region src/serializer/-private/transforms/date.d.ts
|
|
184
|
-
interface DateTransform {
|
|
184
|
+
export interface DateTransform {
|
|
185
185
|
/**
|
|
186
186
|
* see {@link TransformName}
|
|
187
187
|
*/
|
|
@@ -206,7 +206,7 @@ export default class ScoreModel extends Model {
|
|
|
206
206
|
|
|
207
207
|
@public
|
|
208
208
|
*/
|
|
209
|
-
declare class DateTransform {
|
|
209
|
+
export declare class DateTransform {
|
|
210
210
|
/**
|
|
211
211
|
* Converts a serialized (raw payload) `ISO 8601` string, epoch number,
|
|
212
212
|
* or nullish value into a `Date` (or `null`/`undefined`).
|
|
@@ -224,7 +224,7 @@ declare class DateTransform {
|
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/serializer/-private/transforms/number.d.ts
|
|
227
|
-
interface NumberTransform {
|
|
227
|
+
export interface NumberTransform {
|
|
228
228
|
/**
|
|
229
229
|
* see {@link TransformName}
|
|
230
230
|
*/
|
|
@@ -250,7 +250,7 @@ export default class ScoreModel extends Model {
|
|
|
250
250
|
|
|
251
251
|
@public
|
|
252
252
|
*/
|
|
253
|
-
declare class NumberTransform {
|
|
253
|
+
export declare class NumberTransform {
|
|
254
254
|
/**
|
|
255
255
|
* Converts a serialized (raw payload) value into a `number`, or `null`
|
|
256
256
|
* if the value is empty, nullish, or not a valid number.
|
|
@@ -267,7 +267,7 @@ declare class NumberTransform {
|
|
|
267
267
|
}
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/serializer/-private/transforms/string.d.ts
|
|
270
|
-
interface StringTransform {
|
|
270
|
+
export interface StringTransform {
|
|
271
271
|
/**
|
|
272
272
|
* see {@link TransformName}
|
|
273
273
|
*/
|
|
@@ -293,7 +293,7 @@ export default class UserModel extends Model {
|
|
|
293
293
|
|
|
294
294
|
@public
|
|
295
295
|
*/
|
|
296
|
-
declare class StringTransform {
|
|
296
|
+
export declare class StringTransform {
|
|
297
297
|
/**
|
|
298
298
|
* Converts a serialized (raw payload) value into a `string`, or `null`
|
|
299
299
|
* if the value is falsy (and not an empty string).
|
|
@@ -309,5 +309,4 @@ declare class StringTransform {
|
|
|
309
309
|
static create(): StringTransform;
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
312
|
-
export { BooleanTransform, DateTransform, NumberTransform, StringTransform, Transform };
|
|
313
312
|
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/serializer/-private/transforms/transform.ts","../../src/serializer/-private/transforms/boolean.ts","../../src/serializer/-private/transforms/date.ts","../../src/serializer/-private/transforms/number.ts","../../src/serializer/-private/transforms/string.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/serializer/-private/transforms/transform.ts","../../src/serializer/-private/transforms/boolean.ts","../../src/serializer/-private/transforms/date.ts","../../src/serializer/-private/transforms/number.ts","../../src/serializer/-private/transforms/string.ts"],"mappings":";;;;iBAIiB;;;;;;;;;;;;;;;;;;EAkBf,UAAU,gBAAgB,SAAS;;;;;;;;;;;;;;;;;;EAmBnC,YAAY,gBAAgB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgF1B,kBAAkB;;;iBCpHd;;;;GAId;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCU;;;;;EAKX,YAAY,8CAA8C;IAAY;;;;;EAmBtE,UAAU,8BAA8B;IAAY;;;;;SAW7C,UAAU;;;;iBC5EF;;;;GAId;;;;;;;;;;;;;;;;;;;;;qBAsBU;;;;;EAKX,YAAY,oCAAoC,WAAW,0BAA0B;;;;;EAwBrF,UAAU,MAAM,MAAM,WAAW;;;;SAY1B,UAAU;;;;iBC/DF;;;;GAId;;;;;;;;;;;;;;;;;;;;;;qBAuBU;;;;;EAKX,YAAY,gDAAgD,WAAW;;;;EAavE,UAAU,kDAAkD,WAAW;;;;SAahE,UAAU;;;;iBC9DF;;;;GAId;;;;;;;;;;;;;;;;;;;;;;qBAsBU;;;;;EAKX,YAAY,qBAAqB,WAAW;;;;EAM5C,UAAU,uBAAuB,WAAW;;;;SAOrC,UAAU"}
|
package/dist/serializer.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ For an example implementation, see the included {@link JSONSerializer}.
|
|
|
23
23
|
@class Serializer
|
|
24
24
|
@public
|
|
25
25
|
*/
|
|
26
|
-
declare class Serializer extends EmberObject {
|
|
26
|
+
export declare class Serializer extends EmberObject {
|
|
27
27
|
/**
|
|
28
28
|
The `store` property is the application's `store` that contains
|
|
29
29
|
all records. It can be used to look up serializers for other model
|
|
@@ -147,5 +147,4 @@ declare class Serializer extends EmberObject {
|
|
|
147
147
|
normalize(_typeClass: ModelSchema, hash: Record<string, unknown>): SingleResourceDocument | EmptyResourceDocument;
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
|
-
export { Serializer };
|
|
151
150
|
//# sourceMappingURL=serializer.d.ts.map
|
package/dist/serializer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.ts","names":[],"sources":["../src/serializer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","names":[],"sources":["../src/serializer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBA+Ia,mBAAmB;;;;;;;;;;;;;;;;;;;;EAoB9B,OAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGxB,UAAU,YAAY,aAAa,MAAM,0BAA0B,yBAAyB"}
|
package/dist/store.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Store } from "@warp-drive/core";
|
|
|
7
7
|
* `Store` subclass, for apps that have not yet migrated to the
|
|
8
8
|
* `RequestManager`-based equivalents.
|
|
9
9
|
*/
|
|
10
|
-
declare function restoreDeprecatedStoreBehaviors(StoreKlass: typeof Store): void;
|
|
10
|
+
export declare function restoreDeprecatedStoreBehaviors(StoreKlass: typeof Store): void;
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export type { Store };
|
|
13
13
|
//# sourceMappingURL=store.d.ts.map
|
package/dist/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","names":[],"sources":["../src/store.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"store.d.ts","names":[],"sources":["../src/store.ts"],"mappings":";;;;;;;;;wBAiCgB,gCAAgC,mBAAmB"}
|