@spfn/core 0.1.0-alpha.74 → 0.1.0-alpha.81

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.
@@ -73,9 +73,10 @@ declare function ApiErrorSchema(): _sinclair_typebox.TObject<{
73
73
  }>;
74
74
  }>;
75
75
  /**
76
- * Creates a TypeBox union schema for ApiResponse<T>
76
+ * Creates a TypeBox schema for ApiSuccessResponse<T>
77
77
  *
78
78
  * Use this in your route contract's response field for standardized responses.
79
+ * Note: ContractClient throws ApiClientError on failure, so only success type is needed.
79
80
  *
80
81
  * @example
81
82
  * ```ts
@@ -89,7 +90,7 @@ declare function ApiErrorSchema(): _sinclair_typebox.TObject<{
89
90
  * };
90
91
  * ```
91
92
  */
92
- declare function ApiResponseSchema<T extends TSchema>(dataSchema: T): _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
93
+ declare function ApiResponseSchema<T extends TSchema>(dataSchema: T): _sinclair_typebox.TObject<{
93
94
  success: _sinclair_typebox.TLiteral<true>;
94
95
  data: T;
95
96
  meta: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
@@ -102,16 +103,7 @@ declare function ApiResponseSchema<T extends TSchema>(dataSchema: T): _sinclair_
102
103
  totalPages: _sinclair_typebox.TNumber;
103
104
  }>>;
104
105
  }>>;
105
- }>, _sinclair_typebox.TObject<{
106
- success: _sinclair_typebox.TLiteral<false>;
107
- error: _sinclair_typebox.TObject<{
108
- message: _sinclair_typebox.TString;
109
- type: _sinclair_typebox.TString;
110
- statusCode: _sinclair_typebox.TNumber;
111
- stack: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
112
- details: _sinclair_typebox.TOptional<_sinclair_typebox.TAny>;
113
- }>;
114
- }>]>;
106
+ }>;
115
107
 
116
108
  /**
117
109
  * File-based Routing System Type Definitions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spfn/core",
3
- "version": "0.1.0-alpha.74",
3
+ "version": "0.1.0-alpha.81",
4
4
  "description": "SPFN Framework Core - File-based routing, transactions, repository pattern",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",