@ember-data-types/active-record 5.6.0-alpha.3 → 5.6.0-alpha.5

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/README.md CHANGED
@@ -68,11 +68,3 @@ URLs are stable. The same query will produce the same URL every time, even if th
68
68
  the query or values in an array changes.
69
69
 
70
70
  URLs follow the most common ActiveRecord format (underscored pluralized resource types).
71
-
72
- ### Available Builders
73
-
74
- - [createRecord]()
75
- - [deleteRecord]()
76
- - [findRecord]()
77
- - [query]()
78
- - [updateRecord]()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-data-types/active-record",
3
- "version": "5.6.0-alpha.3",
3
+ "version": "5.6.0-alpha.5",
4
4
  "files": [
5
5
  "README.md",
6
6
  "LICENSE.md",
@@ -56,10 +56,7 @@ declare module '@ember-data/active-record/-private/builders/find-record' {
56
56
  * const data = await store.request(options);
57
57
  * ```
58
58
  *
59
- * @method findRecord
60
59
  * @public
61
- * @static
62
- * @for @ember-data/active-record/request
63
60
  * @param identifier
64
61
  * @param options
65
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"find-record.d.ts","sourceRoot":"","sources":["../../../src/-private/builders/find-record.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIvF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAEpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAA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A4B,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC7D,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC7B,wBAAwB,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5D,wBAAgB,UAAU,CACxB,UAAU,EAAE,4BAA4B,EACxC,OAAO,CAAC,EAAE,iBAAiB,GAC1B,wBAAwB,CAAC;AAC5B,wBAAgB,UAAU,CAAC,CAAC,EAC1B,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC7B,wBAAwB,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,wBAAwB,CAAC"}
@@ -45,10 +45,7 @@ declare module '@ember-data/active-record/-private/builders/query' {
45
45
  * const data = await store.request(options);
46
46
  * ```
47
47
  *
48
- * @method query
49
48
  * @public
50
- * @static
51
- * @for @ember-data/active-record/request
52
49
  * @param identifier
53
50
  * @param query
54
51
  * @param options
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/-private/builders/query.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAI3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,CAAC,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,yBAAyB,GAClC,mBAAmB,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7D,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,yBAAyB,GAClC,mBAAmB,CAAC"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/-private/builders/query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAI3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,CAAC,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,yBAAyB,GAClC,mBAAmB,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7D,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,yBAAyB,GAClC,mBAAmB,CAAC"}
@@ -47,10 +47,7 @@ declare module '@ember-data/active-record/-private/builders/save-record' {
47
47
  * const data = await store.request(options);
48
48
  * ```
49
49
  *
50
- * @method deleteRecord
51
50
  * @public
52
- * @static
53
- * @for @ember-data/active-record/request
54
51
  * @param record
55
52
  * @param options
56
53
  */
@@ -91,10 +88,7 @@ declare module '@ember-data/active-record/-private/builders/save-record' {
91
88
  * const data = await store.request(options);
92
89
  * ```
93
90
  *
94
- * @method createRecord
95
91
  * @public
96
- * @static
97
- * @for @ember-data/active-record/request
98
92
  * @param record
99
93
  * @param options
100
94
  */
@@ -138,10 +132,7 @@ declare module '@ember-data/active-record/-private/builders/save-record' {
138
132
  * const data = await store.request(options);
139
133
  * ```
140
134
  *
141
- * @method updateRecord
142
135
  * @public
143
- * @static
144
- * @for @ember-data/active-record/request
145
136
  * @param record
146
137
  * @param options
147
138
  */
@@ -1 +1 @@
1
- {"version":3,"file":"save-record.d.ts","sourceRoot":"","sources":["../../../src/-private/builders/save-record.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACzG,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,oBAAoB,CAAC;AA8BzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACzG,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,yB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AE,yBAAyB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACzG,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,oBAAoB,CAAC;AA6BzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,mBAAmB,EAAE,EAAE,SAAS,mBAAmB,GAAG,CAAC,EAC5F,MAAM,EAAE,CAAC,EACT,OAAO,CAAC,EAAE,yBAAyB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACxD,oBAAoB,CAAC,0BAA0B,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3D,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,yBAAyB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACxD,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference path="./request.d.ts" />
2
- /// <reference path="./-private/builders/query.d.ts" />
3
- /// <reference path="./-private/builders/save-record.d.ts" />
4
2
  /// <reference path="./-private/builders/-utils.d.ts" />
5
- /// <reference path="./-private/builders/find-record.d.ts" />
3
+ /// <reference path="./-private/builders/find-record.d.ts" />
4
+ /// <reference path="./-private/builders/save-record.d.ts" />
5
+ /// <reference path="./-private/builders/query.d.ts" />
@@ -1,66 +1,70 @@
1
1
  declare module '@ember-data/active-record/request' {
2
2
  /**
3
- * <p align="center">
4
- <img
5
- class="project-logo"
6
- src="https://raw.githubusercontent.com/emberjs/data/4612c9354e4c54d53327ec2cf21955075ce21294/ember-data-logo-light.svg#gh-light-mode-only"
7
- alt="EmberData"
8
- width="240px"
9
- title="EmberData"
10
- />
11
- </p>
12
-
13
- This package provides utilities for working with [ActiveRecord](https://guides.rubyonrails.org/active_record_basics.html#convention-over-configuration-in-active-record) APIs with [*Ember***Data**](https://github.com/emberjs/data/).
14
-
15
- ## Installation
16
-
17
- Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
18
-
19
- ```no-highlight
20
- pnpm add @ember-data/active-record
21
- ```
22
-
23
- ## Usage
24
-
25
- Request builders are functions that produce [Fetch Options](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
26
- They take a few contextual inputs about the request you want to make, abstracting away the gnarlier details.
27
-
28
- For instance, to fetch a resource from your API
29
-
30
- ```ts
31
- import { findRecord } from '@ember-data/active-record/request';
32
-
33
- const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });
34
-
35
- /\*
36
- => {
37
- url: 'https://api.example.com/v1/ember_developers/1?include=friends,pets',
38
- method: 'GET',
39
- headers: <Headers>, // 'Content-Type': 'application/json;charset=utf-8'
40
- op: 'findRecord';
41
- records: [{ type: 'ember-developer', id: '1' }]
42
- }
43
- *\/
44
- ```
45
-
46
- Request builder output may be used with either `requestManager.request` or `store.request`.
47
-
48
- URLs are stable. The same query will produce the same URL every time, even if the order of keys in
49
- the query or values in an array changes.
50
-
51
- URLs follow the most common ActiveRecord format (underscored pluralized resource types).
52
-
53
- ### Available Builders
54
-
55
- - [createRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Factive-record/createRecord)
56
- - [deleteRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Factive-record/deleteRecord)
57
- - [findRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Factive-record/findRecord)
58
- - [query](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Factive-record/query)
59
- - [updateRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Factive-record/updateRecord)
60
-
61
- *
62
- * @module @ember-data/active-record/request
63
- * @main @ember-data/active-record/request
3
+ *
4
+ *
5
+ *This package provides utilities for working with [ActiveRecord](https://guides.rubyonrails.org/active_record_basics.html#convention-over-configuration-in-active-record) APIs.
6
+ *
7
+ * ## Installation
8
+ *
9
+ * Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
10
+ *
11
+ * ::: code-group
12
+ *
13
+ * ```sh [pnpm]
14
+ * pnpm add -E @ember-data/active-record
15
+ * ```
16
+ *
17
+ * ```sh [npm]
18
+ * npm add -E @ember-data/active-record
19
+ * ```
20
+ *
21
+ * ```sh [yarn]
22
+ * yarn add -E @ember-data/active-record
23
+ * ```
24
+ *
25
+ * ```sh [bun]
26
+ * bun add --exact @ember-data/active-record
27
+ * ```
28
+ *
29
+ * :::
30
+ *
31
+ * ## Usage
32
+ *
33
+ * Request builders are functions that produce [Fetch Options](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
34
+ * They take a few contextual inputs about the request you want to make, abstracting away the gnarlier details.
35
+ *
36
+ * For instance, to construct a request that would fetch a resource from your API:
37
+ *
38
+ * ```ts
39
+ * import { findRecord } from '@ember-data/active-record/request';
40
+ *
41
+ * const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });
42
+ * ```
43
+ *
44
+ * This would produce the following request object:
45
+ *
46
+ * ```js
47
+ * {
48
+ * url: 'https://api.example.com/v1/ember_developers/1?include=friends,pets',
49
+ * method: 'GET',
50
+ * headers: <Headers>, // 'Accept': 'application/json;charset=utf-8'
51
+ * op: 'findRecord';
52
+ * records: [{ type: 'ember-developer', id: '1' }]
53
+ * }
54
+ * ```
55
+ *
56
+ * Request builder output may be used with either `requestManager.request` or `store.request`.
57
+ *
58
+ * ```ts
59
+ * const data = await store.request(options);
60
+ * ```
61
+ *
62
+ * URLs are stable. The same query will produce the same URL every time, even if the order of keys in
63
+ * the query or values in an array changes.
64
+ *
65
+ * URLs follow the most common ActiveRecord format (underscored pluralized resource types).
66
+ *
67
+ * @module
64
68
  */
65
69
  export { findRecord } from '@ember-data/active-record/-private/builders/find-record';
66
70
  export { query } from '@ember-data/active-record/-private/builders/query';
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}