mirror of https://github.com/grpc/grpc-node.git
grpc-loader: export interfaces and fix minor issue
This commit is contained in:
parent
dfb10f9ac4
commit
ae33e8797a
|
@ -115,18 +115,18 @@ export interface EnumTypeDefinition extends ProtobufTypeDefinition {
|
||||||
format: 'Protocol Buffer 3 EnumDescriptorProto';
|
format: 'Protocol Buffer 3 EnumDescriptorProto';
|
||||||
}
|
}
|
||||||
|
|
||||||
enum IdempotencyLevel {
|
export enum IdempotencyLevel {
|
||||||
IDEMPOTENCY_UNKNOWN = 0,
|
IDEMPOTENCY_UNKNOWN = 0,
|
||||||
NO_SIDE_EFFECTS = 1,
|
NO_SIDE_EFFECTS = 1,
|
||||||
IDEMPOTENT = 2
|
IDEMPOTENT = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NamePart {
|
export interface NamePart {
|
||||||
namePart: string;
|
namePart: string;
|
||||||
isExtension: boolean;
|
isExtension: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UninterpretedOption {
|
export interface UninterpretedOption {
|
||||||
name?: (NamePart[]|null);
|
name?: (NamePart[]|null);
|
||||||
identifierValue?: (string|null);
|
identifierValue?: (string|null);
|
||||||
positiveIntValue?: (number|Long|string|null);
|
positiveIntValue?: (number|Long|string|null);
|
||||||
|
@ -136,12 +136,12 @@ interface UninterpretedOption {
|
||||||
aggregateValue?: (string|null);
|
aggregateValue?: (string|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface CustomHttpPattern {
|
export interface CustomHttpPattern {
|
||||||
kind?: (string|null);
|
kind?: (string|null);
|
||||||
path?: (string|null);
|
path?: (string|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HttpRule {
|
export interface HttpRule {
|
||||||
selector?: (string|null);
|
selector?: (string|null);
|
||||||
get?: (string|null);
|
get?: (string|null);
|
||||||
put?: (string|null);
|
put?: (string|null);
|
||||||
|
@ -154,7 +154,7 @@ interface HttpRule {
|
||||||
additionalBindings?: (HttpRule[]|null);
|
additionalBindings?: (HttpRule[]|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MethodOptions {
|
export interface MethodOptions {
|
||||||
deprecated?: (boolean|null);
|
deprecated?: (boolean|null);
|
||||||
idempotency_level?: (IdempotencyLevel|keyof typeof IdempotencyLevel|null);
|
idempotency_level?: (IdempotencyLevel|keyof typeof IdempotencyLevel|null);
|
||||||
uninterpreted_option?: (UninterpretedOption[]|null);
|
uninterpreted_option?: (UninterpretedOption[]|null);
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { rpcFileDescriptorSet } from '../test_protos/rpc.desc';
|
||||||
import { readFileSync } from 'fs';
|
import { readFileSync } from 'fs';
|
||||||
|
|
||||||
import * as proto_loader from '../src/index';
|
import * as proto_loader from '../src/index';
|
||||||
import { dirname } from "path";
|
import { dirname } from 'path';
|
||||||
|
|
||||||
// Relative path from build output directory to test_protos directory
|
// Relative path from build output directory to test_protos directory
|
||||||
const TEST_PROTO_DIR = `${__dirname}/../../test_protos/`;
|
const TEST_PROTO_DIR = `${__dirname}/../../test_protos/`;
|
||||||
|
|
Loading…
Reference in New Issue