@dolittle/sdk.protobuf
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
21 lines • 1.24 kB
TypeScript
import { Guid } from '@dolittle/rudiments';
import { Artifact as SdkArtifact, ArtifactIdLike, Generation } from '@dolittle/sdk.artifacts';
import { Artifact as PbArtifact } from '@dolittle/contracts/Artifacts/Artifact_pb';
/**
* Convert an artifact to protobuf representation.
* @param {TArtifact} input - The artifact to convert.
* @returns {PbArtifact} The converted artifact.
* @template TArtifact The type of the artifact.
* @template TId The type of the artifact id.
*/
export declare function toProtobuf<TArtifact extends SdkArtifact<TId>, TId extends ArtifactIdLike>(input: TArtifact): PbArtifact;
/**
* Convert an artifact to SDK representation.
* @param {PbArtifact | undefined} input - The artifact to convert.
* @param {(Guid, Generation) => TArtifact} artifactFactory - The callback to use to construct the converted artifact type.
* @returns {TArtifact} The converted artifact.
* @template TArtifact The type of the artifact.
* @template TId The type of the artifact id.
*/
export declare function toSDK<TArtifact extends SdkArtifact<TId>, TId extends ArtifactIdLike>(input: PbArtifact | undefined, artifactFactory: (id: Guid, generation: Generation) => TArtifact): TArtifact;
//# sourceMappingURL=Artifacts.d.ts.map