ember-data-resources 4.0.3 → 5.0.0
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/LICENSE.md +1 -1
- package/README.md +3 -1
- package/addon-main.cjs +5 -0
- package/dist/-private/find.js +2 -0
- package/dist/-private/find.js.map +1 -0
- package/dist/-private/query.js +2 -0
- package/dist/-private/query.js.map +1 -0
- package/dist/-private/resources/errors.js +13 -0
- package/dist/-private/resources/errors.js.map +1 -0
- package/dist/-private/resources/find-all.js +30 -0
- package/dist/-private/resources/find-all.js.map +1 -0
- package/dist/-private/resources/find-record.js +44 -0
- package/dist/-private/resources/find-record.js.map +1 -0
- package/dist/-private/resources/query-record.js +30 -0
- package/dist/-private/resources/query-record.js.map +1 -0
- package/dist/-private/resources/query.js +30 -0
- package/dist/-private/resources/query.js.map +1 -0
- package/dist/-private/resources/request.js +9 -0
- package/dist/-private/resources/request.js.map +1 -0
- package/dist/-private/resources/types.js +2 -0
- package/dist/-private/resources/types.js.map +1 -0
- package/dist/_app_/helpers/find-all.js +1 -0
- package/dist/_app_/helpers/find-record.js +1 -0
- package/dist/_app_/helpers/query-record.js +1 -0
- package/dist/_app_/helpers/query.js +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/js-helpers.js +88 -0
- package/dist/js-helpers.js.map +1 -0
- package/dist/loose-mode-compat/helpers/find-all.js +9 -0
- package/dist/loose-mode-compat/helpers/find-all.js.map +1 -0
- package/dist/loose-mode-compat/helpers/find-record.js +9 -0
- package/dist/loose-mode-compat/helpers/find-record.js.map +1 -0
- package/dist/loose-mode-compat/helpers/query-record.js +9 -0
- package/dist/loose-mode-compat/helpers/query-record.js.map +1 -0
- package/dist/loose-mode-compat/helpers/query.js +9 -0
- package/dist/loose-mode-compat/helpers/query.js.map +1 -0
- package/dist/request-17f93aea.js +141 -0
- package/dist/request-17f93aea.js.map +1 -0
- package/dist-types/-private/find.d.ts +2 -0
- package/dist-types/-private/find.d.ts.map +1 -0
- package/dist-types/-private/query.d.ts +1 -0
- package/dist-types/-private/query.d.ts.map +1 -0
- package/dist-types/-private/resources/errors.d.ts +7 -0
- package/dist-types/-private/resources/errors.d.ts.map +1 -0
- package/dist-types/-private/resources/find-all.d.ts +18 -0
- package/dist-types/-private/resources/find-all.d.ts.map +1 -0
- package/dist-types/-private/resources/find-record.d.ts +18 -0
- package/dist-types/-private/resources/find-record.d.ts.map +1 -0
- package/dist-types/-private/resources/query-record.d.ts +19 -0
- package/dist-types/-private/resources/query-record.d.ts.map +1 -0
- package/dist-types/-private/resources/query.d.ts +20 -0
- package/dist-types/-private/resources/query.d.ts.map +1 -0
- package/dist-types/-private/resources/request.d.ts.map +1 -0
- package/dist-types/-private/resources/types.d.ts +2 -0
- package/dist-types/-private/resources/types.d.ts.map +1 -0
- package/dist-types/defineProperty-796354a6.d.ts +2 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/index.d.ts.map +1 -0
- package/dist-types/js-helpers.d.ts +16 -0
- package/dist-types/js-helpers.d.ts.map +1 -0
- package/dist-types/loose-mode-compat/helpers/find-all.d.ts +2 -0
- package/dist-types/loose-mode-compat/helpers/find-all.d.ts.map +1 -0
- package/dist-types/loose-mode-compat/helpers/find-record.d.ts +2 -0
- package/dist-types/loose-mode-compat/helpers/find-record.d.ts.map +1 -0
- package/dist-types/loose-mode-compat/helpers/query-record.d.ts +2 -0
- package/dist-types/loose-mode-compat/helpers/query-record.d.ts.map +1 -0
- package/dist-types/loose-mode-compat/helpers/query.d.ts +2 -0
- package/dist-types/loose-mode-compat/helpers/query.d.ts.map +1 -0
- package/{-private/resources/request.d.ts → dist-types/request-17f93aea.d.ts} +13 -6
- package/dist-types/toPropertyKey-796354a6.d.ts +4 -0
- package/package.json +112 -126
- package/-private/find.d.ts +0 -1
- package/-private/query.d.ts +0 -1
- package/-private/resources/errors.d.ts +0 -7
- package/-private/resources/find-all.d.ts +0 -19
- package/-private/resources/find-record.d.ts +0 -19
- package/-private/resources/query-record.d.ts +0 -20
- package/-private/resources/query.d.ts +0 -21
- package/-private/resources/types.d.ts +0 -2
- package/.github/renovate.json5 +0 -93
- package/.github/workflows/ci.yml +0 -104
- package/.github/workflows/lint.yml +0 -101
- package/.github/workflows/types.yml +0 -46
- package/CHANGELOG.md +0 -250
- package/addon/-private/query.ts +0 -0
- package/addon/-private/resources/errors.ts +0 -15
- package/addon/-private/resources/find-all.ts +0 -37
- package/addon/-private/resources/find-record.ts +0 -53
- package/addon/-private/resources/query-record.ts +0 -38
- package/addon/-private/resources/query.ts +0 -39
- package/addon/-private/resources/request.ts +0 -113
- package/addon/-private/resources/types.ts +0 -1
- package/addon/index.ts +0 -10
- package/addon/js-helpers.ts +0 -127
- package/app/helpers/find-all.js +0 -1
- package/app/helpers/find-record.js +0 -1
- package/app/helpers/query-record.js +0 -1
- package/app/helpers/query.js +0 -1
- package/commitlint.config.js +0 -18
- package/config/environment.js +0 -5
- package/index.d.ts +0 -6
- package/index.js +0 -11
- package/js-helpers.d.ts +0 -21
- package/tsconfig.json +0 -101
- package/types/dummy/index.d.ts +0 -1
- package/types/ember-data/types/registries/model.d.ts +0 -6
- package/types/global.d.ts +0 -6
- /package/{addon/-private/find.ts → dist-types/-private/resources/request.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,SAAS,EAAE,MAAM;CAK9B;AAED,qBAAa,WAAY,SAAQ,SAAS;gBAC5B,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO;CAK3C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Request } from "../../request-17f93aea.js";
|
|
2
|
+
import ArrayProxy from '@ember/array/proxy';
|
|
3
|
+
import Store from '@ember-data/store';
|
|
4
|
+
type FindAllOptions = Parameters<Store['findAll']>[1];
|
|
5
|
+
type PositionalArgs = [string];
|
|
6
|
+
interface NamedArgs {
|
|
7
|
+
options: FindAllOptions;
|
|
8
|
+
}
|
|
9
|
+
interface Args {
|
|
10
|
+
named: NamedArgs;
|
|
11
|
+
positional: PositionalArgs;
|
|
12
|
+
}
|
|
13
|
+
declare class FindAll<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
14
|
+
private _records;
|
|
15
|
+
__WRAPPED_FUNCTION__([modelName]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
16
|
+
get records(): ArrayProxy<Model> | undefined;
|
|
17
|
+
}
|
|
18
|
+
export { FindAllOptions, NamedArgs, Args, FindAll };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-all.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/find-all.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7D,KAAK,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/B,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,OAAO,CAAC,KAAK,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI,CAAE,SAAQ,OAAO,CAAC,SAAS,CAAC;IAC1E,OAAO,CAAC,QAAQ,CAAgC;IAGnD,oBAAoB,CAAC,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ9F,IAAI,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,CAE3C;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Request } from "../../request-17f93aea.js";
|
|
2
|
+
import { Id } from "./types.js";
|
|
3
|
+
import Store from '@ember-data/store';
|
|
4
|
+
type FindRecordOptions = Parameters<Store['findRecord']>[2];
|
|
5
|
+
type PositionalArgs = [string, Id];
|
|
6
|
+
interface NamedArgs {
|
|
7
|
+
options: FindRecordOptions;
|
|
8
|
+
}
|
|
9
|
+
interface Args {
|
|
10
|
+
named: NamedArgs;
|
|
11
|
+
positional: PositionalArgs;
|
|
12
|
+
}
|
|
13
|
+
declare class FindRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
14
|
+
private _record;
|
|
15
|
+
__WRAPPED_FUNCTION__([modelName, id]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
16
|
+
get record(): Model | undefined;
|
|
17
|
+
}
|
|
18
|
+
export { FindRecordOptions, NamedArgs, Args, FindRecord };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-record.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/find-record.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACnC,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,UAAU,CAAC,KAAK,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI,CAAE,SAAQ,OAAO,CAAC,SAAS,CAAC;IAC7E,OAAO,CAAC,OAAO,CAAoB;IAItC,oBAAoB,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS;IAqBlF,IAAI,MAAM,IAAI,KAAK,GAAG,SAAS,CAE9B;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Request } from "../../request-17f93aea.js";
|
|
2
|
+
import Store from '@ember-data/store';
|
|
3
|
+
type QueryParams = Parameters<Store['queryRecord']>;
|
|
4
|
+
type QueryRecordQuery = QueryParams[1];
|
|
5
|
+
type QueryRecordOptions = QueryParams[2];
|
|
6
|
+
type PositionalArgs = [string, QueryRecordQuery];
|
|
7
|
+
interface NamedArgs {
|
|
8
|
+
options: QueryRecordOptions;
|
|
9
|
+
}
|
|
10
|
+
interface Args {
|
|
11
|
+
named: NamedArgs;
|
|
12
|
+
positional: PositionalArgs;
|
|
13
|
+
}
|
|
14
|
+
declare class QueryRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
15
|
+
private _record;
|
|
16
|
+
__WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
17
|
+
get record(): Model | undefined;
|
|
18
|
+
}
|
|
19
|
+
export { QueryRecordQuery, QueryRecordOptions, NamedArgs, Args, QueryRecord };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-record.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/query-record.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,KAAK,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AACpD,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEhD,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACjD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,WAAW,CAAC,KAAK,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI,CAAE,SAAQ,OAAO,CAAC,SAAS,CAAC;IAC9E,OAAO,CAAC,OAAO,CAAoB;IAGtC,oBAAoB,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS;IAQrF,IAAI,MAAM,IAAI,KAAK,GAAG,SAAS,CAE9B;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Request } from "../../request-17f93aea.js";
|
|
2
|
+
import ArrayProxy from '@ember/array/proxy';
|
|
3
|
+
import Store from '@ember-data/store';
|
|
4
|
+
type QueryParams = Parameters<Store['query']>;
|
|
5
|
+
type QueryQuery = QueryParams[1];
|
|
6
|
+
type QueryOptions = QueryParams[2];
|
|
7
|
+
type PositionalArgs = [string, QueryQuery];
|
|
8
|
+
interface NamedArgs {
|
|
9
|
+
options: QueryOptions;
|
|
10
|
+
}
|
|
11
|
+
interface Args {
|
|
12
|
+
named: NamedArgs;
|
|
13
|
+
positional: PositionalArgs;
|
|
14
|
+
}
|
|
15
|
+
declare class Query<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
16
|
+
private _records;
|
|
17
|
+
__WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
18
|
+
get records(): ArrayProxy<Model> | undefined;
|
|
19
|
+
}
|
|
20
|
+
export { QueryQuery, QueryOptions, NamedArgs, Args, Query };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/query.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,KAAK,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAE1C,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAC3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,KAAK,CAAC,KAAK,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI,CAAE,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxE,OAAO,CAAC,QAAQ,CAAgC;IAGnD,oBAAoB,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS;IAQrF,IAAI,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,CAE3C;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/request.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,qBAAa,OAAO,CAAC,IAAI,CAAE,SAAQ,QAAQ,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC;IAErB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,SAAS,UAAS;IAClB,MAAM,UAAS;IAExB;;OAEG;IACK,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;IAC3C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAEzC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;IAe7E,oBAAoB,CACxB,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,EAC3C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;IAKnC,IAAI,SAAS,YAEZ;IAED,IAAI,OAAO,YAEV;IAED,IAAI,OAAO,IAAI,OAAO,GAAG,SAAS,CAKjC;IAED,IAAI,MAAM,IAAI,OAAO,GAAG,SAAS,CAKhC;IAGK,KAAK;IAML,oBAAoB,CACxB,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,EAC3C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;CAiCpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/-private/resources/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FindAll } from "./-private/resources/find-all.js";
|
|
2
|
+
export { FindRecord } from "./-private/resources/find-record.js";
|
|
3
|
+
export { Query } from "./-private/resources/query.js";
|
|
4
|
+
export { QueryRecord } from "./-private/resources/query-record.js";
|
|
5
|
+
export { findAll, findRecord, query, queryRecord } from "./js-helpers.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGhE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FindAll, FindAllOptions } from "./-private/resources/find-all.js";
|
|
2
|
+
import { FindRecord, FindRecordOptions } from "./-private/resources/find-record.js";
|
|
3
|
+
import { Query, QueryOptions, QueryQuery } from "./-private/resources/query.js";
|
|
4
|
+
import { QueryRecord, QueryRecordOptions, QueryRecordQuery } from "./-private/resources/query-record.js";
|
|
5
|
+
import { Id } from "./-private/resources/types.js";
|
|
6
|
+
type FindRecordThunkResult = Id | [Id] | [Id, FindRecordOptions];
|
|
7
|
+
declare function findRecord<Model = unknown>(destroyable: object, modelName: string, thunk: () => FindRecordThunkResult): FindRecord<Model, import("./-private/resources/find-record.js").Args>;
|
|
8
|
+
type FindAllThunkResult = {
|
|
9
|
+
options: FindAllOptions;
|
|
10
|
+
} | FindAllOptions | void;
|
|
11
|
+
declare function findAll<Model = unknown>(destroyable: object, modelName: string, thunk?: () => FindAllThunkResult): FindAll<Model, import("./-private/resources/find-all.js").Args>;
|
|
12
|
+
type QueryThunkResult = QueryQuery | [QueryQuery] | [QueryQuery, QueryOptions];
|
|
13
|
+
declare function query<Model = unknown>(destroyable: object, modelName: string, thunk: () => QueryThunkResult): Query<Model, import("./-private/resources/query.js").Args>;
|
|
14
|
+
type QueryRecordThunkResult = QueryRecordQuery | [QueryRecordQuery] | [QueryRecordQuery, QueryRecordOptions];
|
|
15
|
+
declare function queryRecord<Model = unknown>(destroyable: object, modelName: string, thunk: () => QueryRecordThunkResult): QueryRecord<Model, import("./-private/resources/query-record.js").Args>;
|
|
16
|
+
export { findRecord, findAll, query, queryRecord };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-helpers.d.ts","sourceRoot":"","sources":["../src/js-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAErD,KAAK,qBAAqB,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAEjE,wBAAgB,UAAU,CAAC,KAAK,GAAG,OAAO,EACxC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,qBAAqB,sEAuBnC;AAED,KAAK,kBAAkB,GAAG;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,GAAG,cAAc,GAAG,IAAI,CAAC;AAE9E,wBAAgB,OAAO,CAAC,KAAK,GAAG,OAAO,EACrC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,kBAAkB,gEAcjC;AAED,KAAK,gBAAgB,GAAG,UAAU,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAE/E,wBAAgB,KAAK,CAAC,KAAK,GAAG,OAAO,EACnC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,gBAAgB,2DAwB9B;AAED,KAAK,sBAAsB,GACvB,gBAAgB,GAChB,CAAC,gBAAgB,CAAC,GAClB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAE3C,wBAAgB,WAAW,CAAC,KAAK,GAAG,OAAO,EACzC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,sBAAsB,wEAwBpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-all.d.ts","sourceRoot":"","sources":["../../../src/loose-mode-compat/helpers/find-all.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-record.d.ts","sourceRoot":"","sources":["../../../src/loose-mode-compat/helpers/find-record.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-record.d.ts","sourceRoot":"","sources":["../../../src/loose-mode-compat/helpers/query-record.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/loose-mode-compat/helpers/query.js"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { Resource } from 'ember-resources';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Resource, ExpandArgs } from 'ember-resources';
|
|
2
|
+
import Store from '@ember-data/store';
|
|
3
|
+
declare function _applyDecoratedDescriptor(target: any, property: any, decorators: any, descriptor: any, context: any): {
|
|
4
|
+
enumerable: any;
|
|
5
|
+
configurable: any;
|
|
6
|
+
writable: boolean;
|
|
7
|
+
value: any;
|
|
8
|
+
initializer: any;
|
|
9
|
+
};
|
|
10
|
+
declare function _initializerDefineProperty(target: any, property: any, descriptor: any, context: any): void;
|
|
11
|
+
type FindRecordOptions = Parameters<Store['findRecord']>[2];
|
|
12
|
+
declare class Request<Args> extends Resource<Args> {
|
|
6
13
|
store: Store;
|
|
7
14
|
error: Error | undefined;
|
|
8
15
|
isLoading: boolean;
|
|
@@ -21,4 +28,4 @@ export declare class Request<Args> extends Resource<Args> {
|
|
|
21
28
|
retry(): Promise<void>;
|
|
22
29
|
__REQUEST_FUNCTION__(_positional: ExpandArgs<Args>['Positional'], _named: ExpandArgs<Args>['Named']): Promise<void>;
|
|
23
30
|
}
|
|
24
|
-
|
|
31
|
+
export { _applyDecoratedDescriptor as default, FindRecordOptions, Request };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-data-resources",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Resource helpers for reactively (re)fetching data with ember-data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -8,147 +8,133 @@
|
|
|
8
8
|
"repository": "https://github.com/NullVoxPopuli/ember-data-resources",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "NullVoxPopuli",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"build": "ember build --environment=production",
|
|
17
|
-
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
18
|
-
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
|
19
|
-
"lint:hbs": "ember-template-lint .",
|
|
20
|
-
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
21
|
-
"lint:js": "eslint . --cache",
|
|
22
|
-
"lint:js:fix": "eslint . --fix",
|
|
23
|
-
"start": "ember serve",
|
|
24
|
-
"test": "npm-run-all lint test:*",
|
|
25
|
-
"test:ember": "ember test",
|
|
26
|
-
"test:ember-compatibility": "ember try:each",
|
|
27
|
-
"prepack": "ember ts:precompile",
|
|
28
|
-
"postpack": "ember ts:clean"
|
|
29
|
-
},
|
|
11
|
+
"files": [
|
|
12
|
+
"addon-main.cjs",
|
|
13
|
+
"dist",
|
|
14
|
+
"dist-types"
|
|
15
|
+
],
|
|
30
16
|
"dependencies": {
|
|
17
|
+
"@ember/string": "^3.1.1",
|
|
31
18
|
"@ember/test-waiters": "^3.0.2",
|
|
32
|
-
"@
|
|
33
|
-
"ember-auto-import": "^2.4.2",
|
|
34
|
-
"ember-cli-babel": "^7.26.11",
|
|
35
|
-
"ember-cli-htmlbars": "^6.0.1",
|
|
36
|
-
"ember-cli-typescript": "^5.1.0",
|
|
37
|
-
"ember-resources": "^5.3.0"
|
|
19
|
+
"@embroider/addon-shim": "^1.0.0"
|
|
38
20
|
},
|
|
39
21
|
"devDependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
22
|
+
"@arethetypeswrong/cli": "^0.2.0",
|
|
23
|
+
"@babel/core": "^7.22.5",
|
|
24
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
25
|
+
"@babel/plugin-proposal-decorators": "^7.22.5",
|
|
26
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
27
|
+
"@babel/runtime": "^7.22.5",
|
|
28
|
+
"@ember-data/store": "^5.0.0",
|
|
29
|
+
"@embroider/addon-dev": "^3.1.1",
|
|
45
30
|
"@glimmer/component": "^1.1.2",
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@types/ember
|
|
53
|
-
"@types/ember-
|
|
54
|
-
"@types/
|
|
55
|
-
"@types/
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/
|
|
60
|
-
"@types/
|
|
61
|
-
"@types/ember__controller": "^4.0.1",
|
|
62
|
-
"@types/ember__debug": "^4.0.1",
|
|
63
|
-
"@types/ember__destroyable": "^4.0.0",
|
|
64
|
-
"@types/ember__engine": "^4.0.2",
|
|
31
|
+
"@glimmer/tracking": "^1.1.2",
|
|
32
|
+
"@glint/core": "^1.0.2",
|
|
33
|
+
"@glint/environment-ember-loose": "^1.0.2",
|
|
34
|
+
"@glint/template": "^1.0.2",
|
|
35
|
+
"@nullvoxpopuli/eslint-configs": "^3.1.3",
|
|
36
|
+
"@tsconfig/ember": "^2.0.0",
|
|
37
|
+
"@types/ember": "^4.0.0",
|
|
38
|
+
"@types/ember-data__store": "^4.0.3",
|
|
39
|
+
"@types/ember__application": "^4.0.0",
|
|
40
|
+
"@types/ember__array": "^4.0.4",
|
|
41
|
+
"@types/ember__component": "^4.0.0",
|
|
42
|
+
"@types/ember__controller": "^4.0.0",
|
|
43
|
+
"@types/ember__debug": "^4.0.0",
|
|
44
|
+
"@types/ember__destroyable": "^4.0.2",
|
|
45
|
+
"@types/ember__engine": "^4.0.0",
|
|
65
46
|
"@types/ember__error": "^4.0.0",
|
|
66
|
-
"@types/ember__object": "^4.0.
|
|
47
|
+
"@types/ember__object": "^4.0.6",
|
|
67
48
|
"@types/ember__polyfills": "^4.0.0",
|
|
68
|
-
"@types/ember__routing": "^4.0.
|
|
69
|
-
"@types/ember__runloop": "^4.0.
|
|
49
|
+
"@types/ember__routing": "^4.0.0",
|
|
50
|
+
"@types/ember__runloop": "^4.0.0",
|
|
70
51
|
"@types/ember__service": "^4.0.0",
|
|
71
|
-
"@types/ember__string": "^3.0
|
|
52
|
+
"@types/ember__string": "^3.16.0",
|
|
72
53
|
"@types/ember__template": "^4.0.0",
|
|
73
54
|
"@types/ember__test": "^4.0.0",
|
|
74
|
-
"@types/ember__test-helpers": "^2.8.1",
|
|
75
55
|
"@types/ember__utils": "^4.0.0",
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"ember-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"ember-qunit": "^5.1.5",
|
|
97
|
-
"ember-resolver": "^8.0.3",
|
|
98
|
-
"ember-source": "~4.6.0",
|
|
99
|
-
"ember-source-channel-url": "^3.0.0",
|
|
100
|
-
"ember-template-lint": "^4.13.0",
|
|
101
|
-
"ember-try": "^2.0.0",
|
|
102
|
-
"eslint": "^8.23.0",
|
|
103
|
-
"eslint-config-prettier": "^8.5.0",
|
|
104
|
-
"eslint-plugin-decorator-position": "^5.0.1",
|
|
105
|
-
"eslint-plugin-ember": "^11.0.6",
|
|
106
|
-
"eslint-plugin-import": "^2.26.0",
|
|
107
|
-
"eslint-plugin-node": "^11.1.0",
|
|
108
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
109
|
-
"eslint-plugin-qunit": "^7.3.1",
|
|
110
|
-
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
111
|
-
"loader.js": "^4.7.0",
|
|
112
|
-
"msw": "^0.47.0",
|
|
113
|
-
"npm-run-all": "^4.1.5",
|
|
114
|
-
"prettier": "^2.7.1",
|
|
115
|
-
"qunit": "^2.19.1",
|
|
116
|
-
"qunit-dom": "^2.0.0",
|
|
117
|
-
"semantic-release": "^19.0.5",
|
|
118
|
-
"typescript": "~4.8.2",
|
|
119
|
-
"webpack": "^5.74.0"
|
|
120
|
-
},
|
|
121
|
-
"peerDependencies": {
|
|
122
|
-
"ember-data": "^3.25.0"
|
|
123
|
-
},
|
|
124
|
-
"release": {
|
|
125
|
-
"branches": [
|
|
126
|
-
"main",
|
|
127
|
-
"master"
|
|
128
|
-
],
|
|
129
|
-
"plugins": [
|
|
130
|
-
"@semantic-release/commit-analyzer",
|
|
131
|
-
"@semantic-release/release-notes-generator",
|
|
132
|
-
"@semantic-release/changelog",
|
|
133
|
-
"@semantic-release/npm",
|
|
134
|
-
"@semantic-release/github",
|
|
135
|
-
"@semantic-release/git"
|
|
136
|
-
]
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
57
|
+
"@typescript-eslint/parser": "^5.60.0",
|
|
58
|
+
"concurrently": "^8.2.0",
|
|
59
|
+
"ember-source": "~4.10.0",
|
|
60
|
+
"ember-resources": "^5.3.0",
|
|
61
|
+
"ember-template-lint": "^5.10.3",
|
|
62
|
+
"eslint": "^8.43.0",
|
|
63
|
+
"eslint-config-prettier": "^8.8.0",
|
|
64
|
+
"eslint-plugin-ember": "^11.8.0",
|
|
65
|
+
"eslint-plugin-n": "^16.0.0",
|
|
66
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
67
|
+
"execa": "^7.1.1",
|
|
68
|
+
"prettier": "^2.8.8",
|
|
69
|
+
"prettier-plugin-ember-template-tag": "^0.3.2",
|
|
70
|
+
"publint": "^0.1.12",
|
|
71
|
+
"rollup": "~3.21.0",
|
|
72
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
73
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
74
|
+
"rollup-plugin-ts": "^3.2.0",
|
|
75
|
+
"typescript": "^4.9.4"
|
|
137
76
|
},
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"yarn": "1.22.19"
|
|
141
|
-
},
|
|
142
|
-
"engines": {
|
|
143
|
-
"node": "14.* || >= 16"
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"registry": "https://registry.npmjs.org"
|
|
144
79
|
},
|
|
145
80
|
"ember": {
|
|
146
81
|
"edition": "octane"
|
|
147
82
|
},
|
|
148
83
|
"ember-addon": {
|
|
149
|
-
"
|
|
84
|
+
"version": 2,
|
|
85
|
+
"type": "addon",
|
|
86
|
+
"main": "addon-main.cjs",
|
|
87
|
+
"app-js": {
|
|
88
|
+
"./helpers/find-all.js": "./dist/_app_/helpers/find-all.js",
|
|
89
|
+
"./helpers/find-record.js": "./dist/_app_/helpers/find-record.js",
|
|
90
|
+
"./helpers/query-record.js": "./dist/_app_/helpers/query-record.js",
|
|
91
|
+
"./helpers/query.js": "./dist/_app_/helpers/query.js"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"exports": {
|
|
95
|
+
".": {
|
|
96
|
+
"types": "./dist-types/index.d.ts",
|
|
97
|
+
"default": "./dist/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./*": {
|
|
100
|
+
"types": "./dist-types/*.d.ts",
|
|
101
|
+
"default": "./dist/*.js"
|
|
102
|
+
},
|
|
103
|
+
"./addon-main.js": "./addon-main.cjs"
|
|
104
|
+
},
|
|
105
|
+
"typesVersions": {
|
|
106
|
+
"*": {
|
|
107
|
+
"*": [
|
|
108
|
+
"dist-types/*"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
150
111
|
},
|
|
151
|
-
"
|
|
152
|
-
"
|
|
112
|
+
"volta": {
|
|
113
|
+
"extends": "../package.json"
|
|
114
|
+
},
|
|
115
|
+
"peerDependencies": {
|
|
116
|
+
"@ember-data/store": "^3.25 || >= 4.0.0",
|
|
117
|
+
"@glimmer/tracking": "^1.1.2",
|
|
118
|
+
"ember-data": "^3.25.0 || >=4.0.0",
|
|
119
|
+
"ember-source": "^3.25.0 || >=4.0.0",
|
|
120
|
+
"ember-resources": "^5.3.0 || >= 6.0.0"
|
|
121
|
+
},
|
|
122
|
+
"scripts": {
|
|
123
|
+
"build": "concurrently 'npm:build:*'",
|
|
124
|
+
"build:js": "rollup --config",
|
|
125
|
+
"build:types": "rm -rf dist-types; pnpm glint --build",
|
|
126
|
+
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
|
|
127
|
+
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
|
|
128
|
+
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
129
|
+
"lint:js": "eslint . --cache",
|
|
130
|
+
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
131
|
+
"lint:js:fix": "eslint . --fix",
|
|
132
|
+
"lint:types": "glint",
|
|
133
|
+
"lint:prettier:fix": "prettier . -w",
|
|
134
|
+
"lint:prettier": "prettier . -c",
|
|
135
|
+
"lint:package": "pnpm publint",
|
|
136
|
+
"lint:published-types": "attw *.tgz || exit 0",
|
|
137
|
+
"start": "rollup --config --watch",
|
|
138
|
+
"pack": "pnpm pack"
|
|
153
139
|
}
|
|
154
|
-
}
|
|
140
|
+
}
|
package/-private/find.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=find.d.ts.map
|
package/-private/query.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Request } from './request';
|
|
2
|
-
import type ArrayProxy from '@ember/array/proxy';
|
|
3
|
-
import type Store from '@ember-data/store';
|
|
4
|
-
export declare type FindAllOptions = Parameters<Store['findAll']>[1];
|
|
5
|
-
declare type PositionalArgs = [string];
|
|
6
|
-
export interface NamedArgs {
|
|
7
|
-
options: FindAllOptions;
|
|
8
|
-
}
|
|
9
|
-
export interface Args {
|
|
10
|
-
named: NamedArgs;
|
|
11
|
-
positional: PositionalArgs;
|
|
12
|
-
}
|
|
13
|
-
export declare class FindAll<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
14
|
-
private _records;
|
|
15
|
-
__WRAPPED_FUNCTION__([modelName]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
16
|
-
get records(): ArrayProxy<Model> | undefined;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=find-all.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Request } from './request';
|
|
2
|
-
import type { Id } from './types';
|
|
3
|
-
import type Store from '@ember-data/store';
|
|
4
|
-
export declare type FindRecordOptions = Parameters<Store['findRecord']>[2];
|
|
5
|
-
declare type PositionalArgs = [string, Id];
|
|
6
|
-
export interface NamedArgs {
|
|
7
|
-
options: FindRecordOptions;
|
|
8
|
-
}
|
|
9
|
-
export interface Args {
|
|
10
|
-
named: NamedArgs;
|
|
11
|
-
positional: PositionalArgs;
|
|
12
|
-
}
|
|
13
|
-
export declare class FindRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
14
|
-
private _record;
|
|
15
|
-
__WRAPPED_FUNCTION__([modelName, id]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
16
|
-
get record(): Model | undefined;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=find-record.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Request } from './request';
|
|
2
|
-
import type Store from '@ember-data/store';
|
|
3
|
-
declare type QueryParams = Parameters<Store['queryRecord']>;
|
|
4
|
-
export declare type QueryRecordQuery = QueryParams[1];
|
|
5
|
-
export declare type QueryRecordOptions = QueryParams[2];
|
|
6
|
-
declare type PositionalArgs = [string, QueryRecordQuery];
|
|
7
|
-
export interface NamedArgs {
|
|
8
|
-
options: QueryRecordOptions;
|
|
9
|
-
}
|
|
10
|
-
export interface Args {
|
|
11
|
-
named: NamedArgs;
|
|
12
|
-
positional: PositionalArgs;
|
|
13
|
-
}
|
|
14
|
-
export declare class QueryRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
15
|
-
private _record;
|
|
16
|
-
__WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
17
|
-
get record(): Model | undefined;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=query-record.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Request } from './request';
|
|
2
|
-
import type ArrayProxy from '@ember/array/proxy';
|
|
3
|
-
import type Store from '@ember-data/store';
|
|
4
|
-
declare type QueryParams = Parameters<Store['query']>;
|
|
5
|
-
export declare type QueryQuery = QueryParams[1];
|
|
6
|
-
export declare type QueryOptions = QueryParams[2];
|
|
7
|
-
declare type PositionalArgs = [string, QueryQuery];
|
|
8
|
-
export interface NamedArgs {
|
|
9
|
-
options: QueryOptions;
|
|
10
|
-
}
|
|
11
|
-
export interface Args {
|
|
12
|
-
named: NamedArgs;
|
|
13
|
-
positional: PositionalArgs;
|
|
14
|
-
}
|
|
15
|
-
export declare class Query<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {
|
|
16
|
-
private _records;
|
|
17
|
-
__WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs): Promise<void>;
|
|
18
|
-
get records(): ArrayProxy<Model> | undefined;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=query.d.ts.map
|