@typicalday/firegraph 0.11.2 → 0.13.0

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 (78) hide show
  1. package/README.md +355 -78
  2. package/dist/backend-DuvHGgK1.d.cts +1897 -0
  3. package/dist/backend-DuvHGgK1.d.ts +1897 -0
  4. package/dist/backend.cjs +365 -5
  5. package/dist/backend.cjs.map +1 -1
  6. package/dist/backend.d.cts +25 -5
  7. package/dist/backend.d.ts +25 -5
  8. package/dist/backend.js +209 -7
  9. package/dist/backend.js.map +1 -1
  10. package/dist/chunk-2DHMNTV6.js +16 -0
  11. package/dist/chunk-2DHMNTV6.js.map +1 -0
  12. package/dist/chunk-4MMQ5W74.js +288 -0
  13. package/dist/chunk-4MMQ5W74.js.map +1 -0
  14. package/dist/{chunk-5753Y42M.js → chunk-C2QMD7RY.js} +6 -10
  15. package/dist/chunk-C2QMD7RY.js.map +1 -0
  16. package/dist/chunk-D4J7Z4FE.js +67 -0
  17. package/dist/chunk-D4J7Z4FE.js.map +1 -0
  18. package/dist/chunk-EQJUUVFG.js +14 -0
  19. package/dist/chunk-EQJUUVFG.js.map +1 -0
  20. package/dist/chunk-N5HFDWQX.js +23 -0
  21. package/dist/chunk-N5HFDWQX.js.map +1 -0
  22. package/dist/chunk-PAD7WFFU.js +573 -0
  23. package/dist/chunk-PAD7WFFU.js.map +1 -0
  24. package/dist/chunk-TK64DNVK.js +256 -0
  25. package/dist/chunk-TK64DNVK.js.map +1 -0
  26. package/dist/{chunk-NJSOD64C.js → chunk-WRTFC5NG.js} +438 -30
  27. package/dist/chunk-WRTFC5NG.js.map +1 -0
  28. package/dist/client-BKi3vk0Q.d.ts +34 -0
  29. package/dist/client-BrsaXtDV.d.cts +34 -0
  30. package/dist/cloudflare/index.cjs +1386 -74
  31. package/dist/cloudflare/index.cjs.map +1 -1
  32. package/dist/cloudflare/index.d.cts +217 -13
  33. package/dist/cloudflare/index.d.ts +217 -13
  34. package/dist/cloudflare/index.js +639 -180
  35. package/dist/cloudflare/index.js.map +1 -1
  36. package/dist/codegen/index.d.cts +1 -1
  37. package/dist/codegen/index.d.ts +1 -1
  38. package/dist/errors-BRc3I_eH.d.cts +73 -0
  39. package/dist/errors-BRc3I_eH.d.ts +73 -0
  40. package/dist/firestore-enterprise/index.cjs +3877 -0
  41. package/dist/firestore-enterprise/index.cjs.map +1 -0
  42. package/dist/firestore-enterprise/index.d.cts +141 -0
  43. package/dist/firestore-enterprise/index.d.ts +141 -0
  44. package/dist/firestore-enterprise/index.js +985 -0
  45. package/dist/firestore-enterprise/index.js.map +1 -0
  46. package/dist/firestore-standard/index.cjs +3117 -0
  47. package/dist/firestore-standard/index.cjs.map +1 -0
  48. package/dist/firestore-standard/index.d.cts +49 -0
  49. package/dist/firestore-standard/index.d.ts +49 -0
  50. package/dist/firestore-standard/index.js +283 -0
  51. package/dist/firestore-standard/index.js.map +1 -0
  52. package/dist/index.cjs +809 -534
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.cts +24 -100
  55. package/dist/index.d.ts +24 -100
  56. package/dist/index.js +184 -531
  57. package/dist/index.js.map +1 -1
  58. package/dist/registry-Bc7h6WTM.d.cts +64 -0
  59. package/dist/registry-C2KUPVZj.d.ts +64 -0
  60. package/dist/{scope-path-B1G3YiA7.d.ts → scope-path-CROFZGr9.d.cts} +1 -56
  61. package/dist/{scope-path-B1G3YiA7.d.cts → scope-path-CROFZGr9.d.ts} +1 -56
  62. package/dist/{serialization-ZZ7RSDRX.js → serialization-OE2PFZMY.js} +6 -4
  63. package/dist/sqlite/index.cjs +3631 -0
  64. package/dist/sqlite/index.cjs.map +1 -0
  65. package/dist/sqlite/index.d.cts +111 -0
  66. package/dist/sqlite/index.d.ts +111 -0
  67. package/dist/sqlite/index.js +1164 -0
  68. package/dist/sqlite/index.js.map +1 -0
  69. package/package.json +33 -3
  70. package/dist/backend-U-MLShlg.d.ts +0 -97
  71. package/dist/backend-np4gEVhB.d.cts +0 -97
  72. package/dist/chunk-5753Y42M.js.map +0 -1
  73. package/dist/chunk-NJSOD64C.js.map +0 -1
  74. package/dist/chunk-R7CRGYY4.js +0 -94
  75. package/dist/chunk-R7CRGYY4.js.map +0 -1
  76. package/dist/types-BGWxcpI_.d.cts +0 -736
  77. package/dist/types-BGWxcpI_.d.ts +0 -736
  78. /package/dist/{serialization-ZZ7RSDRX.js.map → serialization-OE2PFZMY.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { b as DiscoveryResult } from '../types-BGWxcpI_.cjs';
1
+ import { l as DiscoveryResult } from '../backend-DuvHGgK1.cjs';
2
2
  import '@google-cloud/firestore';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { b as DiscoveryResult } from '../types-BGWxcpI_.js';
1
+ import { l as DiscoveryResult } from '../backend-DuvHGgK1.js';
2
2
  import '@google-cloud/firestore';
3
3
 
4
4
  /**
@@ -0,0 +1,73 @@
1
+ declare class FiregraphError extends Error {
2
+ readonly code: string;
3
+ constructor(message: string, code: string);
4
+ }
5
+ declare class NodeNotFoundError extends FiregraphError {
6
+ constructor(uid: string);
7
+ }
8
+ declare class EdgeNotFoundError extends FiregraphError {
9
+ constructor(aUid: string, axbType: string, bUid: string);
10
+ }
11
+ declare class ValidationError extends FiregraphError {
12
+ readonly details?: unknown | undefined;
13
+ constructor(message: string, details?: unknown | undefined);
14
+ }
15
+ declare class RegistryViolationError extends FiregraphError {
16
+ constructor(aType: string, axbType: string, bType: string);
17
+ }
18
+ declare class InvalidQueryError extends FiregraphError {
19
+ constructor(message: string);
20
+ }
21
+ declare class TraversalError extends FiregraphError {
22
+ constructor(message: string);
23
+ }
24
+ declare class DynamicRegistryError extends FiregraphError {
25
+ constructor(message: string);
26
+ }
27
+ declare class QuerySafetyError extends FiregraphError {
28
+ constructor(message: string);
29
+ }
30
+ declare class RegistryScopeError extends FiregraphError {
31
+ constructor(aType: string, axbType: string, bType: string, scopePath: string, allowedIn: string[]);
32
+ }
33
+ declare class MigrationError extends FiregraphError {
34
+ constructor(message: string);
35
+ }
36
+ /**
37
+ * Thrown when a caller tries to perform an operation that would require
38
+ * atomicity across two physical storage backends — e.g. opening a routed
39
+ * subgraph client from inside a transaction callback. Cross-backend
40
+ * atomicity cannot be honoured by real-world storage engines (Firestore,
41
+ * SQLite drivers over D1/DO/better-sqlite3, etc.), so firegraph surfaces
42
+ * this as a typed error instead of silently confining the write to the
43
+ * base backend.
44
+ *
45
+ * Normally `TransactionBackend` and `BatchBackend` don't expose `subgraph()`
46
+ * at the type level, so this error is unreachable through well-typed code.
47
+ * It exists as a public catchable type for app code that needs to tolerate
48
+ * this case deliberately (e.g. dynamic code paths that bypass the type
49
+ * system) and as future-proofing if the interface ever grows a way to
50
+ * request a sub-scope inside a transaction.
51
+ */
52
+ declare class CrossBackendTransactionError extends FiregraphError {
53
+ constructor(message: string);
54
+ }
55
+ /**
56
+ * Thrown when a caller invokes a capability-gated operation on a backend
57
+ * that does not declare the required capability. Capability gating is
58
+ * primarily a compile-time concern (see `BackendCapabilities` and the
59
+ * type-level extension surfaces in `GraphClient<C>`), but this runtime
60
+ * error covers the cases where the type system is bypassed — dynamic
61
+ * registries, `as any` casts, or callers explicitly downcasting through
62
+ * the generic-erased `StorageBackend` shape.
63
+ *
64
+ * The error code is `CAPABILITY_NOT_SUPPORTED`. The message names the
65
+ * missing capability and the backend that was asked, so app code can
66
+ * diagnose without inspecting the cap set itself.
67
+ */
68
+ declare class CapabilityNotSupportedError extends FiregraphError {
69
+ readonly capability: string;
70
+ constructor(capability: string, backendDescription: string);
71
+ }
72
+
73
+ export { CapabilityNotSupportedError as C, DynamicRegistryError as D, EdgeNotFoundError as E, FiregraphError as F, InvalidQueryError as I, MigrationError as M, NodeNotFoundError as N, QuerySafetyError as Q, RegistryScopeError as R, TraversalError as T, ValidationError as V, CrossBackendTransactionError as a, RegistryViolationError as b };
@@ -0,0 +1,73 @@
1
+ declare class FiregraphError extends Error {
2
+ readonly code: string;
3
+ constructor(message: string, code: string);
4
+ }
5
+ declare class NodeNotFoundError extends FiregraphError {
6
+ constructor(uid: string);
7
+ }
8
+ declare class EdgeNotFoundError extends FiregraphError {
9
+ constructor(aUid: string, axbType: string, bUid: string);
10
+ }
11
+ declare class ValidationError extends FiregraphError {
12
+ readonly details?: unknown | undefined;
13
+ constructor(message: string, details?: unknown | undefined);
14
+ }
15
+ declare class RegistryViolationError extends FiregraphError {
16
+ constructor(aType: string, axbType: string, bType: string);
17
+ }
18
+ declare class InvalidQueryError extends FiregraphError {
19
+ constructor(message: string);
20
+ }
21
+ declare class TraversalError extends FiregraphError {
22
+ constructor(message: string);
23
+ }
24
+ declare class DynamicRegistryError extends FiregraphError {
25
+ constructor(message: string);
26
+ }
27
+ declare class QuerySafetyError extends FiregraphError {
28
+ constructor(message: string);
29
+ }
30
+ declare class RegistryScopeError extends FiregraphError {
31
+ constructor(aType: string, axbType: string, bType: string, scopePath: string, allowedIn: string[]);
32
+ }
33
+ declare class MigrationError extends FiregraphError {
34
+ constructor(message: string);
35
+ }
36
+ /**
37
+ * Thrown when a caller tries to perform an operation that would require
38
+ * atomicity across two physical storage backends — e.g. opening a routed
39
+ * subgraph client from inside a transaction callback. Cross-backend
40
+ * atomicity cannot be honoured by real-world storage engines (Firestore,
41
+ * SQLite drivers over D1/DO/better-sqlite3, etc.), so firegraph surfaces
42
+ * this as a typed error instead of silently confining the write to the
43
+ * base backend.
44
+ *
45
+ * Normally `TransactionBackend` and `BatchBackend` don't expose `subgraph()`
46
+ * at the type level, so this error is unreachable through well-typed code.
47
+ * It exists as a public catchable type for app code that needs to tolerate
48
+ * this case deliberately (e.g. dynamic code paths that bypass the type
49
+ * system) and as future-proofing if the interface ever grows a way to
50
+ * request a sub-scope inside a transaction.
51
+ */
52
+ declare class CrossBackendTransactionError extends FiregraphError {
53
+ constructor(message: string);
54
+ }
55
+ /**
56
+ * Thrown when a caller invokes a capability-gated operation on a backend
57
+ * that does not declare the required capability. Capability gating is
58
+ * primarily a compile-time concern (see `BackendCapabilities` and the
59
+ * type-level extension surfaces in `GraphClient<C>`), but this runtime
60
+ * error covers the cases where the type system is bypassed — dynamic
61
+ * registries, `as any` casts, or callers explicitly downcasting through
62
+ * the generic-erased `StorageBackend` shape.
63
+ *
64
+ * The error code is `CAPABILITY_NOT_SUPPORTED`. The message names the
65
+ * missing capability and the backend that was asked, so app code can
66
+ * diagnose without inspecting the cap set itself.
67
+ */
68
+ declare class CapabilityNotSupportedError extends FiregraphError {
69
+ readonly capability: string;
70
+ constructor(capability: string, backendDescription: string);
71
+ }
72
+
73
+ export { CapabilityNotSupportedError as C, DynamicRegistryError as D, EdgeNotFoundError as E, FiregraphError as F, InvalidQueryError as I, MigrationError as M, NodeNotFoundError as N, QuerySafetyError as Q, RegistryScopeError as R, TraversalError as T, ValidationError as V, CrossBackendTransactionError as a, RegistryViolationError as b };