@orpc/contract 0.0.0-next.6083cd9 → 0.0.0-next.67ca77c
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/dist/index.js +5 -1
- package/dist/src/config.d.ts +5 -0
- package/dist/src/procedure.d.ts +6 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -27,7 +27,10 @@ var DecoratedContractProcedure = class _DecoratedContractProcedure extends Contr
|
|
|
27
27
|
route(route) {
|
|
28
28
|
return new _DecoratedContractProcedure({
|
|
29
29
|
...this["~orpc"],
|
|
30
|
-
route
|
|
30
|
+
route: {
|
|
31
|
+
...this["~orpc"].route,
|
|
32
|
+
...route
|
|
33
|
+
}
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
36
|
prefix(prefix) {
|
|
@@ -149,6 +152,7 @@ var ContractBuilder = class {
|
|
|
149
152
|
var DEFAULT_CONFIG = {
|
|
150
153
|
defaultMethod: "POST",
|
|
151
154
|
defaultSuccessStatus: 200,
|
|
155
|
+
defaultSuccessDescription: "OK",
|
|
152
156
|
defaultInputStructure: "compact",
|
|
153
157
|
defaultOutputStructure: "compact"
|
|
154
158
|
};
|
package/dist/src/config.d.ts
CHANGED
package/dist/src/procedure.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export interface RouteOptions {
|
|
|
12
12
|
* @default 200
|
|
13
13
|
*/
|
|
14
14
|
successStatus?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the response when the procedure is successful.
|
|
17
|
+
*
|
|
18
|
+
* @default 'OK'
|
|
19
|
+
*/
|
|
20
|
+
successDescription?: string;
|
|
15
21
|
/**
|
|
16
22
|
* Determines how the input should be structured based on `params`, `query`, `headers`, and `body`.
|
|
17
23
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.67ca77c",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@standard-schema/spec": "1.0.0-beta.4",
|
|
33
|
-
"@orpc/shared": "0.0.0-next.
|
|
33
|
+
"@orpc/shared": "0.0.0-next.67ca77c"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"arktype": "2.0.0-rc.26",
|