@warp-drive/core 5.8.0-alpha.3 → 5.8.0-alpha.32

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 (762) hide show
  1. package/README.md +22 -38
  2. package/declarations/build-config.d.ts +18 -1
  3. package/declarations/graph/-private/-edge-definition.d.ts +12 -2
  4. package/declarations/index.d.ts +90 -4
  5. package/declarations/reactive/-private/document.d.ts +58 -46
  6. package/declarations/reactive/-private/record.d.ts +10 -1
  7. package/declarations/reactive/-private/schema.d.ts +77 -4
  8. package/declarations/reactive/-private.d.ts +1 -0
  9. package/declarations/reactive.d.ts +13 -7
  10. package/declarations/request/-private/types.d.ts +1 -1
  11. package/declarations/request.d.ts +47 -0
  12. package/declarations/store/-private/caches/instance-cache.d.ts +5 -6
  13. package/declarations/store/-private/default-cache-policy.d.ts +147 -129
  14. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +1 -1
  15. package/declarations/store/-private/managers/cache-key-manager.d.ts +26 -8
  16. package/declarations/store/-private/managers/cache-manager.d.ts +6 -4
  17. package/declarations/store/-private/managers/notification-manager.d.ts +1 -1
  18. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +1 -0
  19. package/declarations/store/-private/new-core-tmp/request-state.d.ts +1 -1
  20. package/declarations/store/-private/store-service.d.ts +43 -64
  21. package/declarations/store/-private.d.ts +0 -1
  22. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +1 -1
  23. package/declarations/store/deprecated/-private.d.ts +1 -1
  24. package/declarations/store/deprecated/store.d.ts +33 -32
  25. package/declarations/store.d.ts +1 -0
  26. package/declarations/types/cache.d.ts +8 -6
  27. package/declarations/types/record.d.ts +132 -0
  28. package/declarations/types/request.d.ts +26 -14
  29. package/declarations/types/schema/fields.d.ts +33 -9
  30. package/declarations/{store/-types/q → types/schema}/schema-service.d.ts +15 -13
  31. package/declarations/types/spec/document.d.ts +34 -0
  32. package/declarations/types/symbols.d.ts +2 -2
  33. package/declarations/types.d.ts +1 -1
  34. package/dist/build-config.js +1 -1
  35. package/dist/default-cache-policy-D7_u4YRH.js +572 -0
  36. package/dist/graph/-private.js +13 -4
  37. package/dist/{request-state-CUuZzgvE.js → index-D4si_DxB.js} +10010 -8843
  38. package/dist/index.js +6 -382
  39. package/dist/reactive.js +4 -778
  40. package/dist/{context-C_7OLieY.js → request-oqoLC9rz.js} +219 -172
  41. package/dist/request.js +1 -1
  42. package/dist/store/-private.js +1 -1
  43. package/dist/store.js +1 -533
  44. package/dist/types/-private.js +1 -1
  45. package/dist/types/record.js +127 -0
  46. package/dist/types/request.js +14 -12
  47. package/dist/types/schema/fields.js +14 -0
  48. package/dist/types/schema/schema-service.js +0 -0
  49. package/dist/types/symbols.js +2 -2
  50. package/dist/unpkg/dev/build-config/babel-macros.js +1 -0
  51. package/dist/unpkg/dev/build-config/canary-features.js +1 -0
  52. package/dist/unpkg/dev/build-config/debugging.js +1 -0
  53. package/dist/unpkg/dev/build-config/deprecations.js +1 -0
  54. package/dist/unpkg/dev/build-config/env.js +1 -0
  55. package/dist/unpkg/dev/build-config/macros.js +1 -0
  56. package/dist/unpkg/dev/build-config.js +1 -0
  57. package/dist/unpkg/dev/configure-C3x8YXzL.js +181 -0
  58. package/dist/unpkg/dev/configure.js +1 -0
  59. package/dist/unpkg/dev/declarations/build-config/babel-macros.d.ts +1 -0
  60. package/dist/unpkg/dev/declarations/build-config/canary-features.d.ts +1 -0
  61. package/dist/unpkg/dev/declarations/build-config/debugging.d.ts +1 -0
  62. package/dist/unpkg/dev/declarations/build-config/deprecations.d.ts +1 -0
  63. package/dist/unpkg/dev/declarations/build-config/env.d.ts +1 -0
  64. package/dist/unpkg/dev/declarations/build-config/macros.d.ts +1 -0
  65. package/dist/unpkg/dev/declarations/build-config.d.ts +18 -0
  66. package/dist/unpkg/dev/declarations/configure.d.ts +7 -0
  67. package/dist/unpkg/dev/declarations/graph/-private/-diff.d.ts +19 -0
  68. package/dist/unpkg/dev/declarations/graph/-private/-edge-definition.d.ts +149 -0
  69. package/dist/unpkg/dev/declarations/graph/-private/-state.d.ts +9 -0
  70. package/dist/unpkg/dev/declarations/graph/-private/-utils.d.ts +25 -0
  71. package/dist/unpkg/dev/declarations/graph/-private/coerce-id.d.ts +4 -0
  72. package/dist/unpkg/dev/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +6 -0
  73. package/dist/unpkg/dev/declarations/graph/-private/edges/collection.d.ts +39 -0
  74. package/dist/unpkg/dev/declarations/graph/-private/edges/implicit.d.ts +43 -0
  75. package/dist/unpkg/dev/declarations/graph/-private/edges/resource.d.ts +23 -0
  76. package/dist/unpkg/dev/declarations/graph/-private/graph.d.ts +56 -0
  77. package/dist/unpkg/dev/declarations/graph/-private/normalize-link.d.ts +2 -0
  78. package/dist/unpkg/dev/declarations/graph/-private/operations/add-to-related-records.d.ts +4 -0
  79. package/dist/unpkg/dev/declarations/graph/-private/operations/merge-identifier.d.ts +3 -0
  80. package/dist/unpkg/dev/declarations/graph/-private/operations/remove-from-related-records.d.ts +4 -0
  81. package/dist/unpkg/dev/declarations/graph/-private/operations/replace-related-record.d.ts +3 -0
  82. package/dist/unpkg/dev/declarations/graph/-private/operations/replace-related-records.d.ts +7 -0
  83. package/dist/unpkg/dev/declarations/graph/-private/operations/update-relationship.d.ts +9 -0
  84. package/dist/unpkg/dev/declarations/graph/-private.d.ts +13 -0
  85. package/dist/unpkg/dev/declarations/index.d.ts +100 -0
  86. package/dist/unpkg/dev/declarations/reactive/-private/default-mode.d.ts +73 -0
  87. package/dist/unpkg/dev/declarations/reactive/-private/document.d.ts +142 -0
  88. package/dist/unpkg/dev/declarations/reactive/-private/fields/extension.d.ts +8 -0
  89. package/dist/unpkg/dev/declarations/reactive/-private/fields/get-field-key.d.ts +8 -0
  90. package/dist/unpkg/dev/declarations/reactive/-private/fields/managed-array.d.ts +18 -0
  91. package/dist/unpkg/dev/declarations/reactive/-private/fields/managed-object.d.ts +17 -0
  92. package/dist/unpkg/dev/declarations/reactive/-private/fields/many-array-manager.d.ts +19 -0
  93. package/dist/unpkg/dev/declarations/reactive/-private/hooks.d.ts +5 -0
  94. package/dist/unpkg/dev/declarations/reactive/-private/kind/alias-field.d.ts +4 -0
  95. package/dist/unpkg/dev/declarations/reactive/-private/kind/array-field.d.ts +4 -0
  96. package/dist/unpkg/dev/declarations/reactive/-private/kind/attribute-field.d.ts +4 -0
  97. package/dist/unpkg/dev/declarations/reactive/-private/kind/belongs-to-field.d.ts +4 -0
  98. package/dist/unpkg/dev/declarations/reactive/-private/kind/collection-field.d.ts +4 -0
  99. package/dist/unpkg/dev/declarations/reactive/-private/kind/derived-field.d.ts +4 -0
  100. package/dist/unpkg/dev/declarations/reactive/-private/kind/generic-field.d.ts +4 -0
  101. package/dist/unpkg/dev/declarations/reactive/-private/kind/has-many-field.d.ts +4 -0
  102. package/dist/unpkg/dev/declarations/reactive/-private/kind/hash-field.d.ts +4 -0
  103. package/dist/unpkg/dev/declarations/reactive/-private/kind/identity-field.d.ts +4 -0
  104. package/dist/unpkg/dev/declarations/reactive/-private/kind/local-field.d.ts +4 -0
  105. package/dist/unpkg/dev/declarations/reactive/-private/kind/object-field.d.ts +4 -0
  106. package/dist/unpkg/dev/declarations/reactive/-private/kind/resource-field.d.ts +4 -0
  107. package/dist/unpkg/dev/declarations/reactive/-private/kind/schema-array-field.d.ts +4 -0
  108. package/dist/unpkg/dev/declarations/reactive/-private/kind/schema-object-field.d.ts +4 -0
  109. package/dist/unpkg/dev/declarations/reactive/-private/record.d.ts +83 -0
  110. package/dist/unpkg/dev/declarations/reactive/-private/schema.d.ts +326 -0
  111. package/dist/unpkg/dev/declarations/reactive/-private/symbols.d.ts +5 -0
  112. package/dist/unpkg/dev/declarations/reactive/-private.d.ts +2 -0
  113. package/dist/unpkg/dev/declarations/reactive.d.ts +287 -0
  114. package/dist/unpkg/dev/declarations/request/-private/context.d.ts +39 -0
  115. package/dist/unpkg/dev/declarations/request/-private/debug.d.ts +4 -0
  116. package/dist/unpkg/dev/declarations/request/-private/fetch.d.ts +33 -0
  117. package/dist/unpkg/dev/declarations/request/-private/future.d.ts +7 -0
  118. package/dist/unpkg/dev/declarations/request/-private/manager.d.ts +158 -0
  119. package/dist/unpkg/dev/declarations/request/-private/promise-cache.d.ts +28 -0
  120. package/dist/unpkg/dev/declarations/request/-private/types.d.ts +234 -0
  121. package/dist/unpkg/dev/declarations/request/-private/utils.d.ts +57 -0
  122. package/dist/unpkg/dev/declarations/request.d.ts +52 -0
  123. package/dist/unpkg/dev/declarations/store/-private/cache-handler/handler.d.ts +56 -0
  124. package/dist/unpkg/dev/declarations/store/-private/cache-handler/types.d.ts +98 -0
  125. package/dist/unpkg/dev/declarations/store/-private/cache-handler/utils.d.ts +31 -0
  126. package/dist/unpkg/dev/declarations/store/-private/caches/instance-cache.d.ts +58 -0
  127. package/dist/unpkg/dev/declarations/store/-private/caches/resource-utils.d.ts +9 -0
  128. package/dist/unpkg/dev/declarations/store/-private/debug/utils.d.ts +7 -0
  129. package/dist/unpkg/dev/declarations/store/-private/default-cache-policy.d.ts +387 -0
  130. package/dist/unpkg/dev/declarations/store/-private/managers/cache-capabilities-manager.d.ts +34 -0
  131. package/dist/unpkg/dev/declarations/store/-private/managers/cache-key-manager.d.ts +304 -0
  132. package/dist/unpkg/dev/declarations/store/-private/managers/cache-manager.d.ts +380 -0
  133. package/dist/unpkg/dev/declarations/store/-private/managers/notification-manager.d.ts +83 -0
  134. package/dist/unpkg/dev/declarations/store/-private/managers/record-array-manager.d.ts +100 -0
  135. package/dist/unpkg/dev/declarations/store/-private/network/request-cache.d.ts +103 -0
  136. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
  137. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/promise-state.d.ts +264 -0
  138. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +138 -0
  139. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +154 -0
  140. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +56 -0
  141. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/request-state.d.ts +372 -0
  142. package/dist/unpkg/dev/declarations/store/-private/new-core-tmp/request-subscription.d.ts +177 -0
  143. package/dist/unpkg/dev/declarations/store/-private/record-arrays/-utils.d.ts +80 -0
  144. package/dist/unpkg/dev/declarations/store/-private/record-arrays/legacy-live-array.d.ts +81 -0
  145. package/dist/unpkg/dev/declarations/store/-private/record-arrays/legacy-many-array.d.ts +133 -0
  146. package/dist/unpkg/dev/declarations/store/-private/record-arrays/legacy-query.d.ts +81 -0
  147. package/dist/unpkg/dev/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +3 -0
  148. package/dist/unpkg/dev/declarations/store/-private/record-arrays/resource-array.d.ts +67 -0
  149. package/dist/unpkg/dev/declarations/store/-private/store-service.d.ts +874 -0
  150. package/dist/unpkg/dev/declarations/store/-private/utils/coerce-id.d.ts +4 -0
  151. package/dist/unpkg/dev/declarations/store/-private/utils/construct-resource.d.ts +6 -0
  152. package/dist/unpkg/dev/declarations/store/-private/utils/is-non-empty-string.d.ts +1 -0
  153. package/dist/unpkg/dev/declarations/store/-private/utils/normalize-model-name.d.ts +1 -0
  154. package/dist/unpkg/dev/declarations/store/-private/utils/uuid-polyfill.d.ts +1 -0
  155. package/dist/unpkg/dev/declarations/store/-private.d.ts +29 -0
  156. package/dist/unpkg/dev/declarations/store/-types/q/cache-capabilities-manager.d.ts +90 -0
  157. package/dist/unpkg/dev/declarations/store/-types/q/identifier.d.ts +23 -0
  158. package/dist/unpkg/dev/declarations/store/-types/q/record-instance.d.ts +22 -0
  159. package/dist/unpkg/dev/declarations/store/-types/q/store.d.ts +31 -0
  160. package/dist/unpkg/dev/declarations/store/deprecated/-private.d.ts +223 -0
  161. package/dist/unpkg/dev/declarations/store/deprecated/store.d.ts +784 -0
  162. package/dist/unpkg/dev/declarations/store.d.ts +2 -0
  163. package/dist/unpkg/dev/declarations/types/-private.d.ts +22 -0
  164. package/dist/unpkg/dev/declarations/types/cache/aliases.d.ts +1 -0
  165. package/dist/unpkg/dev/declarations/types/cache/change.d.ts +6 -0
  166. package/dist/unpkg/dev/declarations/types/cache/mutations.d.ts +38 -0
  167. package/dist/unpkg/dev/declarations/types/cache/operations.d.ts +168 -0
  168. package/dist/unpkg/dev/declarations/types/cache/relationship.d.ts +13 -0
  169. package/dist/unpkg/dev/declarations/types/cache.d.ts +429 -0
  170. package/dist/unpkg/dev/declarations/types/graph.d.ts +47 -0
  171. package/dist/unpkg/dev/declarations/types/identifier.d.ts +86 -0
  172. package/dist/unpkg/dev/declarations/types/json/raw.d.ts +6 -0
  173. package/dist/unpkg/dev/declarations/types/params.d.ts +8 -0
  174. package/dist/unpkg/dev/declarations/types/record.d.ts +269 -0
  175. package/dist/unpkg/dev/declarations/types/request.d.ts +367 -0
  176. package/dist/unpkg/dev/declarations/types/runtime.d.ts +14 -0
  177. package/dist/unpkg/dev/declarations/types/schema/concepts.d.ts +23 -0
  178. package/dist/unpkg/dev/declarations/types/schema/fields.d.ts +2200 -0
  179. package/dist/unpkg/dev/declarations/types/schema/fields.type-test.d.ts +1 -0
  180. package/dist/unpkg/dev/declarations/types/schema/schema-service.d.ts +380 -0
  181. package/dist/unpkg/dev/declarations/types/spec/document.d.ts +67 -0
  182. package/dist/unpkg/dev/declarations/types/spec/error.d.ts +18 -0
  183. package/dist/unpkg/dev/declarations/types/spec/json-api-raw.d.ts +139 -0
  184. package/dist/unpkg/dev/declarations/types/symbols.d.ts +78 -0
  185. package/dist/unpkg/dev/declarations/types/utils.d.ts +5 -0
  186. package/dist/unpkg/dev/declarations/types.d.ts +11 -0
  187. package/dist/unpkg/dev/declarations/utils/string.d.ts +47 -0
  188. package/dist/unpkg/dev/default-cache-policy-D7_u4YRH.js +572 -0
  189. package/dist/unpkg/dev/graph/-private.js +3374 -0
  190. package/dist/unpkg/dev/index-D4si_DxB.js +11746 -0
  191. package/dist/unpkg/dev/index.js +8 -0
  192. package/dist/unpkg/dev/reactive/-private.js +1 -0
  193. package/dist/unpkg/dev/reactive.js +129 -0
  194. package/dist/unpkg/dev/request-oqoLC9rz.js +725 -0
  195. package/dist/unpkg/dev/request.js +1 -0
  196. package/dist/unpkg/dev/store/-private.js +2 -0
  197. package/dist/unpkg/dev/store.js +1 -0
  198. package/dist/unpkg/dev/symbols-sql1_mdx.js +39 -0
  199. package/dist/unpkg/dev/types/-private.js +79 -0
  200. package/dist/unpkg/dev/types/cache/aliases.js +0 -0
  201. package/dist/unpkg/dev/types/cache/change.js +0 -0
  202. package/dist/unpkg/dev/types/cache/mutations.js +0 -0
  203. package/dist/unpkg/dev/types/cache/operations.js +0 -0
  204. package/dist/unpkg/dev/types/cache/relationship.js +0 -0
  205. package/dist/unpkg/dev/types/cache.js +0 -0
  206. package/dist/unpkg/dev/types/graph.js +0 -0
  207. package/dist/unpkg/dev/types/identifier.js +63 -0
  208. package/dist/unpkg/dev/types/json/raw.js +0 -0
  209. package/dist/unpkg/dev/types/params.js +0 -0
  210. package/dist/unpkg/dev/types/record.js +191 -0
  211. package/dist/unpkg/dev/types/request.js +77 -0
  212. package/dist/unpkg/dev/types/runtime.js +34 -0
  213. package/dist/unpkg/dev/types/schema/concepts.js +0 -0
  214. package/dist/unpkg/dev/types/schema/fields.js +505 -0
  215. package/dist/unpkg/dev/types/schema/fields.type-test.js +0 -0
  216. package/dist/unpkg/dev/types/schema/schema-service.js +0 -0
  217. package/dist/unpkg/dev/types/spec/document.js +0 -0
  218. package/dist/unpkg/dev/types/spec/error.js +0 -0
  219. package/dist/unpkg/dev/types/spec/json-api-raw.js +0 -0
  220. package/dist/unpkg/dev/types/symbols.js +84 -0
  221. package/dist/unpkg/dev/types/utils.js +0 -0
  222. package/dist/unpkg/dev/types.js +0 -0
  223. package/dist/unpkg/dev/utils/string.js +92 -0
  224. package/dist/unpkg/dev-deprecated/build-config/babel-macros.js +1 -0
  225. package/dist/unpkg/dev-deprecated/build-config/canary-features.js +1 -0
  226. package/dist/unpkg/dev-deprecated/build-config/debugging.js +1 -0
  227. package/dist/unpkg/dev-deprecated/build-config/deprecations.js +1 -0
  228. package/dist/unpkg/dev-deprecated/build-config/env.js +1 -0
  229. package/dist/unpkg/dev-deprecated/build-config/macros.js +1 -0
  230. package/dist/unpkg/dev-deprecated/build-config.js +1 -0
  231. package/dist/unpkg/dev-deprecated/configure-C3x8YXzL.js +181 -0
  232. package/dist/unpkg/dev-deprecated/configure.js +1 -0
  233. package/dist/unpkg/dev-deprecated/declarations/build-config/babel-macros.d.ts +1 -0
  234. package/dist/unpkg/dev-deprecated/declarations/build-config/canary-features.d.ts +1 -0
  235. package/dist/unpkg/dev-deprecated/declarations/build-config/debugging.d.ts +1 -0
  236. package/dist/unpkg/dev-deprecated/declarations/build-config/deprecations.d.ts +1 -0
  237. package/dist/unpkg/dev-deprecated/declarations/build-config/env.d.ts +1 -0
  238. package/dist/unpkg/dev-deprecated/declarations/build-config/macros.d.ts +1 -0
  239. package/dist/unpkg/dev-deprecated/declarations/build-config.d.ts +18 -0
  240. package/dist/unpkg/dev-deprecated/declarations/configure.d.ts +7 -0
  241. package/dist/unpkg/dev-deprecated/declarations/graph/-private/-diff.d.ts +19 -0
  242. package/dist/unpkg/dev-deprecated/declarations/graph/-private/-edge-definition.d.ts +149 -0
  243. package/dist/unpkg/dev-deprecated/declarations/graph/-private/-state.d.ts +9 -0
  244. package/dist/unpkg/dev-deprecated/declarations/graph/-private/-utils.d.ts +25 -0
  245. package/dist/unpkg/dev-deprecated/declarations/graph/-private/coerce-id.d.ts +4 -0
  246. package/dist/unpkg/dev-deprecated/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +6 -0
  247. package/dist/unpkg/dev-deprecated/declarations/graph/-private/edges/collection.d.ts +39 -0
  248. package/dist/unpkg/dev-deprecated/declarations/graph/-private/edges/implicit.d.ts +43 -0
  249. package/dist/unpkg/dev-deprecated/declarations/graph/-private/edges/resource.d.ts +23 -0
  250. package/dist/unpkg/dev-deprecated/declarations/graph/-private/graph.d.ts +56 -0
  251. package/dist/unpkg/dev-deprecated/declarations/graph/-private/normalize-link.d.ts +2 -0
  252. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/add-to-related-records.d.ts +4 -0
  253. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/merge-identifier.d.ts +3 -0
  254. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/remove-from-related-records.d.ts +4 -0
  255. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/replace-related-record.d.ts +3 -0
  256. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/replace-related-records.d.ts +7 -0
  257. package/dist/unpkg/dev-deprecated/declarations/graph/-private/operations/update-relationship.d.ts +9 -0
  258. package/dist/unpkg/dev-deprecated/declarations/graph/-private.d.ts +13 -0
  259. package/dist/unpkg/dev-deprecated/declarations/index.d.ts +100 -0
  260. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/default-mode.d.ts +73 -0
  261. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/document.d.ts +142 -0
  262. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/fields/extension.d.ts +8 -0
  263. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/fields/get-field-key.d.ts +8 -0
  264. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/fields/managed-array.d.ts +18 -0
  265. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/fields/managed-object.d.ts +17 -0
  266. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/fields/many-array-manager.d.ts +19 -0
  267. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/hooks.d.ts +5 -0
  268. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/alias-field.d.ts +4 -0
  269. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/array-field.d.ts +4 -0
  270. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/attribute-field.d.ts +4 -0
  271. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/belongs-to-field.d.ts +4 -0
  272. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/collection-field.d.ts +4 -0
  273. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/derived-field.d.ts +4 -0
  274. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/generic-field.d.ts +4 -0
  275. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/has-many-field.d.ts +4 -0
  276. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/hash-field.d.ts +4 -0
  277. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/identity-field.d.ts +4 -0
  278. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/local-field.d.ts +4 -0
  279. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/object-field.d.ts +4 -0
  280. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/resource-field.d.ts +4 -0
  281. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/schema-array-field.d.ts +4 -0
  282. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/kind/schema-object-field.d.ts +4 -0
  283. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/record.d.ts +83 -0
  284. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/schema.d.ts +326 -0
  285. package/dist/unpkg/dev-deprecated/declarations/reactive/-private/symbols.d.ts +5 -0
  286. package/dist/unpkg/dev-deprecated/declarations/reactive/-private.d.ts +2 -0
  287. package/dist/unpkg/dev-deprecated/declarations/reactive.d.ts +287 -0
  288. package/dist/unpkg/dev-deprecated/declarations/request/-private/context.d.ts +39 -0
  289. package/dist/unpkg/dev-deprecated/declarations/request/-private/debug.d.ts +4 -0
  290. package/dist/unpkg/dev-deprecated/declarations/request/-private/fetch.d.ts +33 -0
  291. package/dist/unpkg/dev-deprecated/declarations/request/-private/future.d.ts +7 -0
  292. package/dist/unpkg/dev-deprecated/declarations/request/-private/manager.d.ts +158 -0
  293. package/dist/unpkg/dev-deprecated/declarations/request/-private/promise-cache.d.ts +28 -0
  294. package/dist/unpkg/dev-deprecated/declarations/request/-private/types.d.ts +234 -0
  295. package/dist/unpkg/dev-deprecated/declarations/request/-private/utils.d.ts +57 -0
  296. package/dist/unpkg/dev-deprecated/declarations/request.d.ts +52 -0
  297. package/dist/unpkg/dev-deprecated/declarations/store/-private/cache-handler/handler.d.ts +56 -0
  298. package/dist/unpkg/dev-deprecated/declarations/store/-private/cache-handler/types.d.ts +98 -0
  299. package/dist/unpkg/dev-deprecated/declarations/store/-private/cache-handler/utils.d.ts +31 -0
  300. package/dist/unpkg/dev-deprecated/declarations/store/-private/caches/instance-cache.d.ts +58 -0
  301. package/dist/unpkg/dev-deprecated/declarations/store/-private/caches/resource-utils.d.ts +9 -0
  302. package/dist/unpkg/dev-deprecated/declarations/store/-private/debug/utils.d.ts +7 -0
  303. package/dist/unpkg/dev-deprecated/declarations/store/-private/default-cache-policy.d.ts +387 -0
  304. package/dist/unpkg/dev-deprecated/declarations/store/-private/managers/cache-capabilities-manager.d.ts +34 -0
  305. package/dist/unpkg/dev-deprecated/declarations/store/-private/managers/cache-key-manager.d.ts +304 -0
  306. package/dist/unpkg/dev-deprecated/declarations/store/-private/managers/cache-manager.d.ts +380 -0
  307. package/dist/unpkg/dev-deprecated/declarations/store/-private/managers/notification-manager.d.ts +83 -0
  308. package/dist/unpkg/dev-deprecated/declarations/store/-private/managers/record-array-manager.d.ts +100 -0
  309. package/dist/unpkg/dev-deprecated/declarations/store/-private/network/request-cache.d.ts +103 -0
  310. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
  311. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/promise-state.d.ts +264 -0
  312. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +138 -0
  313. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +154 -0
  314. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +56 -0
  315. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/request-state.d.ts +372 -0
  316. package/dist/unpkg/dev-deprecated/declarations/store/-private/new-core-tmp/request-subscription.d.ts +177 -0
  317. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/-utils.d.ts +80 -0
  318. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/legacy-live-array.d.ts +81 -0
  319. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/legacy-many-array.d.ts +133 -0
  320. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/legacy-query.d.ts +81 -0
  321. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +3 -0
  322. package/dist/unpkg/dev-deprecated/declarations/store/-private/record-arrays/resource-array.d.ts +67 -0
  323. package/dist/unpkg/dev-deprecated/declarations/store/-private/store-service.d.ts +874 -0
  324. package/dist/unpkg/dev-deprecated/declarations/store/-private/utils/coerce-id.d.ts +4 -0
  325. package/dist/unpkg/dev-deprecated/declarations/store/-private/utils/construct-resource.d.ts +6 -0
  326. package/dist/unpkg/dev-deprecated/declarations/store/-private/utils/is-non-empty-string.d.ts +1 -0
  327. package/dist/unpkg/dev-deprecated/declarations/store/-private/utils/normalize-model-name.d.ts +1 -0
  328. package/dist/unpkg/dev-deprecated/declarations/store/-private/utils/uuid-polyfill.d.ts +1 -0
  329. package/dist/unpkg/dev-deprecated/declarations/store/-private.d.ts +29 -0
  330. package/dist/unpkg/dev-deprecated/declarations/store/-types/q/cache-capabilities-manager.d.ts +90 -0
  331. package/dist/unpkg/dev-deprecated/declarations/store/-types/q/identifier.d.ts +23 -0
  332. package/dist/unpkg/dev-deprecated/declarations/store/-types/q/record-instance.d.ts +22 -0
  333. package/dist/unpkg/dev-deprecated/declarations/store/-types/q/store.d.ts +31 -0
  334. package/dist/unpkg/dev-deprecated/declarations/store/deprecated/-private.d.ts +223 -0
  335. package/dist/unpkg/dev-deprecated/declarations/store/deprecated/store.d.ts +784 -0
  336. package/dist/unpkg/dev-deprecated/declarations/store.d.ts +2 -0
  337. package/dist/unpkg/dev-deprecated/declarations/types/-private.d.ts +22 -0
  338. package/dist/unpkg/dev-deprecated/declarations/types/cache/aliases.d.ts +1 -0
  339. package/dist/unpkg/dev-deprecated/declarations/types/cache/change.d.ts +6 -0
  340. package/dist/unpkg/dev-deprecated/declarations/types/cache/mutations.d.ts +38 -0
  341. package/dist/unpkg/dev-deprecated/declarations/types/cache/operations.d.ts +168 -0
  342. package/dist/unpkg/dev-deprecated/declarations/types/cache/relationship.d.ts +13 -0
  343. package/dist/unpkg/dev-deprecated/declarations/types/cache.d.ts +429 -0
  344. package/dist/unpkg/dev-deprecated/declarations/types/graph.d.ts +47 -0
  345. package/dist/unpkg/dev-deprecated/declarations/types/identifier.d.ts +86 -0
  346. package/dist/unpkg/dev-deprecated/declarations/types/json/raw.d.ts +6 -0
  347. package/dist/unpkg/dev-deprecated/declarations/types/params.d.ts +8 -0
  348. package/dist/unpkg/dev-deprecated/declarations/types/record.d.ts +269 -0
  349. package/dist/unpkg/dev-deprecated/declarations/types/request.d.ts +367 -0
  350. package/dist/unpkg/dev-deprecated/declarations/types/runtime.d.ts +14 -0
  351. package/dist/unpkg/dev-deprecated/declarations/types/schema/concepts.d.ts +23 -0
  352. package/dist/unpkg/dev-deprecated/declarations/types/schema/fields.d.ts +2200 -0
  353. package/dist/unpkg/dev-deprecated/declarations/types/schema/fields.type-test.d.ts +1 -0
  354. package/dist/unpkg/dev-deprecated/declarations/types/schema/schema-service.d.ts +380 -0
  355. package/dist/unpkg/dev-deprecated/declarations/types/spec/document.d.ts +67 -0
  356. package/dist/unpkg/dev-deprecated/declarations/types/spec/error.d.ts +18 -0
  357. package/dist/unpkg/dev-deprecated/declarations/types/spec/json-api-raw.d.ts +139 -0
  358. package/dist/unpkg/dev-deprecated/declarations/types/symbols.d.ts +78 -0
  359. package/dist/unpkg/dev-deprecated/declarations/types/utils.d.ts +5 -0
  360. package/dist/unpkg/dev-deprecated/declarations/types.d.ts +11 -0
  361. package/dist/unpkg/dev-deprecated/declarations/utils/string.d.ts +47 -0
  362. package/dist/unpkg/dev-deprecated/default-cache-policy-D7_u4YRH.js +572 -0
  363. package/dist/unpkg/dev-deprecated/graph/-private.js +3374 -0
  364. package/dist/unpkg/dev-deprecated/index-D4si_DxB.js +11746 -0
  365. package/dist/unpkg/dev-deprecated/index.js +8 -0
  366. package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -0
  367. package/dist/unpkg/dev-deprecated/reactive.js +129 -0
  368. package/dist/unpkg/dev-deprecated/request-oqoLC9rz.js +725 -0
  369. package/dist/unpkg/dev-deprecated/request.js +1 -0
  370. package/dist/unpkg/dev-deprecated/store/-private.js +2 -0
  371. package/dist/unpkg/dev-deprecated/store.js +1 -0
  372. package/dist/unpkg/dev-deprecated/symbols-sql1_mdx.js +39 -0
  373. package/dist/unpkg/dev-deprecated/types/-private.js +79 -0
  374. package/dist/unpkg/dev-deprecated/types/cache/aliases.js +0 -0
  375. package/dist/unpkg/dev-deprecated/types/cache/change.js +0 -0
  376. package/dist/unpkg/dev-deprecated/types/cache/mutations.js +0 -0
  377. package/dist/unpkg/dev-deprecated/types/cache/operations.js +0 -0
  378. package/dist/unpkg/dev-deprecated/types/cache/relationship.js +0 -0
  379. package/dist/unpkg/dev-deprecated/types/cache.js +0 -0
  380. package/dist/unpkg/dev-deprecated/types/graph.js +0 -0
  381. package/dist/unpkg/dev-deprecated/types/identifier.js +63 -0
  382. package/dist/unpkg/dev-deprecated/types/json/raw.js +0 -0
  383. package/dist/unpkg/dev-deprecated/types/params.js +0 -0
  384. package/dist/unpkg/dev-deprecated/types/record.js +191 -0
  385. package/dist/unpkg/dev-deprecated/types/request.js +77 -0
  386. package/dist/unpkg/dev-deprecated/types/runtime.js +34 -0
  387. package/dist/unpkg/dev-deprecated/types/schema/concepts.js +0 -0
  388. package/dist/unpkg/dev-deprecated/types/schema/fields.js +505 -0
  389. package/dist/unpkg/dev-deprecated/types/schema/fields.type-test.js +0 -0
  390. package/dist/unpkg/dev-deprecated/types/schema/schema-service.js +0 -0
  391. package/dist/unpkg/dev-deprecated/types/spec/document.js +0 -0
  392. package/dist/unpkg/dev-deprecated/types/spec/error.js +0 -0
  393. package/dist/unpkg/dev-deprecated/types/spec/json-api-raw.js +0 -0
  394. package/dist/unpkg/dev-deprecated/types/symbols.js +84 -0
  395. package/dist/unpkg/dev-deprecated/types/utils.js +0 -0
  396. package/dist/unpkg/dev-deprecated/types.js +0 -0
  397. package/dist/unpkg/dev-deprecated/utils/string.js +92 -0
  398. package/dist/unpkg/prod/build-config/babel-macros.js +1 -0
  399. package/dist/unpkg/prod/build-config/canary-features.js +1 -0
  400. package/dist/unpkg/prod/build-config/debugging.js +1 -0
  401. package/dist/unpkg/prod/build-config/deprecations.js +1 -0
  402. package/dist/unpkg/prod/build-config/env.js +1 -0
  403. package/dist/unpkg/prod/build-config/macros.js +1 -0
  404. package/dist/unpkg/prod/build-config.js +1 -0
  405. package/dist/unpkg/prod/configure-C3x8YXzL.js +181 -0
  406. package/dist/unpkg/prod/configure.js +1 -0
  407. package/dist/unpkg/prod/declarations/build-config/babel-macros.d.ts +1 -0
  408. package/dist/unpkg/prod/declarations/build-config/canary-features.d.ts +1 -0
  409. package/dist/unpkg/prod/declarations/build-config/debugging.d.ts +1 -0
  410. package/dist/unpkg/prod/declarations/build-config/deprecations.d.ts +1 -0
  411. package/dist/unpkg/prod/declarations/build-config/env.d.ts +1 -0
  412. package/dist/unpkg/prod/declarations/build-config/macros.d.ts +1 -0
  413. package/dist/unpkg/prod/declarations/build-config.d.ts +18 -0
  414. package/dist/unpkg/prod/declarations/configure.d.ts +7 -0
  415. package/dist/unpkg/prod/declarations/graph/-private/-diff.d.ts +19 -0
  416. package/dist/unpkg/prod/declarations/graph/-private/-edge-definition.d.ts +149 -0
  417. package/dist/unpkg/prod/declarations/graph/-private/-state.d.ts +9 -0
  418. package/dist/unpkg/prod/declarations/graph/-private/-utils.d.ts +25 -0
  419. package/dist/unpkg/prod/declarations/graph/-private/coerce-id.d.ts +4 -0
  420. package/dist/unpkg/prod/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +6 -0
  421. package/dist/unpkg/prod/declarations/graph/-private/edges/collection.d.ts +39 -0
  422. package/dist/unpkg/prod/declarations/graph/-private/edges/implicit.d.ts +43 -0
  423. package/dist/unpkg/prod/declarations/graph/-private/edges/resource.d.ts +23 -0
  424. package/dist/unpkg/prod/declarations/graph/-private/graph.d.ts +56 -0
  425. package/dist/unpkg/prod/declarations/graph/-private/normalize-link.d.ts +2 -0
  426. package/dist/unpkg/prod/declarations/graph/-private/operations/add-to-related-records.d.ts +4 -0
  427. package/dist/unpkg/prod/declarations/graph/-private/operations/merge-identifier.d.ts +3 -0
  428. package/dist/unpkg/prod/declarations/graph/-private/operations/remove-from-related-records.d.ts +4 -0
  429. package/dist/unpkg/prod/declarations/graph/-private/operations/replace-related-record.d.ts +3 -0
  430. package/dist/unpkg/prod/declarations/graph/-private/operations/replace-related-records.d.ts +7 -0
  431. package/dist/unpkg/prod/declarations/graph/-private/operations/update-relationship.d.ts +9 -0
  432. package/dist/unpkg/prod/declarations/graph/-private.d.ts +13 -0
  433. package/dist/unpkg/prod/declarations/index.d.ts +100 -0
  434. package/dist/unpkg/prod/declarations/reactive/-private/default-mode.d.ts +73 -0
  435. package/dist/unpkg/prod/declarations/reactive/-private/document.d.ts +142 -0
  436. package/dist/unpkg/prod/declarations/reactive/-private/fields/extension.d.ts +8 -0
  437. package/dist/unpkg/prod/declarations/reactive/-private/fields/get-field-key.d.ts +8 -0
  438. package/dist/unpkg/prod/declarations/reactive/-private/fields/managed-array.d.ts +18 -0
  439. package/dist/unpkg/prod/declarations/reactive/-private/fields/managed-object.d.ts +17 -0
  440. package/dist/unpkg/prod/declarations/reactive/-private/fields/many-array-manager.d.ts +19 -0
  441. package/dist/unpkg/prod/declarations/reactive/-private/hooks.d.ts +5 -0
  442. package/dist/unpkg/prod/declarations/reactive/-private/kind/alias-field.d.ts +4 -0
  443. package/dist/unpkg/prod/declarations/reactive/-private/kind/array-field.d.ts +4 -0
  444. package/dist/unpkg/prod/declarations/reactive/-private/kind/attribute-field.d.ts +4 -0
  445. package/dist/unpkg/prod/declarations/reactive/-private/kind/belongs-to-field.d.ts +4 -0
  446. package/dist/unpkg/prod/declarations/reactive/-private/kind/collection-field.d.ts +4 -0
  447. package/dist/unpkg/prod/declarations/reactive/-private/kind/derived-field.d.ts +4 -0
  448. package/dist/unpkg/prod/declarations/reactive/-private/kind/generic-field.d.ts +4 -0
  449. package/dist/unpkg/prod/declarations/reactive/-private/kind/has-many-field.d.ts +4 -0
  450. package/dist/unpkg/prod/declarations/reactive/-private/kind/hash-field.d.ts +4 -0
  451. package/dist/unpkg/prod/declarations/reactive/-private/kind/identity-field.d.ts +4 -0
  452. package/dist/unpkg/prod/declarations/reactive/-private/kind/local-field.d.ts +4 -0
  453. package/dist/unpkg/prod/declarations/reactive/-private/kind/object-field.d.ts +4 -0
  454. package/dist/unpkg/prod/declarations/reactive/-private/kind/resource-field.d.ts +4 -0
  455. package/dist/unpkg/prod/declarations/reactive/-private/kind/schema-array-field.d.ts +4 -0
  456. package/dist/unpkg/prod/declarations/reactive/-private/kind/schema-object-field.d.ts +4 -0
  457. package/dist/unpkg/prod/declarations/reactive/-private/record.d.ts +83 -0
  458. package/dist/unpkg/prod/declarations/reactive/-private/schema.d.ts +326 -0
  459. package/dist/unpkg/prod/declarations/reactive/-private/symbols.d.ts +5 -0
  460. package/dist/unpkg/prod/declarations/reactive/-private.d.ts +2 -0
  461. package/dist/unpkg/prod/declarations/reactive.d.ts +287 -0
  462. package/dist/unpkg/prod/declarations/request/-private/context.d.ts +39 -0
  463. package/dist/unpkg/prod/declarations/request/-private/debug.d.ts +4 -0
  464. package/dist/unpkg/prod/declarations/request/-private/fetch.d.ts +33 -0
  465. package/dist/unpkg/prod/declarations/request/-private/future.d.ts +7 -0
  466. package/dist/unpkg/prod/declarations/request/-private/manager.d.ts +158 -0
  467. package/dist/unpkg/prod/declarations/request/-private/promise-cache.d.ts +28 -0
  468. package/dist/unpkg/prod/declarations/request/-private/types.d.ts +234 -0
  469. package/dist/unpkg/prod/declarations/request/-private/utils.d.ts +57 -0
  470. package/dist/unpkg/prod/declarations/request.d.ts +52 -0
  471. package/dist/unpkg/prod/declarations/store/-private/cache-handler/handler.d.ts +56 -0
  472. package/dist/unpkg/prod/declarations/store/-private/cache-handler/types.d.ts +98 -0
  473. package/dist/unpkg/prod/declarations/store/-private/cache-handler/utils.d.ts +31 -0
  474. package/dist/unpkg/prod/declarations/store/-private/caches/instance-cache.d.ts +58 -0
  475. package/dist/unpkg/prod/declarations/store/-private/caches/resource-utils.d.ts +9 -0
  476. package/dist/unpkg/prod/declarations/store/-private/debug/utils.d.ts +7 -0
  477. package/dist/unpkg/prod/declarations/store/-private/default-cache-policy.d.ts +387 -0
  478. package/dist/unpkg/prod/declarations/store/-private/managers/cache-capabilities-manager.d.ts +34 -0
  479. package/dist/unpkg/prod/declarations/store/-private/managers/cache-key-manager.d.ts +304 -0
  480. package/dist/unpkg/prod/declarations/store/-private/managers/cache-manager.d.ts +380 -0
  481. package/dist/unpkg/prod/declarations/store/-private/managers/notification-manager.d.ts +83 -0
  482. package/dist/unpkg/prod/declarations/store/-private/managers/record-array-manager.d.ts +100 -0
  483. package/dist/unpkg/prod/declarations/store/-private/network/request-cache.d.ts +103 -0
  484. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
  485. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/promise-state.d.ts +264 -0
  486. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +138 -0
  487. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +154 -0
  488. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +56 -0
  489. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/request-state.d.ts +372 -0
  490. package/dist/unpkg/prod/declarations/store/-private/new-core-tmp/request-subscription.d.ts +177 -0
  491. package/dist/unpkg/prod/declarations/store/-private/record-arrays/-utils.d.ts +80 -0
  492. package/dist/unpkg/prod/declarations/store/-private/record-arrays/legacy-live-array.d.ts +81 -0
  493. package/dist/unpkg/prod/declarations/store/-private/record-arrays/legacy-many-array.d.ts +133 -0
  494. package/dist/unpkg/prod/declarations/store/-private/record-arrays/legacy-query.d.ts +81 -0
  495. package/dist/unpkg/prod/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +3 -0
  496. package/dist/unpkg/prod/declarations/store/-private/record-arrays/resource-array.d.ts +67 -0
  497. package/dist/unpkg/prod/declarations/store/-private/store-service.d.ts +874 -0
  498. package/dist/unpkg/prod/declarations/store/-private/utils/coerce-id.d.ts +4 -0
  499. package/dist/unpkg/prod/declarations/store/-private/utils/construct-resource.d.ts +6 -0
  500. package/dist/unpkg/prod/declarations/store/-private/utils/is-non-empty-string.d.ts +1 -0
  501. package/dist/unpkg/prod/declarations/store/-private/utils/normalize-model-name.d.ts +1 -0
  502. package/dist/unpkg/prod/declarations/store/-private/utils/uuid-polyfill.d.ts +1 -0
  503. package/dist/unpkg/prod/declarations/store/-private.d.ts +29 -0
  504. package/dist/unpkg/prod/declarations/store/-types/q/cache-capabilities-manager.d.ts +90 -0
  505. package/dist/unpkg/prod/declarations/store/-types/q/identifier.d.ts +23 -0
  506. package/dist/unpkg/prod/declarations/store/-types/q/record-instance.d.ts +22 -0
  507. package/dist/unpkg/prod/declarations/store/-types/q/store.d.ts +31 -0
  508. package/dist/unpkg/prod/declarations/store/deprecated/-private.d.ts +223 -0
  509. package/dist/unpkg/prod/declarations/store/deprecated/store.d.ts +784 -0
  510. package/dist/unpkg/prod/declarations/store.d.ts +2 -0
  511. package/dist/unpkg/prod/declarations/types/-private.d.ts +22 -0
  512. package/dist/unpkg/prod/declarations/types/cache/aliases.d.ts +1 -0
  513. package/dist/unpkg/prod/declarations/types/cache/change.d.ts +6 -0
  514. package/dist/unpkg/prod/declarations/types/cache/mutations.d.ts +38 -0
  515. package/dist/unpkg/prod/declarations/types/cache/operations.d.ts +168 -0
  516. package/dist/unpkg/prod/declarations/types/cache/relationship.d.ts +13 -0
  517. package/dist/unpkg/prod/declarations/types/cache.d.ts +429 -0
  518. package/dist/unpkg/prod/declarations/types/graph.d.ts +47 -0
  519. package/dist/unpkg/prod/declarations/types/identifier.d.ts +86 -0
  520. package/dist/unpkg/prod/declarations/types/json/raw.d.ts +6 -0
  521. package/dist/unpkg/prod/declarations/types/params.d.ts +8 -0
  522. package/dist/unpkg/prod/declarations/types/record.d.ts +269 -0
  523. package/dist/unpkg/prod/declarations/types/request.d.ts +367 -0
  524. package/dist/unpkg/prod/declarations/types/runtime.d.ts +14 -0
  525. package/dist/unpkg/prod/declarations/types/schema/concepts.d.ts +23 -0
  526. package/dist/unpkg/prod/declarations/types/schema/fields.d.ts +2200 -0
  527. package/dist/unpkg/prod/declarations/types/schema/fields.type-test.d.ts +1 -0
  528. package/dist/unpkg/prod/declarations/types/schema/schema-service.d.ts +380 -0
  529. package/dist/unpkg/prod/declarations/types/spec/document.d.ts +67 -0
  530. package/dist/unpkg/prod/declarations/types/spec/error.d.ts +18 -0
  531. package/dist/unpkg/prod/declarations/types/spec/json-api-raw.d.ts +139 -0
  532. package/dist/unpkg/prod/declarations/types/symbols.d.ts +78 -0
  533. package/dist/unpkg/prod/declarations/types/utils.d.ts +5 -0
  534. package/dist/unpkg/prod/declarations/types.d.ts +11 -0
  535. package/dist/unpkg/prod/declarations/utils/string.d.ts +47 -0
  536. package/dist/unpkg/prod/default-cache-policy-D7_u4YRH.js +572 -0
  537. package/dist/unpkg/prod/graph/-private.js +3374 -0
  538. package/dist/unpkg/prod/index-D4si_DxB.js +11746 -0
  539. package/dist/unpkg/prod/index.js +8 -0
  540. package/dist/unpkg/prod/reactive/-private.js +1 -0
  541. package/dist/unpkg/prod/reactive.js +129 -0
  542. package/dist/unpkg/prod/request-oqoLC9rz.js +725 -0
  543. package/dist/unpkg/prod/request.js +1 -0
  544. package/dist/unpkg/prod/store/-private.js +2 -0
  545. package/dist/unpkg/prod/store.js +1 -0
  546. package/dist/unpkg/prod/symbols-sql1_mdx.js +39 -0
  547. package/dist/unpkg/prod/types/-private.js +79 -0
  548. package/dist/unpkg/prod/types/cache/aliases.js +0 -0
  549. package/dist/unpkg/prod/types/cache/change.js +0 -0
  550. package/dist/unpkg/prod/types/cache/mutations.js +0 -0
  551. package/dist/unpkg/prod/types/cache/operations.js +0 -0
  552. package/dist/unpkg/prod/types/cache/relationship.js +0 -0
  553. package/dist/unpkg/prod/types/cache.js +0 -0
  554. package/dist/unpkg/prod/types/graph.js +0 -0
  555. package/dist/unpkg/prod/types/identifier.js +63 -0
  556. package/dist/unpkg/prod/types/json/raw.js +0 -0
  557. package/dist/unpkg/prod/types/params.js +0 -0
  558. package/dist/unpkg/prod/types/record.js +191 -0
  559. package/dist/unpkg/prod/types/request.js +77 -0
  560. package/dist/unpkg/prod/types/runtime.js +34 -0
  561. package/dist/unpkg/prod/types/schema/concepts.js +0 -0
  562. package/dist/unpkg/prod/types/schema/fields.js +505 -0
  563. package/dist/unpkg/prod/types/schema/fields.type-test.js +0 -0
  564. package/dist/unpkg/prod/types/schema/schema-service.js +0 -0
  565. package/dist/unpkg/prod/types/spec/document.js +0 -0
  566. package/dist/unpkg/prod/types/spec/error.js +0 -0
  567. package/dist/unpkg/prod/types/spec/json-api-raw.js +0 -0
  568. package/dist/unpkg/prod/types/symbols.js +84 -0
  569. package/dist/unpkg/prod/types/utils.js +0 -0
  570. package/dist/unpkg/prod/types.js +0 -0
  571. package/dist/unpkg/prod/utils/string.js +92 -0
  572. package/dist/unpkg/prod-deprecated/build-config/babel-macros.js +1 -0
  573. package/dist/unpkg/prod-deprecated/build-config/canary-features.js +1 -0
  574. package/dist/unpkg/prod-deprecated/build-config/debugging.js +1 -0
  575. package/dist/unpkg/prod-deprecated/build-config/deprecations.js +1 -0
  576. package/dist/unpkg/prod-deprecated/build-config/env.js +1 -0
  577. package/dist/unpkg/prod-deprecated/build-config/macros.js +1 -0
  578. package/dist/unpkg/prod-deprecated/build-config.js +1 -0
  579. package/dist/unpkg/prod-deprecated/configure-C3x8YXzL.js +181 -0
  580. package/dist/unpkg/prod-deprecated/configure.js +1 -0
  581. package/dist/unpkg/prod-deprecated/declarations/build-config/babel-macros.d.ts +1 -0
  582. package/dist/unpkg/prod-deprecated/declarations/build-config/canary-features.d.ts +1 -0
  583. package/dist/unpkg/prod-deprecated/declarations/build-config/debugging.d.ts +1 -0
  584. package/dist/unpkg/prod-deprecated/declarations/build-config/deprecations.d.ts +1 -0
  585. package/dist/unpkg/prod-deprecated/declarations/build-config/env.d.ts +1 -0
  586. package/dist/unpkg/prod-deprecated/declarations/build-config/macros.d.ts +1 -0
  587. package/dist/unpkg/prod-deprecated/declarations/build-config.d.ts +18 -0
  588. package/dist/unpkg/prod-deprecated/declarations/configure.d.ts +7 -0
  589. package/dist/unpkg/prod-deprecated/declarations/graph/-private/-diff.d.ts +19 -0
  590. package/dist/unpkg/prod-deprecated/declarations/graph/-private/-edge-definition.d.ts +149 -0
  591. package/dist/unpkg/prod-deprecated/declarations/graph/-private/-state.d.ts +9 -0
  592. package/dist/unpkg/prod-deprecated/declarations/graph/-private/-utils.d.ts +25 -0
  593. package/dist/unpkg/prod-deprecated/declarations/graph/-private/coerce-id.d.ts +4 -0
  594. package/dist/unpkg/prod-deprecated/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +6 -0
  595. package/dist/unpkg/prod-deprecated/declarations/graph/-private/edges/collection.d.ts +39 -0
  596. package/dist/unpkg/prod-deprecated/declarations/graph/-private/edges/implicit.d.ts +43 -0
  597. package/dist/unpkg/prod-deprecated/declarations/graph/-private/edges/resource.d.ts +23 -0
  598. package/dist/unpkg/prod-deprecated/declarations/graph/-private/graph.d.ts +56 -0
  599. package/dist/unpkg/prod-deprecated/declarations/graph/-private/normalize-link.d.ts +2 -0
  600. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/add-to-related-records.d.ts +4 -0
  601. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/merge-identifier.d.ts +3 -0
  602. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/remove-from-related-records.d.ts +4 -0
  603. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/replace-related-record.d.ts +3 -0
  604. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/replace-related-records.d.ts +7 -0
  605. package/dist/unpkg/prod-deprecated/declarations/graph/-private/operations/update-relationship.d.ts +9 -0
  606. package/dist/unpkg/prod-deprecated/declarations/graph/-private.d.ts +13 -0
  607. package/dist/unpkg/prod-deprecated/declarations/index.d.ts +100 -0
  608. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/default-mode.d.ts +73 -0
  609. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/document.d.ts +142 -0
  610. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/fields/extension.d.ts +8 -0
  611. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/fields/get-field-key.d.ts +8 -0
  612. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/fields/managed-array.d.ts +18 -0
  613. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/fields/managed-object.d.ts +17 -0
  614. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/fields/many-array-manager.d.ts +19 -0
  615. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/hooks.d.ts +5 -0
  616. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/alias-field.d.ts +4 -0
  617. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/array-field.d.ts +4 -0
  618. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/attribute-field.d.ts +4 -0
  619. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/belongs-to-field.d.ts +4 -0
  620. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/collection-field.d.ts +4 -0
  621. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/derived-field.d.ts +4 -0
  622. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/generic-field.d.ts +4 -0
  623. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/has-many-field.d.ts +4 -0
  624. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/hash-field.d.ts +4 -0
  625. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/identity-field.d.ts +4 -0
  626. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/local-field.d.ts +4 -0
  627. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/object-field.d.ts +4 -0
  628. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/resource-field.d.ts +4 -0
  629. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/schema-array-field.d.ts +4 -0
  630. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/kind/schema-object-field.d.ts +4 -0
  631. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/record.d.ts +83 -0
  632. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/schema.d.ts +326 -0
  633. package/dist/unpkg/prod-deprecated/declarations/reactive/-private/symbols.d.ts +5 -0
  634. package/dist/unpkg/prod-deprecated/declarations/reactive/-private.d.ts +2 -0
  635. package/dist/unpkg/prod-deprecated/declarations/reactive.d.ts +287 -0
  636. package/dist/unpkg/prod-deprecated/declarations/request/-private/context.d.ts +39 -0
  637. package/dist/unpkg/prod-deprecated/declarations/request/-private/debug.d.ts +4 -0
  638. package/dist/unpkg/prod-deprecated/declarations/request/-private/fetch.d.ts +33 -0
  639. package/dist/unpkg/prod-deprecated/declarations/request/-private/future.d.ts +7 -0
  640. package/dist/unpkg/prod-deprecated/declarations/request/-private/manager.d.ts +158 -0
  641. package/dist/unpkg/prod-deprecated/declarations/request/-private/promise-cache.d.ts +28 -0
  642. package/dist/unpkg/prod-deprecated/declarations/request/-private/types.d.ts +234 -0
  643. package/dist/unpkg/prod-deprecated/declarations/request/-private/utils.d.ts +57 -0
  644. package/dist/unpkg/prod-deprecated/declarations/request.d.ts +52 -0
  645. package/dist/unpkg/prod-deprecated/declarations/store/-private/cache-handler/handler.d.ts +56 -0
  646. package/dist/unpkg/prod-deprecated/declarations/store/-private/cache-handler/types.d.ts +98 -0
  647. package/dist/unpkg/prod-deprecated/declarations/store/-private/cache-handler/utils.d.ts +31 -0
  648. package/dist/unpkg/prod-deprecated/declarations/store/-private/caches/instance-cache.d.ts +58 -0
  649. package/dist/unpkg/prod-deprecated/declarations/store/-private/caches/resource-utils.d.ts +9 -0
  650. package/dist/unpkg/prod-deprecated/declarations/store/-private/debug/utils.d.ts +7 -0
  651. package/dist/unpkg/prod-deprecated/declarations/store/-private/default-cache-policy.d.ts +387 -0
  652. package/dist/unpkg/prod-deprecated/declarations/store/-private/managers/cache-capabilities-manager.d.ts +34 -0
  653. package/dist/unpkg/prod-deprecated/declarations/store/-private/managers/cache-key-manager.d.ts +304 -0
  654. package/dist/unpkg/prod-deprecated/declarations/store/-private/managers/cache-manager.d.ts +380 -0
  655. package/dist/unpkg/prod-deprecated/declarations/store/-private/managers/notification-manager.d.ts +83 -0
  656. package/dist/unpkg/prod-deprecated/declarations/store/-private/managers/record-array-manager.d.ts +100 -0
  657. package/dist/unpkg/prod-deprecated/declarations/store/-private/network/request-cache.d.ts +103 -0
  658. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
  659. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/promise-state.d.ts +264 -0
  660. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +138 -0
  661. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +154 -0
  662. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +56 -0
  663. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/request-state.d.ts +372 -0
  664. package/dist/unpkg/prod-deprecated/declarations/store/-private/new-core-tmp/request-subscription.d.ts +177 -0
  665. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/-utils.d.ts +80 -0
  666. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/legacy-live-array.d.ts +81 -0
  667. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/legacy-many-array.d.ts +133 -0
  668. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/legacy-query.d.ts +81 -0
  669. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +3 -0
  670. package/dist/unpkg/prod-deprecated/declarations/store/-private/record-arrays/resource-array.d.ts +67 -0
  671. package/dist/unpkg/prod-deprecated/declarations/store/-private/store-service.d.ts +874 -0
  672. package/dist/unpkg/prod-deprecated/declarations/store/-private/utils/coerce-id.d.ts +4 -0
  673. package/dist/unpkg/prod-deprecated/declarations/store/-private/utils/construct-resource.d.ts +6 -0
  674. package/dist/unpkg/prod-deprecated/declarations/store/-private/utils/is-non-empty-string.d.ts +1 -0
  675. package/dist/unpkg/prod-deprecated/declarations/store/-private/utils/normalize-model-name.d.ts +1 -0
  676. package/dist/unpkg/prod-deprecated/declarations/store/-private/utils/uuid-polyfill.d.ts +1 -0
  677. package/dist/unpkg/prod-deprecated/declarations/store/-private.d.ts +29 -0
  678. package/dist/unpkg/prod-deprecated/declarations/store/-types/q/cache-capabilities-manager.d.ts +90 -0
  679. package/dist/unpkg/prod-deprecated/declarations/store/-types/q/identifier.d.ts +23 -0
  680. package/dist/unpkg/prod-deprecated/declarations/store/-types/q/record-instance.d.ts +22 -0
  681. package/dist/unpkg/prod-deprecated/declarations/store/-types/q/store.d.ts +31 -0
  682. package/dist/unpkg/prod-deprecated/declarations/store/deprecated/-private.d.ts +223 -0
  683. package/dist/unpkg/prod-deprecated/declarations/store/deprecated/store.d.ts +784 -0
  684. package/dist/unpkg/prod-deprecated/declarations/store.d.ts +2 -0
  685. package/dist/unpkg/prod-deprecated/declarations/types/-private.d.ts +22 -0
  686. package/dist/unpkg/prod-deprecated/declarations/types/cache/aliases.d.ts +1 -0
  687. package/dist/unpkg/prod-deprecated/declarations/types/cache/change.d.ts +6 -0
  688. package/dist/unpkg/prod-deprecated/declarations/types/cache/mutations.d.ts +38 -0
  689. package/dist/unpkg/prod-deprecated/declarations/types/cache/operations.d.ts +168 -0
  690. package/dist/unpkg/prod-deprecated/declarations/types/cache/relationship.d.ts +13 -0
  691. package/dist/unpkg/prod-deprecated/declarations/types/cache.d.ts +429 -0
  692. package/dist/unpkg/prod-deprecated/declarations/types/graph.d.ts +47 -0
  693. package/dist/unpkg/prod-deprecated/declarations/types/identifier.d.ts +86 -0
  694. package/dist/unpkg/prod-deprecated/declarations/types/json/raw.d.ts +6 -0
  695. package/dist/unpkg/prod-deprecated/declarations/types/params.d.ts +8 -0
  696. package/dist/unpkg/prod-deprecated/declarations/types/record.d.ts +269 -0
  697. package/dist/unpkg/prod-deprecated/declarations/types/request.d.ts +367 -0
  698. package/dist/unpkg/prod-deprecated/declarations/types/runtime.d.ts +14 -0
  699. package/dist/unpkg/prod-deprecated/declarations/types/schema/concepts.d.ts +23 -0
  700. package/dist/unpkg/prod-deprecated/declarations/types/schema/fields.d.ts +2200 -0
  701. package/dist/unpkg/prod-deprecated/declarations/types/schema/fields.type-test.d.ts +1 -0
  702. package/dist/unpkg/prod-deprecated/declarations/types/schema/schema-service.d.ts +380 -0
  703. package/dist/unpkg/prod-deprecated/declarations/types/spec/document.d.ts +67 -0
  704. package/dist/unpkg/prod-deprecated/declarations/types/spec/error.d.ts +18 -0
  705. package/dist/unpkg/prod-deprecated/declarations/types/spec/json-api-raw.d.ts +139 -0
  706. package/dist/unpkg/prod-deprecated/declarations/types/symbols.d.ts +78 -0
  707. package/dist/unpkg/prod-deprecated/declarations/types/utils.d.ts +5 -0
  708. package/dist/unpkg/prod-deprecated/declarations/types.d.ts +11 -0
  709. package/dist/unpkg/prod-deprecated/declarations/utils/string.d.ts +47 -0
  710. package/dist/unpkg/prod-deprecated/default-cache-policy-D7_u4YRH.js +572 -0
  711. package/dist/unpkg/prod-deprecated/graph/-private.js +3374 -0
  712. package/dist/unpkg/prod-deprecated/index-D4si_DxB.js +11746 -0
  713. package/dist/unpkg/prod-deprecated/index.js +8 -0
  714. package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -0
  715. package/dist/unpkg/prod-deprecated/reactive.js +129 -0
  716. package/dist/unpkg/prod-deprecated/request-oqoLC9rz.js +725 -0
  717. package/dist/unpkg/prod-deprecated/request.js +1 -0
  718. package/dist/unpkg/prod-deprecated/store/-private.js +2 -0
  719. package/dist/unpkg/prod-deprecated/store.js +1 -0
  720. package/dist/unpkg/prod-deprecated/symbols-sql1_mdx.js +39 -0
  721. package/dist/unpkg/prod-deprecated/types/-private.js +79 -0
  722. package/dist/unpkg/prod-deprecated/types/cache/aliases.js +0 -0
  723. package/dist/unpkg/prod-deprecated/types/cache/change.js +0 -0
  724. package/dist/unpkg/prod-deprecated/types/cache/mutations.js +0 -0
  725. package/dist/unpkg/prod-deprecated/types/cache/operations.js +0 -0
  726. package/dist/unpkg/prod-deprecated/types/cache/relationship.js +0 -0
  727. package/dist/unpkg/prod-deprecated/types/cache.js +0 -0
  728. package/dist/unpkg/prod-deprecated/types/graph.js +0 -0
  729. package/dist/unpkg/prod-deprecated/types/identifier.js +63 -0
  730. package/dist/unpkg/prod-deprecated/types/json/raw.js +0 -0
  731. package/dist/unpkg/prod-deprecated/types/params.js +0 -0
  732. package/dist/unpkg/prod-deprecated/types/record.js +191 -0
  733. package/dist/unpkg/prod-deprecated/types/request.js +77 -0
  734. package/dist/unpkg/prod-deprecated/types/runtime.js +34 -0
  735. package/dist/unpkg/prod-deprecated/types/schema/concepts.js +0 -0
  736. package/dist/unpkg/prod-deprecated/types/schema/fields.js +505 -0
  737. package/dist/unpkg/prod-deprecated/types/schema/fields.type-test.js +0 -0
  738. package/dist/unpkg/prod-deprecated/types/schema/schema-service.js +0 -0
  739. package/dist/unpkg/prod-deprecated/types/spec/document.js +0 -0
  740. package/dist/unpkg/prod-deprecated/types/spec/error.js +0 -0
  741. package/dist/unpkg/prod-deprecated/types/spec/json-api-raw.js +0 -0
  742. package/dist/unpkg/prod-deprecated/types/symbols.js +84 -0
  743. package/dist/unpkg/prod-deprecated/types/utils.js +0 -0
  744. package/dist/unpkg/prod-deprecated/types.js +0 -0
  745. package/dist/unpkg/prod-deprecated/utils/string.js +92 -0
  746. package/logos/README.md +2 -2
  747. package/logos/logo-yellow-slab.svg +1 -0
  748. package/logos/word-mark-black.svg +1 -0
  749. package/logos/word-mark-white.svg +1 -0
  750. package/package.json +3 -3
  751. package/logos/NCC-1701-a-blue.svg +0 -4
  752. package/logos/NCC-1701-a-gold.svg +0 -4
  753. package/logos/NCC-1701-a-gold_100.svg +0 -1
  754. package/logos/NCC-1701-a-gold_base-64.txt +0 -1
  755. package/logos/NCC-1701-a.svg +0 -4
  756. package/logos/docs-badge.svg +0 -2
  757. package/logos/ember-data-logo-dark.svg +0 -12
  758. package/logos/ember-data-logo-light.svg +0 -12
  759. package/logos/social1.png +0 -0
  760. package/logos/social2.png +0 -0
  761. package/logos/warp-drive-logo-dark.svg +0 -4
  762. package/logos/warp-drive-logo-gold.svg +0 -4
@@ -0,0 +1,2200 @@
1
+ import type { ObjectValue, PrimitiveValue, Value } from "../json/raw.js";
2
+ /**
3
+ * Options signature for Legacy Attributes.
4
+ */
5
+ export interface AttrOptions {
6
+ /**
7
+ * A primitive value or a function which produces a value.
8
+ */
9
+ defaultValue?: PrimitiveValue | (() => Value);
10
+ [key: string]: Value | (() => Value) | undefined;
11
+ }
12
+ /**
13
+ * A generic "field" that can be used to define
14
+ * primitive value fields.
15
+ *
16
+ * Replaces "attribute" for primitive value fields.
17
+ * Can also be used to eject from deep-tracking of
18
+ * objects or arrays.
19
+ *
20
+ * A major difference between "field" and "attribute"
21
+ * is that "type" points to a legacy transform on
22
+ * "attribute" that a serializer *might* use, while
23
+ * "type" points to a new-style transform on "field"
24
+ * that a record implmentation *must* use.
25
+ *
26
+ * @public
27
+ */
28
+ export interface GenericField {
29
+ /**
30
+ * The kind of field this is.
31
+ *
32
+ * @public
33
+ */
34
+ kind: "field";
35
+ /**
36
+ * The name of the field.
37
+ *
38
+ * @public
39
+ */
40
+ name: string;
41
+ /**
42
+ * The name of the field as returned by the API
43
+ * and inserted into the {@link Cache} if it differs
44
+ * from {@link GenericField.name}
45
+ *
46
+ * For instance, if the API returns:
47
+ *
48
+ * ```ts
49
+ * {
50
+ * attributes: {
51
+ * 'first-name': 'Chris'
52
+ * }
53
+ * }
54
+ * ```
55
+ *
56
+ * But the app desires to use `record.firstName; // 'Chris'`
57
+ *
58
+ * Then `name` would be set to `'firstName'` and
59
+ * `sourceKey` would be set to `'first-name'`.
60
+ *
61
+ * This option is only needed when the value differs from name.
62
+ */
63
+ sourceKey?: string;
64
+ /**
65
+ * the name of the {@link Transformation} to use, if any
66
+ *
67
+ * @public
68
+ */
69
+ type?: string;
70
+ /**
71
+ * Options to pass to the transform, if any
72
+ *
73
+ * Must comply to the specific transform's options
74
+ * schema.
75
+ *
76
+ * @public
77
+ */
78
+ options?: ObjectValue;
79
+ }
80
+ /**
81
+ * A field that can be used to alias one key to another
82
+ * key present in the cache version of the resource.
83
+ *
84
+ * Unlike DerivedField, an AliasField may write to its
85
+ * source when a record is in an editable mode.
86
+ *
87
+ * ~~AliasFields may utilize a transform, specified by type,
88
+ * to pre/post process the raw data for the field.~~ (not yet implemented)
89
+ *
90
+ * An AliasField may also specify a `kind` via options.
91
+ * `kind` may be any other valid field kind other than
92
+ *
93
+ * - `@hash`
94
+ * - `@id`
95
+ * - `@local`
96
+ * - `derived`
97
+ *
98
+ * This allows an AliasField to rename any field in the cache.
99
+ *
100
+ * Alias fields are generally intended to be used to support migrating
101
+ * between different schemas, though there are times where they are useful
102
+ * as a form of advanced derivation when used with a transform. For instance,
103
+ * an AliasField could be used to expose both a string and a Date version of the
104
+ * same field, with both being capable of being written to.
105
+ *
106
+ * @public
107
+ */
108
+ export interface LegacyAliasField {
109
+ /**
110
+ * The kind of field this is.
111
+ *
112
+ * @public
113
+ */
114
+ kind: "alias";
115
+ /**
116
+ * The name of the field.
117
+ *
118
+ * @public
119
+ */
120
+ name: string;
121
+ /**
122
+ * Always null (for now)
123
+ *
124
+ * @public
125
+ */
126
+ type: null;
127
+ /**
128
+ * The field def for which this is an alias.
129
+ *
130
+ * @public
131
+ */
132
+ options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
133
+ }
134
+ /**
135
+ * A field that can be used to alias one key to another
136
+ * key present in the cache version of the resource.
137
+ *
138
+ * Unlike DerivedField, an AliasField may write to its
139
+ * source when a record is in an editable mode.
140
+ *
141
+ * ~~AliasFields may utilize a transform, specified by type,
142
+ * to pre/post process the raw data for the field.~~ (not yet implemented)
143
+ *
144
+ * An AliasField may also specify a `kind` via options.
145
+ * `kind` may be any other valid field kind other than
146
+ *
147
+ * - `@hash`
148
+ * - `@id`
149
+ * - `@local`
150
+ * - `derived`
151
+ *
152
+ * This allows an AliasField to rename any field in the cache.
153
+ *
154
+ * Alias fields are generally intended to be used to support migrating
155
+ * between different schemas, though there are times where they are useful
156
+ * as a form of advanced derivation when used with a transform. For instance,
157
+ * an AliasField could be used to expose both a string and a Date version of the
158
+ * same field, with both being capable of being written to.
159
+ *
160
+ * @public
161
+ */
162
+ export interface PolarisAliasField {
163
+ /**
164
+ * The kind of field this is.
165
+ *
166
+ * @public
167
+ */
168
+ kind: "alias";
169
+ /**
170
+ * The name of the field.
171
+ *
172
+ * @public
173
+ */
174
+ name: string;
175
+ /**
176
+ * Always null (for now)
177
+ *
178
+ * @public
179
+ */
180
+ type: null;
181
+ /**
182
+ * The field def for which this is an alias.
183
+ *
184
+ * @public
185
+ */
186
+ options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LinksModeBelongsToField | LinksModeHasManyField;
187
+ }
188
+ /**
189
+ * A field that can be used to alias one key to another
190
+ * key present in the cache version of the resource.
191
+ *
192
+ * Unlike DerivedField, an AliasField may write to its
193
+ * source when a record is in an editable mode.
194
+ *
195
+ * AliasFields may utilize a transform, specified by type,
196
+ * to pre/post process the field.
197
+ *
198
+ * An AliasField may also specify a `kind` via options.
199
+ * `kind` may be any other valid field kind other than
200
+ *
201
+ * - `@hash`
202
+ * - `@id`
203
+ * - `@local`
204
+ * - `derived`
205
+ *
206
+ * This allows an AliasField to rename any field in the cache.
207
+ *
208
+ * Alias fields are generally intended to be used to support migrating
209
+ * between different schemas, though there are times where they are useful
210
+ * as a form of advanced derivation when used with a transform. For instance,
211
+ * an AliasField could be used to expose both a string and a Date version of the
212
+ * same field, with both being capable of being written to.
213
+ *
214
+ * @public
215
+ */
216
+ export interface ObjectAliasField {
217
+ /**
218
+ * The kind of field this is.
219
+ *
220
+ * @public
221
+ */
222
+ kind: "alias";
223
+ /**
224
+ * The name of the field.
225
+ *
226
+ * @public
227
+ */
228
+ name: string;
229
+ /**
230
+ * Always null (for now)
231
+ *
232
+ * @public
233
+ */
234
+ type: null;
235
+ /**
236
+ * The field def for which this is an alias.
237
+ *
238
+ * @public
239
+ */
240
+ options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField;
241
+ }
242
+ /**
243
+ * Represents a field whose value is the primary
244
+ * key of the resource.
245
+ *
246
+ * This allows any field to serve as the primary
247
+ * key while still being able to drive identity
248
+ * needs within the system.
249
+ *
250
+ * This is useful for resources that use for instance
251
+ * 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their
252
+ * primary key field instead of 'id'.
253
+ *
254
+ * @public
255
+ */
256
+ export interface IdentityField {
257
+ /**
258
+ * The kind of field this is.
259
+ *
260
+ * @public
261
+ */
262
+ kind: "@id";
263
+ /**
264
+ * The name of the field that serves as the
265
+ * primary key for the resource.
266
+ *
267
+ * @public
268
+ */
269
+ name: string;
270
+ /**
271
+ * The name of the field as returned by the API
272
+ * and inserted into the {@link Cache} if it differs
273
+ * from {@link IdentityField.name}
274
+ *
275
+ * For instance, if the API returns:
276
+ *
277
+ * ```ts
278
+ * {
279
+ * entityUrn: '324523-sadf34-345'
280
+ * }
281
+ * ```
282
+ *
283
+ * But the app desires to use `record.id; // '324523-sadf34-345'`
284
+ *
285
+ * Then `name` would be set to `'id'` and
286
+ * `sourceKey` would be set to `'entityUrn'`.
287
+ *
288
+ * This option is only needed when the value differs from name.
289
+ */
290
+ sourceKey?: string;
291
+ }
292
+ /**
293
+ * Represents a specialized field whose computed value
294
+ * will be used as the primary key of a schema-object
295
+ * for serializability and comparison purposes.
296
+ *
297
+ * This field functions similarly to derived fields in that
298
+ * it is non-settable, derived state but differs in that
299
+ * it is only able to compute off of cache state and is given
300
+ * no access to a record instance.
301
+ *
302
+ * This means that if a hashing function wants to compute its value
303
+ * taking into account transformations and derivations it must
304
+ * perform those itself.
305
+ *
306
+ * A schema-array can declare its "key" value to be `@hash` if
307
+ * the schema-objects it contains have such a field.
308
+ *
309
+ * Only one hash field is permittable per schema-object, and
310
+ * it should be placed in the `ResourceSchema`'s `@id` field
311
+ * in place of an `IdentityField`.
312
+ *
313
+ * @public
314
+ */
315
+ export interface HashField {
316
+ /**
317
+ * The kind of field this is.
318
+ *
319
+ * @public
320
+ */
321
+ kind: "@hash";
322
+ /**
323
+ * The name of the field that serves as the
324
+ * hash for the resource.
325
+ *
326
+ * Only required if access to this value by
327
+ * the UI is desired, it can be `null` otherwise.
328
+ *
329
+ * @public
330
+ */
331
+ name: string | null;
332
+ /**
333
+ * The name of a function to run to compute the hash.
334
+ * The function will only have access to the cached
335
+ * data for the record.
336
+ *
337
+ * @public
338
+ */
339
+ type: string;
340
+ /**
341
+ * Any options that should be provided to the hash
342
+ * function.
343
+ *
344
+ * @public
345
+ */
346
+ options?: ObjectValue;
347
+ }
348
+ /**
349
+ * Represents a field whose value is a local
350
+ * value that is not stored in the cache, nor
351
+ * is it sent to the server.
352
+ *
353
+ * Local fields can be written to, and their
354
+ * value is both memoized and reactive (though
355
+ * not deep-tracked).
356
+ *
357
+ * Because their state is not derived from the cache
358
+ * data or the server, they represent a divorced
359
+ * uncanonical source of state.
360
+ *
361
+ * For this reason Local fields should be used sparingly.
362
+ *
363
+ * Currently, while we document this feature here,
364
+ * only allow our own ReactiveResource default fields to
365
+ * utilize them and the feature should be considered private.
366
+ *
367
+ * Example use cases that drove the creation of local
368
+ * fields are states like `isDestroying` and `isDestroyed`
369
+ * which are specific to a record instance but not
370
+ * stored in the cache. We wanted to be able to drive
371
+ * these fields from schema the same as all other fields.
372
+ *
373
+ * Don't make us regret this decision.
374
+ *
375
+ * @public
376
+ */
377
+ export interface LocalField {
378
+ /**
379
+ * The kind of field this is.
380
+ *
381
+ * @public
382
+ */
383
+ kind: "@local";
384
+ /**
385
+ * The name of the field.
386
+ *
387
+ * @public
388
+ */
389
+ name: string;
390
+ /**
391
+ * Not currently utilized, we are considering
392
+ * allowing transforms to operate on local fields
393
+ *
394
+ * @public
395
+ */
396
+ type?: string;
397
+ /**
398
+ * Options for the field.
399
+ *
400
+ * @public
401
+ */
402
+ options?: {
403
+ defaultValue?: PrimitiveValue;
404
+ };
405
+ }
406
+ /**
407
+ * Represents a field whose value is an object
408
+ * with keys pointing to values that are primitive
409
+ * values.
410
+ *
411
+ * If values of the keys are not primitives, or
412
+ * if the key/value pairs have well-defined shape,
413
+ * use 'schema-object' instead.
414
+ *
415
+ * @public
416
+ */
417
+ export interface ObjectField {
418
+ /**
419
+ * The kind of field this is.
420
+ *
421
+ * @public
422
+ */
423
+ kind: "object";
424
+ /**
425
+ * The name of the field.
426
+ *
427
+ * @public
428
+ */
429
+ name: string;
430
+ /**
431
+ * The name of the field as returned by the API
432
+ * and inserted into the {@link Cache} if it differs
433
+ * from {@link ObjectField.name}
434
+ *
435
+ * For instance, if the API returns:
436
+ *
437
+ * ```ts
438
+ * {
439
+ * attributes: {
440
+ * 'first-name': 'Chris'
441
+ * }
442
+ * }
443
+ * ```
444
+ *
445
+ * But the app desires to use `record.firstName; // 'Chris'`
446
+ *
447
+ * Then `name` would be set to `'firstName'` and
448
+ * `sourceKey` would be set to `'first-name'`.
449
+ *
450
+ * This option is only needed when the value differs from name.
451
+ */
452
+ sourceKey?: string;
453
+ /**
454
+ * The name of a transform to pass the entire object
455
+ * through before displaying or serializing it.
456
+ *
457
+ * @public
458
+ */
459
+ type?: string;
460
+ /**
461
+ * Options to pass to the transform, if any
462
+ *
463
+ * Must comply to the specific transform's options
464
+ * schema.
465
+ *
466
+ * @public
467
+ */
468
+ options?: {
469
+ /**
470
+ * ::: warning ⚠️ Dangerous Feature Ahead
471
+ * :::
472
+ *
473
+ * Configures which extensions this object should use.
474
+ *
475
+ * Extensions are registered with the store's schema service
476
+ * via {@link SchemaService.CAUTION_MEGA_DANGER_ZONE_registerExtension}
477
+ *
478
+ * Extensions should only be used for temporary enhancements
479
+ * to objects to support migrating away from deprecated patterns
480
+ * like custom getters, computeds, and methods
481
+ */
482
+ objectExtensions?: string[];
483
+ [key: string]: Value | undefined;
484
+ };
485
+ }
486
+ /**
487
+ * Represents a field whose value is an object
488
+ * with a well-defined structure described by
489
+ * a schema-object (a non-resource schema).
490
+ *
491
+ * If the object's structure is not well-defined,
492
+ * use 'object' instead.
493
+ *
494
+ * By default, a SchemaObject within
495
+ *
496
+ * @public
497
+ */
498
+ export interface SchemaObjectField {
499
+ /**
500
+ * The kind of field this is.
501
+ *
502
+ * @public
503
+ */
504
+ kind: "schema-object";
505
+ /**
506
+ * The name of the field.
507
+ *
508
+ * @public
509
+ */
510
+ name: string;
511
+ /**
512
+ * The name of the field as returned by the API
513
+ * and inserted into the {@link Cache} if it differs
514
+ * from {@link SchemaObjectField.name}
515
+ *
516
+ * For instance, if the API returns:
517
+ *
518
+ * ```ts
519
+ * {
520
+ * attributes: {
521
+ * 'first-name': 'Chris'
522
+ * }
523
+ * }
524
+ * ```
525
+ *
526
+ * But the app desires to use `record.firstName; // 'Chris'`
527
+ *
528
+ * Then `name` would be set to `'firstName'` and
529
+ * `sourceKey` would be set to `'first-name'`.
530
+ *
531
+ * This option is only needed when the value differs from name.
532
+ */
533
+ sourceKey?: string;
534
+ /**
535
+ * If the field is not polymorphic:
536
+ *
537
+ * The name of the ObjectSchema that describes the
538
+ * structure of the object.
539
+ *
540
+ * If the field is polymorphic:
541
+ *
542
+ * The name of the hashFn to use to extract
543
+ * the type from the contained value or null.
544
+ *
545
+ * @public
546
+ */
547
+ type: string | null;
548
+ /**
549
+ * Options for configuring the behavior of the
550
+ * SchemaObject.
551
+ *
552
+ * - `polymorphic` : Whether this SchemaObject is Polymorphic.
553
+ * - `type` : If the SchemaObject is Polymorphic, the key on the raw cache data to use as the "resource-type" value for the schema-object.
554
+ *
555
+ * @public
556
+ */
557
+ options?: {
558
+ /**
559
+ * If true, if no value for this field exists in the cache,
560
+ * an empty `{}` will be used as the source for a new SchemaObject
561
+ * of the associated schema type, as opposed to the field's
562
+ * value being `null`.
563
+ *
564
+ * If `polymorphic` is `true`, defaultValue will be considered `false`.
565
+ */
566
+ defaultValue?: boolean;
567
+ /**
568
+ * ::: warning ⚠️ Dangerous Feature Ahead
569
+ * :::
570
+ *
571
+ * Configures which extensions this object should use.
572
+ *
573
+ * Extensions are registered with the store's schema service
574
+ * via {@link SchemaService.registerDangerousObjectExtension}
575
+ *
576
+ * Extensions should only be used for temporary enhancements
577
+ * to objects to support migrating away from deprecated patterns
578
+ * like custom getters, computeds, and methods
579
+ */
580
+ objectExtensions?: string[];
581
+ /**
582
+ * Whether this SchemaObject is Polymorphic.
583
+ *
584
+ * If the SchemaObject is polymorphic, `options.type` must also be supplied.
585
+ *
586
+ * @public
587
+ */
588
+ polymorphic?: boolean;
589
+ /**
590
+ * If the SchemaObject is Polymorphic, the key on the raw cache data to use
591
+ * as the "resource-type" value for the schema-object.
592
+ *
593
+ * The default is `'type'`.
594
+ *
595
+ * Valid options are:
596
+ *
597
+ * - `'@hash'` : will lookup the `@hash` function specified by
598
+ * SchemaObjectField.type and use it to calculate the type for each value.
599
+ * - \<field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)
600
+ * Are valid field names for this purpose. The cache state without transforms applied will be
601
+ * used when comparing values.
602
+ *
603
+ * @public
604
+ */
605
+ type?: string;
606
+ };
607
+ }
608
+ /**
609
+ * Represents a field whose value is an array
610
+ * of primitive values.
611
+ *
612
+ * If the array's elements are not primitive
613
+ * values, use 'schema-array' instead.
614
+ *
615
+ * @public
616
+ */
617
+ export interface ArrayField {
618
+ /**
619
+ * The kind of field this is.
620
+ *
621
+ * @public
622
+ */
623
+ kind: "array";
624
+ /**
625
+ * The name of the field.
626
+ *
627
+ * @public
628
+ */
629
+ name: string;
630
+ /**
631
+ * The name of the field as returned by the API
632
+ * and inserted into the {@link Cache} if it differs
633
+ * from {@link ArrayField.name}
634
+ *
635
+ * For instance, if the API returns:
636
+ *
637
+ * ```ts
638
+ * {
639
+ * attributes: {
640
+ * 'first-name': 'Chris'
641
+ * }
642
+ * }
643
+ * ```
644
+ *
645
+ * But the app desires to use `record.firstName; // 'Chris'`
646
+ *
647
+ * Then `name` would be set to `'firstName'` and
648
+ * `sourceKey` would be set to `'first-name'`.
649
+ *
650
+ * This option is only needed when the value differs from name.
651
+ */
652
+ sourceKey?: string;
653
+ /**
654
+ * The name of a transform to pass each item
655
+ * in the array through before displaying or
656
+ * or serializing it.
657
+ *
658
+ * @public
659
+ */
660
+ type?: string;
661
+ /**
662
+ * Options to pass to the transform, if any
663
+ *
664
+ * Must comply to the specific transform's options
665
+ * schema.
666
+ *
667
+ * @public
668
+ */
669
+ options?: {
670
+ /**
671
+ * ::: warning ⚠️ Dangerous Feature Ahead
672
+ * :::
673
+ *
674
+ * Configures which extensions this array is allowed to use.
675
+ * Extensions are registered with the store's schema service
676
+ * via {@link SchemaService.CAUTION_MEGA_DANGER_ZONE_registerExtension}
677
+ *
678
+ * Extensions should only be used for temporary enhancements
679
+ * to arrays to support migrating away from deprecated behaviors
680
+ * such as Ember's "ArrayLike" and FragmentArray from ember-data-model-fragments
681
+ */
682
+ arrayExtensions?: string[];
683
+ [key: string]: Value | undefined;
684
+ };
685
+ }
686
+ /**
687
+ * Represents a field whose value is an array
688
+ * of objects with a well-defined structure
689
+ * described by a non-resource schema.
690
+ *
691
+ * If the array's elements are not well-defined,
692
+ * use 'array' instead.
693
+ *
694
+ * @public
695
+ */
696
+ export interface SchemaArrayField {
697
+ /**
698
+ * The kind of field this is.
699
+ *
700
+ * @public
701
+ */
702
+ kind: "schema-array";
703
+ /**
704
+ * The name of the field.
705
+ *
706
+ * @public
707
+ */
708
+ name: string;
709
+ /**
710
+ * The name of the field as returned by the API
711
+ * and inserted into the {@link Cache} if it differs
712
+ * from {@link SchemaArrayField.name}
713
+ *
714
+ * For instance, if the API returns:
715
+ *
716
+ * ```ts
717
+ * {
718
+ * attributes: {
719
+ * 'first-name': 'Chris'
720
+ * }
721
+ * }
722
+ * ```
723
+ *
724
+ * But the app desires to use `record.firstName; // 'Chris'`
725
+ *
726
+ * Then `name` would be set to `'firstName'` and
727
+ * `sourceKey` would be set to `'first-name'`.
728
+ *
729
+ * This option is only needed when the value differs from name.
730
+ */
731
+ sourceKey?: string;
732
+ /**
733
+ * If the SchemaArray is not polymorphic:
734
+ *
735
+ * The name of the ObjectSchema that describes the
736
+ * structure of the objects in the array.
737
+ *
738
+ * If the SchemaArray is polymorphic:
739
+ *
740
+ * The name of the hashFn to use to extract
741
+ * the type from contained members or null.
742
+ *
743
+ * @public
744
+ */
745
+ type: string | null;
746
+ /**
747
+ * Options for configuring the behavior of the
748
+ * SchemaArray.
749
+ *
750
+ * - `key`
751
+ *
752
+ * Configures how the SchemaArray determines whether an object in the cache is the same
753
+ * as an object previously used to instantiate one of the schema-objects it contains.
754
+ *
755
+ * The default is `'@identity'`.
756
+ *
757
+ * Valid options are:
758
+ *
759
+ * - `'@identity'`(default) : the cached object's referential identity will be used.
760
+ * This may result in significant instability when resource data is updated from the API
761
+ * - `'@index'` : the cached object's index in the array will be used.
762
+ * This is only a good choice for arrays that rarely if ever change membership
763
+ * - `'@hash'` : will lookup the `@hash` function supplied in the ResourceSchema for
764
+ * The contained schema-object and use the computed result to determine and compare identity.
765
+ * - \<field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)
766
+ * Are valid field names for this purpose. The cache state without transforms applied will be
767
+ * used when comparing values. The field value should be unique enough to guarantee two schema-objects
768
+ * of the same type will not collide.
769
+ *
770
+ * - `polymorphic` : Whether this SchemaArray is Polymorphic.
771
+ * - `type` : If the SchemaArray is Polymorphic, the key on the raw cache data to use as the "resource-type" value for the schema-object.
772
+ *
773
+ * @public
774
+ */
775
+ options?: {
776
+ /**
777
+ * If true, if no value for this field exists in the cache,
778
+ * an empty `[]` will be used as the value of the field,
779
+ * as opposed to the field's value being `null`.
780
+ *
781
+ */
782
+ defaultValue?: boolean;
783
+ /**
784
+ * ::: warning ⚠️ Dangerous Feature Ahead
785
+ * :::
786
+ *
787
+ * Configures which extensions this array is allowed to use.
788
+ * Extensions are registered with the store's schema service
789
+ * via {@link SchemaService.CAUTION_MEGA_DANGER_ZONE_registerExtension}
790
+ *
791
+ * Extensions should only be used for temporary enhancements
792
+ * to arrays to support migrating away from deprecated behaviors
793
+ * such as Ember's "ArrayLike" and FragmentArray from ember-data-model-fragments
794
+ */
795
+ arrayExtensions?: string[];
796
+ /**
797
+ * ::: warning ⚠️ Dangerous Feature Ahead
798
+ * :::
799
+ *
800
+ * Configures which extensions this object should use.
801
+ *
802
+ * Extensions are registered with the store's schema service
803
+ * via {@link SchemaService.registerDangerousObjectExtension}
804
+ *
805
+ * Extensions should only be used for temporary enhancements
806
+ * to objects to support migrating away from deprecated patterns
807
+ * like custom getters, computeds, and methods
808
+ */
809
+ objectExtensions?: string[];
810
+ /**
811
+ * Configures how the SchemaArray determines whether
812
+ * an object in the cache is the same as an object
813
+ * previously used to instantiate one of the schema-objects
814
+ * it contains.
815
+ *
816
+ * The default is `'@identity'`.
817
+ *
818
+ * Valid options are:
819
+ *
820
+ * - `'@identity'` (default) : the cached object's referential identity will be used.
821
+ * This may result in significant instability when resource data is updated from the API
822
+ * - `'@index'` : the cached object's index in the array will be used.
823
+ * This is only a good choice for arrays that rarely if ever change membership
824
+ * - `'@hash'` : will lookup the `@hash` function supplied in the ResourceSchema for
825
+ * The contained schema-object and use the computed result to determine and compare identity.
826
+ * - \<field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)
827
+ * Are valid field names for this purpose. The cache state without transforms applied will be
828
+ * used when comparing values. The field value should be unique enough to guarantee two schema-objects
829
+ * of the same type will not collide.
830
+ *
831
+ */
832
+ key?: "@identity" | "@index" | "@hash" | string;
833
+ /**
834
+ * Whether this SchemaArray is Polymorphic.
835
+ *
836
+ * If the SchemaArray is polymorphic, `options.type` must also be supplied.
837
+ *
838
+ */
839
+ polymorphic?: boolean;
840
+ /**
841
+ * If the SchemaArray is Polymorphic, the key on the raw cache data to use
842
+ * as the "resource-type" value for the schema-object.
843
+ *
844
+ * The default is `'type'`.
845
+ *
846
+ * Valid options are:
847
+ *
848
+ * - `'@hash'` : will lookup the `@hash` function specified by
849
+ * SchemaArrayField.type and use it to calculate the type for each value.
850
+ * - \<field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)
851
+ * Are valid field names for this purpose. The cache state without transforms applied will be
852
+ * used when comparing values.
853
+ */
854
+ type?: string;
855
+ };
856
+ }
857
+ /**
858
+ * Represents a field whose value is derived
859
+ * from other fields in the schema.
860
+ *
861
+ * The value is read-only, and is not stored
862
+ * in the cache, nor is it sent to the server.
863
+ *
864
+ * Usage of derived fields should be minimized
865
+ * to scenarios where the derivation is known
866
+ * to be safe. For instance, derivations that
867
+ * required fields that are not always loaded
868
+ * or that require access to related resources
869
+ * that may not be loaded should be avoided.
870
+ *
871
+ * @public
872
+ */
873
+ export interface DerivedField {
874
+ /**
875
+ * The kind of field this is.
876
+ *
877
+ * @public
878
+ */
879
+ kind: "derived";
880
+ /**
881
+ * The name of the field.
882
+ *
883
+ * @public
884
+ */
885
+ name: string;
886
+ /**
887
+ * The name of the derivation to use.
888
+ *
889
+ * Derivations are functions that take the
890
+ * record, options, and the name of the field
891
+ * as arguments, and return the derived value.
892
+ *
893
+ * Derivations are memoized, and are only
894
+ * recomputed when the fields they depend on
895
+ * change.
896
+ *
897
+ * Derivations are not stored in the cache,
898
+ * and are not sent to the server.
899
+ *
900
+ * Derivation functions must be explicitly
901
+ * registered with the schema service.
902
+ *
903
+ * @public
904
+ */
905
+ type: string;
906
+ /**
907
+ * Options to pass to the derivation, if any
908
+ *
909
+ * Must comply to the specific derivation's
910
+ * options schema.
911
+ *
912
+ * @public
913
+ */
914
+ options?: ObjectValue;
915
+ }
916
+ /**
917
+ * Represents a field that is a reference to
918
+ * another resource.
919
+ *
920
+ * SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
921
+ * BY ReactiveResource
922
+ *
923
+ * @public
924
+ */
925
+ export interface ResourceField {
926
+ /**
927
+ * The kind of field this is.
928
+ *
929
+ * @public
930
+ */
931
+ kind: "resource";
932
+ /**
933
+ * The name of the field.
934
+ *
935
+ * @public
936
+ */
937
+ name: string;
938
+ /**
939
+ * The name of the field as returned by the API
940
+ * and inserted into the {@link Cache} if it differs
941
+ * from {@link ResourceField.name}
942
+ *
943
+ * For instance, if the API returns:
944
+ *
945
+ * ```ts
946
+ * {
947
+ * attributes: {
948
+ * 'first-name': 'Chris'
949
+ * }
950
+ * }
951
+ * ```
952
+ *
953
+ * But the app desires to use `record.firstName; // 'Chris'`
954
+ *
955
+ * Then `name` would be set to `'firstName'` and
956
+ * `sourceKey` would be set to `'first-name'`.
957
+ *
958
+ * This option is only needed when the value differs from name.
959
+ */
960
+ sourceKey?: string;
961
+ /**
962
+ * The name of the resource that this field
963
+ * refers to. In the case of a polymorphic
964
+ * relationship, this should be the trait
965
+ * or abstract type.
966
+ *
967
+ * @public
968
+ */
969
+ type: string;
970
+ /**
971
+ * Options for resources are optional. If
972
+ * not present, all options are presumed
973
+ * to be falsey
974
+ *
975
+ * @public
976
+ */
977
+ options?: {
978
+ /**
979
+ * Whether the relationship is async
980
+ *
981
+ * If true, it is expected that the cache
982
+ * data for this field will contain a link
983
+ * that can be used to fetch the related
984
+ * resource when needed.
985
+ *
986
+ * @public
987
+ */
988
+ async?: boolean;
989
+ /**
990
+ * The name of the inverse field on the
991
+ * related resource that points back to
992
+ * this field on this resource to form a
993
+ * bidirectional relationship.
994
+ *
995
+ * If null, the relationship is unidirectional.
996
+ *
997
+ * @public
998
+ */
999
+ inverse?: string | null;
1000
+ /**
1001
+ * If this field is satisfying a polymorphic
1002
+ * relationship on another resource, then this
1003
+ * should be set to the trait or abstract type
1004
+ * that this resource implements.
1005
+ *
1006
+ * @public
1007
+ */
1008
+ as?: string;
1009
+ /**
1010
+ * Whether this field is a polymorphic relationship,
1011
+ * meaning that it can point to multiple types of
1012
+ * resources so long as they implement the trait
1013
+ * or abstract type specified in `type`.
1014
+ *
1015
+ * @public
1016
+ */
1017
+ polymorphic?: boolean;
1018
+ };
1019
+ }
1020
+ /**
1021
+ * Represents a field that is a reference to
1022
+ * a collection of other resources, potentially
1023
+ * paginate.
1024
+ *
1025
+ * SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
1026
+ * BY ReactiveResource
1027
+ *
1028
+ * @public
1029
+ */
1030
+ export interface CollectionField {
1031
+ /**
1032
+ * The kind of field this is.
1033
+ *
1034
+ * @public
1035
+ */
1036
+ kind: "collection";
1037
+ /**
1038
+ * The name of the field.
1039
+ *
1040
+ * @public
1041
+ */
1042
+ name: string;
1043
+ /**
1044
+ * The name of the field as returned by the API
1045
+ * and inserted into the {@link Cache} if it differs
1046
+ * from {@link CollectionField.name}
1047
+ *
1048
+ * For instance, if the API returns:
1049
+ *
1050
+ * ```ts
1051
+ * {
1052
+ * attributes: {
1053
+ * 'first-name': 'Chris'
1054
+ * }
1055
+ * }
1056
+ * ```
1057
+ *
1058
+ * But the app desires to use `record.firstName; // 'Chris'`
1059
+ *
1060
+ * Then `name` would be set to `'firstName'` and
1061
+ * `sourceKey` would be set to `'first-name'`.
1062
+ *
1063
+ * This option is only needed when the value differs from name.
1064
+ */
1065
+ sourceKey?: string;
1066
+ /**
1067
+ * The name of the resource that this field
1068
+ * refers to. In the case of a polymorphic
1069
+ * relationship, this should be the trait
1070
+ * or abstract type.
1071
+ *
1072
+ * @public
1073
+ */
1074
+ type: string;
1075
+ /**
1076
+ * Options for resources are optional. If
1077
+ * not present, all options are presumed
1078
+ * to be falsey
1079
+ *
1080
+ * @public
1081
+ */
1082
+ options?: {
1083
+ /**
1084
+ * Whether the relationship is async
1085
+ *
1086
+ * If true, it is expected that the cache
1087
+ * data for this field will contain links
1088
+ * that can be used to fetch the related
1089
+ * resources when needed.
1090
+ *
1091
+ * When false, it is expected that all related
1092
+ * resources are loaded together with this resource,
1093
+ * and that the cache data for this field will
1094
+ * contain the full list of pointers.
1095
+ *
1096
+ * When true, it is expected that the relationship
1097
+ * is paginated. If the relationship is not paginated,
1098
+ * then the cache data for "page 1" would contain the
1099
+ * full list of pointers, and loading "page 1" would
1100
+ * load all related resources.
1101
+ *
1102
+ * @public
1103
+ */
1104
+ async?: boolean;
1105
+ /**
1106
+ * The name of the inverse field on the
1107
+ * related resource that points back to
1108
+ * this field on this resource to form a
1109
+ * bidirectional relationship.
1110
+ *
1111
+ * If null, the relationship is unidirectional.
1112
+ *
1113
+ * @public
1114
+ */
1115
+ inverse?: string | null;
1116
+ /**
1117
+ * If this field is satisfying a polymorphic
1118
+ * relationship on another resource, then this
1119
+ * should be set to the trait or abstract type
1120
+ * that this resource implements.
1121
+ *
1122
+ * @public
1123
+ */
1124
+ as?: string;
1125
+ /**
1126
+ * Whether this field is a polymorphic relationship,
1127
+ * meaning that it can point to multiple types of
1128
+ * resources so long as they implement the trait
1129
+ * or abstract type specified in `type`.
1130
+ *
1131
+ * @public
1132
+ */
1133
+ polymorphic?: boolean;
1134
+ };
1135
+ }
1136
+ /**
1137
+ * > [!CAUTION]
1138
+ * > This Field is LEGACY
1139
+ * > It cannot be used with PolarisMode
1140
+ *
1141
+ * A generic "field" that can be used to define
1142
+ * primitive value fields.
1143
+ *
1144
+ * If the field points to an object or array,
1145
+ * it will not be deep-tracked.
1146
+ *
1147
+ * Transforms when defined are legacy transforms
1148
+ * that a serializer *might* use, but their usage
1149
+ * is not guaranteed.
1150
+ *
1151
+ * @public
1152
+ */
1153
+ export interface LegacyAttributeField {
1154
+ /**
1155
+ * The kind of field this is.
1156
+ *
1157
+ * @public
1158
+ */
1159
+ kind: "attribute";
1160
+ /**
1161
+ * The name of the field.
1162
+ *
1163
+ * @public
1164
+ */
1165
+ name: string;
1166
+ /**
1167
+ * The name of the field as returned by the API
1168
+ * and inserted into the {@link Cache} if it differs
1169
+ * from {@link LegacyAttributeField.name}
1170
+ *
1171
+ * For instance, if the API returns:
1172
+ *
1173
+ * ```ts
1174
+ * {
1175
+ * attributes: {
1176
+ * 'first-name': 'Chris'
1177
+ * }
1178
+ * }
1179
+ * ```
1180
+ *
1181
+ * But the app desires to use `record.firstName; // 'Chris'`
1182
+ *
1183
+ * Then `name` would be set to `'firstName'` and
1184
+ * `sourceKey` would be set to `'first-name'`.
1185
+ *
1186
+ * This option is only needed when the value differs from name.
1187
+ */
1188
+ sourceKey?: string;
1189
+ /**
1190
+ * The name of the transform to use, if any
1191
+ *
1192
+ * @public
1193
+ */
1194
+ type?: string | null;
1195
+ /**
1196
+ * Options to pass to the transform, if any
1197
+ *
1198
+ * Must comply to the specific transform's options
1199
+ * schema.
1200
+ *
1201
+ * See {@link AttrOptions} for more info.
1202
+ */
1203
+ options?: AttrOptions;
1204
+ }
1205
+ /**
1206
+ * > [!CAUTION]
1207
+ * > This Field is LEGACY
1208
+ *
1209
+ * Represents a field that is a reference to
1210
+ * another resource.
1211
+ *
1212
+ * This is the legacy version of the `ResourceField`.
1213
+ *
1214
+ * @public
1215
+ */
1216
+ export interface LegacyBelongsToField {
1217
+ /**
1218
+ * The kind of field this is.
1219
+ *
1220
+ * @public
1221
+ */
1222
+ kind: "belongsTo";
1223
+ /**
1224
+ * The name of the field.
1225
+ *
1226
+ * @public
1227
+ */
1228
+ name: string;
1229
+ /**
1230
+ * The name of the field as returned by the API
1231
+ * and inserted into the {@link Cache} if it differs
1232
+ * from {@link LegacyBelongsToField.name}
1233
+ *
1234
+ * For instance, if the API returns:
1235
+ *
1236
+ * ```ts
1237
+ * {
1238
+ * attributes: {
1239
+ * 'first-name': 'Chris'
1240
+ * }
1241
+ * }
1242
+ * ```
1243
+ *
1244
+ * But the app desires to use `record.firstName; // 'Chris'`
1245
+ *
1246
+ * Then `name` would be set to `'firstName'` and
1247
+ * `sourceKey` would be set to `'first-name'`.
1248
+ *
1249
+ * This option is only needed when the value differs from name.
1250
+ */
1251
+ sourceKey?: string;
1252
+ /**
1253
+ * The name of the resource that this field
1254
+ * refers to. In the case of a polymorphic
1255
+ * relationship, this should be the trait
1256
+ * or abstract type.
1257
+ *
1258
+ * @public
1259
+ */
1260
+ type: string;
1261
+ /**
1262
+ * Options for belongsTo are mandatory.
1263
+ *
1264
+ * @public
1265
+ */
1266
+ options: {
1267
+ /**
1268
+ * Whether the relationship is async
1269
+ *
1270
+ * If true, it is expected that the cache
1271
+ * data for this field will contain a link
1272
+ * or a pointer that can be used to fetch
1273
+ * the related resource when needed.
1274
+ *
1275
+ * Pointers are highly discouraged.
1276
+ *
1277
+ * @public
1278
+ */
1279
+ async: boolean;
1280
+ /**
1281
+ * The name of the inverse field on the
1282
+ * related resource that points back to
1283
+ * this field on this resource to form a
1284
+ * bidirectional relationship.
1285
+ *
1286
+ * If null, the relationship is unidirectional.
1287
+ *
1288
+ * If the inverse field definition uses a sourceKey,
1289
+ * this should still be the name of the field, not the sourceKey.
1290
+ *
1291
+ * @public
1292
+ */
1293
+ inverse: string | null;
1294
+ /**
1295
+ * If this field is satisfying a polymorphic
1296
+ * relationship on another resource, then this
1297
+ * should be set to the trait or abstract type
1298
+ * that this resource implements.
1299
+ *
1300
+ * @public
1301
+ */
1302
+ as?: string;
1303
+ /**
1304
+ * Whether this field is a polymorphic relationship,
1305
+ * meaning that it can point to multiple types of
1306
+ * resources so long as they implement the trait
1307
+ * or abstract type specified in `type`.
1308
+ *
1309
+ * @public
1310
+ */
1311
+ polymorphic?: boolean;
1312
+ /**
1313
+ * Whether this field should ever make use of the legacy request infra
1314
+ * from @warp-drive/legacy/compat and the LegacyNetworkMiddleware for
1315
+ * adapters and serializers.
1316
+ *
1317
+ * When true, none of the legacy support will be utilized. Sync relationships
1318
+ * will be expected to already have all their data. When reloading a sync relationship
1319
+ * you would be expected to have a `related link` available from a prior relationship
1320
+ * payload e.g.
1321
+ *
1322
+ * ```ts
1323
+ * {
1324
+ * data: {
1325
+ * type: 'user',
1326
+ * id: '2',
1327
+ * attributes: { name: 'Chris' },
1328
+ * relationships: {
1329
+ * bestFriend: {
1330
+ * links: { related: "/users/1/bestFriend" },
1331
+ * data: { type: 'user', id: '1' },
1332
+ * }
1333
+ * }
1334
+ * },
1335
+ * included: [
1336
+ * { type: 'user', id: '1', attributes: { name: 'Krystan' } }
1337
+ * ]
1338
+ * }
1339
+ * ```
1340
+ *
1341
+ * Async relationships will be loaded via their link if needed.
1342
+ *
1343
+ * @public
1344
+ */
1345
+ linksMode?: true;
1346
+ /**
1347
+ * When omitted, the cache data for this field will
1348
+ * clear local state of all changes except for the
1349
+ * addition of records still in the "new" state any
1350
+ * time the remote data for this field is updated.
1351
+ *
1352
+ * When set to `false`, the cache data for this field
1353
+ * will instead intelligently commit any changes from
1354
+ * local state that are present in the remote data,
1355
+ * leaving any remaining changes in local state still.
1356
+ *
1357
+ * @public
1358
+ */
1359
+ resetOnRemoteUpdate?: false;
1360
+ };
1361
+ }
1362
+ /**
1363
+ * > [!CAUTION]
1364
+ * > This Field is LEGACY
1365
+ *
1366
+ * Represents a field that is a reference to
1367
+ * another resource.
1368
+ *
1369
+ * This is the legacy version of the `ResourceField`.
1370
+ *
1371
+ * @public
1372
+ */
1373
+ export interface LinksModeBelongsToField {
1374
+ /**
1375
+ * The kind of field this is.
1376
+ *
1377
+ * @public
1378
+ */
1379
+ kind: "belongsTo";
1380
+ /**
1381
+ * The name of the field.
1382
+ *
1383
+ * @public
1384
+ */
1385
+ name: string;
1386
+ /**
1387
+ * The name of the field as returned by the API
1388
+ * and inserted into the {@link Cache} if it differs
1389
+ * from {@link LinksModeBelongsToField.name}
1390
+ *
1391
+ * For instance, if the API returns:
1392
+ *
1393
+ * ```ts
1394
+ * {
1395
+ * attributes: {
1396
+ * 'first-name': 'Chris'
1397
+ * }
1398
+ * }
1399
+ * ```
1400
+ *
1401
+ * But the app desires to use `record.firstName; // 'Chris'`
1402
+ *
1403
+ * Then `name` would be set to `'firstName'` and
1404
+ * `sourceKey` would be set to `'first-name'`.
1405
+ *
1406
+ * This option is only needed when the value differs from name.
1407
+ */
1408
+ sourceKey?: string;
1409
+ /**
1410
+ * The name of the resource that this field
1411
+ * refers to. In the case of a polymorphic
1412
+ * relationship, this should be the trait
1413
+ * or abstract type.
1414
+ *
1415
+ * @public
1416
+ */
1417
+ type: string;
1418
+ /**
1419
+ * Options for belongsTo are mandatory.
1420
+ *
1421
+ * @public
1422
+ */
1423
+ options: {
1424
+ /**
1425
+ * Whether the relationship is async
1426
+ *
1427
+ * MUST be false for PolarisMode + LinksMode
1428
+ *
1429
+ * @public
1430
+ */
1431
+ async: false;
1432
+ /**
1433
+ * The name of the inverse field on the
1434
+ * related resource that points back to
1435
+ * this field on this resource to form a
1436
+ * bidirectional relationship.
1437
+ *
1438
+ * If null, the relationship is unidirectional.
1439
+ *
1440
+ * If the inverse field definition uses a sourceKey,
1441
+ * this should still be the name of the field, not the sourceKey.
1442
+ *
1443
+ * @public
1444
+ */
1445
+ inverse: string | null;
1446
+ /**
1447
+ * If this field is satisfying a polymorphic
1448
+ * relationship on another resource, then this
1449
+ * should be set to the trait or abstract type
1450
+ * that this resource implements.
1451
+ *
1452
+ * @public
1453
+ */
1454
+ as?: string;
1455
+ /**
1456
+ * Whether this field is a polymorphic relationship,
1457
+ * meaning that it can point to multiple types of
1458
+ * resources so long as they implement the trait
1459
+ * or abstract type specified in `type`.
1460
+ *
1461
+ * @public
1462
+ */
1463
+ polymorphic?: boolean;
1464
+ /**
1465
+ * Whether this field should ever make use of the legacy support infra
1466
+ * from @warp-drive/legacy/model and the LegacyNetworkMiddleware for adapters and serializers.
1467
+ *
1468
+ * MUST be true for PolarisMode + LinksMode
1469
+ *
1470
+ * When true, none of the legacy support will be utilized. Sync relationships
1471
+ * will be expected to already have all their data. When reloading a sync relationship
1472
+ * you would be expected to have a `related link` available from a prior relationship
1473
+ * payload e.g.
1474
+ *
1475
+ * ```ts
1476
+ * {
1477
+ * data: {
1478
+ * type: 'user',
1479
+ * id: '2',
1480
+ * attributes: { name: 'Chris' },
1481
+ * relationships: {
1482
+ * bestFriend: {
1483
+ * links: { related: "/users/1/bestFriend" },
1484
+ * data: { type: 'user', id: '1' },
1485
+ * }
1486
+ * }
1487
+ * },
1488
+ * included: [
1489
+ * { type: 'user', id: '1', attributes: { name: 'Krystan' } }
1490
+ * ]
1491
+ * }
1492
+ * ```
1493
+ *
1494
+ * Async relationships will be loaded via their link if needed.
1495
+ *
1496
+ * Activating LinksMode will *also* deactivate the deprecated
1497
+ * `resetOnRemoteUpdate` behavior for this field.
1498
+ *
1499
+ * This means that when new remote state is received, the cache
1500
+ * will intelligently commit any changes from local state that
1501
+ * are present in the remote data for this field, leaving any remaining
1502
+ * changes in local state still.
1503
+ *
1504
+ * Previously, the cache would clear local state of all changes
1505
+ * except for the addition of records still in the "new" state any
1506
+ * time the remote data for this field was updated.
1507
+ *
1508
+ * @public
1509
+ */
1510
+ linksMode: true;
1511
+ };
1512
+ }
1513
+ /**
1514
+ * > [!CAUTION]
1515
+ * > This Field is LEGACY
1516
+ *
1517
+ * Represents a field that is a reference to
1518
+ * a collection of other resources.
1519
+ *
1520
+ * This is the legacy version of the `CollectionField`.
1521
+ *
1522
+ * @public
1523
+ */
1524
+ export interface LegacyHasManyField {
1525
+ /**
1526
+ * The kind of field this is.
1527
+ *
1528
+ * @public
1529
+ */
1530
+ kind: "hasMany";
1531
+ /**
1532
+ * The name of the field.
1533
+ *
1534
+ * @public
1535
+ */
1536
+ name: string;
1537
+ /**
1538
+ * The name of the field as returned by the API
1539
+ * and inserted into the {@link Cache} if it differs
1540
+ * from {@link LegacyHasManyField.name}
1541
+ *
1542
+ * For instance, if the API returns:
1543
+ *
1544
+ * ```ts
1545
+ * {
1546
+ * attributes: {
1547
+ * 'first-name': 'Chris'
1548
+ * }
1549
+ * }
1550
+ * ```
1551
+ *
1552
+ * But the app desires to use `record.firstName; // 'Chris'`
1553
+ *
1554
+ * Then `name` would be set to `'firstName'` and
1555
+ * `sourceKey` would be set to `'first-name'`.
1556
+ *
1557
+ * This option is only needed when the value differs from name.
1558
+ */
1559
+ sourceKey?: string;
1560
+ /**
1561
+ * the name of the resource that this field
1562
+ * refers to. In the case of a polymorphic
1563
+ * relationship, this should be the trait
1564
+ * or abstract type.
1565
+ *
1566
+ * @public
1567
+ */
1568
+ type: string;
1569
+ /**
1570
+ * Options for hasMany are mandatory.
1571
+ *
1572
+ * @public
1573
+ */
1574
+ options: {
1575
+ /**
1576
+ * ::: warning ⚠️ Dangerous Feature Ahead
1577
+ * :::
1578
+ *
1579
+ * Configures which extensions this array is allowed to use.
1580
+ * Extensions are registered with the store's schema service
1581
+ * via {@link SchemaService.CAUTION_MEGA_DANGER_ZONE_registerExtension}
1582
+ *
1583
+ * Extensions should only be used for temporary enhancements
1584
+ * to arrays to support migrating away from deprecated behaviors
1585
+ * such as Ember's "ArrayLike" and FragmentArray from ember-data-model-fragments
1586
+ */
1587
+ arrayExtensions?: string[];
1588
+ /**
1589
+ * Whether the relationship is async
1590
+ *
1591
+ * If true, it is expected that the cache
1592
+ * data for this field will contain links
1593
+ * or pointers that can be used to fetch
1594
+ * the related resources when needed.
1595
+ *
1596
+ * When false, it is expected that all related
1597
+ * resources are loaded together with this resource,
1598
+ * and that the cache data for this field will
1599
+ * contain the full list of pointers.
1600
+ *
1601
+ * hasMany relationships do not support pagination.
1602
+ *
1603
+ * @public
1604
+ */
1605
+ async: boolean;
1606
+ /**
1607
+ * The name of the inverse field on the
1608
+ * related resource that points back to
1609
+ * this field on this resource to form a
1610
+ * bidirectional relationship.
1611
+ *
1612
+ * If null, the relationship is unidirectional.
1613
+ *
1614
+ * If the inverse field definition uses a sourceKey,
1615
+ * this should still be the name of the field, not the sourceKey.
1616
+ *
1617
+ * @public
1618
+ */
1619
+ inverse: string | null;
1620
+ /**
1621
+ * If this field is satisfying a polymorphic
1622
+ * relationship on another resource, then this
1623
+ * should be set to the trait or abstract type
1624
+ * that this resource implements.
1625
+ *
1626
+ * @public
1627
+ */
1628
+ as?: string;
1629
+ /**
1630
+ * Whether this field is a polymorphic relationship,
1631
+ * meaning that it can point to multiple types of
1632
+ * resources so long as they implement the trait
1633
+ * or abstract type specified in `type`.
1634
+ *
1635
+ * @public
1636
+ */
1637
+ polymorphic?: boolean;
1638
+ /**
1639
+ * Whether this field should ever make use of the legacy support infra
1640
+ * from @warp-drive/legacy/model and the LegacyNetworkMiddleware for adapters and serializers.
1641
+ *
1642
+ * When true, none of the legacy support will be utilized. Sync relationships
1643
+ * will be expected to already have all their data. When reloading a sync relationship
1644
+ * you would be expected to have a `related link` available from a prior relationship
1645
+ * payload e.g.
1646
+ *
1647
+ * ```ts
1648
+ * {
1649
+ * data: {
1650
+ * type: 'user',
1651
+ * id: '2',
1652
+ * attributes: { name: 'Chris' },
1653
+ * relationships: {
1654
+ * bestFriends: {
1655
+ * links: { related: "/users/1/bestFriends" },
1656
+ * data: [ { type: 'user', id: '1' } ],
1657
+ * }
1658
+ * }
1659
+ * },
1660
+ * included: [
1661
+ * { type: 'user', id: '1', attributes: { name: 'Krystan' } }
1662
+ * ]
1663
+ * }
1664
+ * ```
1665
+ *
1666
+ * Async relationships will be loaded via their link if needed.
1667
+ *
1668
+ * @public
1669
+ */
1670
+ linksMode?: true;
1671
+ /**
1672
+ * When omitted, the cache data for this field will
1673
+ * clear local state of all changes except for the
1674
+ * addition of records still in the "new" state any
1675
+ * time the remote data for this field is updated.
1676
+ *
1677
+ * When set to `false`, the cache data for this field
1678
+ * will instead intelligently commit any changes from
1679
+ * local state that are present in the remote data,
1680
+ * leaving any remaining changes in local state still.
1681
+ *
1682
+ * @public
1683
+ */
1684
+ resetOnRemoteUpdate?: false;
1685
+ };
1686
+ }
1687
+ /**
1688
+ * > [!CAUTION]
1689
+ * > This Field is LEGACY
1690
+ *
1691
+ * Represents a field that is a reference to
1692
+ * a collection of other resources.
1693
+ *
1694
+ * This is the legacy version of the `CollectionField`.
1695
+ *
1696
+ * @public
1697
+ */
1698
+ export interface LinksModeHasManyField {
1699
+ /**
1700
+ * The kind of field this is.
1701
+ *
1702
+ * @public
1703
+ */
1704
+ kind: "hasMany";
1705
+ /**
1706
+ * The name of the field.
1707
+ *
1708
+ * @public
1709
+ */
1710
+ name: string;
1711
+ /**
1712
+ * The name of the field as returned by the API
1713
+ * and inserted into the {@link Cache} if it differs
1714
+ * from {@link LinksModeHasManyField.name}
1715
+ *
1716
+ * For instance, if the API returns:
1717
+ *
1718
+ * ```ts
1719
+ * {
1720
+ * attributes: {
1721
+ * 'first-name': 'Chris'
1722
+ * }
1723
+ * }
1724
+ * ```
1725
+ *
1726
+ * But the app desires to use `record.firstName; // 'Chris'`
1727
+ *
1728
+ * Then `name` would be set to `'firstName'` and
1729
+ * `sourceKey` would be set to `'first-name'`.
1730
+ *
1731
+ * This option is only needed when the value differs from name.
1732
+ */
1733
+ sourceKey?: string;
1734
+ /**
1735
+ * the name of the resource that this field
1736
+ * refers to. In the case of a polymorphic
1737
+ * relationship, this should be the trait
1738
+ * or abstract type.
1739
+ *
1740
+ * @public
1741
+ */
1742
+ type: string;
1743
+ /**
1744
+ * Options for hasMany are mandatory.
1745
+ *
1746
+ * @public
1747
+ */
1748
+ options: {
1749
+ /**
1750
+ * ::: warning ⚠️ Dangerous Feature Ahead
1751
+ * :::
1752
+ *
1753
+ * Configures which extensions this array is allowed to use.
1754
+ * Extensions are registered with the store's schema service
1755
+ * via {@link SchemaService.CAUTION_MEGA_DANGER_ZONE_registerExtension}
1756
+ *
1757
+ * Extensions should only be used for temporary enhancements
1758
+ * to arrays to support migrating away from deprecated behaviors
1759
+ * such as Ember's "ArrayLike" and FragmentArray from ember-data-model-fragments
1760
+ */
1761
+ arrayExtensions?: string[];
1762
+ /**
1763
+ * Whether the relationship is async
1764
+ *
1765
+ * MUST be false for PolarisMode + LinksMode
1766
+ *
1767
+ * If true, it is expected that the cache
1768
+ * data for this field will contain links
1769
+ * or pointers that can be used to fetch
1770
+ * the related resources when needed.
1771
+ *
1772
+ * When false, it is expected that all related
1773
+ * resources are loaded together with this resource,
1774
+ * and that the cache data for this field will
1775
+ * contain the full list of pointers.
1776
+ *
1777
+ * hasMany relationships do not support pagination.
1778
+ *
1779
+ * @public
1780
+ */
1781
+ async: false;
1782
+ /**
1783
+ * The name of the inverse field on the
1784
+ * related resource that points back to
1785
+ * this field on this resource to form a
1786
+ * bidirectional relationship.
1787
+ *
1788
+ * If null, the relationship is unidirectional.
1789
+ *
1790
+ * If the inverse field definition uses a sourceKey,
1791
+ * this should still be the name of the field, not the sourceKey.
1792
+ *
1793
+ * @public
1794
+ */
1795
+ inverse: string | null;
1796
+ /**
1797
+ * If this field is satisfying a polymorphic
1798
+ * relationship on another resource, then this
1799
+ * should be set to the trait or abstract type
1800
+ * that this resource implements.
1801
+ *
1802
+ * @public
1803
+ */
1804
+ as?: string;
1805
+ /**
1806
+ * Whether this field is a polymorphic relationship,
1807
+ * meaning that it can point to multiple types of
1808
+ * resources so long as they implement the trait
1809
+ * or abstract type specified in `type`.
1810
+ *
1811
+ * @public
1812
+ */
1813
+ polymorphic?: boolean;
1814
+ /**
1815
+ * Whether this field should ever make use of the legacy support infra
1816
+ * from @warp-drive/legacy/model and the LegacyNetworkMiddleware for adapters and serializers.
1817
+ *
1818
+ * MUST be true for PolarisMode + LinksMode
1819
+ *
1820
+ * When true, none of the legacy support will be utilized. Sync relationships
1821
+ * will be expected to already have all their data. When reloading a sync relationship
1822
+ * you would be expected to have a `related link` available from a prior relationship
1823
+ * payload e.g.
1824
+ *
1825
+ * ```ts
1826
+ * {
1827
+ * data: {
1828
+ * type: 'user',
1829
+ * id: '2',
1830
+ * attributes: { name: 'Chris' },
1831
+ * relationships: {
1832
+ * bestFriends: {
1833
+ * links: { related: "/users/1/bestFriends" },
1834
+ * data: [ { type: 'user', id: '1' } ],
1835
+ * }
1836
+ * }
1837
+ * },
1838
+ * included: [
1839
+ * { type: 'user', id: '1', attributes: { name: 'Krystan' } }
1840
+ * ]
1841
+ * }
1842
+ * ```
1843
+ *
1844
+ * Async relationships will be loaded via their link if needed.
1845
+ *
1846
+ * Activating LinksMode will *also* deactivate the deprecated
1847
+ * `resetOnRemoteUpdate` behavior for this field.
1848
+ *
1849
+ * This means that when new remote state is received, the cache
1850
+ * will intelligently commit any changes from local state that
1851
+ * are present in the remote data for this field, leaving any remaining
1852
+ * changes in local state still.
1853
+ *
1854
+ * Previously, the cache would clear local state of all changes
1855
+ * except for the addition of records still in the "new" state any
1856
+ * time the remote data for this field was updated.
1857
+ *
1858
+ * @public
1859
+ */
1860
+ linksMode: true;
1861
+ };
1862
+ }
1863
+ /**
1864
+ * A union of all possible LegacyMode field schemas.
1865
+ *
1866
+ * Available field schemas are:
1867
+ *
1868
+ * - {@link GenericField}
1869
+ * - {@link LegacyAliasField}
1870
+ * - {@link LocalField}
1871
+ * - {@link ObjectField}
1872
+ * - {@link SchemaObjectField}
1873
+ * - {@link ArrayField}
1874
+ * - {@link SchemaArrayField}
1875
+ * - {@link DerivedField}
1876
+ * - {@link ResourceField | ResourceField (not yet implemented)}
1877
+ * - {@link CollectionField | CollectionField (not yet implemented)}
1878
+ * - {@link LegacyAttributeField}
1879
+ * - {@link LegacyBelongsToField}
1880
+ * - {@link LegacyHasManyField}
1881
+ *
1882
+ * @public
1883
+ */
1884
+ export type LegacyModeFieldSchema = GenericField | LegacyAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
1885
+ /**
1886
+ * A union of all possible PolarisMode field schemas.
1887
+ *
1888
+ * Available field schemas are:
1889
+ *
1890
+ * - {@link GenericField}
1891
+ * - {@link PolarisAliasField}
1892
+ * - {@link LocalField}
1893
+ * - {@link ObjectField}
1894
+ * - {@link SchemaObjectField}
1895
+ * - {@link ArrayField}
1896
+ * - {@link SchemaArrayField}
1897
+ * - {@link DerivedField}
1898
+ * - {@link ResourceField | ResourceField (not yet implemented)}
1899
+ * - {@link CollectionField | CollectionField (not yet implemented)}
1900
+ * - {@link LinksModeBelongsToField}
1901
+ * - {@link LinksModeHasManyField}
1902
+ *
1903
+ * @public
1904
+ */
1905
+ export type PolarisModeFieldSchema = GenericField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LinksModeBelongsToField | LinksModeHasManyField;
1906
+ /**
1907
+ * A union of all possible LegacyMode and PolarisMode
1908
+ * field schemas.
1909
+ *
1910
+ * You likely will want to use PolarisModeFieldSchema,
1911
+ * LegacyModeFieldSchema, or ObjectFieldSchema instead
1912
+ * as appropriate as they are more specific and will
1913
+ * provide better guidance around what is valid.
1914
+ *
1915
+ * @public
1916
+ */
1917
+ export type FieldSchema = GenericField | LegacyAliasField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | ResourceField | CollectionField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
1918
+ /**
1919
+ * A union of all possible LegacyMode and PolarisMode
1920
+ * field schemas that represent data that could be in
1921
+ * the cache.
1922
+ *
1923
+ * In other words this will not include types like alias
1924
+ * fields, local fields, or derived fields.
1925
+ *
1926
+ * @public
1927
+ */
1928
+ export type CacheableFieldSchema = IdentityField | GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | ResourceField | CollectionField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
1929
+ /**
1930
+ * A union of all possible field schemas that can be
1931
+ * used in an ObjectSchema.
1932
+ *
1933
+ * @public
1934
+ */
1935
+ export type ObjectFieldSchema = LegacyAttributeField | GenericField | ObjectAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField;
1936
+ /**
1937
+ * Represents a schema for a primary resource in PolarisMode.
1938
+ *
1939
+ * Primary resources are objects with a unique identity of their
1940
+ * own which may allow them to appear in relationships, or in multiple
1941
+ * response documents.
1942
+ *
1943
+ * @public
1944
+ */
1945
+ export interface PolarisResourceSchema {
1946
+ legacy?: false;
1947
+ /**
1948
+ * For primary resources, this should be an IdentityField
1949
+ *
1950
+ * for schema-objects, this should be either a HashField or null
1951
+ *
1952
+ * @public
1953
+ */
1954
+ identity: IdentityField;
1955
+ /**
1956
+ * The name of the schema
1957
+ *
1958
+ * For cacheable resources, this should be the
1959
+ * primary resource type.
1960
+ *
1961
+ * For object schemas, this should be the name
1962
+ * of the object schema.
1963
+ *
1964
+ * The names of object and resource schemas share
1965
+ * a single namespace and must not conflict.
1966
+ *
1967
+ * We recommend a naming convention for object schemas
1968
+ * such as below for ensuring uniqueness:
1969
+ *
1970
+ * - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
1971
+ * - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
1972
+ * - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
1973
+ *
1974
+ * @public
1975
+ */
1976
+ type: string;
1977
+ /**
1978
+ * The fields that make up the shape of the resource
1979
+ *
1980
+ * @public
1981
+ */
1982
+ fields: PolarisModeFieldSchema[];
1983
+ /**
1984
+ * A list of traits that this resource implements. The fields for these
1985
+ * traits should still be defined in the fields array.
1986
+ *
1987
+ * Each trait should be a string that matches the `type` of another
1988
+ * resource schema. The trait can be abstract and reference a resource
1989
+ * type that is never defined as a schema.
1990
+ *
1991
+ * @public
1992
+ */
1993
+ traits?: string[];
1994
+ }
1995
+ /**
1996
+ * Represents a schema for a primary resource in LegacyMode
1997
+ *
1998
+ * Primary resources are objects with a unique identity of their
1999
+ * own which may allow them to appear in relationships, or in multiple
2000
+ * response documents.
2001
+ *
2002
+ * @public
2003
+ */
2004
+ export interface LegacyResourceSchema {
2005
+ /**
2006
+ * A flag indicating that this is a legacy resource schema
2007
+ *
2008
+ * @public
2009
+ */
2010
+ legacy: true;
2011
+ /**
2012
+ * This should be an IdentityField.
2013
+ *
2014
+ * To maximize compatibility with Model where `id` was the
2015
+ * name of the identity field, we recommend using `{ kind: '@id', name: 'id' }`
2016
+ * for records in legacy mode, but this is not required.
2017
+ *
2018
+ * @public
2019
+ */
2020
+ identity: IdentityField;
2021
+ /**
2022
+ * The name of the schema
2023
+ *
2024
+ * For cacheable resources, this should be the
2025
+ * primary resource type.
2026
+ *
2027
+ * The names of object and resource schemas share
2028
+ * a single namespace and must not conflict.
2029
+ *
2030
+ * We recommend a naming convention for object schemas
2031
+ * such as below for ensuring uniqueness:
2032
+ *
2033
+ * - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
2034
+ * - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
2035
+ * - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
2036
+ *
2037
+ * @public
2038
+ */
2039
+ type: string;
2040
+ /**
2041
+ * The fields that make up the shape of the resource
2042
+ *
2043
+ * @public
2044
+ */
2045
+ fields: LegacyModeFieldSchema[];
2046
+ /**
2047
+ * A list of traits that this resource implements. The fields for these
2048
+ * traits should still be defined in the fields array.
2049
+ *
2050
+ * Each trait should be a string that matches the `type` of another
2051
+ * resource schema. The trait can be abstract and reference a resource
2052
+ * type that is never defined as a schema.
2053
+ *
2054
+ * @public
2055
+ */
2056
+ traits?: string[];
2057
+ /**
2058
+ * ::: warning ⚠️ Dangerous Feature Ahead
2059
+ * :::
2060
+ *
2061
+ * Configures which extensions this resource should use.
2062
+ *
2063
+ * Extensions are registered with the store's schema service
2064
+ * via {@link SchemaService.registerDangerousObjectExtension}
2065
+ *
2066
+ * Extensions should only be used for temporary enhancements
2067
+ * to objects to support migrating away from deprecated patterns
2068
+ * like custom getters, computeds, and methods
2069
+ */
2070
+ objectExtensions?: string[];
2071
+ }
2072
+ /**
2073
+ * A type which represents a valid JSON schema
2074
+ * definition for either a PolarisMode or a
2075
+ * LegacyMode resource.
2076
+ *
2077
+ * Note, this is separate from the type returned
2078
+ * by the SchemaService which provides fields as a Map
2079
+ * instead of as an Array.
2080
+ *
2081
+ * @public
2082
+ */
2083
+ export type ResourceSchema = PolarisResourceSchema | LegacyResourceSchema;
2084
+ /**
2085
+ * Represents a schema for an object that is not
2086
+ * a primary resource (has no unique identity of its own).
2087
+ *
2088
+ * ObjectSchemas may not currently contain relationships.
2089
+ *
2090
+ * @public
2091
+ */
2092
+ export interface ObjectSchema {
2093
+ /**
2094
+ * Either a HashField from which to calculate an identity or null
2095
+ *
2096
+ * In the case of `null`, the object's identity will be based
2097
+ * on the referential identity of the object in the cache itself
2098
+ * when an identity is needed.
2099
+ *
2100
+ * @public
2101
+ */
2102
+ identity: HashField | null;
2103
+ /**
2104
+ * The name of the schema
2105
+ *
2106
+ * The names of object and resource schemas share
2107
+ * a single namespace and must not conflict.
2108
+ *
2109
+ * We recommend a naming convention for object schemas
2110
+ * such as below for ensuring uniqueness:
2111
+ *
2112
+ * - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
2113
+ * - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
2114
+ * - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
2115
+ *
2116
+ * @public
2117
+ */
2118
+ type: string;
2119
+ /**
2120
+ * The fields that make up the shape of the object
2121
+ *
2122
+ * @public
2123
+ */
2124
+ fields: ObjectFieldSchema[];
2125
+ /**
2126
+ * ::: warning ⚠️ Dangerous Feature Ahead
2127
+ * :::
2128
+ *
2129
+ * Configures which extensions this object should use.
2130
+ *
2131
+ * Extensions are registered with the store's schema service
2132
+ * via {@link SchemaService.registerDangerousObjectExtension}
2133
+ *
2134
+ * Extensions should only be used for temporary enhancements
2135
+ * to objects to support migrating away from deprecated patterns
2136
+ * like custom getters, computeds, and methods
2137
+ */
2138
+ objectExtensions?: string[];
2139
+ }
2140
+ export type Schema = ResourceSchema | ObjectSchema;
2141
+ /**
2142
+ * A trait for use on a PolarisMode record
2143
+ */
2144
+ export interface PolarisTrait {
2145
+ name: string;
2146
+ mode: "polaris";
2147
+ fields: PolarisModeFieldSchema[];
2148
+ traits?: string[];
2149
+ }
2150
+ /**
2151
+ * A trait for use on a LegacyMode record
2152
+ */
2153
+ export interface LegacyTrait {
2154
+ name: string;
2155
+ mode: "legacy";
2156
+ fields: LegacyModeFieldSchema[];
2157
+ traits?: string[];
2158
+ }
2159
+ /**
2160
+ * A union of
2161
+ * - {@link LegacyTrait}
2162
+ * - {@link PolarisTrait}
2163
+ */
2164
+ export type Trait = LegacyTrait | PolarisTrait;
2165
+ /**
2166
+ * A no-op type utility that enables type-checking resource schema
2167
+ * definitions.
2168
+ *
2169
+ * Will return the passed in schema.
2170
+ *
2171
+ * This will not validate relationship inverses or related types,
2172
+ * as doing so would require a full schema graph to be passed in
2173
+ * and no cycles in the graph to be present.
2174
+ *
2175
+ * @public
2176
+ */
2177
+ export declare function resourceSchema<T extends LegacyResourceSchema | PolarisResourceSchema>(schema: LegacyResourceSchema | PolarisResourceSchema): T;
2178
+ /**
2179
+ * A no-op type utility that enables type-checking object schema
2180
+ * definitions.
2181
+ *
2182
+ * Will return the passed in schema.
2183
+ *
2184
+ * @public
2185
+ */
2186
+ export declare function objectSchema<T extends ObjectSchema>(schema: T): T;
2187
+ /**
2188
+ * A type utility to narrow a schema to a ResourceSchema
2189
+ *
2190
+ * @public
2191
+ */
2192
+ export declare function isResourceSchema(schema: ResourceSchema | ObjectSchema): schema is ResourceSchema;
2193
+ /**
2194
+ * A type utility to narrow a schema to LegacyResourceSchema
2195
+ *
2196
+ * @public
2197
+ */
2198
+ export declare function isLegacyResourceSchema(schema: ResourceSchema | ObjectSchema): schema is LegacyResourceSchema;
2199
+ export type LegacyField = LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
2200
+ export type LegacyRelationshipField = LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;