@loradb/lora-graphql 0.24.0 → 0.25.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 (53) hide show
  1. package/README.md +185 -42
  2. package/dist/analyze/access.d.ts +11 -3
  3. package/dist/analyze/input-schemas.d.ts +11 -0
  4. package/dist/analyze/plans.d.ts +8 -0
  5. package/dist/analyze/stored.d.ts +29 -0
  6. package/dist/analyze/verdicts.d.ts +6 -0
  7. package/dist/cli.js +263 -244
  8. package/dist/cli.js.map +1 -1
  9. package/dist/compile/cache.d.ts +9 -1
  10. package/dist/compile/context.d.ts +3 -0
  11. package/dist/compile/read/common.d.ts +2 -0
  12. package/dist/compile/read/root.d.ts +7 -0
  13. package/dist/compile/selection.d.ts +5 -0
  14. package/dist/diff-CdZZG-N1.js +134 -0
  15. package/dist/diff-CdZZG-N1.js.map +1 -0
  16. package/dist/driver.d.ts +36 -1
  17. package/dist/errors.d.ts +21 -1
  18. package/dist/events/outbox.d.ts +14 -0
  19. package/dist/events/worker.d.ts +67 -0
  20. package/dist/execute/mutate/checks.d.ts +16 -0
  21. package/dist/execute/mutate/env.d.ts +50 -0
  22. package/dist/execute/mutate/errors.d.ts +6 -0
  23. package/dist/execute/mutate/links.d.ts +38 -0
  24. package/dist/execute/mutate/plan.d.ts +5 -0
  25. package/dist/execute/mutate/runner.d.ts +101 -25
  26. package/dist/execute/mutate/single-call.d.ts +92 -0
  27. package/dist/execute/mutate/triggers.d.ts +21 -0
  28. package/dist/execute/mutate/unique-together.d.ts +5 -1
  29. package/dist/execute/mutate/validate.d.ts +11 -0
  30. package/dist/execute/transaction.d.ts +13 -2
  31. package/dist/index.d.ts +7 -2
  32. package/dist/index.js +16 -15
  33. package/dist/lora-graphql-D11QFUkf.js +17222 -0
  34. package/dist/lora-graphql-D11QFUkf.js.map +1 -0
  35. package/dist/lora-graphql.d.ts +36 -3
  36. package/dist/model/build/authorization.d.ts +11 -1
  37. package/dist/model/build/constraints.d.ts +22 -0
  38. package/dist/model/build/rule-checks.d.ts +6 -1
  39. package/dist/model/build/trigger.d.ts +9 -0
  40. package/dist/model/constraints.d.ts +112 -0
  41. package/dist/model/desugar.d.ts +7 -0
  42. package/dist/model/directives.d.ts +1 -1
  43. package/dist/model/types.d.ts +34 -0
  44. package/dist/options.d.ts +76 -3
  45. package/dist/results.d.ts +12 -1
  46. package/dist/schema/scalars.d.ts +8 -1
  47. package/dist/standard-schema.d.ts +37 -0
  48. package/dist/testing.js +1 -1
  49. package/package.json +2 -2
  50. package/dist/diff-aDivqYqr.js +0 -100
  51. package/dist/diff-aDivqYqr.js.map +0 -1
  52. package/dist/driver-DSnytFsU.js +0 -14323
  53. package/dist/driver-DSnytFsU.js.map +0 -1
@@ -2,8 +2,19 @@ import { DriverTransaction, QueryResult } from '../driver.js';
2
2
  import { WriteChange } from './changes.js';
3
3
  export declare class LoraTransaction {
4
4
  #private;
5
- /** @internal Created by `LoraGraphQL.begin()`. */
6
- constructor(tx: DriverTransaction, emit: (change: WriteChange) => void);
5
+ /**
6
+ * @internal Created by `LoraGraphQL.begin()`, and for a JavaScript
7
+ * trigger over the transaction of the mutation that fired it
8
+ * (`inTrigger`), which that mutation commits.
9
+ */
10
+ constructor(tx: DriverTransaction, emit: (change: WriteChange) => void, inTrigger?: boolean);
11
+ /**
12
+ * @internal Whether a trigger owns this handle: mutations run in it
13
+ * fire no trigger themselves.
14
+ */
15
+ get inTrigger(): boolean;
16
+ /** @internal The write-sets recorded so far, handed over. */
17
+ drain(): WriteChange[];
7
18
  /** @internal The driver transaction statements run in. */
8
19
  get driverTransaction(): DriverTransaction;
9
20
  /** False once committed, rolled back, or failed. */
package/dist/index.d.ts CHANGED
@@ -15,11 +15,16 @@ export type { CypherFinding } from './analyze/cypher-check.js';
15
15
  export { diffSchemas, type ApiChange, type SchemaDiff, } from './analyze/diff.js';
16
16
  export type { CompiledRead, ReadSet, SeekExpectation, } from './compile/read/types.js';
17
17
  export type { EntityRef, RelationshipRef, WriteChange, } from './execute/changes.js';
18
- export type { MutationInfo, PopulatedByCallback, } from './execute/mutate/env.js';
18
+ export type { MutationInfo, PopulatedByCallback, TriggerEvent, TriggerFunction, TriggerFunctions, } from './execute/mutate/env.js';
19
19
  export type { MutationKind } from './schema/mutations.js';
20
20
  export type { ChangeEvent } from './schema/hooks.js';
21
21
  export { LoraTransaction } from './execute/transaction.js';
22
- export { ModelError, formatProblem, isLoraGraphQLError, LORA_GRAPHQL_ERROR_CODES, type LoraGraphQLErrorCode, type ModelProblem, } from './errors.js';
22
+ export type { Worker, WorkerOptions } from './events/worker.js';
23
+ export { ModelError, formatProblem, isLoraGraphQLError, LORA_GRAPHQL_ERROR_CODES, type LoraGraphQLErrorCode, type ModelProblem, type Violation, } from './errors.js';
24
+ export type { FieldConstraints } from './model/constraints.js';
25
+ export { inputSchemas, type JsonSchema } from './analyze/input-schemas.js';
26
+ export type { StoredReport, StoredViolation } from './analyze/stored.js';
27
+ export type { StandardIssue, StandardResult, StandardSchemaV1, TypeValidator, } from './standard-schema.js';
23
28
  export { toGlobalId, fromGlobalId } from './schema/global-id.js';
24
29
  export type { Attributes, MetricsLike, ObservabilityOptions, SpanLike, StatementEndEvent, TracerLike, } from './observe.js';
25
30
  export { schemaHash, type ManifestOperation, type OperationManifest, } from './codegen.js';
package/dist/index.js CHANGED
@@ -1,26 +1,27 @@
1
- import { D as r, L as e, a as o, b as l, M as i, c as d, d as n, e as t, f as p, g as f, h as m, i as L, j as c, l as R, p as h, r as D, s as E, k as G, t as b, v as u } from "./driver-DSnytFsU.js";
2
- import { d as A } from "./diff-aDivqYqr.js";
1
+ import { D as r, L as e, a as o, b as i, M as l, c as n, d, e as t, f as m, g as p, h as c, i as f, j as L, k as h, l as R, p as D, r as u, s as E, m as G, t as b, v } from "./lora-graphql-D11QFUkf.js";
2
+ import { d as O } from "./diff-CdZZG-N1.js";
3
3
  export {
4
4
  r as DEFAULT_GUARDS,
5
5
  e as LORA_GRAPHQL_ERROR_CODES,
6
6
  o as LoraGraphQL,
7
- l as LoraTransaction,
8
- i as ModelError,
9
- d as buildModel,
10
- n as checkPlans,
11
- A as diffSchemas,
7
+ i as LoraTransaction,
8
+ l as ModelError,
9
+ n as buildModel,
10
+ d as checkPlans,
11
+ O as diffSchemas,
12
12
  t as directiveTypeDefs,
13
- p as envelopPlugin,
14
- f as formatProblem,
15
- m as fromGlobalId,
16
- L as inferRequirements,
17
- c as isLoraGraphQLError,
13
+ m as envelopPlugin,
14
+ p as formatProblem,
15
+ c as fromGlobalId,
16
+ f as inferRequirements,
17
+ L as inputSchemas,
18
+ h as isLoraGraphQLError,
18
19
  R as loraDriver,
19
- h as parseOptions,
20
- D as requirementDdl,
20
+ D as parseOptions,
21
+ u as requirementDdl,
21
22
  E as scanExpands,
22
23
  G as schemaHash,
23
24
  b as toGlobalId,
24
- u as validationRules
25
+ v as validationRules
25
26
  };
26
27
  //# sourceMappingURL=index.js.map