@ember-data-types/store 5.4.0-alpha.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +193 -0
  3. package/ember-data-logo-dark.svg +12 -0
  4. package/ember-data-logo-light.svg +12 -0
  5. package/package.json +20 -0
  6. package/unstable-preview-types/-private/cache-handler.d.ts +100 -0
  7. package/unstable-preview-types/-private/cache-handler.d.ts.map +1 -0
  8. package/unstable-preview-types/-private/caches/cache-utils.d.ts +11 -0
  9. package/unstable-preview-types/-private/caches/cache-utils.d.ts.map +1 -0
  10. package/unstable-preview-types/-private/caches/identifier-cache.d.ts +182 -0
  11. package/unstable-preview-types/-private/caches/identifier-cache.d.ts.map +1 -0
  12. package/unstable-preview-types/-private/caches/instance-cache.d.ts +63 -0
  13. package/unstable-preview-types/-private/caches/instance-cache.d.ts.map +1 -0
  14. package/unstable-preview-types/-private/caches/resource-utils.d.ts +12 -0
  15. package/unstable-preview-types/-private/caches/resource-utils.d.ts.map +1 -0
  16. package/unstable-preview-types/-private/document.d.ts +146 -0
  17. package/unstable-preview-types/-private/document.d.ts.map +1 -0
  18. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +179 -0
  19. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  20. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +19 -0
  21. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  22. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +29 -0
  23. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  24. package/unstable-preview-types/-private/managers/cache-manager.d.ts +442 -0
  25. package/unstable-preview-types/-private/managers/cache-manager.d.ts.map +1 -0
  26. package/unstable-preview-types/-private/managers/notification-manager.d.ts +98 -0
  27. package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +1 -0
  28. package/unstable-preview-types/-private/managers/record-array-manager.d.ts +97 -0
  29. package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +1 -0
  30. package/unstable-preview-types/-private/network/request-cache.d.ts +109 -0
  31. package/unstable-preview-types/-private/network/request-cache.d.ts.map +1 -0
  32. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +133 -0
  33. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -0
  34. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
  35. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  36. package/unstable-preview-types/-private/store-service.d.ts +1554 -0
  37. package/unstable-preview-types/-private/store-service.d.ts.map +1 -0
  38. package/unstable-preview-types/-private/utils/coerce-id.d.ts +10 -0
  39. package/unstable-preview-types/-private/utils/coerce-id.d.ts.map +1 -0
  40. package/unstable-preview-types/-private/utils/construct-resource.d.ts +10 -0
  41. package/unstable-preview-types/-private/utils/construct-resource.d.ts.map +1 -0
  42. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +7 -0
  43. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts.map +1 -0
  44. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +4 -0
  45. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts.map +1 -0
  46. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +4 -0
  47. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts.map +1 -0
  48. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +4 -0
  49. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts.map +1 -0
  50. package/unstable-preview-types/-private.d.ts +20 -0
  51. package/unstable-preview-types/-private.d.ts.map +1 -0
  52. package/unstable-preview-types/-types/overview.d.ts +21 -0
  53. package/unstable-preview-types/-types/overview.d.ts.map +1 -0
  54. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts +107 -0
  55. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts.map +1 -0
  56. package/unstable-preview-types/-types/q/cache.d.ts +47 -0
  57. package/unstable-preview-types/-types/q/cache.d.ts.map +1 -0
  58. package/unstable-preview-types/-types/q/ds-model.d.ts +15 -0
  59. package/unstable-preview-types/-types/q/ds-model.d.ts.map +1 -0
  60. package/unstable-preview-types/-types/q/identifier.d.ts +171 -0
  61. package/unstable-preview-types/-types/q/identifier.d.ts.map +1 -0
  62. package/unstable-preview-types/-types/q/promise-proxies.d.ts +4 -0
  63. package/unstable-preview-types/-types/q/promise-proxies.d.ts.map +1 -0
  64. package/unstable-preview-types/-types/q/record-data-json-api.d.ts +36 -0
  65. package/unstable-preview-types/-types/q/record-data-json-api.d.ts.map +1 -0
  66. package/unstable-preview-types/-types/q/record-instance.d.ts +29 -0
  67. package/unstable-preview-types/-types/q/record-instance.d.ts.map +1 -0
  68. package/unstable-preview-types/-types/q/schema-service.d.ts +214 -0
  69. package/unstable-preview-types/-types/q/schema-service.d.ts.map +1 -0
  70. package/unstable-preview-types/-types/q/store.d.ts +17 -0
  71. package/unstable-preview-types/-types/q/store.d.ts.map +1 -0
  72. package/unstable-preview-types/index.d.ts +220 -0
  73. package/unstable-preview-types/index.d.ts.map +1 -0
package/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (C) 2017-2023 Ember.js contributors
4
+ Portions Copyright (C) 2011-2017 Tilde, Inc. and contributors.
5
+ Portions Copyright (C) 2011 LivingSocial Inc.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,193 @@
1
+ <p align="center">
2
+ <img
3
+ class="project-logo"
4
+ src="./ember-data-logo-dark.svg#gh-dark-mode-only"
5
+ alt="EmberData Store"
6
+ width="240px"
7
+ title="EmberData Store"
8
+ />
9
+ <img
10
+ class="project-logo"
11
+ src="./ember-data-logo-light.svg#gh-light-mode-only"
12
+ alt="EmberData Store"
13
+ width="240px"
14
+ title="EmberData Store"
15
+ />
16
+ </p>
17
+
18
+ <p align="center">⚡️ The lightweight reactive data library for JavaScript applications</p>
19
+
20
+ This package provides [*Ember***Data**](https://github.com/emberjs/data/)'s `Store` class.
21
+
22
+ The `Store` coordinates interaction between your application, a [Cache](https://api.emberjs.com/ember-data/release/classes/%3CInterface%3E%20Cache),
23
+ and sources of data (such as your API or a local persistence layer) accessed via a [RequestManager](https://github.com/emberjs/data/tree/main/packages/request).
24
+
25
+ ```mermaid
26
+ flowchart LR
27
+ A[fa:fa-terminal App] ===> D{fa:fa-code-fork Store}
28
+ B{{fa:fa-sitemap RequestManager}} <--> C[(fa:fa-database Source)]
29
+ D <--> E[(fa:fa-archive Cache)]
30
+ D <--> B
31
+ click B href "https://github.com/emberjs/data/tree/main/packages/request" "Go to @ember-data/request" _blank
32
+ click E href "https://github.com/emberjs/data/tree/main/packages/json-api" "Go to @ember-data/json-api" _blank
33
+ style B color:#58a6ff;
34
+ style E color:#58a6ff;
35
+ ```
36
+
37
+ Optionally, the Store can be configured to hydrate the response data into rich presentation classes.
38
+
39
+ ```mermaid
40
+ flowchart LR
41
+ A[fa:fa-terminal App] --- B(Model)
42
+ A === C{fa:fa-code-fork Store}
43
+ B --- C
44
+ click B href "https://github.com/emberjs/data/tree/main/packages/model" "Go to @ember-data/model" _blank
45
+ style B color:#58a6ff;
46
+ ```
47
+
48
+ ## Installation
49
+
50
+ Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
51
+
52
+ ```
53
+ pnpm add @ember-data/store
54
+ ```
55
+
56
+ After installing you will want to configure your first `Store`. Read more below for how to create and configure stores for your application.
57
+
58
+
59
+ ## 🔨 Creating A Store
60
+
61
+ To use a `Store` we will need to do few things: add a [Cache](https://api.emberjs.com/ember-data/release/classes/%3CInterface%3E%20Cache) to store data **in-memory**, add a [Handler](https://github.com/emberjs/data/tree/main/packages/request#handling-requests) to fetch data from a source, and implement `instantiateRecord` to tell the store how to display the data for individual resources.
62
+
63
+ > **Note**
64
+ > If you are using the package `ember-data` then a `JSON:API` cache and `instantiateRecord` are configured for you by default.
65
+
66
+ ### Configuring A Cache
67
+
68
+ To start, let's install a [JSON:API](https://jsonapi.org/) cache. If your app uses `GraphQL` or `REST` other caches may better fit your data. You can author your own cache by creating one that conforms to the [spec](https://api.emberjs.com/ember-data/release/classes/%3CInterface%3E%20Cache).
69
+
70
+ The package [@ember-data/json-api](https://github.com/emberjs/data/tree/main/packages/json-api) provides a [JSON:API](https://jsonapi.org/) cache we can use. After installing it, we can configure the store to use this cache.
71
+
72
+ ```js
73
+ import Store from '@ember-data/store';
74
+ import Cache from '@ember-data/json-api';
75
+
76
+ class extends Store {
77
+ createCache(storeWrapper) {
78
+ return new Cache(storeWrapper);
79
+ }
80
+ }
81
+ ```
82
+
83
+ Now that we have a `cache` let's setup something to handle fetching and saving data via our API.
84
+
85
+ > **Note**
86
+ > The `ember-data` package automatically includes and configures the `@ember-data/json-api` cache for you.
87
+
88
+ ### Handling Requests
89
+
90
+ When *Ember***Data** needs to fetch or save data it will pass that request to your application's `RequestManager` for fulfillment. How this fulfillment occurs (in-memory, device storage, via single or multiple API requests, etc.) is then up to the registered request handlers.
91
+
92
+ To start, let's install the `RequestManager` from `@ember-data/request` and the basic `Fetch` handler from ``@ember-data/request/fetch`.
93
+
94
+ > **Note**
95
+ > If your app uses `GraphQL`, `REST` or different conventions for `JSON:API` than your cache expects, other handlers may better fit your data. You can author your own handler by creating one that conforms to the [handler interface](https://github.com/emberjs/data/tree/main/packages/request#handling-requests).
96
+
97
+ ```ts
98
+ import Store, { CacheHandler } from '@ember-data/store';
99
+ import RequestManager from '@ember-data/request';
100
+ import Fetch from '@ember-data/request/fetch';
101
+
102
+ export default class extends Store {
103
+ constructor() {
104
+ super(...arguments);
105
+ this.requestManager = new RequestManager();
106
+ this.requestManager.use([Fetch]);
107
+ this.requestManager.useCache(CacheHandler);
108
+ }
109
+ }
110
+ ```
111
+
112
+ **Using RequestManager as a Service**
113
+
114
+ Alternatively if you have configured the `RequestManager` to be a service you may re-use it.
115
+
116
+ *app/services/request.js*
117
+ ```ts
118
+ import RequestManager from '@ember-data/request';
119
+ import { CacheHandler } from '@ember-data/store';
120
+ import Fetch from '@ember-data/request/fetch';
121
+
122
+ export default class extends RequestManager {
123
+ constructor(createArgs) {
124
+ super(createArgs);
125
+ this.use([Fetch]);
126
+ this.useCache(CacheHandler);
127
+ }
128
+ }
129
+ ```
130
+
131
+ *app/services/store.js*
132
+ ```ts
133
+ import Store from '@ember-data/store';
134
+ import { service } from '@ember/service';
135
+
136
+ export default class extends Store {
137
+ @service('request') requestManager
138
+ }
139
+ ```
140
+
141
+ ### Presenting Data from the Cache
142
+
143
+ Now that we have a source and a cach for our data, we need to configure how the Store delivers that data back to our application. We do this via the hook [instantiateRecord](https://api.emberjs.com/ember-data/release/classes/Store/methods/instantiateRecord%20(hook)?anchor=instantiateRecord%20(hook)),
144
+ which allows us to transform the data for a resource before handing it to the application.
145
+
146
+ A naive way to present the data would be to return it as JSON. Typically instead this hook will be used to add reactivity and make each unique resource a singleton, ensuring that if the cache updates our presented data will reflect the new state.
147
+
148
+ Below is an example of using the hooks `instantiateRecord` and a `teardownRecord` to provide minimal read-only reactive state for simple resources.
149
+
150
+ ```ts
151
+ import Store, { recordIdentifierFor } from '@ember-data/store';
152
+ import { TrackedObject } from 'tracked-built-ins';
153
+
154
+ class extends Store {
155
+ instantiateRecord(identifier) {
156
+ const { cache, notifications } = this;
157
+
158
+ // create a TrackedObject with our attributes, id and type
159
+ const record = new TrackedObject(Object.assign({}, cache.peek(identifier)));
160
+ record.type = identifier.type;
161
+ record.id = identifier.id;
162
+
163
+ // update the TrackedObject whenever attributes change
164
+ const token = notifications.subscribe(identifier, (_, change) => {
165
+ if (change === 'attributes') {
166
+ Object.assign(record, cache.peek(identifier));
167
+ }
168
+ });
169
+
170
+ record.destroy = () => {
171
+ this.notifications.unsubscribe(token);
172
+ };
173
+
174
+ return record;
175
+ }
176
+
177
+ teardownRecord(record: FakeRecord) {
178
+ record.destroy();
179
+ }
180
+ }
181
+ ```
182
+
183
+ Because `instantiateRecord` is opaque to the nature of the record, an implementation can be anything from a fairly simple object to a robust proxy that intelligently links together associated records through relationships.
184
+
185
+ This also enables creating a record that separates `edit` flows from `create` flows entirely. A record class might choose to implement a `checkout` method that gives access to an editable instance while the primary record continues to be read-only and reflect only persisted (non-mutated) state.
186
+
187
+ Typically you will choose an existing record implementation such as `@ember-data/model` for your application.
188
+
189
+ Because of the boundaries around instantiation and the cache, record implementations should be capable of interop both with each other and with any `Cache`. Due to this, if needed an application can utilize multiple record implementations and multiple cache implementations either to support enhanced features for only a subset of records or to be able to incrementally migrate from one record/cache to another record or cache.
190
+
191
+ > **Note**
192
+ > The `ember-data` package automatically includes the `@ember-data/model`
193
+ > package and configures it for you.
@@ -0,0 +1,12 @@
1
+ <svg width="1028" height="324" viewBox="0 0 1028 324" xmlns="http://www.w3.org/2000/svg">
2
+ <g transform="translate(76.041 42)" fill="none" fill-rule="evenodd">
3
+ <g fill="#E04E39">
4
+ <path d="M507.552 137.229s-12.56 9.744-23.616 8.656c-11.056-1.088-7.584-25.792-7.584-25.792s2.384-22.656-4.128-24.56c-6.496-1.888-14.512 5.904-14.512 5.904s-9.968 11.056-14.736 25.152l-1.312.432s1.52-24.72-.208-30.352c-1.296-2.816-13.216-2.592-15.168 2.384-1.952 4.992-11.488 39.664-12.144 54.192 0 0-18.64 15.824-34.88 18.416-16.256 2.608-20.16-7.584-20.16-7.584s44.208-12.352 42.688-47.68c-1.504-35.328-35.648-22.256-39.504-19.36-3.744 2.816-23.696 14.848-29.52 48.176-.192 1.12-.544 6.08-.544 6.08s-17.12 11.472-26.656 14.512c0 0 26.656-44.864-5.84-65.232-9.14-5.502-17.106-.44-21.845 4.208-2.91 2.854 39.397-43.424 29.637-84.832C302.88.237 293.024-1.875 283.984 1.325c-13.728 5.408-18.928 13.424-18.928 13.424s-17.776 25.792-21.904 64.16c-4.112 38.352-10.176 84.736-10.176 84.736s-8.464 8.24-16.256 8.672c-7.808.416-4.336-23.2-4.336-23.2s6.064-35.968 5.648-42.048c-.448-6.064-.88-9.312-8.032-11.472-7.152-2.176-14.96 6.928-14.96 6.928s-20.576 31.2-22.304 35.968l-1.104 1.968-1.072-1.312s14.512-42.48.656-43.12c-13.872-.656-22.976 15.168-22.976 15.168s-15.824 26.448-16.48 29.472l-1.072-1.296s6.496-30.768 5.2-38.368c-1.312-7.584-8.448-6.064-8.448-6.064s-9.104-1.088-11.488 4.768c-2.384 5.856-11.056 44.64-12.144 56.992 0 0-22.752 16.256-37.712 16.464-14.944.224-13.424-9.472-13.424-9.472s54.832-18.768 39.872-55.824c-6.72-9.536-14.512-12.528-25.568-12.32-11.056.224-24.768 6.96-33.648 26.896-4.256 9.504-5.792 18.544-6.672 25.36 0 0-9.584 1.968-14.784-2.368-5.216-4.336-7.888 0-7.888 0s-8.928 11.392-.048 14.848c8.896 3.472 22.752 5.088 22.752 5.088 1.28 6.064 4.976 16.384 15.808 24.592 16.256 12.352 47.44-1.136 47.44-1.136l12.784-7.168s.432 11.728 9.76 13.44c9.312 1.712 13.216-.032 29.472-39.472 9.536-20.16 10.192-19.072 10.192-19.072 1.072-.224-6.288 38.352-3.472 48.752 2.816 10.416 15.168 9.328 15.168 9.328s6.72 1.296 12.144-17.776c5.408-19.072 15.824-40.096 15.824-40.096 1.28 0-3.264 39.44 3.664 52.016 6.944 12.576 24.928 4.224 24.928 4.224s12.576-6.336 14.528-8.288c0 0 14.912 12.704 35.952 10.4 47.04-9.264 63.776-21.776 63.776-21.776s8.08 20.48 33.12 22.384c28.592 2.16 44.208-15.824 44.208-15.824s-.224 11.696 9.744 15.824c9.984 4.112 16.688-19.04 16.688-19.04l16.688-45.984c1.52 0 2.384 29.904 18.864 34.672 16.464 4.768 37.92-11.168 37.92-11.168s5.2-2.864 4.336-11.536c-.88-8.672-8.672-5.44-8.672-5.44zm-434.08-21.696c5.84 5.632 3.68 17.76-7.376 25.344-11.04 7.6-16.032 6.08-16.032 6.08.656-25.792 17.568-37.072 23.408-31.424zM289.104 26.46c3.68 19.504-32.288 77.584-32.288 77.584.432-13.008 13.216-56.992 13.216-56.992s15.376-40.096 19.072-20.592zm-35.552 148.016s-2.816-9.536 5.2-36.192c8.032-26.656 26.88-16.256 26.88-16.256s13.008 9.968 2.816 36.624c-10.176 26.656-34.896 15.824-34.896 15.824zm109.664-52.224c8.88-16.256 15.824-7.376 15.824-7.376s7.584 8.24-1.088 20.592c-8.672 12.352-21.232 11.488-21.232 11.488s-2.384-8.464 6.496-24.704z"/>
5
+ <path d="M451.918 188.027v-3.112h1.974c.273 0 .547.028.835.057.288.043.562.115.793.216.245.101.432.245.576.433.159.187.23.446.23.763 0 .72-.216 1.182-.648 1.369-.432.187-.994.274-1.671.274h-2.09zm-2.349-4.942v11.843h2.349v-5.057h1.47l2.881 5.057h2.464l-3.17-5.172c.432-.044.836-.13 1.225-.26.374-.13.706-.317.98-.562.288-.245.504-.562.662-.95.173-.39.245-.85.245-1.398 0-1.282-.403-2.19-1.196-2.709-.807-.533-1.96-.792-3.443-.792h-4.467zm-3.76 5.936c0-1.21.201-2.32.62-3.328a8.09 8.09 0 0 1 1.7-2.608 7.71 7.71 0 0 1 2.52-1.73 7.864 7.864 0 0 1 3.127-.619c1.095 0 2.133.202 3.098.62.98.418 1.816.994 2.536 1.729.72.735 1.282 1.599 1.714 2.608.418 1.008.634 2.118.634 3.328s-.216 2.32-.634 3.342c-.432 1.009-.994 1.902-1.714 2.637a7.594 7.594 0 0 1-2.536 1.744 7.725 7.725 0 0 1-3.098.619 7.864 7.864 0 0 1-3.126-.62 7.535 7.535 0 0 1-2.522-1.743c-.72-.735-1.282-1.628-1.7-2.637-.418-1.022-.62-2.132-.62-3.342zm-2.896 0c0 1.628.302 3.083.893 4.38.605 1.311 1.398 2.42 2.392 3.343a10.57 10.57 0 0 0 3.472 2.117c1.311.49 2.68.735 4.106.735 1.441 0 2.81-.245 4.121-.735a10.57 10.57 0 0 0 3.472-2.117c.995-.923 1.787-2.032 2.392-3.343.59-1.297.879-2.752.879-4.38 0-1.6-.288-3.055-.879-4.351-.605-1.312-1.397-2.42-2.392-3.329a10.57 10.57 0 0 0-3.472-2.118 11.356 11.356 0 0 0-4.12-.749c-1.427 0-2.796.245-4.107.75a10.57 10.57 0 0 0-3.472 2.117c-.994.908-1.787 2.017-2.392 3.329-.59 1.296-.893 2.752-.893 4.35z"/>
6
+ </g>
7
+ <path d="M589.663 44.545c.42-4.718.63-8.462.63-11.226 0-3.638-.33-6.168-.975-7.583-.646-1.416-1.592-2.124-2.823-2.124-2.207 0-4.19 1.365-5.976 4.093-1.772 2.73-3.198 6.25-4.295 10.556-1.08 4.31-2.252 8.992-3.528 14.05-1.263 5.061-2.192 10.016-2.793 14.863-.57 4.85-1.051 9.221-1.397 13.115-.36 3.889-.615 6.654-.75 8.296-.3 3.348-.54 6.575-.721 9.68-.18 3.108-.315 5.943-.39 8.503a225.54 225.54 0 0 0-.107 6.71v5.432A515.125 515.125 0 0 0 576.9 92.079a452.907 452.907 0 0 0 3.903-11.879c1.277-4.125 2.554-8.216 3.815-12.274a145.287 145.287 0 0 0 3.213-12.052c.87-3.98 1.487-7.756 1.832-11.33zm-47.689 68.962a42.47 42.47 0 0 0-11.877 8.613c-3.468 3.566-6.366 8.267-8.694 14.114-2.312 5.843-4.084 10.873-5.3 15.086-1.216 4.21-1.817 8.014-1.817 11.414 0 1.055.15 2.106.449 3.162.302 1.055.857 2.004 1.668 2.85.81.84 1.952 1.528 3.439 2.054 1.471.53 3.393.793 5.766.793 1.2 0 2.402-.268 3.588-.81a16.08 16.08 0 0 0 3.379-2.102 24.957 24.957 0 0 0 3.093-2.96 31.904 31.904 0 0 0 2.673-3.453c1.892-2.75 3.618-5.854 5.165-9.318-.197-.95-.376-2.463-.51-4.538-.136-2.07-.24-5.231-.301-9.476-.075-4.247-.152-7.732-.21-10.448a519.42 519.42 0 0 1-.15-7.44c-.045-2.243-.09-4.075-.152-5.503-.074-1.427-.149-2.107-.209-2.038zm70.062 59.695c-4.775 3.934-9.505 7.443-14.144 10.52a127.062 127.062 0 0 1-6.173 3.812 76.437 76.437 0 0 1-6.367 3.328 48.4 48.4 0 0 1-6.094 2.362c-1.952.606-3.77.91-5.406.91-.976 0-2.404-.215-4.296-.643-1.892-.434-3.962-1.306-6.2-2.632-2.252-1.323-4.49-3.239-6.742-5.742-2.237-2.508-4.174-5.835-5.842-9.982a100.616 100.616 0 0 1-7.957 7.35 61.432 61.432 0 0 1-8.724 6.06c-3.003 1.72-6.051 3.098-9.114 4.132-3.08 1.04-6.171 1.557-9.28 1.557-4.384 0-8.168-.91-11.381-2.732a24.331 24.331 0 0 1-7.975-7.274c-2.13-3.025-3.709-6.458-4.758-10.299a45.513 45.513 0 0 1-1.562-11.912c0-4.374.556-8.802 1.667-13.285a62.3 62.3 0 0 1 4.85-13.028 306.475 306.475 0 0 1 7.072-13.185c2.598-4.58 6.036-8.752 10.316-12.516 4.279-3.762 8.678-6.6 13.183-8.516 4.518-1.913 9.34-3.11 14.46-3.59.209-8.754 1.141-16.469 2.793-23.14 1.651-6.668 3.437-13.846 5.345-21.532 1.907-7.683 4.37-14.76 7.388-21.227 3.018-6.47 6.321-12.062 9.91-16.778 3.589-4.717 7.416-8.406 11.487-11.067 4.069-2.66 8.273-3.992 12.613-3.992 3.153 0 5.854.827 8.078 2.48 2.222 1.653 4.04 3.847 5.42 6.583 1.365 2.734 2.358 5.907 2.974 9.517.6 3.612.915 7.342.915 11.19 0 2.402-.03 4.872-.075 7.41-.196 9.674-1.683 18.678-4.474 27.013-2.793 8.334-5.556 16.573-8.274 24.716-2.732 8.144-6.036 16.201-9.88 24.171-5.886 12.197-9.64 20.478-11.246 24.837-.346.954-.691 2.114-1.051 3.478a84.878 84.878 0 0 0-.991 4.443 70.896 70.896 0 0 0-.796 4.908 38.845 38.845 0 0 0-.316 4.852c0 1.977.106 3.853.346 5.625.225 1.77.6 3.356 1.126 4.75.525 1.399 1.23 2.507 2.132 3.323.871.817 1.967 1.226 3.289 1.226 1.276 0 2.687-.256 4.189-.765 1.516-.509 3.123-1.204 4.805-2.09a61.408 61.408 0 0 0 5.105-3.004 127.418 127.418 0 0 0 4.999-3.416c3.708-2.718 7.584-5.811 11.621-9.275l3.035 21.07z" fill="#FFFFFF"/>
8
+ <path d="M625.775 161.267c0 1.738.104 3.423.346 5.057.24 1.633.66 3.093 1.274 4.378.602 1.287 1.413 2.33 2.42 3.131 1.02.796 2.297 1.197 3.843 1.197 2.508 0 4.76-1.084 6.787-3.256 2.027-2.17 3.784-4.782 5.27-7.835a55.388 55.388 0 0 0 3.59-9.465c.915-3.256 1.5-5.972 1.771-8.143l7.538-32.86c-2.763 0-5.45.688-8.078 2.054-2.628 1.371-5.107 3.223-7.433 5.563-2.327 2.338-4.461 5.01-6.412 8.014-1.967 3.008-3.889 6.717-5.766 11.124-1.891 4.41-3.213 8.284-3.994 11.623-.78 3.34-1.156 6.482-1.156 9.418zm86.714 7.92c-1.547 2.179-3.62 4.735-6.216 7.666-2.598 2.93-5.511 5.725-8.74 8.381a54.956 54.956 0 0 1-10.42 6.748c-3.709 1.84-7.418 2.758-11.111 2.758-4.475 0-8.214-1.416-11.202-4.253-2.988-2.835-5.57-6.951-7.75-12.357-1.634 1.868-3.632 3.77-6.005 5.702a54.523 54.523 0 0 1-7.792 5.255 50.806 50.806 0 0 1-8.814 3.85c-3.063 1.002-6.126 1.5-9.174 1.5-3.244 0-6.382-.664-9.445-1.99-3.08-1.325-5.781-3.226-8.138-5.708-2.373-2.484-4.25-5.508-5.661-9.077-1.427-3.57-2.132-7.598-2.132-12.086 0-5.033.72-10.204 2.132-15.51 1.426-5.304 3.634-11.042 6.62-17.224 2.973-6.178 6.188-11.515 9.596-16.015 3.439-4.496 7.178-8.427 11.247-11.783 4.07-3.358 8.349-6.027 12.868-8.009 4.505-1.98 9.083-2.971 13.77-2.971 1.56 0 2.776.308 3.663.917a9.43 9.43 0 0 1 2.192 2.095c.57.784 1.126 1.552 1.667 2.3a4.674 4.674 0 0 0 2.04 1.634 9.3 9.3 0 0 0 2.495.664c.839.1 1.711.153 2.582.153.751 0 1.517-.017 2.298-.053.78-.033 1.531-.048 2.282-.048 1.021 0 1.965.1 2.853.303.87.206 1.652.646 2.327 1.33.676.684 1.201 1.633 1.577 2.858.36 1.225.555 2.895.555 5.006 0 3.223-.345 6.796-1.02 10.723a296.911 296.911 0 0 1-2.313 12.07c-.872 4.12-1.862 8.813-2.973 14.09-1.111 5.271-1.668 9.715-1.668 13.33 0 3.089.287 5.503.857 7.24.586 1.744 1.8 2.613 3.694 2.613 1.411 0 2.898-.351 4.443-1.05a27.945 27.945 0 0 0 4.701-2.755 53.642 53.642 0 0 0 4.76-3.86 70.739 70.739 0 0 0 4.49-4.461c3.302-3.605 6.637-7.682 10.015-12.223l4.85 22.247z" fill="#FFFFFF"/>
9
+ <path d="M765.867 172.704c-2.43 2.224-5.449 4.598-9.053 7.13a96.388 96.388 0 0 1-11.667 6.97 88.86 88.86 0 0 1-12.793 5.307c-4.34 1.416-8.47 2.123-12.372 2.123-3.514 0-6.457-.49-8.86-1.464-2.387-.977-4.324-2.34-5.81-4.094-1.472-1.751-2.538-3.895-3.169-6.418-.645-2.53-.976-5.308-.976-8.341 0-4.245.48-9.198 1.427-14.86 1.937-11.708 3.183-18.282 3.739-19.73.916-2.878 12.763-65.43 15.51-75.305 2.568-8.05 4.145-13.285 4.745-15.715.33-1.702 1.247-3.235 2.778-4.602a18.457 18.457 0 0 1 4.715-3.012 25.63 25.63 0 0 1 5.466-1.739c1.877-.375 3.588-.561 5.12-.561 2.778 0 4.655.52 5.66 1.569.992 1.044 1.487 2.441 1.487 4.192 0 1.484-.345 3.578-1.05 6.284-.691 2.709-1.472 5.793-2.358 9.254-.888 3.466-2.192 7.918-3.936 13.36-1.74 5.44-12.926 66.26-13.557 70.097a136.637 136.637 0 0 1-2.403 11.446c-.976 3.789-1.456 7.233-1.456 10.33 0 3.032.33 5.438 1.006 7.225.674 1.784 2.057 2.677 4.144 2.677 2.433 0 5.12-.84 8.094-2.527 2.958-1.682 5.96-3.724 8.994-6.117a202.022 202.022 0 0 0 8.889-7.428 276.486 276.486 0 0 1 7.686-6.57v20.519z" fill="#FFFFFF"/>
10
+ <path d="M809.167 146.295c-.272 2.171-.86 4.881-1.772 8.136a56.238 56.238 0 0 1-3.591 9.457c-1.482 3.053-3.238 5.66-5.26 7.827-2.027 2.17-4.284 3.258-6.781 3.258-1.548 0-2.834-.404-3.843-1.199-1.013-.799-1.821-1.837-2.426-3.126-.61-1.285-1.03-2.744-1.269-4.37a35.652 35.652 0 0 1-.354-5.055c0-2.941.387-6.08 1.162-9.416.775-3.337 2.105-7.205 3.99-11.616 1.884-4.404 3.803-8.107 5.76-11.114 1.953-3.003 4.09-5.672 6.41-8.008 2.327-2.335 4.803-4.189 7.426-5.56 2.628-1.368 5.318-2.052 8.081-2.052l-7.533 32.838zm64.903 14.042c.123-3.51-1.295-7.014-4.783-8.534-4.276-1.866-7.707.432-10.245 3.616a59.476 59.476 0 0 1-5.231 5.75c-4.102 3.955-10.434 10.064-16.514 10.064-1.886 0-3.114-.87-3.686-2.608-.574-1.738-.862-4.152-.862-7.237 0-3.609.561-8.053 1.668-13.322l2.974-14.079c.865-4.12 1.64-8.14 2.311-12.061.672-3.921 1.014-7.493 1.014-10.714 0-2.109-.185-3.777-.56-5-.371-1.228-.89-2.176-1.566-2.86-.679-.68-1.454-1.124-2.335-1.33a12.727 12.727 0 0 0-2.847-.305c-.745 0-1.508.02-2.285.054-.78.033-1.541.05-2.287.05-.877 0-1.747-.05-2.59-.153a9.082 9.082 0 0 1-2.488-.663c-.816-.338-1.492-.882-2.032-1.632a372 372 0 0 0-1.68-2.298c-.572-.783-1.302-1.479-2.184-2.093-.876-.613-2.1-.918-3.657-.918-4.676 0-9.265.988-13.766 2.97-4.506 1.981-8.79 4.646-12.857 8-4.066 3.356-7.806 7.282-11.228 11.776-3.42 4.498-6.625 9.832-9.602 16.007-2.978 6.175-5.182 11.913-6.603 17.21-1.426 5.302-2.135 10.467-2.135 15.5 0 4.486.709 8.51 2.122 12.074 1.413 3.567 3.296 6.59 5.656 9.07 2.356 2.48 5.066 4.383 8.131 5.706 3.065 1.326 6.212 1.99 9.446 1.99 3.051 0 6.108-.5 9.161-1.5a50.753 50.753 0 0 0 8.811-3.847c2.812-1.57 5.412-3.316 7.789-5.253 2.372-1.931 4.378-3.83 6.006-5.696 2.17 5.4 4.749 9.52 7.74 12.349 2.982 2.834 6.713 4.247 11.188 4.247 3.703 0 7.406-.919 11.113-2.756a54.844 54.844 0 0 0 10.401-6.739c3.233-2.657 6.146-5.45 8.74-8.378 3.387-3.827 7.18-7.736 8.993-12.613a12.37 12.37 0 0 0 .759-3.844zM751.618 85.583c.527-.25 1.428-.338 2.689-.267 1.261.075 2.718.096 4.37.069 1.651-.03 3.436-.063 5.358-.107 1.909-.04 3.77-.072 5.573-.097 1.801-.021 3.483-.036 5.045-.05 1.561-.009 2.851-.004 3.874.01 1.2.014 2.102.723 2.717 2.125.601 1.403.961 3.196 1.082 5.377.118 2.524-.376 4.613-1.502 6.259-1.111 1.65-2.387 2.507-3.829 2.58l-34.535 1.732-29.956-1.75c-1.832-.21-3.243-.421-4.25-.636a121.865 121.865 0 0 0-3.2-.629 78.107 78.107 0 0 0-4.292-.634c-1.742-.214-4.25-.467-7.523-.753-1.456-.154-2.597-.53-3.408-1.131-.811-.6-1.427-1.323-1.832-2.171a8.271 8.271 0 0 1-.766-2.678 36.448 36.448 0 0 1-.21-2.422c-.06-1.066.495-1.91 1.637-2.528 1.14-.622 2.627-1.116 4.443-1.49 1.832-.372 3.83-.63 6.037-.777 2.191-.143 4.295-.229 6.32-.265 2.014-.033 3.83-.073 5.422-.121 1.592-.044 2.688-.149 3.289-.316l37.447.67z" fill="#FFFFFF"/>
11
+ </g>
12
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg width="1028" height="324" viewBox="0 0 1028 324" xmlns="http://www.w3.org/2000/svg">
2
+ <g transform="translate(76.041 42)" fill="none" fill-rule="evenodd">
3
+ <g fill="#E04E39">
4
+ <path d="M507.552 137.229s-12.56 9.744-23.616 8.656c-11.056-1.088-7.584-25.792-7.584-25.792s2.384-22.656-4.128-24.56c-6.496-1.888-14.512 5.904-14.512 5.904s-9.968 11.056-14.736 25.152l-1.312.432s1.52-24.72-.208-30.352c-1.296-2.816-13.216-2.592-15.168 2.384-1.952 4.992-11.488 39.664-12.144 54.192 0 0-18.64 15.824-34.88 18.416-16.256 2.608-20.16-7.584-20.16-7.584s44.208-12.352 42.688-47.68c-1.504-35.328-35.648-22.256-39.504-19.36-3.744 2.816-23.696 14.848-29.52 48.176-.192 1.12-.544 6.08-.544 6.08s-17.12 11.472-26.656 14.512c0 0 26.656-44.864-5.84-65.232-9.14-5.502-17.106-.44-21.845 4.208-2.91 2.854 39.397-43.424 29.637-84.832C302.88.237 293.024-1.875 283.984 1.325c-13.728 5.408-18.928 13.424-18.928 13.424s-17.776 25.792-21.904 64.16c-4.112 38.352-10.176 84.736-10.176 84.736s-8.464 8.24-16.256 8.672c-7.808.416-4.336-23.2-4.336-23.2s6.064-35.968 5.648-42.048c-.448-6.064-.88-9.312-8.032-11.472-7.152-2.176-14.96 6.928-14.96 6.928s-20.576 31.2-22.304 35.968l-1.104 1.968-1.072-1.312s14.512-42.48.656-43.12c-13.872-.656-22.976 15.168-22.976 15.168s-15.824 26.448-16.48 29.472l-1.072-1.296s6.496-30.768 5.2-38.368c-1.312-7.584-8.448-6.064-8.448-6.064s-9.104-1.088-11.488 4.768c-2.384 5.856-11.056 44.64-12.144 56.992 0 0-22.752 16.256-37.712 16.464-14.944.224-13.424-9.472-13.424-9.472s54.832-18.768 39.872-55.824c-6.72-9.536-14.512-12.528-25.568-12.32-11.056.224-24.768 6.96-33.648 26.896-4.256 9.504-5.792 18.544-6.672 25.36 0 0-9.584 1.968-14.784-2.368-5.216-4.336-7.888 0-7.888 0s-8.928 11.392-.048 14.848c8.896 3.472 22.752 5.088 22.752 5.088 1.28 6.064 4.976 16.384 15.808 24.592 16.256 12.352 47.44-1.136 47.44-1.136l12.784-7.168s.432 11.728 9.76 13.44c9.312 1.712 13.216-.032 29.472-39.472 9.536-20.16 10.192-19.072 10.192-19.072 1.072-.224-6.288 38.352-3.472 48.752 2.816 10.416 15.168 9.328 15.168 9.328s6.72 1.296 12.144-17.776c5.408-19.072 15.824-40.096 15.824-40.096 1.28 0-3.264 39.44 3.664 52.016 6.944 12.576 24.928 4.224 24.928 4.224s12.576-6.336 14.528-8.288c0 0 14.912 12.704 35.952 10.4 47.04-9.264 63.776-21.776 63.776-21.776s8.08 20.48 33.12 22.384c28.592 2.16 44.208-15.824 44.208-15.824s-.224 11.696 9.744 15.824c9.984 4.112 16.688-19.04 16.688-19.04l16.688-45.984c1.52 0 2.384 29.904 18.864 34.672 16.464 4.768 37.92-11.168 37.92-11.168s5.2-2.864 4.336-11.536c-.88-8.672-8.672-5.44-8.672-5.44zm-434.08-21.696c5.84 5.632 3.68 17.76-7.376 25.344-11.04 7.6-16.032 6.08-16.032 6.08.656-25.792 17.568-37.072 23.408-31.424zM289.104 26.46c3.68 19.504-32.288 77.584-32.288 77.584.432-13.008 13.216-56.992 13.216-56.992s15.376-40.096 19.072-20.592zm-35.552 148.016s-2.816-9.536 5.2-36.192c8.032-26.656 26.88-16.256 26.88-16.256s13.008 9.968 2.816 36.624c-10.176 26.656-34.896 15.824-34.896 15.824zm109.664-52.224c8.88-16.256 15.824-7.376 15.824-7.376s7.584 8.24-1.088 20.592c-8.672 12.352-21.232 11.488-21.232 11.488s-2.384-8.464 6.496-24.704z"/>
5
+ <path d="M451.918 188.027v-3.112h1.974c.273 0 .547.028.835.057.288.043.562.115.793.216.245.101.432.245.576.433.159.187.23.446.23.763 0 .72-.216 1.182-.648 1.369-.432.187-.994.274-1.671.274h-2.09zm-2.349-4.942v11.843h2.349v-5.057h1.47l2.881 5.057h2.464l-3.17-5.172c.432-.044.836-.13 1.225-.26.374-.13.706-.317.98-.562.288-.245.504-.562.662-.95.173-.39.245-.85.245-1.398 0-1.282-.403-2.19-1.196-2.709-.807-.533-1.96-.792-3.443-.792h-4.467zm-3.76 5.936c0-1.21.201-2.32.62-3.328a8.09 8.09 0 0 1 1.7-2.608 7.71 7.71 0 0 1 2.52-1.73 7.864 7.864 0 0 1 3.127-.619c1.095 0 2.133.202 3.098.62.98.418 1.816.994 2.536 1.729.72.735 1.282 1.599 1.714 2.608.418 1.008.634 2.118.634 3.328s-.216 2.32-.634 3.342c-.432 1.009-.994 1.902-1.714 2.637a7.594 7.594 0 0 1-2.536 1.744 7.725 7.725 0 0 1-3.098.619 7.864 7.864 0 0 1-3.126-.62 7.535 7.535 0 0 1-2.522-1.743c-.72-.735-1.282-1.628-1.7-2.637-.418-1.022-.62-2.132-.62-3.342zm-2.896 0c0 1.628.302 3.083.893 4.38.605 1.311 1.398 2.42 2.392 3.343a10.57 10.57 0 0 0 3.472 2.117c1.311.49 2.68.735 4.106.735 1.441 0 2.81-.245 4.121-.735a10.57 10.57 0 0 0 3.472-2.117c.995-.923 1.787-2.032 2.392-3.343.59-1.297.879-2.752.879-4.38 0-1.6-.288-3.055-.879-4.351-.605-1.312-1.397-2.42-2.392-3.329a10.57 10.57 0 0 0-3.472-2.118 11.356 11.356 0 0 0-4.12-.749c-1.427 0-2.796.245-4.107.75a10.57 10.57 0 0 0-3.472 2.117c-.994.908-1.787 2.017-2.392 3.329-.59 1.296-.893 2.752-.893 4.35z"/>
6
+ </g>
7
+ <path d="M589.663 44.545c.42-4.718.63-8.462.63-11.226 0-3.638-.33-6.168-.975-7.583-.646-1.416-1.592-2.124-2.823-2.124-2.207 0-4.19 1.365-5.976 4.093-1.772 2.73-3.198 6.25-4.295 10.556-1.08 4.31-2.252 8.992-3.528 14.05-1.263 5.061-2.192 10.016-2.793 14.863-.57 4.85-1.051 9.221-1.397 13.115-.36 3.889-.615 6.654-.75 8.296-.3 3.348-.54 6.575-.721 9.68-.18 3.108-.315 5.943-.39 8.503a225.54 225.54 0 0 0-.107 6.71v5.432A515.125 515.125 0 0 0 576.9 92.079a452.907 452.907 0 0 0 3.903-11.879c1.277-4.125 2.554-8.216 3.815-12.274a145.287 145.287 0 0 0 3.213-12.052c.87-3.98 1.487-7.756 1.832-11.33zm-47.689 68.962a42.47 42.47 0 0 0-11.877 8.613c-3.468 3.566-6.366 8.267-8.694 14.114-2.312 5.843-4.084 10.873-5.3 15.086-1.216 4.21-1.817 8.014-1.817 11.414 0 1.055.15 2.106.449 3.162.302 1.055.857 2.004 1.668 2.85.81.84 1.952 1.528 3.439 2.054 1.471.53 3.393.793 5.766.793 1.2 0 2.402-.268 3.588-.81a16.08 16.08 0 0 0 3.379-2.102 24.957 24.957 0 0 0 3.093-2.96 31.904 31.904 0 0 0 2.673-3.453c1.892-2.75 3.618-5.854 5.165-9.318-.197-.95-.376-2.463-.51-4.538-.136-2.07-.24-5.231-.301-9.476-.075-4.247-.152-7.732-.21-10.448a519.42 519.42 0 0 1-.15-7.44c-.045-2.243-.09-4.075-.152-5.503-.074-1.427-.149-2.107-.209-2.038zm70.062 59.695c-4.775 3.934-9.505 7.443-14.144 10.52a127.062 127.062 0 0 1-6.173 3.812 76.437 76.437 0 0 1-6.367 3.328 48.4 48.4 0 0 1-6.094 2.362c-1.952.606-3.77.91-5.406.91-.976 0-2.404-.215-4.296-.643-1.892-.434-3.962-1.306-6.2-2.632-2.252-1.323-4.49-3.239-6.742-5.742-2.237-2.508-4.174-5.835-5.842-9.982a100.616 100.616 0 0 1-7.957 7.35 61.432 61.432 0 0 1-8.724 6.06c-3.003 1.72-6.051 3.098-9.114 4.132-3.08 1.04-6.171 1.557-9.28 1.557-4.384 0-8.168-.91-11.381-2.732a24.331 24.331 0 0 1-7.975-7.274c-2.13-3.025-3.709-6.458-4.758-10.299a45.513 45.513 0 0 1-1.562-11.912c0-4.374.556-8.802 1.667-13.285a62.3 62.3 0 0 1 4.85-13.028 306.475 306.475 0 0 1 7.072-13.185c2.598-4.58 6.036-8.752 10.316-12.516 4.279-3.762 8.678-6.6 13.183-8.516 4.518-1.913 9.34-3.11 14.46-3.59.209-8.754 1.141-16.469 2.793-23.14 1.651-6.668 3.437-13.846 5.345-21.532 1.907-7.683 4.37-14.76 7.388-21.227 3.018-6.47 6.321-12.062 9.91-16.778 3.589-4.717 7.416-8.406 11.487-11.067 4.069-2.66 8.273-3.992 12.613-3.992 3.153 0 5.854.827 8.078 2.48 2.222 1.653 4.04 3.847 5.42 6.583 1.365 2.734 2.358 5.907 2.974 9.517.6 3.612.915 7.342.915 11.19 0 2.402-.03 4.872-.075 7.41-.196 9.674-1.683 18.678-4.474 27.013-2.793 8.334-5.556 16.573-8.274 24.716-2.732 8.144-6.036 16.201-9.88 24.171-5.886 12.197-9.64 20.478-11.246 24.837-.346.954-.691 2.114-1.051 3.478a84.878 84.878 0 0 0-.991 4.443 70.896 70.896 0 0 0-.796 4.908 38.845 38.845 0 0 0-.316 4.852c0 1.977.106 3.853.346 5.625.225 1.77.6 3.356 1.126 4.75.525 1.399 1.23 2.507 2.132 3.323.871.817 1.967 1.226 3.289 1.226 1.276 0 2.687-.256 4.189-.765 1.516-.509 3.123-1.204 4.805-2.09a61.408 61.408 0 0 0 5.105-3.004 127.418 127.418 0 0 0 4.999-3.416c3.708-2.718 7.584-5.811 11.621-9.275l3.035 21.07z" fill="#612116"/>
8
+ <path d="M625.775 161.267c0 1.738.104 3.423.346 5.057.24 1.633.66 3.093 1.274 4.378.602 1.287 1.413 2.33 2.42 3.131 1.02.796 2.297 1.197 3.843 1.197 2.508 0 4.76-1.084 6.787-3.256 2.027-2.17 3.784-4.782 5.27-7.835a55.388 55.388 0 0 0 3.59-9.465c.915-3.256 1.5-5.972 1.771-8.143l7.538-32.86c-2.763 0-5.45.688-8.078 2.054-2.628 1.371-5.107 3.223-7.433 5.563-2.327 2.338-4.461 5.01-6.412 8.014-1.967 3.008-3.889 6.717-5.766 11.124-1.891 4.41-3.213 8.284-3.994 11.623-.78 3.34-1.156 6.482-1.156 9.418zm86.714 7.92c-1.547 2.179-3.62 4.735-6.216 7.666-2.598 2.93-5.511 5.725-8.74 8.381a54.956 54.956 0 0 1-10.42 6.748c-3.709 1.84-7.418 2.758-11.111 2.758-4.475 0-8.214-1.416-11.202-4.253-2.988-2.835-5.57-6.951-7.75-12.357-1.634 1.868-3.632 3.77-6.005 5.702a54.523 54.523 0 0 1-7.792 5.255 50.806 50.806 0 0 1-8.814 3.85c-3.063 1.002-6.126 1.5-9.174 1.5-3.244 0-6.382-.664-9.445-1.99-3.08-1.325-5.781-3.226-8.138-5.708-2.373-2.484-4.25-5.508-5.661-9.077-1.427-3.57-2.132-7.598-2.132-12.086 0-5.033.72-10.204 2.132-15.51 1.426-5.304 3.634-11.042 6.62-17.224 2.973-6.178 6.188-11.515 9.596-16.015 3.439-4.496 7.178-8.427 11.247-11.783 4.07-3.358 8.349-6.027 12.868-8.009 4.505-1.98 9.083-2.971 13.77-2.971 1.56 0 2.776.308 3.663.917a9.43 9.43 0 0 1 2.192 2.095c.57.784 1.126 1.552 1.667 2.3a4.674 4.674 0 0 0 2.04 1.634 9.3 9.3 0 0 0 2.495.664c.839.1 1.711.153 2.582.153.751 0 1.517-.017 2.298-.053.78-.033 1.531-.048 2.282-.048 1.021 0 1.965.1 2.853.303.87.206 1.652.646 2.327 1.33.676.684 1.201 1.633 1.577 2.858.36 1.225.555 2.895.555 5.006 0 3.223-.345 6.796-1.02 10.723a296.911 296.911 0 0 1-2.313 12.07c-.872 4.12-1.862 8.813-2.973 14.09-1.111 5.271-1.668 9.715-1.668 13.33 0 3.089.287 5.503.857 7.24.586 1.744 1.8 2.613 3.694 2.613 1.411 0 2.898-.351 4.443-1.05a27.945 27.945 0 0 0 4.701-2.755 53.642 53.642 0 0 0 4.76-3.86 70.739 70.739 0 0 0 4.49-4.461c3.302-3.605 6.637-7.682 10.015-12.223l4.85 22.247z" fill="#612116"/>
9
+ <path d="M765.867 172.704c-2.43 2.224-5.449 4.598-9.053 7.13a96.388 96.388 0 0 1-11.667 6.97 88.86 88.86 0 0 1-12.793 5.307c-4.34 1.416-8.47 2.123-12.372 2.123-3.514 0-6.457-.49-8.86-1.464-2.387-.977-4.324-2.34-5.81-4.094-1.472-1.751-2.538-3.895-3.169-6.418-.645-2.53-.976-5.308-.976-8.341 0-4.245.48-9.198 1.427-14.86 1.937-11.708 3.183-18.282 3.739-19.73.916-2.878 12.763-65.43 15.51-75.305 2.568-8.05 4.145-13.285 4.745-15.715.33-1.702 1.247-3.235 2.778-4.602a18.457 18.457 0 0 1 4.715-3.012 25.63 25.63 0 0 1 5.466-1.739c1.877-.375 3.588-.561 5.12-.561 2.778 0 4.655.52 5.66 1.569.992 1.044 1.487 2.441 1.487 4.192 0 1.484-.345 3.578-1.05 6.284-.691 2.709-1.472 5.793-2.358 9.254-.888 3.466-2.192 7.918-3.936 13.36-1.74 5.44-12.926 66.26-13.557 70.097a136.637 136.637 0 0 1-2.403 11.446c-.976 3.789-1.456 7.233-1.456 10.33 0 3.032.33 5.438 1.006 7.225.674 1.784 2.057 2.677 4.144 2.677 2.433 0 5.12-.84 8.094-2.527 2.958-1.682 5.96-3.724 8.994-6.117a202.022 202.022 0 0 0 8.889-7.428 276.486 276.486 0 0 1 7.686-6.57v20.519z" fill="#612116"/>
10
+ <path d="M809.167 146.295c-.272 2.171-.86 4.881-1.772 8.136a56.238 56.238 0 0 1-3.591 9.457c-1.482 3.053-3.238 5.66-5.26 7.827-2.027 2.17-4.284 3.258-6.781 3.258-1.548 0-2.834-.404-3.843-1.199-1.013-.799-1.821-1.837-2.426-3.126-.61-1.285-1.03-2.744-1.269-4.37a35.652 35.652 0 0 1-.354-5.055c0-2.941.387-6.08 1.162-9.416.775-3.337 2.105-7.205 3.99-11.616 1.884-4.404 3.803-8.107 5.76-11.114 1.953-3.003 4.09-5.672 6.41-8.008 2.327-2.335 4.803-4.189 7.426-5.56 2.628-1.368 5.318-2.052 8.081-2.052l-7.533 32.838zm64.903 14.042c.123-3.51-1.295-7.014-4.783-8.534-4.276-1.866-7.707.432-10.245 3.616a59.476 59.476 0 0 1-5.231 5.75c-4.102 3.955-10.434 10.064-16.514 10.064-1.886 0-3.114-.87-3.686-2.608-.574-1.738-.862-4.152-.862-7.237 0-3.609.561-8.053 1.668-13.322l2.974-14.079c.865-4.12 1.64-8.14 2.311-12.061.672-3.921 1.014-7.493 1.014-10.714 0-2.109-.185-3.777-.56-5-.371-1.228-.89-2.176-1.566-2.86-.679-.68-1.454-1.124-2.335-1.33a12.727 12.727 0 0 0-2.847-.305c-.745 0-1.508.02-2.285.054-.78.033-1.541.05-2.287.05-.877 0-1.747-.05-2.59-.153a9.082 9.082 0 0 1-2.488-.663c-.816-.338-1.492-.882-2.032-1.632a372 372 0 0 0-1.68-2.298c-.572-.783-1.302-1.479-2.184-2.093-.876-.613-2.1-.918-3.657-.918-4.676 0-9.265.988-13.766 2.97-4.506 1.981-8.79 4.646-12.857 8-4.066 3.356-7.806 7.282-11.228 11.776-3.42 4.498-6.625 9.832-9.602 16.007-2.978 6.175-5.182 11.913-6.603 17.21-1.426 5.302-2.135 10.467-2.135 15.5 0 4.486.709 8.51 2.122 12.074 1.413 3.567 3.296 6.59 5.656 9.07 2.356 2.48 5.066 4.383 8.131 5.706 3.065 1.326 6.212 1.99 9.446 1.99 3.051 0 6.108-.5 9.161-1.5a50.753 50.753 0 0 0 8.811-3.847c2.812-1.57 5.412-3.316 7.789-5.253 2.372-1.931 4.378-3.83 6.006-5.696 2.17 5.4 4.749 9.52 7.74 12.349 2.982 2.834 6.713 4.247 11.188 4.247 3.703 0 7.406-.919 11.113-2.756a54.844 54.844 0 0 0 10.401-6.739c3.233-2.657 6.146-5.45 8.74-8.378 3.387-3.827 7.18-7.736 8.993-12.613a12.37 12.37 0 0 0 .759-3.844zM751.618 85.583c.527-.25 1.428-.338 2.689-.267 1.261.075 2.718.096 4.37.069 1.651-.03 3.436-.063 5.358-.107 1.909-.04 3.77-.072 5.573-.097 1.801-.021 3.483-.036 5.045-.05 1.561-.009 2.851-.004 3.874.01 1.2.014 2.102.723 2.717 2.125.601 1.403.961 3.196 1.082 5.377.118 2.524-.376 4.613-1.502 6.259-1.111 1.65-2.387 2.507-3.829 2.58l-34.535 1.732-29.956-1.75c-1.832-.21-3.243-.421-4.25-.636a121.865 121.865 0 0 0-3.2-.629 78.107 78.107 0 0 0-4.292-.634c-1.742-.214-4.25-.467-7.523-.753-1.456-.154-2.597-.53-3.408-1.131-.811-.6-1.427-1.323-1.832-2.171a8.271 8.271 0 0 1-.766-2.678 36.448 36.448 0 0 1-.21-2.422c-.06-1.066.495-1.91 1.637-2.528 1.14-.622 2.627-1.116 4.443-1.49 1.832-.372 3.83-.63 6.037-.777 2.191-.143 4.295-.229 6.32-.265 2.014-.033 3.83-.073 5.422-.121 1.592-.044 2.688-.149 3.289-.316l37.447.67z" fill="#612116"/>
11
+ </g>
12
+ </svg>
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@ember-data-types/store",
3
+ "version": "5.4.0-alpha.49",
4
+ "files": [
5
+ "unstable-preview-types",
6
+ "README.md",
7
+ "LICENSE.md",
8
+ "ember-data-logo-dark.svg",
9
+ "ember-data-logo-light.svg"
10
+ ],
11
+ "private": false,
12
+ "description": "Type Declarations for @ember-data/store",
13
+ "author": "Chris Thoburn <runspired@users.noreply.github.com>",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+ssh://git@github.com:emberjs/data.git",
18
+ "directory": "packages/store"
19
+ }
20
+ }
@@ -0,0 +1,100 @@
1
+ declare module '@ember-data/store/-private/cache-handler' {
2
+ import type { CacheHandler as CacheHandlerType } from '@ember-data/request';
3
+ import type { StableDocumentIdentifier } from '@warp-drive/core-types/identifier';
4
+ import type { ImmutableRequestInfo, RequestContext, ResponseInfo } from '@warp-drive/core-types/request';
5
+ import { EnableHydration } from '@warp-drive/core-types/request';
6
+ import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/raw';
7
+ import type Store from '@ember-data/store/-private/store-service';
8
+ /**
9
+ * A service which an application may provide to the store via
10
+ * the store's `lifetimes` property to configure the behavior
11
+ * of the CacheHandler.
12
+ *
13
+ * The default behavior for request lifetimes is to never expire
14
+ * unless manually refreshed via `cacheOptions.reload` or `cacheOptions.backgroundReload`.
15
+ *
16
+ * Implementing this service allows you to programatically define
17
+ * when a request should be considered expired.
18
+ *
19
+ * @class <Interface> LifetimesService
20
+ * @public
21
+ */
22
+ export interface LifetimesService {
23
+ /**
24
+ * Invoked to determine if the request may be fulfilled from cache
25
+ * if possible.
26
+ *
27
+ * Note, this is only invoked if the request has a cache-key.
28
+ *
29
+ * If no cache entry is found or the entry is hard expired,
30
+ * the request will be fulfilled from the configured request handlers
31
+ * and the cache will be updated before returning the response.
32
+ *
33
+ * @method isHardExpired
34
+ * @public
35
+ * @param {StableDocumentIdentifier} identifier
36
+ * @param {Store} store
37
+ * @return {boolean} true if the request is considered hard expired
38
+ */
39
+ isHardExpired(identifier: StableDocumentIdentifier, store: Store): boolean;
40
+ /**
41
+ * Invoked if `isHardExpired` is false to determine if the request
42
+ * should be update behind the scenes if cache data is already available.
43
+ *
44
+ * Note, this is only invoked if the request has a cache-key.
45
+ *
46
+ * If true, the request will be fulfilled from cache while a backgrounded
47
+ * request is made to update the cache via the configured request handlers.
48
+ *
49
+ * @method isSoftExpired
50
+ * @public
51
+ * @param {StableDocumentIdentifier} identifier
52
+ * @param {Store} store
53
+ * @return {boolean} true if the request is considered soft expired
54
+ */
55
+ isSoftExpired(identifier: StableDocumentIdentifier, store: Store): boolean;
56
+ /**
57
+ * Invoked when a request will be sent to the configured request handlers.
58
+ * This is invoked for both foreground and background requests.
59
+ *
60
+ * Note, this is invoked regardless of whether the request has a cache-key.
61
+ *
62
+ * @method willRequest [Optional]
63
+ * @public
64
+ * @param {ImmutableRequestInfo} request
65
+ * @param {StableDocumentIdentifier | null} identifier
66
+ * @param {Store} store
67
+ * @return {void}
68
+ */
69
+ willRequest?(request: ImmutableRequestInfo, identifier: StableDocumentIdentifier | null, store: Store): void;
70
+ /**
71
+ * Invoked when a request has been fulfilled from the configured request handlers.
72
+ * This is invoked for both foreground and background requests once the cache has
73
+ * been updated.
74
+ *
75
+ * Note, this is invoked regardless of whether the request has a cache-key.
76
+ *
77
+ * @method didRequest [Optional]
78
+ * @public
79
+ * @param {ImmutableRequestInfo} request
80
+ * @param {ImmutableResponse} response
81
+ * @param {StableDocumentIdentifier | null} identifier
82
+ * @param {Store} store
83
+ * @return {void}
84
+ */
85
+ didRequest?(request: ImmutableRequestInfo, response: Response | ResponseInfo | null, identifier: StableDocumentIdentifier | null, store: Store): void;
86
+ }
87
+ export type LooseStoreRequestInfo = Omit<ImmutableRequestInfo, 'records' | 'headers'> & {
88
+ records?: ResourceIdentifierObject[];
89
+ headers?: Headers;
90
+ };
91
+ export type StoreRequestInput = ImmutableRequestInfo | LooseStoreRequestInfo;
92
+ export interface StoreRequestContext extends RequestContext {
93
+ request: ImmutableRequestInfo & {
94
+ store: Store;
95
+ [EnableHydration]?: boolean;
96
+ };
97
+ }
98
+ export const CacheHandler: CacheHandlerType;
99
+ }
100
+ //# sourceMappingURL=cache-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-handler.d.ts","sourceRoot":"","sources":["../../src/-private/cache-handler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAGV,oBAAoB,EAEpB,cAAc,EACd,YAAY,EAGb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAa,MAAM,gCAAgC,CAAC;AAO5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAIhF,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;IAC3E;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;IAE3E;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,CAAC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,wBAAwB,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAE7G;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,CACT,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI,EACxC,UAAU,EAAE,wBAAwB,GAAG,IAAI,EAC3C,KAAK,EAAE,KAAK,GACX,IAAI,CAAC;CACT;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG;IACtF,OAAO,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAE7E,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,OAAO,EAAE,oBAAoB,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC/E;AA+RD,eAAO,MAAM,YAAY,EAAE,gBAoD1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ declare module '@ember-data/store/-private/caches/cache-utils' {
2
+ import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
3
+ import type { Cache } from '@ember-data/store/-types/q/cache';
4
+ import type { OpaqueRecordInstance } from '@ember-data/store/-types/q/record-instance';
5
+ export const CacheForIdentifierCache: Map<unknown, Cache>;
6
+ export function setCacheFor(identifier: StableRecordIdentifier | OpaqueRecordInstance, cache: Cache): void;
7
+ export function removeRecordDataFor(identifier: StableRecordIdentifier | OpaqueRecordInstance): void;
8
+ export default function peekCache(instance: StableRecordIdentifier): Cache | null;
9
+ export default function peekCache(instance: OpaqueRecordInstance): Cache;
10
+ }
11
+ //# sourceMappingURL=cache-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-utils.d.ts","sourceRoot":"","sources":["../../../src/-private/caches/cache-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAO3E,eAAO,MAAM,uBAAuB,qBAAkE,CAAC;AAEvG,wBAAgB,WAAW,CAAC,UAAU,EAAE,sBAAsB,GAAG,oBAAoB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAMzG;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,sBAAsB,GAAG,oBAAoB,GAAG,IAAI,CAEnG;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,QAAQ,EAAE,sBAAsB,GAAG,KAAK,GAAG,IAAI,CAAC;AAClF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,KAAK,CAAC"}
@@ -0,0 +1,182 @@
1
+ declare module '@ember-data/store/-private/caches/identifier-cache' {
2
+ import { type Identifier, type RecordIdentifier, type StableDocumentIdentifier, type StableRecordIdentifier } from '@warp-drive/core-types/identifier';
3
+ import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
4
+ import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/raw';
5
+ import type { ForgetMethod, GenerationMethod, ResetMethod, UpdateMethod } from '@ember-data/store/-types/q/identifier';
6
+ export function isStableIdentifier(identifier: unknown): identifier is StableRecordIdentifier;
7
+ export function isDocumentIdentifier(identifier: unknown): identifier is StableDocumentIdentifier;
8
+ interface KeyOptions {
9
+ lid: IdentifierMap;
10
+ id: IdentifierMap;
11
+ }
12
+ type TypeMap = {
13
+ [key: string]: KeyOptions;
14
+ };
15
+ type IdentifierMap = Map<string, StableRecordIdentifier>;
16
+ type KeyInfo = {
17
+ id: string | null;
18
+ type: string;
19
+ };
20
+ type StableCache = {
21
+ resources: IdentifierMap;
22
+ documents: Map<string, StableDocumentIdentifier>;
23
+ resourcesByType: TypeMap;
24
+ polymorphicLidBackMap: Map<string, string[]>;
25
+ };
26
+ export type KeyInfoMethod = (resource: unknown, known: StableRecordIdentifier | null) => KeyInfo;
27
+ export type MergeMethod = (targetIdentifier: StableRecordIdentifier, matchedIdentifier: StableRecordIdentifier, resourceData: unknown) => StableRecordIdentifier;
28
+ export function setIdentifierGenerationMethod(method: GenerationMethod | null): void;
29
+ export function setIdentifierUpdateMethod(method: UpdateMethod | null): void;
30
+ export function setIdentifierForgetMethod(method: ForgetMethod | null): void;
31
+ export function setIdentifierResetMethod(method: ResetMethod | null): void;
32
+ export function setKeyInfoForResource(method: KeyInfoMethod | null): void;
33
+ /**
34
+ * Each instance of {Store} receives a unique instance of a IdentifierCache.
35
+ *
36
+ * This cache is responsible for assigning or retrieving the unique identify
37
+ * for arbitrary resource data encountered by the store. Data representing
38
+ * a unique resource or record should always be represented by the same
39
+ * identifier.
40
+ *
41
+ * It can be configured by consuming applications.
42
+ *
43
+ * @class IdentifierCache
44
+ @public
45
+ */
46
+ export class IdentifierCache {
47
+ _cache: StableCache;
48
+ _generate: GenerationMethod;
49
+ _update: UpdateMethod;
50
+ _forget: ForgetMethod;
51
+ _reset: ResetMethod;
52
+ _merge: MergeMethod;
53
+ _keyInfoForResource: KeyInfoMethod;
54
+ _isDefaultConfig: boolean;
55
+ _id: number;
56
+ constructor();
57
+ /**
58
+ * Internal hook to allow management of merge conflicts with identifiers.
59
+ *
60
+ * we allow late binding of this private internal merge so that
61
+ * the cache can insert itself here to handle elimination of duplicates
62
+ *
63
+ * @method __configureMerge
64
+ * @private
65
+ */
66
+ __configureMerge(method: MergeMethod | null): void;
67
+ upgradeIdentifier(resource: {
68
+ type: string;
69
+ id: string | null;
70
+ lid?: string;
71
+ }): StableRecordIdentifier;
72
+ /**
73
+ * @method _getRecordIdentifier
74
+ * @private
75
+ */
76
+ _getRecordIdentifier(resource: {
77
+ type: string;
78
+ id: string | null;
79
+ lid?: string;
80
+ }, shouldGenerate: 2): StableRecordIdentifier;
81
+ _getRecordIdentifier(resource: unknown, shouldGenerate: 1): StableRecordIdentifier;
82
+ _getRecordIdentifier(resource: unknown, shouldGenerate: 0): StableRecordIdentifier | undefined;
83
+ /**
84
+ * allows us to peek without generating when needed
85
+ * useful for the "create" case when we need to see if
86
+ * we are accidentally overwritting something
87
+ *
88
+ * @method peekRecordIdentifier
89
+ * @param resource
90
+ * @return {StableRecordIdentifier | undefined}
91
+ * @private
92
+ */
93
+ peekRecordIdentifier(resource: ResourceIdentifierObject | Identifier): StableRecordIdentifier | undefined;
94
+ /**
95
+ Returns the DocumentIdentifier for the given Request, creates one if it does not yet exist.
96
+ Returns `null` if the request does not have a `cacheKey` or `url`.
97
+
98
+ @method getOrCreateDocumentIdentifier
99
+ @param request
100
+ @return {StableDocumentIdentifier | null}
101
+ @public
102
+ */
103
+ getOrCreateDocumentIdentifier(request: ImmutableRequestInfo): StableDocumentIdentifier | null;
104
+ /**
105
+ Returns the Identifier for the given Resource, creates one if it does not yet exist.
106
+
107
+ Specifically this means that we:
108
+
109
+ - validate the `id` `type` and `lid` combo against known identifiers
110
+ - return an object with an `lid` that is stable (repeated calls with the same
111
+ `id` + `type` or `lid` will return the same `lid` value)
112
+ - this referential stability of the object itself is guaranteed
113
+
114
+ @method getOrCreateRecordIdentifier
115
+ @param resource
116
+ @return {StableRecordIdentifier}
117
+ @public
118
+ */
119
+ getOrCreateRecordIdentifier(resource: unknown): StableRecordIdentifier;
120
+ /**
121
+ Returns a new Identifier for the supplied data. Call this method to generate
122
+ an identifier when a new resource is being created local to the client and
123
+ potentially does not have an `id`.
124
+
125
+ Delegates generation to the user supplied `GenerateMethod` if one has been provided
126
+ with the signature `generateMethod({ type }, 'record')`.
127
+
128
+ @method createIdentifierForNewRecord
129
+ @param data
130
+ @return {StableRecordIdentifier}
131
+ @public
132
+ */
133
+ createIdentifierForNewRecord(data: {
134
+ type: string;
135
+ id?: string | null;
136
+ }): StableRecordIdentifier;
137
+ /**
138
+ Provides the opportunity to update secondary lookup tables for existing identifiers
139
+ Called after an identifier created with `createIdentifierForNewRecord` has been
140
+ committed.
141
+
142
+ Assigned `id` to an `Identifier` if `id` has not previously existed; however,
143
+ attempting to change the `id` or calling update without providing an `id` when
144
+ one is missing will throw an error.
145
+
146
+ - sets `id` (if `id` was previously `null`)
147
+ - `lid` and `type` MUST NOT be altered post creation
148
+
149
+ If a merge occurs, it is possible the returned identifier does not match the originally
150
+ provided identifier. In this case the abandoned identifier will go through the usual
151
+ `forgetRecordIdentifier` codepaths.
152
+
153
+ @method updateRecordIdentifier
154
+ @param identifierObject
155
+ @param data
156
+ @return {StableRecordIdentifier}
157
+ @public
158
+ */
159
+ updateRecordIdentifier(identifierObject: RecordIdentifier, data: unknown): StableRecordIdentifier;
160
+ /**
161
+ * @method _mergeRecordIdentifiers
162
+ * @private
163
+ */
164
+ _mergeRecordIdentifiers(keyInfo: KeyInfo, identifier: StableRecordIdentifier, existingIdentifier: StableRecordIdentifier, data: unknown): StableRecordIdentifier;
165
+ /**
166
+ Provides the opportunity to eliminate an identifier from secondary lookup tables
167
+ as well as eliminates it from ember-data's own lookup tables and book keeping.
168
+
169
+ Useful when a record has been deleted and the deletion has been persisted and
170
+ we do not care about the record anymore. Especially useful when an `id` of a
171
+ deleted record might be reused later for a new record.
172
+
173
+ @method forgetRecordIdentifier
174
+ @param identifierObject
175
+ @public
176
+ */
177
+ forgetRecordIdentifier(identifierObject: RecordIdentifier): void;
178
+ destroy(): void;
179
+ }
180
+ export {};
181
+ }
182
+ //# sourceMappingURL=identifier-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier-cache.d.ts","sourceRoot":"","sources":["../../../src/-private/caches/identifier-cache.ts"],"names":[],"mappings":"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"}