@jeffusion/bungee-types 5.12.0 → 5.14.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.
- package/dist/types.d.ts +12 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface ModificationRules {
|
|
|
19
19
|
headers?: {
|
|
20
20
|
add?: Record<string, string>;
|
|
21
21
|
replace?: Record<string, string>;
|
|
22
|
+
default?: Record<string, string>;
|
|
22
23
|
remove?: string[];
|
|
23
24
|
};
|
|
24
25
|
body?: {
|
|
@@ -72,7 +73,16 @@ export interface AuthConfig {
|
|
|
72
73
|
*/
|
|
73
74
|
tokens: string[];
|
|
74
75
|
}
|
|
75
|
-
export
|
|
76
|
+
export type ResponseBodyFormat = 'json' | 'sse-json';
|
|
77
|
+
export interface ResponseModificationRules extends Omit<ModificationRules, 'query'> {
|
|
78
|
+
/** 缺省同时支持 JSON 与 SSE 中的 JSON data 帧。 */
|
|
79
|
+
body_formats?: ResponseBodyFormat[];
|
|
80
|
+
}
|
|
81
|
+
export interface DirectionalModificationRules {
|
|
82
|
+
request?: ModificationRules;
|
|
83
|
+
response?: ResponseModificationRules;
|
|
84
|
+
}
|
|
85
|
+
export interface Endpoint extends DirectionalModificationRules {
|
|
76
86
|
id?: string;
|
|
77
87
|
target: string;
|
|
78
88
|
weight?: number;
|
|
@@ -204,7 +214,7 @@ export interface RetryConfig {
|
|
|
204
214
|
retry_on?: number[];
|
|
205
215
|
per_retry_timeout_ms?: number;
|
|
206
216
|
}
|
|
207
|
-
export interface RouteConfig extends
|
|
217
|
+
export interface RouteConfig extends DirectionalModificationRules {
|
|
208
218
|
/** Stable logical route identity, present only in compiled runtime config. */
|
|
209
219
|
id?: string;
|
|
210
220
|
path: string;
|