@veloxts/client 0.6.77 → 0.6.79

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @veloxts/client
2
2
 
3
+ ## 0.6.79
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(router,client): preserve namespace literal types for proper type narrowing
8
+
9
+ ## 0.6.78
10
+
11
+ ### Patch Changes
12
+
13
+ - fix(ci): add Docker Hub login to avoid rate limits in tests, add rsc-auth template to smoke test matrix, Fix / types.d.ts reference error in template
14
+
3
15
  ## 0.6.77
4
16
 
5
17
  ### Patch Changes
@@ -363,7 +363,7 @@ export type VeloxNamespace<TProcedures extends ProcedureRecord> = {
363
363
  * ```
364
364
  */
365
365
  export type VeloxHooks<TRouter> = {
366
- [K in keyof TRouter]: TRouter[K] extends ProcedureCollection<infer TProcedures> ? VeloxNamespace<TProcedures> : never;
366
+ [K in keyof TRouter]: TRouter[K] extends ProcedureCollection<infer _TNamespace, infer TProcedures> ? VeloxNamespace<TProcedures> : never;
367
367
  };
368
368
  /**
369
369
  * Configuration for createVeloxHooks
package/dist/types.d.ts CHANGED
@@ -62,11 +62,16 @@ export type ProcedureRecord = Record<string, ClientProcedure<any, any>>;
62
62
  /**
63
63
  * Procedure collection with namespace
64
64
  *
65
- * Matches the structure of @veloxts/router's ProcedureCollection
65
+ * Matches the structure of @veloxts/router's ProcedureCollection.
66
+ * The TNamespace parameter captures the literal namespace string for proper
67
+ * type narrowing in router types.
68
+ *
69
+ * @template TNamespace - The literal namespace string (e.g., 'users', 'posts')
70
+ * @template TProcedures - The record of named procedures
66
71
  */
67
- export interface ProcedureCollection<TProcedures extends ProcedureRecord = ProcedureRecord> {
72
+ export interface ProcedureCollection<TNamespace extends string = string, TProcedures extends ProcedureRecord = ProcedureRecord> {
68
73
  /** Resource namespace (e.g., 'users', 'posts') */
69
- readonly namespace: string;
74
+ readonly namespace: TNamespace;
70
75
  /** Named procedures in this collection */
71
76
  readonly procedures: TProcedures;
72
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/client",
3
- "version": "0.6.77",
3
+ "version": "0.6.79",
4
4
  "description": "Type-safe frontend API client for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",