@mochabug/adapt-plugin-builder
Version:
This encapsulate the building an bundling logic for mochabug adapt plugins
134 lines • 4.1 kB
TypeScript
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file mochabugapis/adapt/plugins/v1/service_binding.proto.
*/
export declare const file_mochabugapis_adapt_plugins_v1_service_binding: GenFile;
/**
* A binding for a service. It can either reference a single service (via 'name')
* or specify a one‑of group of available services (via 'one_of_binding').
* The binding can also be marked as optional.
*
* @generated from message mochabugapis.adapt.plugins.v1.ServiceBinding
*/
export type ServiceBinding = Message<"mochabugapis.adapt.plugins.v1.ServiceBinding"> & {
/**
* The binding name is what the plugin is referring to internally when using the service
*
* @generated from field: string name = 1;
*/
name: string;
/**
* The actual binding
*
* @generated from oneof mochabugapis.adapt.plugins.v1.ServiceBinding.binding
*/
binding: {
/**
* A direct reference to a service definition.
*
* @generated from field: string service = 2;
*/
value: string;
case: "service";
} | {
/**
* A one-of binding: a list of service choices.
*
* @generated from field: mochabugapis.adapt.plugins.v1.OneOfBinding one_of = 3;
*/
value: OneOfBinding;
case: "oneOf";
} | {
case: undefined;
value?: undefined;
};
/**
* Whether the binding is optional.
*
* @generated from field: optional bool optional = 4;
*/
optional?: boolean;
};
/**
* A binding for a service. It can either reference a single service (via 'name')
* or specify a one‑of group of available services (via 'one_of_binding').
* The binding can also be marked as optional.
*
* @generated from message mochabugapis.adapt.plugins.v1.ServiceBinding
*/
export type ServiceBindingJson = {
/**
* The binding name is what the plugin is referring to internally when using the service
*
* @generated from field: string name = 1;
*/
name?: string;
/**
* A direct reference to a service definition.
*
* @generated from field: string service = 2;
*/
service?: string;
/**
* A one-of binding: a list of service choices.
*
* @generated from field: mochabugapis.adapt.plugins.v1.OneOfBinding one_of = 3;
*/
oneOf?: OneOfBindingJson;
/**
* Whether the binding is optional.
*
* @generated from field: optional bool optional = 4;
*/
optional?: boolean;
};
/**
* Describes the message mochabugapis.adapt.plugins.v1.ServiceBinding.
* Use `create(ServiceBindingSchema)` to create a new message.
*/
export declare const ServiceBindingSchema: GenMessage<ServiceBinding, ServiceBindingJson>;
/**
* The one-of binding type.
*
* @generated from message mochabugapis.adapt.plugins.v1.OneOfBinding
*/
export type OneOfBinding = Message<"mochabugapis.adapt.plugins.v1.OneOfBinding"> & {
/**
* List of available service names.
*
* @generated from field: repeated string options = 1;
*/
options: string[];
/**
* an optional default that must lie in the options array
*
* @generated from field: optional string default = 2;
*/
default?: string;
};
/**
* The one-of binding type.
*
* @generated from message mochabugapis.adapt.plugins.v1.OneOfBinding
*/
export type OneOfBindingJson = {
/**
* List of available service names.
*
* @generated from field: repeated string options = 1;
*/
options?: string[];
/**
* an optional default that must lie in the options array
*
* @generated from field: optional string default = 2;
*/
default?: string;
};
/**
* Describes the message mochabugapis.adapt.plugins.v1.OneOfBinding.
* Use `create(OneOfBindingSchema)` to create a new message.
*/
export declare const OneOfBindingSchema: GenMessage<OneOfBinding, OneOfBindingJson>;
//# sourceMappingURL=service_binding_pb.d.ts.map