insomnia/packages/insomnia-app/app/common/grpc-events.ts

22 lines
544 B
TypeScript
Raw Normal View History

import { ValueOf } from 'type-fest';
export const GrpcRequestEventEnum = {
start: 'GRPC_START',
sendMessage: 'GRPC_SEND_MESSAGE',
commit: 'GRPC_COMMIT',
cancel: 'GRPC_CANCEL',
cancelMultiple: 'GRPC_CANCEL_MULTIPLE',
} as const;
export type GrpcRequestEvent = ValueOf<typeof GrpcRequestEventEnum>;
export const GrpcResponseEventEnum = {
2020-11-11 22:44:03 +00:00
start: 'GRPC_START',
data: 'GRPC_DATA',
error: 'GRPC_ERROR',
end: 'GRPC_END',
2020-11-11 22:44:03 +00:00
status: 'GRPC_STATUS',
} as const;
export type GrpcResponseEvent = ValueOf<typeof GrpcResponseEventEnum>;