@warp-drive/core 5.6.0-alpha.11

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 (337) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +23 -0
  3. package/README.md +70 -0
  4. package/addon-main.cjs +5 -0
  5. package/cjs-dist/addon-shim.cjs +1 -0
  6. package/cjs-dist/cjs-set-config.cjs +1 -0
  7. package/declarations/build-config/babel-macros.d.ts +2 -0
  8. package/declarations/build-config/babel-macros.d.ts.map +1 -0
  9. package/declarations/build-config/canary-features.d.ts +2 -0
  10. package/declarations/build-config/canary-features.d.ts.map +1 -0
  11. package/declarations/build-config/debugging.d.ts +2 -0
  12. package/declarations/build-config/debugging.d.ts.map +1 -0
  13. package/declarations/build-config/deprecations.d.ts +2 -0
  14. package/declarations/build-config/deprecations.d.ts.map +1 -0
  15. package/declarations/build-config/env.d.ts +2 -0
  16. package/declarations/build-config/env.d.ts.map +1 -0
  17. package/declarations/build-config/macros.d.ts +2 -0
  18. package/declarations/build-config/macros.d.ts.map +1 -0
  19. package/declarations/build-config.d.ts +2 -0
  20. package/declarations/build-config.d.ts.map +1 -0
  21. package/declarations/configure.d.ts +8 -0
  22. package/declarations/configure.d.ts.map +1 -0
  23. package/declarations/graph/-private/-diff.d.ts +33 -0
  24. package/declarations/graph/-private/-diff.d.ts.map +1 -0
  25. package/declarations/graph/-private/-edge-definition.d.ts +149 -0
  26. package/declarations/graph/-private/-edge-definition.d.ts.map +1 -0
  27. package/declarations/graph/-private/-state.d.ts +10 -0
  28. package/declarations/graph/-private/-state.d.ts.map +1 -0
  29. package/declarations/graph/-private/-utils.d.ts +26 -0
  30. package/declarations/graph/-private/-utils.d.ts.map +1 -0
  31. package/declarations/graph/-private/coerce-id.d.ts +5 -0
  32. package/declarations/graph/-private/coerce-id.d.ts.map +1 -0
  33. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +7 -0
  34. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts.map +1 -0
  35. package/declarations/graph/-private/edges/collection.d.ts +40 -0
  36. package/declarations/graph/-private/edges/collection.d.ts.map +1 -0
  37. package/declarations/graph/-private/edges/implicit.d.ts +14 -0
  38. package/declarations/graph/-private/edges/implicit.d.ts.map +1 -0
  39. package/declarations/graph/-private/edges/resource.d.ts +25 -0
  40. package/declarations/graph/-private/edges/resource.d.ts.map +1 -0
  41. package/declarations/graph/-private/graph.d.ts +55 -0
  42. package/declarations/graph/-private/graph.d.ts.map +1 -0
  43. package/declarations/graph/-private/normalize-link.d.ts +3 -0
  44. package/declarations/graph/-private/normalize-link.d.ts.map +1 -0
  45. package/declarations/graph/-private/operations/add-to-related-records.d.ts +5 -0
  46. package/declarations/graph/-private/operations/add-to-related-records.d.ts.map +1 -0
  47. package/declarations/graph/-private/operations/merge-identifier.d.ts +4 -0
  48. package/declarations/graph/-private/operations/merge-identifier.d.ts.map +1 -0
  49. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +5 -0
  50. package/declarations/graph/-private/operations/remove-from-related-records.d.ts.map +1 -0
  51. package/declarations/graph/-private/operations/replace-related-record.d.ts +4 -0
  52. package/declarations/graph/-private/operations/replace-related-record.d.ts.map +1 -0
  53. package/declarations/graph/-private/operations/replace-related-records.d.ts +8 -0
  54. package/declarations/graph/-private/operations/replace-related-records.d.ts.map +1 -0
  55. package/declarations/graph/-private/operations/update-relationship.d.ts +11 -0
  56. package/declarations/graph/-private/operations/update-relationship.d.ts.map +1 -0
  57. package/declarations/graph/-private.d.ts +14 -0
  58. package/declarations/graph/-private.d.ts.map +1 -0
  59. package/declarations/index.d.ts +15 -0
  60. package/declarations/index.d.ts.map +1 -0
  61. package/declarations/reactive/-private/document.d.ts +147 -0
  62. package/declarations/reactive/-private/document.d.ts.map +1 -0
  63. package/declarations/reactive/-private/fields/compute.d.ts +40 -0
  64. package/declarations/reactive/-private/fields/compute.d.ts.map +1 -0
  65. package/declarations/reactive/-private/fields/managed-array.d.ts +23 -0
  66. package/declarations/reactive/-private/fields/managed-array.d.ts.map +1 -0
  67. package/declarations/reactive/-private/fields/managed-object.d.ts +21 -0
  68. package/declarations/reactive/-private/fields/managed-object.d.ts.map +1 -0
  69. package/declarations/reactive/-private/fields/many-array-manager.d.ts +20 -0
  70. package/declarations/reactive/-private/fields/many-array-manager.d.ts.map +1 -0
  71. package/declarations/reactive/-private/hooks.d.ts +6 -0
  72. package/declarations/reactive/-private/hooks.d.ts.map +1 -0
  73. package/declarations/reactive/-private/record.d.ts +61 -0
  74. package/declarations/reactive/-private/record.d.ts.map +1 -0
  75. package/declarations/reactive/-private/schema.d.ts +180 -0
  76. package/declarations/reactive/-private/schema.d.ts.map +1 -0
  77. package/declarations/reactive/-private/symbols.d.ts +11 -0
  78. package/declarations/reactive/-private/symbols.d.ts.map +1 -0
  79. package/declarations/reactive/-private.d.ts +2 -0
  80. package/declarations/reactive/-private.d.ts.map +1 -0
  81. package/declarations/reactive.d.ts +5 -0
  82. package/declarations/reactive.d.ts.map +1 -0
  83. package/declarations/request/-private/context.d.ts +42 -0
  84. package/declarations/request/-private/context.d.ts.map +1 -0
  85. package/declarations/request/-private/debug.d.ts +5 -0
  86. package/declarations/request/-private/debug.d.ts.map +1 -0
  87. package/declarations/request/-private/fetch.d.ts +40 -0
  88. package/declarations/request/-private/fetch.d.ts.map +1 -0
  89. package/declarations/request/-private/future.d.ts +8 -0
  90. package/declarations/request/-private/future.d.ts.map +1 -0
  91. package/declarations/request/-private/manager.d.ts +160 -0
  92. package/declarations/request/-private/manager.d.ts.map +1 -0
  93. package/declarations/request/-private/promise-cache.d.ts +20 -0
  94. package/declarations/request/-private/promise-cache.d.ts.map +1 -0
  95. package/declarations/request/-private/types.d.ts +236 -0
  96. package/declarations/request/-private/types.d.ts.map +1 -0
  97. package/declarations/request/-private/utils.d.ts +16 -0
  98. package/declarations/request/-private/utils.d.ts.map +1 -0
  99. package/declarations/request.d.ts +6 -0
  100. package/declarations/request.d.ts.map +1 -0
  101. package/declarations/store/-private/cache-handler/handler.d.ts +57 -0
  102. package/declarations/store/-private/cache-handler/handler.d.ts.map +1 -0
  103. package/declarations/store/-private/cache-handler/types.d.ts +99 -0
  104. package/declarations/store/-private/cache-handler/types.d.ts.map +1 -0
  105. package/declarations/store/-private/cache-handler/utils.d.ts +32 -0
  106. package/declarations/store/-private/cache-handler/utils.d.ts.map +1 -0
  107. package/declarations/store/-private/caches/cache-utils.d.ts +9 -0
  108. package/declarations/store/-private/caches/cache-utils.d.ts.map +1 -0
  109. package/declarations/store/-private/caches/identifier-cache.d.ts +316 -0
  110. package/declarations/store/-private/caches/identifier-cache.d.ts.map +1 -0
  111. package/declarations/store/-private/caches/instance-cache.d.ts +65 -0
  112. package/declarations/store/-private/caches/instance-cache.d.ts.map +1 -0
  113. package/declarations/store/-private/caches/resource-utils.d.ts +10 -0
  114. package/declarations/store/-private/caches/resource-utils.d.ts.map +1 -0
  115. package/declarations/store/-private/debug/utils.d.ts +7 -0
  116. package/declarations/store/-private/debug/utils.d.ts.map +1 -0
  117. package/declarations/store/-private/default-cache-policy.d.ts +383 -0
  118. package/declarations/store/-private/default-cache-policy.d.ts.map +1 -0
  119. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +164 -0
  120. package/declarations/store/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  121. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +17 -0
  122. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  123. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +26 -0
  124. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  125. package/declarations/store/-private/managers/cache-manager.d.ts +428 -0
  126. package/declarations/store/-private/managers/cache-manager.d.ts.map +1 -0
  127. package/declarations/store/-private/managers/notification-manager.d.ts +93 -0
  128. package/declarations/store/-private/managers/notification-manager.d.ts.map +1 -0
  129. package/declarations/store/-private/managers/record-array-manager.d.ts +98 -0
  130. package/declarations/store/-private/managers/record-array-manager.d.ts.map +1 -0
  131. package/declarations/store/-private/network/request-cache.d.ts +104 -0
  132. package/declarations/store/-private/network/request-cache.d.ts.map +1 -0
  133. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +255 -0
  134. package/declarations/store/-private/new-core-tmp/promise-state.d.ts.map +1 -0
  135. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +93 -0
  136. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts.map +1 -0
  137. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +170 -0
  138. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts.map +1 -0
  139. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +30 -0
  140. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts.map +1 -0
  141. package/declarations/store/-private/new-core-tmp/request-state.d.ts +255 -0
  142. package/declarations/store/-private/new-core-tmp/request-state.d.ts.map +1 -0
  143. package/declarations/store/-private/record-arrays/identifier-array.d.ts +141 -0
  144. package/declarations/store/-private/record-arrays/identifier-array.d.ts.map +1 -0
  145. package/declarations/store/-private/record-arrays/many-array.d.ts +199 -0
  146. package/declarations/store/-private/record-arrays/many-array.d.ts.map +1 -0
  147. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +116 -0
  148. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  149. package/declarations/store/-private/store-service.d.ts +1597 -0
  150. package/declarations/store/-private/store-service.d.ts.map +1 -0
  151. package/declarations/store/-private/store-service.type-test.d.ts +2 -0
  152. package/declarations/store/-private/store-service.type-test.d.ts.map +1 -0
  153. package/declarations/store/-private/utils/coerce-id.d.ts +5 -0
  154. package/declarations/store/-private/utils/coerce-id.d.ts.map +1 -0
  155. package/declarations/store/-private/utils/construct-resource.d.ts +7 -0
  156. package/declarations/store/-private/utils/construct-resource.d.ts.map +1 -0
  157. package/declarations/store/-private/utils/is-non-empty-string.d.ts +2 -0
  158. package/declarations/store/-private/utils/is-non-empty-string.d.ts.map +1 -0
  159. package/declarations/store/-private/utils/normalize-model-name.d.ts +2 -0
  160. package/declarations/store/-private/utils/normalize-model-name.d.ts.map +1 -0
  161. package/declarations/store/-private/utils/uuid-polyfill.d.ts +2 -0
  162. package/declarations/store/-private/utils/uuid-polyfill.d.ts.map +1 -0
  163. package/declarations/store/-private.d.ts +27 -0
  164. package/declarations/store/-private.d.ts.map +1 -0
  165. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +100 -0
  166. package/declarations/store/-types/q/cache-capabilities-manager.d.ts.map +1 -0
  167. package/declarations/store/-types/q/ds-model.d.ts +22 -0
  168. package/declarations/store/-types/q/ds-model.d.ts.map +1 -0
  169. package/declarations/store/-types/q/identifier.d.ts +21 -0
  170. package/declarations/store/-types/q/identifier.d.ts.map +1 -0
  171. package/declarations/store/-types/q/promise-proxies.d.ts +2 -0
  172. package/declarations/store/-types/q/promise-proxies.d.ts.map +1 -0
  173. package/declarations/store/-types/q/record-data-json-api.d.ts +31 -0
  174. package/declarations/store/-types/q/record-data-json-api.d.ts.map +1 -0
  175. package/declarations/store/-types/q/record-instance.d.ts +24 -0
  176. package/declarations/store/-types/q/record-instance.d.ts.map +1 -0
  177. package/declarations/store/-types/q/schema-service.d.ts +331 -0
  178. package/declarations/store/-types/q/schema-service.d.ts.map +1 -0
  179. package/declarations/store/-types/q/store.d.ts +35 -0
  180. package/declarations/store/-types/q/store.d.ts.map +1 -0
  181. package/declarations/store.d.ts +2 -0
  182. package/declarations/store.d.ts.map +1 -0
  183. package/declarations/types/-private.d.ts +14 -0
  184. package/declarations/types/-private.d.ts.map +1 -0
  185. package/declarations/types/cache/aliases.d.ts +2 -0
  186. package/declarations/types/cache/aliases.d.ts.map +1 -0
  187. package/declarations/types/cache/change.d.ts +7 -0
  188. package/declarations/types/cache/change.d.ts.map +1 -0
  189. package/declarations/types/cache/mutations.d.ts +39 -0
  190. package/declarations/types/cache/mutations.d.ts.map +1 -0
  191. package/declarations/types/cache/operations.d.ts +72 -0
  192. package/declarations/types/cache/operations.d.ts.map +1 -0
  193. package/declarations/types/cache/relationship.d.ts +14 -0
  194. package/declarations/types/cache/relationship.d.ts.map +1 -0
  195. package/declarations/types/cache.d.ts +492 -0
  196. package/declarations/types/cache.d.ts.map +1 -0
  197. package/declarations/types/graph.d.ts +48 -0
  198. package/declarations/types/graph.d.ts.map +1 -0
  199. package/declarations/types/identifier.d.ts +111 -0
  200. package/declarations/types/identifier.d.ts.map +1 -0
  201. package/declarations/types/json/raw.d.ts +7 -0
  202. package/declarations/types/json/raw.d.ts.map +1 -0
  203. package/declarations/types/params.d.ts +10 -0
  204. package/declarations/types/params.d.ts.map +1 -0
  205. package/declarations/types/record.d.ts +96 -0
  206. package/declarations/types/record.d.ts.map +1 -0
  207. package/declarations/types/record.type-test.d.ts +2 -0
  208. package/declarations/types/record.type-test.d.ts.map +1 -0
  209. package/declarations/types/request.d.ts +308 -0
  210. package/declarations/types/request.d.ts.map +1 -0
  211. package/declarations/types/request.type-test.d.ts +2 -0
  212. package/declarations/types/request.type-test.d.ts.map +1 -0
  213. package/declarations/types/runtime.d.ts +15 -0
  214. package/declarations/types/runtime.d.ts.map +1 -0
  215. package/declarations/types/schema/concepts.d.ts +17 -0
  216. package/declarations/types/schema/concepts.d.ts.map +1 -0
  217. package/declarations/types/schema/fields.d.ts +1674 -0
  218. package/declarations/types/schema/fields.d.ts.map +1 -0
  219. package/declarations/types/schema/fields.type-test.d.ts +2 -0
  220. package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
  221. package/declarations/types/spec/document.d.ts +31 -0
  222. package/declarations/types/spec/document.d.ts.map +1 -0
  223. package/declarations/types/spec/error.d.ts +19 -0
  224. package/declarations/types/spec/error.d.ts.map +1 -0
  225. package/declarations/types/spec/json-api-raw.d.ts +142 -0
  226. package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
  227. package/declarations/types/symbols.d.ts +79 -0
  228. package/declarations/types/symbols.d.ts.map +1 -0
  229. package/declarations/types/utils.d.ts +5 -0
  230. package/declarations/types/utils.d.ts.map +1 -0
  231. package/declarations/types.d.ts +12 -0
  232. package/declarations/types.d.ts.map +1 -0
  233. package/declarations/utils/string.d.ts +45 -0
  234. package/declarations/utils/string.d.ts.map +1 -0
  235. package/dist/build-config/babel-macros.js +1 -0
  236. package/dist/build-config/babel-macros.js.map +1 -0
  237. package/dist/build-config/canary-features.js +1 -0
  238. package/dist/build-config/canary-features.js.map +1 -0
  239. package/dist/build-config/debugging.js +1 -0
  240. package/dist/build-config/debugging.js.map +1 -0
  241. package/dist/build-config/deprecations.js +1 -0
  242. package/dist/build-config/deprecations.js.map +1 -0
  243. package/dist/build-config/env.js +1 -0
  244. package/dist/build-config/env.js.map +1 -0
  245. package/dist/build-config/macros.js +1 -0
  246. package/dist/build-config/macros.js.map +1 -0
  247. package/dist/build-config.js +1 -0
  248. package/dist/build-config.js.map +1 -0
  249. package/dist/configure-Bz49BEZQ.js +145 -0
  250. package/dist/configure-Bz49BEZQ.js.map +1 -0
  251. package/dist/configure.js +1 -0
  252. package/dist/configure.js.map +1 -0
  253. package/dist/context-DE5sFezZ.js +636 -0
  254. package/dist/context-DE5sFezZ.js.map +1 -0
  255. package/dist/graph/-private.js +3364 -0
  256. package/dist/graph/-private.js.map +1 -0
  257. package/dist/handler-DYUefHNU.js +339 -0
  258. package/dist/handler-DYUefHNU.js.map +1 -0
  259. package/dist/index.js +382 -0
  260. package/dist/index.js.map +1 -0
  261. package/dist/reactive/-private.js +1 -0
  262. package/dist/reactive/-private.js.map +1 -0
  263. package/dist/reactive.js +1802 -0
  264. package/dist/reactive.js.map +1 -0
  265. package/dist/request-state-Bv5CY_H0.js +7358 -0
  266. package/dist/request-state-Bv5CY_H0.js.map +1 -0
  267. package/dist/request.js +1 -0
  268. package/dist/request.js.map +1 -0
  269. package/dist/store/-private.js +3 -0
  270. package/dist/store/-private.js.map +1 -0
  271. package/dist/store.js +545 -0
  272. package/dist/store.js.map +1 -0
  273. package/dist/symbols-DyqeYQTe.js +44 -0
  274. package/dist/symbols-DyqeYQTe.js.map +1 -0
  275. package/dist/types/-private.js +79 -0
  276. package/dist/types/-private.js.map +1 -0
  277. package/dist/types/cache/aliases.js +0 -0
  278. package/dist/types/cache/aliases.js.map +1 -0
  279. package/dist/types/cache/change.js +0 -0
  280. package/dist/types/cache/change.js.map +1 -0
  281. package/dist/types/cache/mutations.js +0 -0
  282. package/dist/types/cache/mutations.js.map +1 -0
  283. package/dist/types/cache/operations.js +0 -0
  284. package/dist/types/cache/operations.js.map +1 -0
  285. package/dist/types/cache/relationship.js +0 -0
  286. package/dist/types/cache/relationship.js.map +1 -0
  287. package/dist/types/cache.js +0 -0
  288. package/dist/types/cache.js.map +1 -0
  289. package/dist/types/graph.js +0 -0
  290. package/dist/types/graph.js.map +1 -0
  291. package/dist/types/identifier.js +89 -0
  292. package/dist/types/identifier.js.map +1 -0
  293. package/dist/types/json/raw.js +0 -0
  294. package/dist/types/json/raw.js.map +1 -0
  295. package/dist/types/params.js +0 -0
  296. package/dist/types/params.js.map +1 -0
  297. package/dist/types/record.js +64 -0
  298. package/dist/types/record.js.map +1 -0
  299. package/dist/types/request.js +33 -0
  300. package/dist/types/request.js.map +1 -0
  301. package/dist/types/runtime.js +34 -0
  302. package/dist/types/runtime.js.map +1 -0
  303. package/dist/types/schema/concepts.js +0 -0
  304. package/dist/types/schema/concepts.js.map +1 -0
  305. package/dist/types/schema/fields.js +470 -0
  306. package/dist/types/schema/fields.js.map +1 -0
  307. package/dist/types/schema/fields.type-test.js +0 -0
  308. package/dist/types/schema/fields.type-test.js.map +1 -0
  309. package/dist/types/spec/document.js +0 -0
  310. package/dist/types/spec/document.js.map +1 -0
  311. package/dist/types/spec/error.js +0 -0
  312. package/dist/types/spec/error.js.map +1 -0
  313. package/dist/types/spec/json-api-raw.js +0 -0
  314. package/dist/types/spec/json-api-raw.js.map +1 -0
  315. package/dist/types/symbols.js +84 -0
  316. package/dist/types/symbols.js.map +1 -0
  317. package/dist/types/utils.js +0 -0
  318. package/dist/types/utils.js.map +1 -0
  319. package/dist/types.js +0 -0
  320. package/dist/types.js.map +1 -0
  321. package/dist/utils/string.js +92 -0
  322. package/dist/utils/string.js.map +1 -0
  323. package/logos/NCC-1701-a-blue.svg +4 -0
  324. package/logos/NCC-1701-a-gold.svg +4 -0
  325. package/logos/NCC-1701-a-gold_100.svg +1 -0
  326. package/logos/NCC-1701-a-gold_base-64.txt +1 -0
  327. package/logos/NCC-1701-a.svg +4 -0
  328. package/logos/README.md +4 -0
  329. package/logos/docs-badge.svg +2 -0
  330. package/logos/ember-data-logo-dark.svg +12 -0
  331. package/logos/ember-data-logo-light.svg +12 -0
  332. package/logos/github-header.svg +444 -0
  333. package/logos/social1.png +0 -0
  334. package/logos/social2.png +0 -0
  335. package/logos/warp-drive-logo-dark.svg +4 -0
  336. package/logos/warp-drive-logo-gold.svg +4 -0
  337. package/package.json +70 -0
@@ -0,0 +1,331 @@
1
+ import type { RecordIdentifier, StableRecordIdentifier } from '../../../types/identifier.ts';
2
+ import type { ObjectValue } from '../../../types/json/raw.ts';
3
+ import type { Derivation, HashFn, Transformation } from '../../../types/schema/concepts.ts';
4
+ import type { ArrayField, DerivedField, FieldSchema, GenericField, HashField, LegacyAttributeField, LegacyRelationshipField, ObjectField, Schema } from '../../../types/schema/fields.ts';
5
+ export type AttributesSchema = Record<string, LegacyAttributeField>;
6
+ export type RelationshipsSchema = Record<string, LegacyRelationshipField>;
7
+ interface ObjectWithStringTypeProperty {
8
+ type: string;
9
+ }
10
+ /**
11
+ * The SchemaService provides the ability to query for information about the structure
12
+ * of any resource type.
13
+ *
14
+ * Applications can provide any implementation of the SchemaService they please so long
15
+ * as it conforms to this interface.
16
+ *
17
+ * The design of the service means that schema information could be lazily populated,
18
+ * derived-on-demand, or progressively enhanced during the course of an application's runtime.
19
+ * The primary requirement is merely that any information the service needs to correctly
20
+ * respond to an inquest is available by the time it is asked.
21
+ *
22
+ * The `@ember-data/model` package provides an implementation of this service which
23
+ * makes use of your model classes as the source of information to respond to queries
24
+ * about resource schema. While this is useful, this may not be ideal for your application.
25
+ * For instance, Schema information could be sideloaded or pre-flighted for API calls,
26
+ * resulting in no need to bundle and ship potentially large and expensive JSON
27
+ * or large Javascript based Models to pull information from.
28
+ *
29
+ * To register a custom schema implementation, implement the store's `createSchemaService`
30
+ * hook to return an instance of your service.
31
+ *
32
+ * ```ts
33
+ * import Store from '@ember-data/store';
34
+ * import CustomSchemas from './custom-schemas';
35
+ *
36
+ * export default class extends Store {
37
+ * createSchemaService() {
38
+ * return new CustomSchemas();
39
+ * }
40
+ * }
41
+ * ```
42
+ *
43
+ * At runtime, both the `Store` and the `CacheCapabilitiesManager` provide
44
+ * access to this service via the `schema` property.
45
+ *
46
+ * ```ts
47
+ * export default class extends Component {
48
+ * @service store;
49
+ *
50
+ * get fields() {
51
+ * return this.store
52
+ * .schema
53
+ * .fields(this.args.dataType);
54
+ * }
55
+ * }
56
+ * ```
57
+ *
58
+ * @class (Interface) SchemaService
59
+ * @public
60
+ */
61
+ export interface SchemaService {
62
+ /**
63
+ * DEPRECATED - use `hasResource` instead
64
+ *
65
+ * Queries whether the SchemaService recognizes `type` as a resource type
66
+ *
67
+ * @public
68
+ * @deprecated
69
+ * @param {String} type
70
+ * @return {Boolean}
71
+ */
72
+ doesTypeExist?(type: string): boolean;
73
+ /**
74
+ * Queries whether the SchemaService recognizes `type` as a resource type
75
+ *
76
+ * @public
77
+ * @param {StableRecordIdentifier|ObjectWithStringTypeProperty} resource
78
+ * @return {Boolean}
79
+ */
80
+ hasResource(resource: ObjectWithStringTypeProperty | StableRecordIdentifier): boolean;
81
+ /**
82
+ * Queries whether the SchemaService recognizes `type` as a resource trait
83
+ *
84
+ * @public
85
+ * @param {String} type
86
+ * @return {Boolean}
87
+ */
88
+ hasTrait(type: string): boolean;
89
+ /**
90
+ * Queries whether the given resource has the given trait
91
+ *
92
+ * @public
93
+ * @param {StableRecordIdentifier|ObjectWithStringTypeProperty} resource
94
+ * @param {String} trait
95
+ * @return {Boolean}
96
+ */
97
+ resourceHasTrait(resource: ObjectWithStringTypeProperty | StableRecordIdentifier, trait: string): boolean;
98
+ /**
99
+ * Queries for the fields of a given resource type or resource identity.
100
+ *
101
+ * Should error if the resource type is not recognized.
102
+ *
103
+ * @public
104
+ * @param {StableRecordIdentifier|ObjectWithStringTypeProperty} resource
105
+ * @return {Map<string, FieldSchema>}
106
+ */
107
+ fields(resource: ObjectWithStringTypeProperty | StableRecordIdentifier): Map<string, FieldSchema>;
108
+ /**
109
+ * Returns the transformation registered with the name provided
110
+ * by `field.type`. Validates that the field is a valid transformable.
111
+ *
112
+ * @public
113
+ * @param {TransformableField|ObjectWithStringTypeProperty} field
114
+ * @return {Transformation}
115
+ */
116
+ transformation(field: GenericField | ObjectField | ArrayField | ObjectWithStringTypeProperty): Transformation;
117
+ /**
118
+ * Returns the hash function registered with the name provided
119
+ * by `field.type`. Validates that the field is a valid HashField.
120
+ *
121
+ * @public
122
+ * @param {HashField|ObjectWithStringTypeProperty} field
123
+ * @return {HashFn}
124
+ */
125
+ hashFn(field: HashField | ObjectWithStringTypeProperty): HashFn;
126
+ /**
127
+ * Returns the derivation registered with the name provided
128
+ * by `field.type`. Validates that the field is a valid DerivedField.
129
+ *
130
+ * @public
131
+ * @param {DerivedField|ObjectWithStringTypeProperty} field
132
+ * @return {Derivation}
133
+ */
134
+ derivation(field: DerivedField | ObjectWithStringTypeProperty): Derivation;
135
+ /**
136
+ * Returns the schema for the provided resource type.
137
+ *
138
+ * @public
139
+ * @param {StableRecordIdentifier|ObjectWithStringTypeProperty} resource
140
+ * @return {ResourceSchema}
141
+ */
142
+ resource(resource: ObjectWithStringTypeProperty | StableRecordIdentifier): Schema;
143
+ /**
144
+ * Enables registration of multiple Schemas at once.
145
+ *
146
+ * This can be useful for either pre-loading schema information
147
+ * or for registering schema information delivered by API calls
148
+ * or other sources just-in-time.
149
+ *
150
+ * @public
151
+ * @param {Schema[]} schemas
152
+ */
153
+ registerResources(schemas: Schema[]): void;
154
+ /**
155
+ * Enables registration of a single Schema representing either
156
+ * a resource in PolarisMode or LegacyMode or an ObjectSchema
157
+ * representing an embedded structure in other schemas.
158
+ *
159
+ * This can be useful for either pre-loading schema information
160
+ * or for registering schema information delivered by API calls
161
+ * or other sources just-in-time.
162
+ *
163
+ * @public
164
+ * @param {Schema} schema
165
+ */
166
+ registerResource(schema: Schema): void;
167
+ /**
168
+ * Enables registration of a transformation.
169
+ *
170
+ * The transformation can later be retrieved by the name
171
+ * attached to it's `[Type]` property.
172
+ *
173
+ * @public
174
+ * @param {Transformation} transform
175
+ */
176
+ registerTransformation(transform: Transformation): void;
177
+ /**
178
+ * Enables registration of a derivation.
179
+ *
180
+ * The derivation can later be retrieved by the name
181
+ * attached to it's `[Type]` property.
182
+ *
183
+ * @public
184
+ * @param {Derivation} derivation
185
+ */
186
+ registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void;
187
+ /**
188
+ * Enables registration of a hashing function
189
+ *
190
+ * The hashing function can later be retrieved by the name
191
+ * attached to it's `[Type]` property.
192
+ *
193
+ * @public
194
+ * @param {HashFn} hashfn
195
+ */
196
+ registerHashFn(hashFn: HashFn): void;
197
+ /**
198
+ * DEPRECATED - use `fields` instead
199
+ *
200
+ * Returns definitions for all properties of the specified resource
201
+ * that are considered "attributes". Generally these are properties
202
+ * that are not related to book-keeping state on the client and do
203
+ * not represent a linkage to another resource.
204
+ *
205
+ * The return value should be a dictionary of key:value pairs
206
+ * where the `key` is the attribute or property's name and `value`
207
+ * is an object with at least the property `name` which should also
208
+ * match `key`.
209
+ *
210
+ * Optionally, this object may also specify `type`, which should
211
+ * be a string reference to a `transform`, and `options` which
212
+ * should be dictionary in which any key:value pairs are permissable.
213
+ *
214
+ * For instance, when using `@ember-data/model`, the following attribute
215
+ * definition:
216
+ *
217
+ * ```ts
218
+ * class extends Model {
219
+ * @attr('string', { defaultValue: 'hello' }) greeting;
220
+ * @attr('date') birthday;
221
+ * @attr firstName;
222
+ * }
223
+ * ```
224
+ *
225
+ * Would be returned as:
226
+ *
227
+ * ```js
228
+ * {
229
+ * greeting: { name: 'greeting', type: 'string', options: { defaultValue: 'hello' } },
230
+ * birthday: { name: 'birthday', type: 'date' },
231
+ * firstName: { name: 'firstName' }
232
+ * }
233
+ * ```
234
+ *
235
+ * @public
236
+ * @deprecated
237
+ * @param {RecordIdentifier|ObjectWithStringTypeProperty} identifier
238
+ * @return {AttributesSchema}
239
+ */
240
+ attributesDefinitionFor?(identifier: RecordIdentifier | ObjectWithStringTypeProperty): AttributesSchema;
241
+ /**
242
+ * DEPRECATED - use `fields` instead
243
+ *
244
+ * Returns definitions for all properties of the specified resource
245
+ * that are considered "relationships". Generally these are properties
246
+ * that represent a linkage to another resource.
247
+ *
248
+ * The return value should be a dictionary of key:value pairs
249
+ * where the `key` is the relationship or property's name and `value`
250
+ * is an object with at least the following properties:
251
+ *
252
+ * - `name` which should also match the `key` used in the dictionary.
253
+ * - `kind` which should be either `belongsTo` or `hasMany`
254
+ * - `type` which should be the related resource's string "type"
255
+ * - `options` which should be a dictionary allowing any key but with
256
+ * at least the below keys present.
257
+ *
258
+ * - `options.async` a boolean representing whether data for this relationship is
259
+ * typically loaded on-demand.
260
+ * - `options.inverse` a string or null representing the field name / key of the
261
+ * corresponding relationship on the inverse resource.
262
+ *
263
+ * Additionally the following options properties are optional. See [Polymorphic Relationships](https://rfcs.emberjs.com/id/0793-polymporphic-relations-without-inheritance)
264
+ *
265
+ * - `options.polymorphic` a boolean representing whether multiple resource types
266
+ * can be used to satisfy this relationship.
267
+ * - `options.as` a string representing the abstract type that the concrete side of
268
+ * a relationship must specify when fulfilling a polymorphic inverse.
269
+ *
270
+ * For example, the following Model using @ember-data/model would generate this relationships
271
+ * definition by default:
272
+ *
273
+ * ```js
274
+ * class User extends Model {
275
+ * @belongsTo('user', { async: false, inverse: null }) bestFriend;
276
+ * @hasMany('user', { async: true, inverse: 'friends' }) friends;
277
+ * @hasMany('pet', { async: false, polymorphic: true, inverse: 'owner' }) pets;
278
+ * }
279
+ * ```
280
+ *
281
+ * Which would be returned as
282
+ *
283
+ * ```js
284
+ * {
285
+ * bestFriend: {
286
+ * name: 'bestFriend',
287
+ * kind: 'belongsTo',
288
+ * type: 'user',
289
+ * options: {
290
+ * async: false,
291
+ * inverse: null
292
+ * }
293
+ * },
294
+ * friends: {
295
+ * name: 'friends',
296
+ * kind: 'hasMany',
297
+ * type: 'user',
298
+ * options: {
299
+ * async: true,
300
+ * inverse: 'friends'
301
+ * }
302
+ * },
303
+ * pets: {
304
+ * name: 'pets',
305
+ * kind: 'hasMany',
306
+ * type: 'pet',
307
+ * options: {
308
+ * async: false,
309
+ * polymorphic: true,
310
+ * inverse: 'owner'
311
+ * }
312
+ * },
313
+ * }
314
+ * ```
315
+ *
316
+ * @public
317
+ * @deprecated
318
+ * @param {RecordIdentifier|ObjectWithStringTypeProperty} identifier
319
+ * @return {RelationshipsSchema}
320
+ */
321
+ relationshipsDefinitionFor?(identifier: RecordIdentifier | ObjectWithStringTypeProperty): RelationshipsSchema;
322
+ /**
323
+ * Returns all known resource types
324
+ *
325
+ * @public
326
+ * @return {String[]}
327
+ */
328
+ resourceTypes(): Readonly<string[]>;
329
+ }
330
+ export {};
331
+ //# sourceMappingURL=schema-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-service.d.ts","sourceRoot":"","sources":["../../../../src/store/-types/q/schema-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,uBAAu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;;OASG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE3C;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC;;;;;;;;OAQG;IACH,sBAAsB,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAAC;IAExD;;;;;;;;OAQG;IACH,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,WAAW,GAAG,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;IAEhG;;;;;;;;OAQG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,uBAAuB,CAAC,CAAC,UAAU,EAAE,gBAAgB,GAAG,4BAA4B,GAAG,gBAAgB,CAAC;IAExG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IACH,0BAA0B,CAAC,CAAC,UAAU,EAAE,gBAAgB,GAAG,4BAA4B,GAAG,mBAAmB,CAAC;IAE9G;;;;;OAKG;IACH,aAAa,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;CACrC"}
@@ -0,0 +1,35 @@
1
+ import type { Value } from '../../../types/json/raw';
2
+ import type { Includes, TypedRecordInstance } from '../../../types/record';
3
+ export interface BaseFinderOptions<T = unknown> {
4
+ reload?: boolean;
5
+ backgroundReload?: boolean;
6
+ include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];
7
+ adapterOptions?: Record<string, unknown>;
8
+ }
9
+ export interface FindRecordOptions<T = unknown> extends BaseFinderOptions<T> {
10
+ /**
11
+ * Data to preload into the store before the request is made.
12
+ * This feature is *highly* discouraged and has no corresponding
13
+ * feature when using builders and handlers.
14
+ *
15
+ * Excepting relationships: the data should be in the form of a
16
+ * JSON object where the keys are fields on the record and the value
17
+ * is the raw value to be added to the cache.
18
+ *
19
+ * Relationships can either be provided as string IDs from which
20
+ * an identifier will be built base upon the relationship's expected
21
+ * resource type, or be record instances from which the identifier
22
+ * will be extracted.
23
+ *
24
+ */
25
+ preload?: Record<string, Value>;
26
+ }
27
+ export type QueryOptions = {
28
+ [K in string | 'adapterOptions']?: K extends 'adapterOptions' ? Record<string, unknown> : unknown;
29
+ };
30
+ export type FindAllOptions<T = unknown> = BaseFinderOptions<T>;
31
+ export type LegacyResourceQuery<T = unknown> = {
32
+ include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];
33
+ [key: string]: Value | undefined;
34
+ };
35
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store/-types/q/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,SAAS,mBAAmB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AACD,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAC1E;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,YAAY,GAAG;KACxB,CAAC,IAAI,MAAM,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;CAClG,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC7C,OAAO,CAAC,EAAE,CAAC,SAAS,mBAAmB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5E,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;CAClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { DefaultCachePolicy, type PolicyConfig, type CacheControlValue, parseCacheControl, } from './store/-private/default-cache-policy';
2
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,14 @@
1
+ type UniversalTransientKey = 'REQ_ID';
2
+ type UniversalKey = `(transient) ${UniversalTransientKey}` | 'RequestMap' | 'PromiseCache' | 'RequestCache' | 'SkipCache' | 'EnableHydration' | 'WarpDriveRuntimeConfig';
3
+ type TransientKey = 'transactionRef' | 'configuredGenerationMethod' | 'configuredUpdateMethod' | 'configuredForgetMethod' | 'configuredResetMethod' | 'configuredKeyInfoMethod' | 'signalHooks';
4
+ type GlobalKey = `(transient) ${TransientKey}` | 'AdapterError' | 'InvalidError' | 'TimeoutError' | 'AbortError' | 'UnauthorizedError' | 'ForbiddenError' | 'NotFoundError' | 'ConflictError' | 'ServerError' | '#{}' | '#[]' | 'Signals' | 'AvailableShims' | 'FAKE_ARR' | '#source' | '#update' | '#notify' | 'IS_COLLECTION' | 'Touching' | 'RequestPromise' | 'SaveOp' | 'LEGACY_SUPPORT' | 'LegacySupport' | 'Graphs' | 'IS_FROZEN' | 'IS_CACHE_HANDLER' | 'CONFIG' | 'DEBUG_MAP' | 'IDENTIFIERS' | 'DOCUMENTS' | 'CacheForIdentifierCache' | 'RecordCache' | 'StoreMap' | 'Store' | '$type' | 'TransformName' | 'RequestSignature' | 'IS_FUTURE' | 'DOC' | 'ManagedArrayMap' | 'ManagedObjectMap' | 'Support' | 'SOURCE' | 'MUTATE' | 'Destroy' | 'Identifier' | 'Editable' | 'EmbeddedPath' | 'EmbeddedType' | 'Parent' | 'Checkout' | 'Legacy';
5
+ type UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;
6
+ type UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;
7
+ export declare function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K>;
8
+ export declare function peekTransient<T>(key: TransientKey): T | null;
9
+ export declare function setTransient<T>(key: TransientKey, value: T): T;
10
+ export declare function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K>;
11
+ export declare function peekUniversalTransient<T>(key: UniversalTransientKey): T | null;
12
+ export declare function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T;
13
+ export {};
14
+ //# sourceMappingURL=-private.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../../src/types/-private.ts"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAExB,QAAQ,CAAC;AAEX,KAAK,YAAY,GACb,eAAe,qBAAqB,EAAE,GAEtC,YAAY,GACZ,cAAc,GACd,cAAc,GAEd,WAAW,GACX,iBAAiB,GAEjB,wBAAwB,CAAC;AAE7B,KAAK,YAAY,GAEb,gBAAgB,GA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AC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG9D;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAWnG;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,GAAG,CAAC,GAAG,IAAI,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAGhF"}
@@ -0,0 +1,2 @@
1
+ export type ResourceBlob = unknown;
2
+ //# sourceMappingURL=aliases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../src/types/cache/aliases.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { StableDocumentIdentifier, StableRecordIdentifier } from '../identifier.ts';
2
+ export interface Change {
3
+ identifier: StableRecordIdentifier | StableDocumentIdentifier;
4
+ op: 'upsert' | 'remove';
5
+ patch?: unknown;
6
+ }
7
+ //# sourceMappingURL=change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../../../src/types/cache/change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,sBAAsB,GAAG,wBAAwB,CAAC;IAC9D,EAAE,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,39 @@
1
+ import type { StableRecordIdentifier } from '../identifier.ts';
2
+ export interface AddToResourceRelationshipMutation {
3
+ op: 'add';
4
+ record: StableRecordIdentifier;
5
+ field: string;
6
+ value: StableRecordIdentifier | StableRecordIdentifier[];
7
+ index?: number;
8
+ }
9
+ export interface RemoveFromResourceRelationshipMutation {
10
+ op: 'remove';
11
+ record: StableRecordIdentifier;
12
+ field: string;
13
+ value: StableRecordIdentifier | StableRecordIdentifier[];
14
+ index?: number;
15
+ }
16
+ export interface ReplaceRelatedRecordMutation {
17
+ op: 'replaceRelatedRecord';
18
+ record: StableRecordIdentifier;
19
+ field: string;
20
+ value: StableRecordIdentifier | null;
21
+ prior?: StableRecordIdentifier;
22
+ index?: number;
23
+ }
24
+ export interface ReplaceRelatedRecordsMutation {
25
+ op: 'replaceRelatedRecords';
26
+ record: StableRecordIdentifier;
27
+ field: string;
28
+ value: StableRecordIdentifier[];
29
+ prior?: StableRecordIdentifier[];
30
+ index?: number;
31
+ }
32
+ export interface SortRelatedRecordsMutation {
33
+ op: 'sortRelatedRecords';
34
+ record: StableRecordIdentifier;
35
+ field: string;
36
+ value: StableRecordIdentifier[];
37
+ }
38
+ export type Mutation = ReplaceRelatedRecordsMutation | ReplaceRelatedRecordMutation | RemoveFromResourceRelationshipMutation | AddToResourceRelationshipMutation | SortRelatedRecordsMutation;
39
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/types/cache/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sCAAsC;IACrD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAGrC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,uBAAuB,CAAC;IAC5B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAGhC,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAGjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,oBAAoB,CAAC;IACzB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC;AAgBD,MAAM,MAAM,QAAQ,GAChB,6BAA6B,GAC7B,4BAA4B,GAC5B,sCAAsC,GACtC,iCAAiC,GACjC,0BAA0B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { StableDocumentIdentifier, StableExistingRecordIdentifier, StableRecordIdentifier } from '../identifier.ts';
2
+ import type { Value } from '../json/raw.ts';
3
+ import type { ExistingResourceObject } from '../spec/json-api-raw.ts';
4
+ import type { Relationship } from './relationship.ts';
5
+ export interface Op {
6
+ op: string;
7
+ }
8
+ export interface MergeOperation extends Op {
9
+ op: 'mergeIdentifiers';
10
+ record: StableRecordIdentifier;
11
+ value: StableRecordIdentifier;
12
+ }
13
+ export interface RemoveDocumentOperation extends Op {
14
+ op: 'remove';
15
+ record: StableDocumentIdentifier;
16
+ }
17
+ export interface RemoveResourceOperation extends Op {
18
+ op: 'remove';
19
+ record: StableExistingRecordIdentifier;
20
+ }
21
+ export interface AddResourceOperation extends Op {
22
+ op: 'add';
23
+ record: StableExistingRecordIdentifier;
24
+ value: ExistingResourceObject;
25
+ }
26
+ export interface UpdateResourceOperation extends Op {
27
+ op: 'update';
28
+ record: StableExistingRecordIdentifier;
29
+ value: ExistingResourceObject;
30
+ }
31
+ export interface UpdateResourceFieldOperation extends Op {
32
+ op: 'update';
33
+ record: StableExistingRecordIdentifier;
34
+ field: string;
35
+ value: Value;
36
+ }
37
+ export interface UpdateResourceRelationshipOperation extends Op {
38
+ op: 'update';
39
+ record: StableExistingRecordIdentifier;
40
+ field: string;
41
+ value: Relationship<StableExistingRecordIdentifier>;
42
+ }
43
+ export interface AddToDocumentOperation extends Op {
44
+ op: 'add';
45
+ record: StableDocumentIdentifier;
46
+ field: 'data' | 'included';
47
+ value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
48
+ index?: number;
49
+ }
50
+ export interface AddToResourceRelationshipOperation extends Op {
51
+ op: 'add';
52
+ record: StableExistingRecordIdentifier;
53
+ field: string;
54
+ value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
55
+ index?: number;
56
+ }
57
+ export interface RemoveFromResourceRelationshipOperation extends Op {
58
+ op: 'remove';
59
+ record: StableExistingRecordIdentifier;
60
+ field: string;
61
+ value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
62
+ index?: number;
63
+ }
64
+ export interface RemoveFromDocumentOperation extends Op {
65
+ op: 'remove';
66
+ record: StableDocumentIdentifier;
67
+ field: 'data' | 'included';
68
+ value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
69
+ index?: number;
70
+ }
71
+ export type Operation = MergeOperation | RemoveResourceOperation | RemoveDocumentOperation | AddResourceOperation | UpdateResourceOperation | UpdateResourceFieldOperation | AddToResourceRelationshipOperation | RemoveFromResourceRelationshipOperation | AddToDocumentOperation | RemoveFromDocumentOperation;
72
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/types/cache/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,EAAE;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAUD,MAAM,WAAW,cAAe,SAAQ,EAAE;IACxC,EAAE,EAAE,kBAAkB,CAAC;IAEvB,MAAM,EAAE,sBAAsB,CAAC;IAE/B,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,EAAE;IACjD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;CAClC;AAED,MAAM,WAAW,uBAAwB,SAAQ,EAAE;IACjD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,8BAA8B,CAAC;CACxC;AAED,MAAM,WAAW,oBAAqB,SAAQ,EAAE;IAC9C,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,8BAA8B,CAAC;IACvC,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,EAAE;IACjD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,8BAA8B,CAAC;IACvC,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAED,MAAM,WAAW,4BAA6B,SAAQ,EAAE;IACtD,EAAE,EAAE,QAAQ,CAAC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AS,GACjB,cAAc,GACd,uBAAuB,GACvB,uBAAuB,GACvB,oBAAoB,GACpB,uBAAuB,GACvB,4BAA4B,GAC5B,kCAAkC,GAClC,uCAAuC,GACvC,sBAAsB,GACtB,2BAA2B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { StableRecordIdentifier } from '../identifier.ts';
2
+ import type { Links, Meta, PaginationLinks } from '../spec/json-api-raw.ts';
3
+ export interface ResourceRelationship<T = StableRecordIdentifier> {
4
+ data?: T | null;
5
+ meta?: Meta;
6
+ links?: Links;
7
+ }
8
+ export interface CollectionRelationship<T = StableRecordIdentifier> {
9
+ data?: T[];
10
+ meta?: Meta;
11
+ links?: PaginationLinks;
12
+ }
13
+ export type Relationship<T = StableRecordIdentifier> = ResourceRelationship<T> | CollectionRelationship<T>;
14
+ //# sourceMappingURL=relationship.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/types/cache/relationship.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,sBAAsB;IAC9D,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAID,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,sBAAsB;IAChE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,sBAAsB,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC"}