@ember-data-types/active-record 5.8.0-alpha.40 → 5.8.0-alpha.42

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
@@ -28,6 +28,12 @@
28
28
 
29
29
  # @ember-data/active-record
30
30
 
31
+ > [!WARNING]
32
+ > **⚠️ This package only exists for backwards compatibility**
33
+ >
34
+ > Newer apps should use [@warp-drive/utilities](https://warp-drive.io/api/@warp-drive/utilities/)
35
+
36
+
31
37
  This package provides utilities for working with **Active**Record APIs with [***Warp*Drive**](https://warp-drive.io/) when using the older package configuration.
32
38
 
33
39
  For for modern usage of these utilities, see [@warp-drive/utilities](https://www.npmjs.com/package/@warp-drive/utilities).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-data-types/active-record",
3
- "version": "5.8.0-alpha.40",
3
+ "version": "5.8.0-alpha.42",
4
4
  "files": [
5
5
  "README.md",
6
6
  "LICENSE.md",
@@ -1 +1,9 @@
1
- /// <reference path="./request.d.ts" />
1
+ /// <reference path="./request.d.ts" />
2
+ declare module '@ember-data/active-record' {
3
+ /**
4
+ * @module
5
+ * @mergeModuleWith <project>
6
+ */
7
+ export {};
8
+
9
+ }
@@ -1,71 +1,4 @@
1
1
  declare module '@ember-data/active-record/request' {
2
- /**
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
68
- */
69
2
  export { findRecord, query, deleteRecord, createRecord, updateRecord } from "@warp-drive/utilities/active-record";
70
3
 
71
4
  }