fix(rpc): protocol Route.fulfill (#3200)
This commit is contained in:
parent
3bd97776b8
commit
52eb6c609a
|
|
@ -2055,13 +2055,13 @@ export type RouteContinueOptions = {
|
||||||
};
|
};
|
||||||
export type RouteContinueResult = void;
|
export type RouteContinueResult = void;
|
||||||
export type RouteFulfillParams = {
|
export type RouteFulfillParams = {
|
||||||
status: number,
|
status?: number,
|
||||||
headers: {
|
headers?: {
|
||||||
name: string,
|
name: string,
|
||||||
value: string,
|
value: string,
|
||||||
}[],
|
}[],
|
||||||
body: string,
|
body?: string,
|
||||||
isBase64: boolean,
|
isBase64?: boolean,
|
||||||
};
|
};
|
||||||
export type RouteFulfillOptions = {
|
export type RouteFulfillOptions = {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1694,16 +1694,17 @@ Route:
|
||||||
|
|
||||||
fulfill:
|
fulfill:
|
||||||
parameters:
|
parameters:
|
||||||
status: number
|
# default is 200
|
||||||
|
status: number?
|
||||||
headers:
|
headers:
|
||||||
type: array
|
type: array?
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
name: string
|
name: string
|
||||||
value: string
|
value: string
|
||||||
body: string
|
body: string?
|
||||||
isBase64: boolean
|
isBase64: boolean?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -803,13 +803,13 @@ export function createScheme(tChannel: (name: string) => Validator): Scheme {
|
||||||
postData: tOptional(tBinary),
|
postData: tOptional(tBinary),
|
||||||
});
|
});
|
||||||
scheme.RouteFulfillParams = tObject({
|
scheme.RouteFulfillParams = tObject({
|
||||||
status: tNumber,
|
status: tOptional(tNumber),
|
||||||
headers: tArray(tObject({
|
headers: tOptional(tArray(tObject({
|
||||||
name: tString,
|
name: tString,
|
||||||
value: tString,
|
value: tString,
|
||||||
})),
|
}))),
|
||||||
body: tString,
|
body: tOptional(tString),
|
||||||
isBase64: tBoolean,
|
isBase64: tOptional(tBoolean),
|
||||||
});
|
});
|
||||||
scheme.ResponseBodyParams = tOptional(tObject({}));
|
scheme.ResponseBodyParams = tOptional(tObject({}));
|
||||||
scheme.ResponseFinishedParams = tOptional(tObject({}));
|
scheme.ResponseFinishedParams = tOptional(tObject({}));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue