@mochabug/adaptkit
Version:
A cmd to create, emulate and publish Mochabug Adapt plugins
107 lines • 3.81 kB
TypeScript
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file mochabugapis/adapt/plugins/v1/state_contract.proto.
*/
export declare const file_mochabugapis_adapt_plugins_v1_state_contract: GenFile;
/**
* StateContract describes the compatibility class for opaque plugin-owned
* state. If a manifest omits a state contract, the platform treats that scope
* as generation "default". If a StateContract is present, both generation and
* on_generation_change must be explicit. Generations are author-defined
* compatibility labels and are not derived from plugin semver.
*
* @generated from message mochabugapis.adapt.plugins.v1.StateContract
*/
export type StateContract = Message<"mochabugapis.adapt.plugins.v1.StateContract"> & {
/**
* 'generation' identifies the state format compatibility class.
*
* @generated from field: string generation = 1;
*/
generation: string;
/**
* 'on_generation_change' is the policy the platform applies when updating
* from a different generation into this target generation.
*
* @generated from oneof mochabugapis.adapt.plugins.v1.StateContract.on_generation_change
*/
onGenerationChange: {
/**
* Wipe the affected state. This is the only supported policy today.
*
* @generated from field: mochabugapis.adapt.plugins.v1.WipeState wipe = 2;
*/
value: WipeState;
case: "wipe";
} | {
case: undefined;
value?: undefined;
};
};
/**
* StateContract describes the compatibility class for opaque plugin-owned
* state. If a manifest omits a state contract, the platform treats that scope
* as generation "default". If a StateContract is present, both generation and
* on_generation_change must be explicit. Generations are author-defined
* compatibility labels and are not derived from plugin semver.
*
* @generated from message mochabugapis.adapt.plugins.v1.StateContract
*/
export type StateContractJson = {
/**
* 'generation' identifies the state format compatibility class.
*
* @generated from field: string generation = 1;
*/
generation?: string;
/**
* Wipe the affected state. This is the only supported policy today.
*
* @generated from field: mochabugapis.adapt.plugins.v1.WipeState wipe = 2;
*/
wipe?: WipeStateJson;
};
/**
* Describes the message mochabugapis.adapt.plugins.v1.StateContract.
* Use `create(StateContractSchema)` to create a new message.
*/
export declare const StateContractSchema: GenMessage<StateContract, {
jsonType: StateContractJson;
}>;
/**
* WipeState declares that state should be deleted when entering a generation
* from any different generation.
*
* @generated from message mochabugapis.adapt.plugins.v1.WipeState
*/
export type WipeState = Message<"mochabugapis.adapt.plugins.v1.WipeState"> & {
/**
* Optional short reason attached to the wipe decision.
*
* @generated from field: optional string reason = 1;
*/
reason?: string | undefined;
};
/**
* WipeState declares that state should be deleted when entering a generation
* from any different generation.
*
* @generated from message mochabugapis.adapt.plugins.v1.WipeState
*/
export type WipeStateJson = {
/**
* Optional short reason attached to the wipe decision.
*
* @generated from field: optional string reason = 1;
*/
reason?: string;
};
/**
* Describes the message mochabugapis.adapt.plugins.v1.WipeState.
* Use `create(WipeStateSchema)` to create a new message.
*/
export declare const WipeStateSchema: GenMessage<WipeState, {
jsonType: WipeStateJson;
}>;
//# sourceMappingURL=state_contract_pb.d.ts.map