@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.
- package/README.md +2 -1
- package/dist/client/index.d.ts +41 -2
- package/dist/client/index.js +14 -1
- package/dist/client/index.js.map +1 -1
- package/dist/codegen/generators/index.js +2 -2
- package/dist/codegen/generators/index.js.map +1 -1
- package/dist/codegen/index.d.ts +1 -1
- package/dist/codegen/index.js +2 -2
- package/dist/codegen/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.js +9 -2
- package/dist/middleware/index.js.map +1 -1
- package/dist/route/index.d.ts +2 -2
- package/dist/route/index.js +10 -6
- package/dist/route/index.js.map +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{types-Dzggq1Yb.d.ts → types-DYueuoD6.d.ts} +4 -12
- package/package.json +1 -1
|
@@ -73,9 +73,10 @@ declare function ApiErrorSchema(): _sinclair_typebox.TObject<{
|
|
|
73
73
|
}>;
|
|
74
74
|
}>;
|
|
75
75
|
/**
|
|
76
|
-
* Creates a TypeBox
|
|
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.
|
|
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
|
-
}
|
|
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
|