mirror of https://github.com/grpc/grpc-node.git
grpc-loader: update interfaces & add new test
This commit is contained in:
parent
d335428458
commit
4c185fa2e6
|
@ -116,9 +116,9 @@ export interface EnumTypeDefinition extends ProtobufTypeDefinition {
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum IdempotencyLevel {
|
export enum IdempotencyLevel {
|
||||||
IDEMPOTENCY_UNKNOWN = 0,
|
IDEMPOTENCY_UNKNOWN = 'IDEMPOTENCY_UNKNOWN',
|
||||||
NO_SIDE_EFFECTS = 1,
|
NO_SIDE_EFFECTS = 'NO_SIDE_EFFECTS',
|
||||||
IDEMPOTENT = 2
|
IDEMPOTENT = 'IDEMPOTENT'
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NamePart {
|
export interface NamePart {
|
||||||
|
@ -136,16 +136,11 @@ export interface UninterpretedOption {
|
||||||
aggregate_value?: string;
|
aggregate_value?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CustomHttpPattern {
|
|
||||||
kind?: string;
|
|
||||||
path?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MethodOptions {
|
export interface MethodOptions {
|
||||||
deprecated?: (boolean|null);
|
deprecated?: boolean;
|
||||||
idempotency_level?: (IdempotencyLevel|keyof typeof IdempotencyLevel|null);
|
idempotency_level?: IdempotencyLevel|keyof typeof IdempotencyLevel;
|
||||||
uninterpreted_option?: (UninterpretedOption[]|null);
|
uninterpreted_option?: UninterpretedOption;
|
||||||
[k: string]: unknown
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MethodDefinition<RequestType, ResponseType, OutputRequestType=RequestType, OutputResponseType=ResponseType> {
|
export interface MethodDefinition<RequestType, ResponseType, OutputRequestType=RequestType, OutputResponseType=ResponseType> {
|
||||||
|
|
|
@ -160,5 +160,6 @@ describe('Descriptor types', () => {
|
||||||
},
|
},
|
||||||
'(google.api.method_signature)': 'bar'
|
'(google.api.method_signature)': 'bar'
|
||||||
})
|
})
|
||||||
|
assert(service.HelloWithoutOptions.options === undefined)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,4 +34,5 @@ service Hello {
|
||||||
};
|
};
|
||||||
option (google.api.method_signature) = 'bar';
|
option (google.api.method_signature) = 'bar';
|
||||||
}
|
}
|
||||||
|
rpc HelloWithoutOptions (Empty) returns (Empty) {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue