@warp-drive/core 5.6.0-alpha.15 → 5.6.0-alpha.17

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 (286) hide show
  1. package/declarations/build-config/babel-macros.d.ts +1 -2
  2. package/declarations/build-config/canary-features.d.ts +1 -2
  3. package/declarations/build-config/debugging.d.ts +1 -2
  4. package/declarations/build-config/deprecations.d.ts +1 -2
  5. package/declarations/build-config/env.d.ts +1 -2
  6. package/declarations/build-config/macros.d.ts +1 -2
  7. package/declarations/build-config.d.ts +1 -2
  8. package/declarations/configure.d.ts +6 -7
  9. package/declarations/graph/-private/-diff.d.ts +21 -22
  10. package/declarations/graph/-private/-edge-definition.d.ts +134 -135
  11. package/declarations/graph/-private/-state.d.ts +93 -7
  12. package/declarations/graph/-private/-utils.d.ts +18 -13
  13. package/declarations/graph/-private/coerce-id.d.ts +6 -1
  14. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +15 -4
  15. package/declarations/graph/-private/edges/collection.d.ts +35 -36
  16. package/declarations/graph/-private/edges/implicit.d.ts +28 -29
  17. package/declarations/graph/-private/edges/resource.d.ts +19 -20
  18. package/declarations/graph/-private/graph.d.ts +83 -48
  19. package/declarations/graph/-private/normalize-link.d.ts +7 -2
  20. package/declarations/graph/-private/operations/add-to-related-records.d.ts +3 -4
  21. package/declarations/graph/-private/operations/merge-identifier.d.ts +2 -3
  22. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +3 -4
  23. package/declarations/graph/-private/operations/replace-related-record.d.ts +2 -3
  24. package/declarations/graph/-private/operations/replace-related-records.d.ts +58 -4
  25. package/declarations/graph/-private/operations/update-relationship.d.ts +11 -9
  26. package/declarations/graph/-private.d.ts +9 -10
  27. package/declarations/index.d.ts +11 -12
  28. package/declarations/reactive/-private/document.d.ts +143 -144
  29. package/declarations/reactive/-private/fields/compute.d.ts +31 -28
  30. package/declarations/reactive/-private/fields/extension.d.ts +2 -3
  31. package/declarations/reactive/-private/fields/managed-array.d.ts +19 -20
  32. package/declarations/reactive/-private/fields/managed-object.d.ts +16 -16
  33. package/declarations/reactive/-private/fields/many-array-manager.d.ts +15 -16
  34. package/declarations/reactive/-private/hooks.d.ts +3 -4
  35. package/declarations/reactive/-private/record.d.ts +61 -59
  36. package/declarations/reactive/-private/schema.d.ts +242 -224
  37. package/declarations/reactive/-private/symbols.d.ts +26 -1
  38. package/declarations/reactive/-private.d.ts +1 -2
  39. package/declarations/reactive.d.ts +4 -5
  40. package/declarations/request/-private/context.d.ts +34 -35
  41. package/declarations/request/-private/debug.d.ts +2 -3
  42. package/declarations/request/-private/fetch.d.ts +23 -24
  43. package/declarations/request/-private/future.d.ts +3 -4
  44. package/declarations/request/-private/manager.d.ts +159 -157
  45. package/declarations/request/-private/promise-cache.d.ts +21 -13
  46. package/declarations/request/-private/types.d.ts +124 -124
  47. package/declarations/request/-private/utils.d.ts +8 -9
  48. package/declarations/request.d.ts +5 -6
  49. package/declarations/store/-private/cache-handler/handler.d.ts +57 -52
  50. package/declarations/store/-private/cache-handler/types.d.ts +95 -96
  51. package/declarations/store/-private/cache-handler/utils.d.ts +16 -16
  52. package/declarations/store/-private/caches/cache-utils.d.ts +7 -4
  53. package/declarations/store/-private/caches/identifier-cache.d.ts +234 -246
  54. package/declarations/store/-private/caches/instance-cache.d.ts +47 -47
  55. package/declarations/store/-private/caches/resource-utils.d.ts +3 -4
  56. package/declarations/store/-private/debug/utils.d.ts +6 -7
  57. package/declarations/store/-private/default-cache-policy.d.ts +362 -361
  58. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +154 -159
  59. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +14 -14
  60. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +21 -22
  61. package/declarations/store/-private/managers/cache-manager.d.ts +440 -425
  62. package/declarations/store/-private/managers/notification-manager.d.ts +88 -83
  63. package/declarations/store/-private/managers/record-array-manager.d.ts +89 -90
  64. package/declarations/store/-private/network/request-cache.d.ts +86 -83
  65. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +252 -244
  66. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +154 -155
  67. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +148 -149
  68. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +28 -23
  69. package/declarations/store/-private/new-core-tmp/request-state.d.ts +263 -241
  70. package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +253 -223
  71. package/declarations/store/-private/record-arrays/identifier-array.d.ts +125 -121
  72. package/declarations/store/-private/record-arrays/many-array.d.ts +180 -184
  73. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +120 -110
  74. package/declarations/store/-private/store-service.d.ts +1594 -1586
  75. package/declarations/store/-private/utils/coerce-id.d.ts +6 -1
  76. package/declarations/store/-private/utils/construct-resource.d.ts +1 -2
  77. package/declarations/store/-private/utils/is-non-empty-string.d.ts +0 -1
  78. package/declarations/store/-private/utils/normalize-model-name.d.ts +0 -1
  79. package/declarations/store/-private/utils/uuid-polyfill.d.ts +0 -1
  80. package/declarations/store/-private.d.ts +31 -28
  81. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +96 -97
  82. package/declarations/store/-types/q/ds-model.d.ts +17 -18
  83. package/declarations/store/-types/q/identifier.d.ts +11 -12
  84. package/declarations/store/-types/q/record-instance.d.ts +16 -17
  85. package/declarations/store/-types/q/schema-service.d.ts +346 -343
  86. package/declarations/store/-types/q/store.d.ts +25 -28
  87. package/declarations/store.d.ts +1 -2
  88. package/declarations/types/-private.d.ts +16 -8
  89. package/declarations/types/cache/aliases.d.ts +11 -1
  90. package/declarations/types/cache/change.d.ts +4 -5
  91. package/declarations/types/cache/mutations.d.ts +51 -28
  92. package/declarations/types/cache/operations.d.ts +60 -47
  93. package/declarations/types/cache/relationship.d.ts +11 -9
  94. package/declarations/types/cache.d.ts +495 -484
  95. package/declarations/types/graph.d.ts +31 -32
  96. package/declarations/types/identifier.d.ts +83 -82
  97. package/declarations/types/json/raw.d.ts +1 -2
  98. package/declarations/types/params.d.ts +4 -5
  99. package/declarations/types/record.d.ts +117 -76
  100. package/declarations/types/request.d.ts +289 -266
  101. package/declarations/types/runtime.d.ts +8 -9
  102. package/declarations/types/schema/concepts.d.ts +19 -13
  103. package/declarations/types/schema/fields.d.ts +1712 -1713
  104. package/declarations/types/schema/fields.type-test.d.ts +0 -1
  105. package/declarations/types/spec/document.d.ts +28 -22
  106. package/declarations/types/spec/error.d.ts +16 -17
  107. package/declarations/types/spec/json-api-raw.d.ts +102 -102
  108. package/declarations/types/symbols.d.ts +74 -75
  109. package/declarations/types/utils.d.ts +5 -5
  110. package/declarations/types.d.ts +10 -11
  111. package/declarations/utils/string.d.ts +43 -40
  112. package/dist/graph/-private.js +1 -1
  113. package/dist/{handler-D1C3Innj.js → handler-C2T-IyJK.js} +1 -1
  114. package/dist/index.js +2 -2
  115. package/dist/reactive/-private.js +1 -1
  116. package/dist/reactive.js +42 -73
  117. package/dist/{request-state-CCOJIj5i.js → request-state-CjLph1LP.js} +275 -261
  118. package/dist/store/-private.js +2 -2
  119. package/dist/{symbols-epHW0Vm9.js → symbols-SIstXMLI.js} +1 -1
  120. package/dist/types/-private.js +1 -1
  121. package/package.json +4 -4
  122. package/declarations/build-config/babel-macros.d.ts.map +0 -1
  123. package/declarations/build-config/canary-features.d.ts.map +0 -1
  124. package/declarations/build-config/debugging.d.ts.map +0 -1
  125. package/declarations/build-config/deprecations.d.ts.map +0 -1
  126. package/declarations/build-config/env.d.ts.map +0 -1
  127. package/declarations/build-config/macros.d.ts.map +0 -1
  128. package/declarations/build-config.d.ts.map +0 -1
  129. package/declarations/configure.d.ts.map +0 -1
  130. package/declarations/graph/-private/-diff.d.ts.map +0 -1
  131. package/declarations/graph/-private/-edge-definition.d.ts.map +0 -1
  132. package/declarations/graph/-private/-state.d.ts.map +0 -1
  133. package/declarations/graph/-private/-utils.d.ts.map +0 -1
  134. package/declarations/graph/-private/coerce-id.d.ts.map +0 -1
  135. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts.map +0 -1
  136. package/declarations/graph/-private/edges/collection.d.ts.map +0 -1
  137. package/declarations/graph/-private/edges/implicit.d.ts.map +0 -1
  138. package/declarations/graph/-private/edges/resource.d.ts.map +0 -1
  139. package/declarations/graph/-private/graph.d.ts.map +0 -1
  140. package/declarations/graph/-private/normalize-link.d.ts.map +0 -1
  141. package/declarations/graph/-private/operations/add-to-related-records.d.ts.map +0 -1
  142. package/declarations/graph/-private/operations/merge-identifier.d.ts.map +0 -1
  143. package/declarations/graph/-private/operations/remove-from-related-records.d.ts.map +0 -1
  144. package/declarations/graph/-private/operations/replace-related-record.d.ts.map +0 -1
  145. package/declarations/graph/-private/operations/replace-related-records.d.ts.map +0 -1
  146. package/declarations/graph/-private/operations/update-relationship.d.ts.map +0 -1
  147. package/declarations/graph/-private.d.ts.map +0 -1
  148. package/declarations/index.d.ts.map +0 -1
  149. package/declarations/reactive/-private/document.d.ts.map +0 -1
  150. package/declarations/reactive/-private/fields/compute.d.ts.map +0 -1
  151. package/declarations/reactive/-private/fields/extension.d.ts.map +0 -1
  152. package/declarations/reactive/-private/fields/managed-array.d.ts.map +0 -1
  153. package/declarations/reactive/-private/fields/managed-object.d.ts.map +0 -1
  154. package/declarations/reactive/-private/fields/many-array-manager.d.ts.map +0 -1
  155. package/declarations/reactive/-private/hooks.d.ts.map +0 -1
  156. package/declarations/reactive/-private/record.d.ts.map +0 -1
  157. package/declarations/reactive/-private/schema.d.ts.map +0 -1
  158. package/declarations/reactive/-private/symbols.d.ts.map +0 -1
  159. package/declarations/reactive/-private.d.ts.map +0 -1
  160. package/declarations/reactive.d.ts.map +0 -1
  161. package/declarations/request/-private/context.d.ts.map +0 -1
  162. package/declarations/request/-private/debug.d.ts.map +0 -1
  163. package/declarations/request/-private/fetch.d.ts.map +0 -1
  164. package/declarations/request/-private/future.d.ts.map +0 -1
  165. package/declarations/request/-private/manager.d.ts.map +0 -1
  166. package/declarations/request/-private/promise-cache.d.ts.map +0 -1
  167. package/declarations/request/-private/types.d.ts.map +0 -1
  168. package/declarations/request/-private/utils.d.ts.map +0 -1
  169. package/declarations/request.d.ts.map +0 -1
  170. package/declarations/store/-private/cache-handler/handler.d.ts.map +0 -1
  171. package/declarations/store/-private/cache-handler/types.d.ts.map +0 -1
  172. package/declarations/store/-private/cache-handler/utils.d.ts.map +0 -1
  173. package/declarations/store/-private/caches/cache-utils.d.ts.map +0 -1
  174. package/declarations/store/-private/caches/identifier-cache.d.ts.map +0 -1
  175. package/declarations/store/-private/caches/instance-cache.d.ts.map +0 -1
  176. package/declarations/store/-private/caches/resource-utils.d.ts.map +0 -1
  177. package/declarations/store/-private/debug/utils.d.ts.map +0 -1
  178. package/declarations/store/-private/default-cache-policy.d.ts.map +0 -1
  179. package/declarations/store/-private/legacy-model-support/record-reference.d.ts.map +0 -1
  180. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts.map +0 -1
  181. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts.map +0 -1
  182. package/declarations/store/-private/managers/cache-manager.d.ts.map +0 -1
  183. package/declarations/store/-private/managers/notification-manager.d.ts.map +0 -1
  184. package/declarations/store/-private/managers/record-array-manager.d.ts.map +0 -1
  185. package/declarations/store/-private/network/request-cache.d.ts.map +0 -1
  186. package/declarations/store/-private/new-core-tmp/promise-state.d.ts.map +0 -1
  187. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts.map +0 -1
  188. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts.map +0 -1
  189. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts.map +0 -1
  190. package/declarations/store/-private/new-core-tmp/request-state.d.ts.map +0 -1
  191. package/declarations/store/-private/new-core-tmp/request-subscription.d.ts.map +0 -1
  192. package/declarations/store/-private/record-arrays/identifier-array.d.ts.map +0 -1
  193. package/declarations/store/-private/record-arrays/many-array.d.ts.map +0 -1
  194. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts.map +0 -1
  195. package/declarations/store/-private/store-service.d.ts.map +0 -1
  196. package/declarations/store/-private/store-service.type-test.d.ts +0 -2
  197. package/declarations/store/-private/store-service.type-test.d.ts.map +0 -1
  198. package/declarations/store/-private/utils/coerce-id.d.ts.map +0 -1
  199. package/declarations/store/-private/utils/construct-resource.d.ts.map +0 -1
  200. package/declarations/store/-private/utils/is-non-empty-string.d.ts.map +0 -1
  201. package/declarations/store/-private/utils/normalize-model-name.d.ts.map +0 -1
  202. package/declarations/store/-private/utils/uuid-polyfill.d.ts.map +0 -1
  203. package/declarations/store/-private.d.ts.map +0 -1
  204. package/declarations/store/-types/q/cache-capabilities-manager.d.ts.map +0 -1
  205. package/declarations/store/-types/q/ds-model.d.ts.map +0 -1
  206. package/declarations/store/-types/q/identifier.d.ts.map +0 -1
  207. package/declarations/store/-types/q/promise-proxies.d.ts +0 -2
  208. package/declarations/store/-types/q/promise-proxies.d.ts.map +0 -1
  209. package/declarations/store/-types/q/record-data-json-api.d.ts +0 -31
  210. package/declarations/store/-types/q/record-data-json-api.d.ts.map +0 -1
  211. package/declarations/store/-types/q/record-instance.d.ts.map +0 -1
  212. package/declarations/store/-types/q/schema-service.d.ts.map +0 -1
  213. package/declarations/store/-types/q/store.d.ts.map +0 -1
  214. package/declarations/store.d.ts.map +0 -1
  215. package/declarations/types/-private.d.ts.map +0 -1
  216. package/declarations/types/cache/aliases.d.ts.map +0 -1
  217. package/declarations/types/cache/change.d.ts.map +0 -1
  218. package/declarations/types/cache/mutations.d.ts.map +0 -1
  219. package/declarations/types/cache/operations.d.ts.map +0 -1
  220. package/declarations/types/cache/relationship.d.ts.map +0 -1
  221. package/declarations/types/cache.d.ts.map +0 -1
  222. package/declarations/types/graph.d.ts.map +0 -1
  223. package/declarations/types/identifier.d.ts.map +0 -1
  224. package/declarations/types/json/raw.d.ts.map +0 -1
  225. package/declarations/types/params.d.ts.map +0 -1
  226. package/declarations/types/record.d.ts.map +0 -1
  227. package/declarations/types/record.type-test.d.ts +0 -2
  228. package/declarations/types/record.type-test.d.ts.map +0 -1
  229. package/declarations/types/request.d.ts.map +0 -1
  230. package/declarations/types/request.type-test.d.ts +0 -2
  231. package/declarations/types/request.type-test.d.ts.map +0 -1
  232. package/declarations/types/runtime.d.ts.map +0 -1
  233. package/declarations/types/schema/concepts.d.ts.map +0 -1
  234. package/declarations/types/schema/fields.d.ts.map +0 -1
  235. package/declarations/types/schema/fields.type-test.d.ts.map +0 -1
  236. package/declarations/types/spec/document.d.ts.map +0 -1
  237. package/declarations/types/spec/error.d.ts.map +0 -1
  238. package/declarations/types/spec/json-api-raw.d.ts.map +0 -1
  239. package/declarations/types/symbols.d.ts.map +0 -1
  240. package/declarations/types/utils.d.ts.map +0 -1
  241. package/declarations/types.d.ts.map +0 -1
  242. package/declarations/utils/string.d.ts.map +0 -1
  243. package/dist/build-config/babel-macros.js.map +0 -1
  244. package/dist/build-config/canary-features.js.map +0 -1
  245. package/dist/build-config/debugging.js.map +0 -1
  246. package/dist/build-config/deprecations.js.map +0 -1
  247. package/dist/build-config/env.js.map +0 -1
  248. package/dist/build-config/macros.js.map +0 -1
  249. package/dist/build-config.js.map +0 -1
  250. package/dist/configure-B48bFHOl.js.map +0 -1
  251. package/dist/configure.js.map +0 -1
  252. package/dist/context-COmAnXUQ.js.map +0 -1
  253. package/dist/graph/-private.js.map +0 -1
  254. package/dist/handler-D1C3Innj.js.map +0 -1
  255. package/dist/index.js.map +0 -1
  256. package/dist/reactive/-private.js.map +0 -1
  257. package/dist/reactive.js.map +0 -1
  258. package/dist/request-state-CCOJIj5i.js.map +0 -1
  259. package/dist/request.js.map +0 -1
  260. package/dist/store/-private.js.map +0 -1
  261. package/dist/store.js.map +0 -1
  262. package/dist/symbols-epHW0Vm9.js.map +0 -1
  263. package/dist/types/-private.js.map +0 -1
  264. package/dist/types/cache/aliases.js.map +0 -1
  265. package/dist/types/cache/change.js.map +0 -1
  266. package/dist/types/cache/mutations.js.map +0 -1
  267. package/dist/types/cache/operations.js.map +0 -1
  268. package/dist/types/cache/relationship.js.map +0 -1
  269. package/dist/types/cache.js.map +0 -1
  270. package/dist/types/graph.js.map +0 -1
  271. package/dist/types/identifier.js.map +0 -1
  272. package/dist/types/json/raw.js.map +0 -1
  273. package/dist/types/params.js.map +0 -1
  274. package/dist/types/record.js.map +0 -1
  275. package/dist/types/request.js.map +0 -1
  276. package/dist/types/runtime.js.map +0 -1
  277. package/dist/types/schema/concepts.js.map +0 -1
  278. package/dist/types/schema/fields.js.map +0 -1
  279. package/dist/types/schema/fields.type-test.js.map +0 -1
  280. package/dist/types/spec/document.js.map +0 -1
  281. package/dist/types/spec/error.js.map +0 -1
  282. package/dist/types/spec/json-api-raw.js.map +0 -1
  283. package/dist/types/symbols.js.map +0 -1
  284. package/dist/types/utils.js.map +0 -1
  285. package/dist/types.js.map +0 -1
  286. package/dist/utils/string.js.map +0 -1
@@ -1,48 +1,47 @@
1
- import type { AddToResourceRelationshipMutation as AddResourceMutation, RemoveFromResourceRelationshipMutation as RemoveResourceMutation } from './cache/mutations.ts';
2
- import type { AddToResourceRelationshipOperation as AddResourceOperation, RemoveFromResourceRelationshipOperation as RemoveResourceOperation, UpdateResourceRelationshipOperation } from './cache/operations.ts';
3
- import type { StableRecordIdentifier } from './identifier.ts';
4
- import type { CollectionResourceRelationship, SingleResourceRelationship } from './spec/json-api-raw.ts';
1
+ import type { AddToResourceRelationshipMutation as AddResourceMutation, RemoveFromResourceRelationshipMutation as RemoveResourceMutation } from "./cache/mutations.js";
2
+ import type { AddToResourceRelationshipOperation as AddResourceOperation, RemoveFromResourceRelationshipOperation as RemoveResourceOperation, UpdateResourceRelationshipOperation } from "./cache/operations.js";
3
+ import type { StableRecordIdentifier } from "./identifier.js";
4
+ import type { CollectionResourceRelationship, SingleResourceRelationship } from "./spec/json-api-raw.js";
5
5
  export interface Operation {
6
- op: string;
6
+ op: string;
7
7
  }
8
8
  export interface UpdateRelationshipOperation {
9
- op: 'updateRelationship';
10
- record: StableRecordIdentifier;
11
- field: string;
12
- value: SingleResourceRelationship | CollectionResourceRelationship;
9
+ op: "updateRelationship";
10
+ record: StableRecordIdentifier;
11
+ field: string;
12
+ value: SingleResourceRelationship | CollectionResourceRelationship;
13
13
  }
14
14
  export interface DeleteRecordOperation {
15
- op: 'deleteRecord';
16
- record: StableRecordIdentifier;
17
- isNew: boolean;
15
+ op: "deleteRecord";
16
+ record: StableRecordIdentifier;
17
+ isNew: boolean;
18
18
  }
19
19
  export interface UnknownOperation {
20
- op: 'never';
21
- record: StableRecordIdentifier;
22
- field: string;
20
+ op: "never";
21
+ record: StableRecordIdentifier;
22
+ field: string;
23
23
  }
24
24
  export interface ReplaceRelatedRecordOperation {
25
- op: 'replaceRelatedRecord';
26
- record: StableRecordIdentifier;
27
- field: string;
28
- value: StableRecordIdentifier | null;
29
- prior?: StableRecordIdentifier;
30
- index?: number;
25
+ op: "replaceRelatedRecord";
26
+ record: StableRecordIdentifier;
27
+ field: string;
28
+ value: StableRecordIdentifier | null;
29
+ prior?: StableRecordIdentifier;
30
+ index?: number;
31
31
  }
32
32
  export interface SortRelatedRecords {
33
- op: 'sortRelatedRecords';
34
- record: StableRecordIdentifier;
35
- field: string;
36
- value: StableRecordIdentifier[];
33
+ op: "sortRelatedRecords";
34
+ record: StableRecordIdentifier;
35
+ field: string;
36
+ value: StableRecordIdentifier[];
37
37
  }
38
38
  export interface ReplaceRelatedRecordsOperation {
39
- op: 'replaceRelatedRecords';
40
- record: StableRecordIdentifier;
41
- field: string;
42
- value: StableRecordIdentifier[];
43
- prior?: StableRecordIdentifier[];
44
- index?: number;
39
+ op: "replaceRelatedRecords";
40
+ record: StableRecordIdentifier;
41
+ field: string;
42
+ value: StableRecordIdentifier[];
43
+ prior?: StableRecordIdentifier[];
44
+ index?: number;
45
45
  }
46
46
  export type RemoteRelationshipOperation = UpdateResourceRelationshipOperation | UpdateRelationshipOperation | ReplaceRelatedRecordOperation | ReplaceRelatedRecordsOperation | RemoveResourceOperation | AddResourceOperation | DeleteRecordOperation | SortRelatedRecords;
47
47
  export type LocalRelationshipOperation = ReplaceRelatedRecordsOperation | ReplaceRelatedRecordOperation | AddResourceMutation | RemoveResourceMutation | SortRelatedRecords;
48
- //# sourceMappingURL=graph.d.ts.map
@@ -1,111 +1,112 @@
1
+ // provided for additional debuggability
1
2
  export declare const DEBUG_CLIENT_ORIGINATED: unique symbol;
2
3
  export declare const DEBUG_IDENTIFIER_BUCKET: unique symbol;
3
4
  export declare const DEBUG_STALE_CACHE_OWNER: unique symbol;
4
- export declare const CACHE_OWNER: '__$co';
5
- export type IdentifierBucket = 'record' | 'document';
5
+ // also present in production
6
+ export declare const CACHE_OWNER: "__$co";
7
+ export type IdentifierBucket = "record" | "document";
6
8
  export interface Identifier {
7
- lid: string;
8
- clientId?: string;
9
+ lid: string;
10
+ clientId?: string;
9
11
  }
10
12
  export interface ExistingRecordIdentifier<T extends string = string> extends Identifier {
11
- id: string;
12
- type: T;
13
+ id: string;
14
+ type: T;
13
15
  }
14
16
  export interface NewRecordIdentifier<T extends string = string> extends Identifier {
15
- id: string | null;
16
- type: T;
17
+ id: string | null;
18
+ type: T;
17
19
  }
18
20
  export type StableDocumentIdentifier = {
19
- lid: string;
21
+ lid: string;
20
22
  };
21
23
  export type RequestKey = StableDocumentIdentifier;
22
24
  /**
23
- * An Identifier specific to a record which may or may not
24
- * be present in the cache.
25
- *
26
- * The absence of an `id` DOES NOT indicate that this
27
- * Identifier is for a new client-created record as it
28
- * may also indicate that it was generated for a secondary
29
- * index and the primary `id` index is not yet known.
30
- *
31
- * @internal
32
- */
25
+ * An Identifier specific to a record which may or may not
26
+ * be present in the cache.
27
+ *
28
+ * The absence of an `id` DOES NOT indicate that this
29
+ * Identifier is for a new client-created record as it
30
+ * may also indicate that it was generated for a secondary
31
+ * index and the primary `id` index is not yet known.
32
+ *
33
+ * @internal
34
+ */
33
35
  export type RecordIdentifier<T extends string = string> = ExistingRecordIdentifier<T> | NewRecordIdentifier<T>;
34
36
  /**
35
- * Used when an Identifier is known to be the stable version
36
- *
37
- * @internal
38
- */
37
+ * Used when an Identifier is known to be the stable version
38
+ *
39
+ * @internal
40
+ */
39
41
  export interface StableIdentifier extends Identifier {
40
- [DEBUG_IDENTIFIER_BUCKET]?: string;
42
+ [DEBUG_IDENTIFIER_BUCKET]?: string;
41
43
  }
42
44
  /**
43
- * Used when a StableRecordIdentifier was not created locally as part
44
- * of a call to store.createRecord
45
- *
46
- * Distinguishing between this Identifier and one for a client created
47
- * record that was created with an ID is generally speaking not possible
48
- * at runtime, so anything with an ID typically narrows to this.
49
- *
50
- * @internal
51
- */
45
+ * Used when a StableRecordIdentifier was not created locally as part
46
+ * of a call to store.createRecord
47
+ *
48
+ * Distinguishing between this Identifier and one for a client created
49
+ * record that was created with an ID is generally speaking not possible
50
+ * at runtime, so anything with an ID typically narrows to this.
51
+ *
52
+ * @internal
53
+ */
52
54
  export interface StableExistingRecordIdentifier<T extends string = string> extends StableIdentifier {
53
- id: string;
54
- type: T;
55
- [DEBUG_CLIENT_ORIGINATED]?: boolean;
56
- [CACHE_OWNER]: number | undefined;
57
- [DEBUG_STALE_CACHE_OWNER]?: number | undefined;
55
+ id: string;
56
+ type: T;
57
+ [DEBUG_CLIENT_ORIGINATED]?: boolean;
58
+ [CACHE_OWNER]: number | undefined;
59
+ [DEBUG_STALE_CACHE_OWNER]?: number | undefined;
58
60
  }
59
61
  /**
60
- * Used when a StableRecordIdentifier was created locally
61
- * (by a call to store.createRecord).
62
- *
63
- * It is possible in rare circumstances to have a StableRecordIdentifier
64
- * that is not for a new record but does not have an ID. This would
65
- * happen if a user intentionally created one for use with a secondary-index
66
- * prior to the record having been fully loaded.
67
- *
68
- * @internal
69
- */
62
+ * Used when a StableRecordIdentifier was created locally
63
+ * (by a call to store.createRecord).
64
+ *
65
+ * It is possible in rare circumstances to have a StableRecordIdentifier
66
+ * that is not for a new record but does not have an ID. This would
67
+ * happen if a user intentionally created one for use with a secondary-index
68
+ * prior to the record having been fully loaded.
69
+ *
70
+ * @internal
71
+ */
70
72
  export interface StableNewRecordIdentifier<T extends string = string> extends StableIdentifier {
71
- id: string | null;
72
- type: T;
73
- [DEBUG_CLIENT_ORIGINATED]?: boolean;
74
- [CACHE_OWNER]: number | undefined;
75
- [DEBUG_STALE_CACHE_OWNER]?: number | undefined;
73
+ id: string | null;
74
+ type: T;
75
+ [DEBUG_CLIENT_ORIGINATED]?: boolean;
76
+ [CACHE_OWNER]: number | undefined;
77
+ [DEBUG_STALE_CACHE_OWNER]?: number | undefined;
76
78
  }
77
79
  /**
78
- * A referentially stable object with a unique string (lid) that can be used
79
- * as a reference to data in the cache.
80
- *
81
- * Every record instance has a unique identifier, and identifiers may refer
82
- * to data that has never been loaded (for instance, in an async relationship).
83
- *
84
- * @class StableRecordIdentifier
85
- * @public
86
- */
80
+ * A referentially stable object with a unique string (lid) that can be used
81
+ * as a reference to data in the cache.
82
+ *
83
+ * Every record instance has a unique identifier, and identifiers may refer
84
+ * to data that has never been loaded (for instance, in an async relationship).
85
+ *
86
+ * @class StableRecordIdentifier
87
+ * @public
88
+ */
87
89
  /**
88
- * A string representing a unique identity.
89
- *
90
- * @property lid
91
- * @type {String}
92
- * @public
93
- */
90
+ * A string representing a unique identity.
91
+ *
92
+ * @property lid
93
+ * @type {String}
94
+ * @public
95
+ */
94
96
  /**
95
- * the primary resource `type` or `modelName` this identity belongs to.
96
- *
97
- * @property type
98
- * @type {String}
99
- * @public
100
- */
97
+ * the primary resource `type` or `modelName` this identity belongs to.
98
+ *
99
+ * @property type
100
+ * @type {String}
101
+ * @public
102
+ */
101
103
  /**
102
- * the primary id for the record this identity belongs to. `null`
103
- * if not yet assigned an id.
104
- *
105
- * @property id
106
- * @type {String | null}
107
- * @public
108
- */
104
+ * the primary id for the record this identity belongs to. `null`
105
+ * if not yet assigned an id.
106
+ *
107
+ * @property id
108
+ * @type {String | null}
109
+ * @public
110
+ */
109
111
  export type StableRecordIdentifier<T extends string = string> = StableExistingRecordIdentifier<T> | StableNewRecordIdentifier<T>;
110
112
  export type ResourceKey<T extends string = string> = StableRecordIdentifier<T>;
111
- //# sourceMappingURL=identifier.d.ts.map
@@ -1,7 +1,6 @@
1
1
  export type PrimitiveValue = string | number | boolean | null;
2
2
  export interface ObjectValue {
3
- [key: string]: Value;
3
+ [key: string]: Value;
4
4
  }
5
5
  export type ArrayValue = Value[];
6
6
  export type Value = PrimitiveValue | ArrayValue | ObjectValue;
7
- //# sourceMappingURL=raw.d.ts.map
@@ -1,10 +1,9 @@
1
- import type { Includes, TypedRecordInstance } from './record.ts';
1
+ import type { Includes, TypedRecordInstance } from "./record.js";
2
2
  export type SerializablePrimitive = string | number | boolean | null;
3
3
  export type Serializable = SerializablePrimitive | SerializablePrimitive[];
4
4
  export type QueryParamsSerializationOptions = {
5
- arrayFormat?: 'bracket' | 'indices' | 'repeat' | 'comma';
5
+ arrayFormat?: "bracket" | "indices" | "repeat" | "comma";
6
6
  };
7
7
  export type QueryParamsSource<T = unknown> = ({
8
- include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];
9
- } & Record<Exclude<string, 'include'>, Serializable>) | URLSearchParams;
10
- //# sourceMappingURL=params.d.ts.map
8
+ include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];
9
+ } & Record<Exclude<string, "include">, Serializable>) | URLSearchParams;
@@ -1,96 +1,137 @@
1
- import type { Type } from './symbols.ts';
1
+ import type { Type } from "./symbols.js";
2
2
  /**
3
- * Records may be anything, They don't even
4
- * have to be objects.
5
- *
6
- * Whatever they are, if they have a Type
7
- * property, that property will be used by WarpDrive
8
- * and WarpDrive to provide better type safety and
9
- * intellisense.
10
- *
11
- * @class TypedRecordInstance
12
- */
3
+ * Records may be anything, They don't even
4
+ * have to be objects.
5
+ *
6
+ * Whatever they are, if they have a Type
7
+ * property, that property will be used by WarpDrive
8
+ * and WarpDrive to provide better type safety and
9
+ * intellisense.
10
+ *
11
+ * @class TypedRecordInstance
12
+ */
13
13
  export interface TypedRecordInstance {
14
- /**
15
- * The type of the resource.
16
- *
17
- * This is an optional feature that can be used by
18
- * record implementations to provide a typescript
19
- * hint for the type of the resource.
20
- *
21
- * When used, WarpDrive APIs can
22
- * take advantage of this to provide better type
23
- * safety and intellisense.
24
- *
25
- * @property [Type]
26
- * @type {Type}
27
- * @type {String}
28
- */
29
- [Type]: string;
14
+ /**
15
+ * The type of the resource.
16
+ *
17
+ * This is an optional feature that can be used by
18
+ * record implementations to provide a typescript
19
+ * hint for the type of the resource.
20
+ *
21
+ * When used, WarpDrive APIs can
22
+ * take advantage of this to provide better type
23
+ * safety and intellisense.
24
+ *
25
+ * @property [Type]
26
+ * @type {Type}
27
+ * @type {String}
28
+ */
29
+ [Type]: string;
30
30
  }
31
31
  /**
32
- * A type utility that extracts the Type if available,
33
- * otherwise it returns never.
34
- *
35
- */
32
+ * A type utility that extracts the Type if available,
33
+ * otherwise it returns never.
34
+ *
35
+ */
36
36
  export type TypeFromInstance<T> = T extends TypedRecordInstance ? T[typeof Type] : never;
37
37
  /**
38
- * A type utility that extracts the Type if available,
39
- * otherwise it returns string
40
- *
41
- */
38
+ * A type utility that extracts the Type if available,
39
+ * otherwise it returns string
40
+ *
41
+ */
42
42
  export type TypeFromInstanceOrString<T> = T extends TypedRecordInstance ? T[typeof Type] : string;
43
43
  type IsUniqueSymbol<T> = T extends `___(unique) Symbol(${string})` ? true : false;
44
44
  type Unpacked<T> = T extends (infer U)[] ? U : T;
45
45
  type NONE = {
46
- __NONE: never;
46
+ __NONE: never;
47
47
  };
48
- type __InternalExtract<MAX_DEPTH extends _DEPTHCOUNT, T extends TypedRecordInstance, V extends TypedRecordInstance, IncludePrefix extends boolean, Ignore, Pre extends string, DEPTH extends _DEPTHCOUNT> = V extends T ? IncludePrefix extends false ? V[typeof Type] : Pre : V extends Ignore ? IncludePrefix extends false ? V[typeof Type] : Pre : IS_MAX_DEPTH<DEPTH, MAX_DEPTH> extends true ? Pre : ExtractUnion<MAX_DEPTH, V, IncludePrefix, Ignore | T, Pre, INC_DEPTH<DEPTH>>;
49
- type __ExtractIfRecord<MAX_DEPTH extends _DEPTHCOUNT, T extends TypedRecordInstance, V, IncludePrefix extends boolean, Ignore, Pre extends string, DEPTH extends _DEPTHCOUNT> = V extends TypedRecordInstance ? __InternalExtract<MAX_DEPTH, T, V, IncludePrefix, Ignore, Pre, DEPTH> : never;
50
- type _ExtractUnion<MAX_DEPTH extends _DEPTHCOUNT, T extends TypedRecordInstance, IncludePrefix extends boolean, Ignore, Pre, DEPTH extends _DEPTHCOUNT> = {
51
- [K in keyof T]: IsUniqueSymbol<K> extends true ? never : K extends string ? __ExtractIfRecord<MAX_DEPTH, T, Unpacked<Awaited<T[K]>>, IncludePrefix, Ignore, Pre extends string ? `${Pre}.${K}` : K, DEPTH> : never;
52
- }[keyof T];
48
+ type __InternalExtract<
49
+ MAX_DEPTH extends _DEPTHCOUNT,
50
+ T extends TypedRecordInstance,
51
+ V extends TypedRecordInstance,
52
+ IncludePrefix extends boolean,
53
+ Ignore,
54
+ Pre extends string,
55
+ DEPTH extends _DEPTHCOUNT
56
+ > = V extends T ? IncludePrefix extends false ? V[typeof Type] : Pre : V extends Ignore ? IncludePrefix extends false ? V[typeof Type] : Pre : IS_MAX_DEPTH<DEPTH, MAX_DEPTH> extends true ? Pre : ExtractUnion<MAX_DEPTH, V, IncludePrefix, Ignore | T, Pre, INC_DEPTH<DEPTH>>;
57
+ type __ExtractIfRecord<
58
+ MAX_DEPTH extends _DEPTHCOUNT,
59
+ T extends TypedRecordInstance,
60
+ V,
61
+ IncludePrefix extends boolean,
62
+ Ignore,
63
+ Pre extends string,
64
+ DEPTH extends _DEPTHCOUNT
65
+ > = V extends TypedRecordInstance ? __InternalExtract<MAX_DEPTH, T, V, IncludePrefix, Ignore, Pre, DEPTH> : never;
66
+ type _ExtractUnion<
67
+ MAX_DEPTH extends _DEPTHCOUNT,
68
+ T extends TypedRecordInstance,
69
+ IncludePrefix extends boolean,
70
+ Ignore,
71
+ Pre,
72
+ DEPTH extends _DEPTHCOUNT
73
+ > = { [K in keyof T] : IsUniqueSymbol<K> extends true ? never : K extends string ? __ExtractIfRecord<MAX_DEPTH, T, Unpacked<Awaited<T[K]>>, IncludePrefix, Ignore, Pre extends string ? `${Pre}.${K}` : K, DEPTH> : never }[keyof T];
53
74
  /**
54
- * A Utility that extracts either resource types or resource paths from a TypedRecordInstance.
55
- *
56
- * Its limitations are mostly around its intentional non-recursiveness. It presumes that APIs which
57
- * implement includes will not allow cyclical include paths, and will collapse includes by type.
58
- *
59
- * This follows closer to the JSON:API fields spec than to the includes spec in nature, but in
60
- * practice it is so impracticle for an API to allow z-algo include paths that this is probably
61
- * reasonable.
62
- *
63
- * We may need to revisit this in the future, opting to either make this restriction optional or
64
- * to allow for other strategies.
65
- *
66
- * There's a 90% chance this particular implementation belongs being in the JSON:API package instead
67
- * of core-types, but it's here for now.
68
- *
69
- */
70
- type ExtractUnion<MAX_DEPTH extends _DEPTHCOUNT, T extends TypedRecordInstance, IncludePrefix extends boolean = false, Ignore = NONE, Pre = NONE, DEPTH extends _DEPTHCOUNT = 1> = Exclude<IncludePrefix extends true ? // if we want to include prefix, we union with the prefix. Outer Exclude will filter any "NONE" types
71
- _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | Pre : // Else we just union the types.
72
- _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | T[typeof Type], NONE>;
75
+ * A Utility that extracts either resource types or resource paths from a TypedRecordInstance.
76
+ *
77
+ * Its limitations are mostly around its intentional non-recursiveness. It presumes that APIs which
78
+ * implement includes will not allow cyclical include paths, and will collapse includes by type.
79
+ *
80
+ * This follows closer to the JSON:API fields spec than to the includes spec in nature, but in
81
+ * practice it is so impracticle for an API to allow z-algo include paths that this is probably
82
+ * reasonable.
83
+ *
84
+ * We may need to revisit this in the future, opting to either make this restriction optional or
85
+ * to allow for other strategies.
86
+ *
87
+ * There's a 90% chance this particular implementation belongs being in the JSON:API package instead
88
+ * of core-types, but it's here for now.
89
+ *
90
+ */
91
+ type ExtractUnion<
92
+ MAX_DEPTH extends _DEPTHCOUNT,
93
+ T extends TypedRecordInstance,
94
+ IncludePrefix extends boolean = false,
95
+ Ignore = NONE,
96
+ Pre = NONE,
97
+ DEPTH extends _DEPTHCOUNT = 1
98
+ > = Exclude<IncludePrefix extends true ? _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | Pre : _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | T[typeof Type], NONE>;
73
99
  type _DEPTHCOUNT = 1 | 2 | 3 | 4 | 5;
74
100
  type INC_DEPTH<START extends _DEPTHCOUNT> = START extends 1 ? 2 : START extends 2 ? 3 : START extends 3 ? 4 : 5;
75
- type IS_MAX_DEPTH<DEPTH extends _DEPTHCOUNT, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = DEPTH extends MAX_DEPTH ? true : false;
101
+ type IS_MAX_DEPTH<
102
+ DEPTH extends _DEPTHCOUNT,
103
+ MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH
104
+ > = DEPTH extends MAX_DEPTH ? true : false;
76
105
  type DEFAULT_MAX_DEPTH = 3;
77
106
  /**
78
- * A utility that provides the union of all ResourceName for all potential
79
- * includes for the given TypedRecordInstance.
80
- *
81
- */
82
- export type ExtractSuggestedCacheTypes<T extends TypedRecordInstance, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = ExtractUnion<MAX_DEPTH, T>;
107
+ * A utility that provides the union of all ResourceName for all potential
108
+ * includes for the given TypedRecordInstance.
109
+ *
110
+ */
111
+ export type ExtractSuggestedCacheTypes<
112
+ T extends TypedRecordInstance,
113
+ MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH
114
+ > = ExtractUnion<MAX_DEPTH, T>;
83
115
  /**
84
- * A utility that provides the union type of all valid include paths for the given
85
- * TypedRecordInstance.
86
- *
87
- * Cyclical paths are filtered out.
88
- *
89
- */
90
- export type Includes<T extends TypedRecordInstance, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = ExtractUnion<MAX_DEPTH, T, true>;
116
+ * A utility that provides the union type of all valid include paths for the given
117
+ * TypedRecordInstance.
118
+ *
119
+ * Cyclical paths are filtered out.
120
+ *
121
+ */
122
+ export type Includes<
123
+ T extends TypedRecordInstance,
124
+ MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH
125
+ > = ExtractUnion<MAX_DEPTH, T, true>;
91
126
  export type OpaqueRecordInstance = unknown;
92
- export type _StringSatisfiesIncludes<T extends string, SET extends string, FT extends string> = T extends SET ? FT : T extends `${infer U},${infer V}` ? U extends SET ? _StringSatisfiesIncludes<V, Exclude<SET, U>, FT> : never : never;
93
- export type StringSatisfiesIncludes<T extends string, SET extends string> = _StringSatisfiesIncludes<T, SET, T>;
127
+ export type _StringSatisfiesIncludes<
128
+ T extends string,
129
+ SET extends string,
130
+ FT extends string
131
+ > = T extends SET ? FT : T extends `${infer U},${infer V}` ? U extends SET ? _StringSatisfiesIncludes<V, Exclude<SET, U>, FT> : never : never;
132
+ export type StringSatisfiesIncludes<
133
+ T extends string,
134
+ SET extends string
135
+ > = _StringSatisfiesIncludes<T, SET, T>;
94
136
  export declare function createIncludeValidator<T extends TypedRecordInstance>(): <U extends string>(includes: StringSatisfiesIncludes<U, Includes<T>>) => U;
95
137
  export {};
96
- //# sourceMappingURL=record.d.ts.map