@confect/server 9.0.2 → 9.1.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 (43) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/ActionCtx.d.ts +3 -2
  3. package/dist/ActionCtx.d.ts.map +1 -1
  4. package/dist/ActionCtx.js.map +1 -1
  5. package/dist/DatabaseReader.d.ts +18 -4324
  6. package/dist/DatabaseReader.d.ts.map +1 -1
  7. package/dist/DatabaseReader.js.map +1 -1
  8. package/dist/DatabaseWriter.d.ts +25 -33
  9. package/dist/DatabaseWriter.d.ts.map +1 -1
  10. package/dist/DatabaseWriter.js.map +1 -1
  11. package/dist/Document.d.ts +2 -0
  12. package/dist/Document.d.ts.map +1 -1
  13. package/dist/Document.js.map +1 -1
  14. package/dist/MutationCtx.d.ts +3 -2
  15. package/dist/MutationCtx.d.ts.map +1 -1
  16. package/dist/MutationCtx.js.map +1 -1
  17. package/dist/OrderedQuery.d.ts +6 -6
  18. package/dist/OrderedQuery.d.ts.map +1 -1
  19. package/dist/OrderedQuery.js.map +1 -1
  20. package/dist/QueryCtx.d.ts +3 -2
  21. package/dist/QueryCtx.d.ts.map +1 -1
  22. package/dist/QueryCtx.js.map +1 -1
  23. package/dist/QueryInitializer.d.ts +7 -7
  24. package/dist/QueryInitializer.d.ts.map +1 -1
  25. package/dist/QueryInitializer.js.map +1 -1
  26. package/dist/RegisteredConvexFunction.d.ts +1 -1089
  27. package/dist/RegisteredConvexFunction.d.ts.map +1 -1
  28. package/dist/RegisteredFunction.d.ts +1 -8
  29. package/dist/RegisteredFunction.d.ts.map +1 -1
  30. package/dist/VectorSearch.d.ts +15 -28
  31. package/dist/VectorSearch.d.ts.map +1 -1
  32. package/dist/VectorSearch.js.map +1 -1
  33. package/dist/tsconfig.src.tsbuildinfo +1 -1
  34. package/package.json +2 -2
  35. package/src/ActionCtx.ts +10 -4
  36. package/src/DatabaseReader.ts +58 -13
  37. package/src/DatabaseWriter.ts +70 -7
  38. package/src/Document.ts +6 -0
  39. package/src/MutationCtx.ts +10 -4
  40. package/src/OrderedQuery.ts +6 -14
  41. package/src/QueryCtx.ts +10 -4
  42. package/src/QueryInitializer.ts +20 -25
  43. package/src/VectorSearch.ts +23 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @confect/server
2
2
 
3
+ ## 9.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8bbde87: Make Confect's public types declaration-emittable, fixing `TS7056` under `tsc --build` with `composite`/`declaration` (e.g. consuming a Confect backend as a referenced TypeScript project).
8
+
9
+ The schema-generic service tags (`DatabaseReader`, `DatabaseWriter`, `VectorSearch`, `QueryCtx`/`MutationCtx`/`ActionCtx`) now back their `Context.GenericTag` with named generic interfaces, and codegen annotates the `_generated/services.ts` exports with the corresponding tag aliases — so declaration emit prints the names by reference instead of re-expanding the whole data model (the example backend's `services.d.ts` drops from ~307 KB to ~5.6 KB).
10
+
11
+ Codegen also emits `_generated/docs.ts` — a nominal `interface` per table plus a `Docs` registry — threaded into the reader/writer tags via the `Document.Document<Schema, Table>` helper, so query/mutation helpers print named document types (e.g. `NotesDoc`) with no added annotations. Runtime behaviour is unchanged.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [4d8a568]
16
+ - @confect/core@9.1.0
17
+
3
18
  ## 9.0.2
4
19
 
5
20
  ### Patch Changes
@@ -1,5 +1,6 @@
1
1
  import type { GenericActionCtx, GenericDataModel } from "convex/server";
2
2
  import * as Context from "effect/Context";
3
- export declare const ActionCtx: <DataModel extends GenericDataModel>() => Context.Tag<GenericActionCtx<DataModel>, GenericActionCtx<DataModel>>;
4
- export type ActionCtx<DataModel extends GenericDataModel> = ReturnType<typeof ActionCtx<DataModel>>["Identifier"];
3
+ export type ActionCtxTag<DataModel extends GenericDataModel> = Context.Tag<GenericActionCtx<DataModel>, GenericActionCtx<DataModel>>;
4
+ export declare const ActionCtx: <DataModel extends GenericDataModel>() => ActionCtxTag<DataModel>;
5
+ export type ActionCtx<DataModel extends GenericDataModel> = GenericActionCtx<DataModel>;
5
6
  //# sourceMappingURL=ActionCtx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionCtx.d.ts","sourceRoot":"","sources":["../src/ActionCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,eAAO,MAAM,SAAS,GAAI,SAAS,SAAS,gBAAgB,4EACkB,CAAC;AAE/E,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,gBAAgB,IAAI,UAAU,CACpE,OAAO,SAAS,CAAC,SAAS,CAAC,CAC5B,CAAC,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"ActionCtx.d.ts","sourceRoot":"","sources":["../src/ActionCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,MAAM,MAAM,YAAY,CAAC,SAAS,SAAS,gBAAgB,IAAI,OAAO,CAAC,GAAG,CACxE,gBAAgB,CAAC,SAAS,CAAC,EAC3B,gBAAgB,CAAC,SAAS,CAAC,CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,SAAS,SAAS,gBAAgB,OAC/B,YAAY,CAAC,SAAS,CACmD,CAAC;AAE/E,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,gBAAgB,IACtD,gBAAgB,CAAC,SAAS,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport * as Context from \"effect/Context\";\n\nexport const ActionCtx = <DataModel extends GenericDataModel>() =>\n Context.GenericTag<GenericActionCtx<DataModel>>(\"@confect/server/ActionCtx\");\n\nexport type ActionCtx<DataModel extends GenericDataModel> = ReturnType<\n typeof ActionCtx<DataModel>\n>[\"Identifier\"];\n"],"mappings":";;;;;AAGA,MAAa,kBACX,QAAQ,WAAwC,4BAA4B"}
1
+ {"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport * as Context from \"effect/Context\";\n\nexport type ActionCtxTag<DataModel extends GenericDataModel> = Context.Tag<\n GenericActionCtx<DataModel>,\n GenericActionCtx<DataModel>\n>;\n\nexport const ActionCtx = <\n DataModel extends GenericDataModel,\n>(): ActionCtxTag<DataModel> =>\n Context.GenericTag<GenericActionCtx<DataModel>>(\"@confect/server/ActionCtx\");\n\nexport type ActionCtx<DataModel extends GenericDataModel> =\n GenericActionCtx<DataModel>;\n"],"mappings":";;;;;AAQA,MAAa,kBAGX,QAAQ,WAAwC,4BAA4B"}