@wundergraph/cosmo-connect
Version:
TypeScript Connect client for WunderGraph Cosmo
423 lines (422 loc) • 19.7 kB
TypeScript
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from enum wg.cosmo.graphqlmetrics.v1.OperationType
*/
export declare enum OperationType {
/**
* @generated from enum value: QUERY = 0;
*/
QUERY = 0,
/**
* @generated from enum value: MUTATION = 1;
*/
MUTATION = 1,
/**
* @generated from enum value: SUBSCRIPTION = 2;
*/
SUBSCRIPTION = 2
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.RequestInfo
*/
export declare class RequestInfo extends Message<RequestInfo> {
/**
* @generated from field: int32 StatusCode = 1;
*/
StatusCode: number;
/**
* @generated from field: bool error = 2;
*/
error: boolean;
constructor(data?: PartialMessage<RequestInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.RequestInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RequestInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RequestInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RequestInfo;
static equals(a: RequestInfo | PlainMessage<RequestInfo> | undefined, b: RequestInfo | PlainMessage<RequestInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.SchemaUsageInfo
*/
export declare class SchemaUsageInfo extends Message<SchemaUsageInfo> {
/**
* RequestDocument is the fully normalized GraphQL request document
*
* @generated from field: string RequestDocument = 1;
*/
RequestDocument: string;
/**
* TypeFieldMetrics is the list of used fields in the request document
*
* @generated from field: repeated wg.cosmo.graphqlmetrics.v1.TypeFieldUsageInfo TypeFieldMetrics = 2;
*/
TypeFieldMetrics: TypeFieldUsageInfo[];
/**
* OperationInfo is the operation info
*
* @generated from field: wg.cosmo.graphqlmetrics.v1.OperationInfo OperationInfo = 3;
*/
OperationInfo?: OperationInfo;
/**
* SchemaInfo is the schema info
*
* @generated from field: wg.cosmo.graphqlmetrics.v1.SchemaInfo SchemaInfo = 4;
*/
SchemaInfo?: SchemaInfo;
/**
* ClientInfo is the client info
*
* @generated from field: wg.cosmo.graphqlmetrics.v1.ClientInfo ClientInfo = 5;
*/
ClientInfo?: ClientInfo;
/**
* RequestInfo is the request info
*
* @generated from field: wg.cosmo.graphqlmetrics.v1.RequestInfo RequestInfo = 6;
*/
RequestInfo?: RequestInfo;
/**
* Attributes is a map of attributes that can be used to filter the metrics
*
* @generated from field: map<string, string> Attributes = 7;
*/
Attributes: {
[key: string]: string;
};
/**
* ArgumentMetrics is the list of used arguments in the request document
*
* @generated from field: repeated wg.cosmo.graphqlmetrics.v1.ArgumentUsageInfo ArgumentMetrics = 8;
*/
ArgumentMetrics: ArgumentUsageInfo[];
/**
* InputMetrics is the list of used input fields in the request document
*
* @generated from field: repeated wg.cosmo.graphqlmetrics.v1.InputUsageInfo InputMetrics = 9;
*/
InputMetrics: InputUsageInfo[];
constructor(data?: PartialMessage<SchemaUsageInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.SchemaUsageInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SchemaUsageInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SchemaUsageInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SchemaUsageInfo;
static equals(a: SchemaUsageInfo | PlainMessage<SchemaUsageInfo> | undefined, b: SchemaUsageInfo | PlainMessage<SchemaUsageInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.SchemaUsageInfoAggregation
*/
export declare class SchemaUsageInfoAggregation extends Message<SchemaUsageInfoAggregation> {
/**
* @generated from field: wg.cosmo.graphqlmetrics.v1.SchemaUsageInfo SchemaUsage = 1;
*/
SchemaUsage?: SchemaUsageInfo;
/**
* @generated from field: uint64 RequestCount = 2;
*/
RequestCount: bigint;
constructor(data?: PartialMessage<SchemaUsageInfoAggregation>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.SchemaUsageInfoAggregation";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SchemaUsageInfoAggregation;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SchemaUsageInfoAggregation;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SchemaUsageInfoAggregation;
static equals(a: SchemaUsageInfoAggregation | PlainMessage<SchemaUsageInfoAggregation> | undefined, b: SchemaUsageInfoAggregation | PlainMessage<SchemaUsageInfoAggregation> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.ClientInfo
*/
export declare class ClientInfo extends Message<ClientInfo> {
/**
* Name is the GraphQL client name obtained from the request header
*
* @generated from field: string Name = 1;
*/
Name: string;
/**
* Version is the GraphQL client version obtained from the request header
*
* @generated from field: string Version = 2;
*/
Version: string;
constructor(data?: PartialMessage<ClientInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.ClientInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ClientInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ClientInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ClientInfo;
static equals(a: ClientInfo | PlainMessage<ClientInfo> | undefined, b: ClientInfo | PlainMessage<ClientInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.OperationInfo
*/
export declare class OperationInfo extends Message<OperationInfo> {
/**
* Hash is the hash of the request document and the operation name
*
* @generated from field: string Hash = 1;
*/
Hash: string;
/**
* Name is the operation name
*
* @generated from field: string Name = 2;
*/
Name: string;
/**
* Type is the operation type
*
* @generated from field: wg.cosmo.graphqlmetrics.v1.OperationType Type = 3;
*/
Type: OperationType;
constructor(data?: PartialMessage<OperationInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.OperationInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OperationInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OperationInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OperationInfo;
static equals(a: OperationInfo | PlainMessage<OperationInfo> | undefined, b: OperationInfo | PlainMessage<OperationInfo> | undefined): boolean;
}
/**
* FederatedGraphID and OrganizationID are transport over JWT
*
* @generated from message wg.cosmo.graphqlmetrics.v1.SchemaInfo
*/
export declare class SchemaInfo extends Message<SchemaInfo> {
/**
* Version is the schema version
*
* @generated from field: string Version = 3;
*/
Version: string;
constructor(data?: PartialMessage<SchemaInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.SchemaInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SchemaInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SchemaInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SchemaInfo;
static equals(a: SchemaInfo | PlainMessage<SchemaInfo> | undefined, b: SchemaInfo | PlainMessage<SchemaInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.TypeFieldUsageInfo
*/
export declare class TypeFieldUsageInfo extends Message<TypeFieldUsageInfo> {
/**
* Path is the path to the field in the request document but without the root type query, mutation, or subscription
*
* @generated from field: repeated string Path = 1;
*/
Path: string[];
/**
* TypeNames is the list of enclosing type names of the field
*
* @generated from field: repeated string TypeNames = 2;
*/
TypeNames: string[];
/**
* SubgraphIDs is the list of datasource IDs (e.g subgraph ID) that the field is used from
*
* @generated from field: repeated string SubgraphIDs = 3;
*/
SubgraphIDs: string[];
/**
* Count is the number of times the field is used. Useful for batching at client side.
*
* @generated from field: uint64 Count = 4;
*/
Count: bigint;
/**
* NamedType is the underlying type of the field
*
* @generated from field: string NamedType = 5;
*/
NamedType: string;
/**
* IndirectInterfaceField is true if the field is an interface field that is used through an implementing type
*
* @generated from field: bool IndirectInterfaceField = 6;
*/
IndirectInterfaceField: boolean;
constructor(data?: PartialMessage<TypeFieldUsageInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.TypeFieldUsageInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TypeFieldUsageInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TypeFieldUsageInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TypeFieldUsageInfo;
static equals(a: TypeFieldUsageInfo | PlainMessage<TypeFieldUsageInfo> | undefined, b: TypeFieldUsageInfo | PlainMessage<TypeFieldUsageInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.ArgumentUsageInfo
*/
export declare class ArgumentUsageInfo extends Message<ArgumentUsageInfo> {
/**
* Path is the path to the field in the request document but without the root type query, mutation, or subscription
*
* @generated from field: repeated string Path = 1;
*/
Path: string[];
/**
* TypeName is the enclosing type name of the argument
*
* @generated from field: string TypeName = 2;
*/
TypeName: string;
/**
* Count is the number of times the argument is used. Useful for batching at client side.
*
* @generated from field: uint64 Count = 3;
*/
Count: bigint;
/**
* NamedType is the underlying type of the argument
*
* @generated from field: string NamedType = 4;
*/
NamedType: string;
/**
* SubgraphIDs is the list of datasource IDs (e.g subgraph ID) that the argument is used from
*
* @generated from field: repeated string SubgraphIDs = 5;
*/
SubgraphIDs: string[];
/**
* IsNull indicates whether this argument was explicitly set to null
* This is critical for detecting breaking changes when optional arguments become required
*
* @generated from field: bool IsNull = 6;
*/
IsNull: boolean;
constructor(data?: PartialMessage<ArgumentUsageInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.ArgumentUsageInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ArgumentUsageInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ArgumentUsageInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ArgumentUsageInfo;
static equals(a: ArgumentUsageInfo | PlainMessage<ArgumentUsageInfo> | undefined, b: ArgumentUsageInfo | PlainMessage<ArgumentUsageInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.InputUsageInfo
*/
export declare class InputUsageInfo extends Message<InputUsageInfo> {
/**
* Path is the path to the field in the request document but without the root type query, mutation, or subscription
*
* @generated from field: repeated string Path = 1;
*/
Path: string[];
/**
* TypeName is the enclosing type name of the argument
*
* @generated from field: string TypeName = 2;
*/
TypeName: string;
/**
* Count is the number of times the argument is used. Useful for batching at client side.
*
* @generated from field: uint64 Count = 3;
*/
Count: bigint;
/**
* NamedType is the underlying type of the input field
*
* @generated from field: string NamedType = 4;
*/
NamedType: string;
/**
* EnumValues is an empty list if the input field is not an enum, otherwise it contains the list of used enum values
*
* @generated from field: repeated string EnumValues = 5;
*/
EnumValues: string[];
/**
* SubgraphIDs is the list of datasource IDs (e.g subgraph ID) that the input is used from
*
* @generated from field: repeated string SubgraphIDs = 6;
*/
SubgraphIDs: string[];
/**
* IsNull indicates whether this input was explicitly or implicitly null
* This is critical for detecting breaking changes when optional fields become required
*
* @generated from field: bool IsNull = 7;
*/
IsNull: boolean;
constructor(data?: PartialMessage<InputUsageInfo>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.InputUsageInfo";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InputUsageInfo;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InputUsageInfo;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InputUsageInfo;
static equals(a: InputUsageInfo | PlainMessage<InputUsageInfo> | undefined, b: InputUsageInfo | PlainMessage<InputUsageInfo> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.PublishGraphQLRequestMetricsRequest
*/
export declare class PublishGraphQLRequestMetricsRequest extends Message<PublishGraphQLRequestMetricsRequest> {
/**
* @generated from field: repeated wg.cosmo.graphqlmetrics.v1.SchemaUsageInfo SchemaUsage = 1;
*/
SchemaUsage: SchemaUsageInfo[];
constructor(data?: PartialMessage<PublishGraphQLRequestMetricsRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.PublishGraphQLRequestMetricsRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishGraphQLRequestMetricsRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishGraphQLRequestMetricsRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishGraphQLRequestMetricsRequest;
static equals(a: PublishGraphQLRequestMetricsRequest | PlainMessage<PublishGraphQLRequestMetricsRequest> | undefined, b: PublishGraphQLRequestMetricsRequest | PlainMessage<PublishGraphQLRequestMetricsRequest> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.PublishOperationCoverageReportResponse
*/
export declare class PublishOperationCoverageReportResponse extends Message<PublishOperationCoverageReportResponse> {
constructor(data?: PartialMessage<PublishOperationCoverageReportResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.PublishOperationCoverageReportResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishOperationCoverageReportResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishOperationCoverageReportResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishOperationCoverageReportResponse;
static equals(a: PublishOperationCoverageReportResponse | PlainMessage<PublishOperationCoverageReportResponse> | undefined, b: PublishOperationCoverageReportResponse | PlainMessage<PublishOperationCoverageReportResponse> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.PublishAggregatedGraphQLRequestMetricsRequest
*/
export declare class PublishAggregatedGraphQLRequestMetricsRequest extends Message<PublishAggregatedGraphQLRequestMetricsRequest> {
/**
* @generated from field: repeated wg.cosmo.graphqlmetrics.v1.SchemaUsageInfoAggregation Aggregation = 1;
*/
Aggregation: SchemaUsageInfoAggregation[];
constructor(data?: PartialMessage<PublishAggregatedGraphQLRequestMetricsRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.PublishAggregatedGraphQLRequestMetricsRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishAggregatedGraphQLRequestMetricsRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishAggregatedGraphQLRequestMetricsRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishAggregatedGraphQLRequestMetricsRequest;
static equals(a: PublishAggregatedGraphQLRequestMetricsRequest | PlainMessage<PublishAggregatedGraphQLRequestMetricsRequest> | undefined, b: PublishAggregatedGraphQLRequestMetricsRequest | PlainMessage<PublishAggregatedGraphQLRequestMetricsRequest> | undefined): boolean;
}
/**
* @generated from message wg.cosmo.graphqlmetrics.v1.PublishAggregatedGraphQLRequestMetricsResponse
*/
export declare class PublishAggregatedGraphQLRequestMetricsResponse extends Message<PublishAggregatedGraphQLRequestMetricsResponse> {
constructor(data?: PartialMessage<PublishAggregatedGraphQLRequestMetricsResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "wg.cosmo.graphqlmetrics.v1.PublishAggregatedGraphQLRequestMetricsResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishAggregatedGraphQLRequestMetricsResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishAggregatedGraphQLRequestMetricsResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishAggregatedGraphQLRequestMetricsResponse;
static equals(a: PublishAggregatedGraphQLRequestMetricsResponse | PlainMessage<PublishAggregatedGraphQLRequestMetricsResponse> | undefined, b: PublishAggregatedGraphQLRequestMetricsResponse | PlainMessage<PublishAggregatedGraphQLRequestMetricsResponse> | undefined): boolean;
}