import { Map } from "google-protobuf"; import { ConfigurationItem as ConfigurationItemProto } from "../proto/dapr/proto/common/v1/common_pb"; import { KeyValueType } from "../types/KeyValue.type"; import { ConfigurationType } from "../types/configuration/Configuration.type"; import { PubSubBulkPublishEntry } from "../types/pubsub/PubSubBulkPublishEntry.type"; import { PubSubBulkPublishResponse } from "../types/pubsub/PubSubBulkPublishResponse.type"; import { PubSubBulkPublishMessage } from "../types/pubsub/PubSubBulkPublishMessage.type"; import { PubSubBulkPublishApiResponse } from "../types/pubsub/PubSubBulkPublishApiResponse.type"; import { DaprClientOptions } from "../types/DaprClientOptions"; import CommunicationProtocolEnum from "../enum/CommunicationProtocol.enum"; import { LoggerOptions } from "../types/logger/LoggerOptions"; import { StateConsistencyEnum } from "../enum/StateConsistency.enum"; import { StateConcurrencyEnum } from "../enum/StateConcurrency.enum"; /** * Adds metadata to a map. * @param map Input map * @param metadata key value pair of metadata */ export declare function addMetadataToMap(map: Map, metadata?: KeyValueType): void; /** * Converts one or multiple sets of data to a querystring * Each set of data contains a set of KeyValue Pair * An optional "metadata" type can be added in each set, in which case * the QS key of each data in the set will be prefixed with "metadata.". * * Note, the returned value does not contain the "?" prefix. * * @param params one of multiple set of data * @returns HTTP query parameter string */ export declare function createHTTPQueryParam(...params: { data?: KeyValueType; type?: "metadata"; }[]): string; /** * Return the string representation of a valid consistency configuration * @param c */ export declare function getStateConsistencyValue(c?: StateConsistencyEnum): "eventual" | "strong" | undefined; /** * Return the string representation of a valid concurrency configuration * @param c */ export declare function getStateConcurrencyValue(c?: StateConcurrencyEnum): "first-write" | "last-write" | undefined; /** * Converts a Map to a ConfigurationType object. * @param Map * @returns ConfigurationType object */ export declare function createConfigurationType(configDict: Map): ConfigurationType; /** * Gets the Content-Type for the input data. * * If the data is a valid Cloud Event, the Content-Type is "application/cloudevents+json". * If the data is a JSON object, the Content-Type is "application/json". * If the data is a string, the Content-Type is "text/plain". * Otherwise, the Content-Type is "application/octet-stream". * * @param data input data * @returns Content-Type header value */ export declare function getContentType(data: any): string; /** * Get the entries for bulk publish request. * If entryIDs are missing, generate UUIDs for them. * If contentTypes are missing, infer them based on the data using {@link getContentType}. * * @param messages pubsub bulk publish messages * @returns configured entries */ export declare function getBulkPublishEntries(messages: PubSubBulkPublishMessage[]): PubSubBulkPublishEntry[]; /** * Get the response for bulk publish request. * * @param response bulk publish API response * @param entries entries for bulk publish request * @param error error from bulk publish request * @returns SDK response for bulk publish request */ export declare function getBulkPublishResponse(params: { entries: PubSubBulkPublishEntry[]; response: PubSubBulkPublishApiResponse; } | { entries: PubSubBulkPublishEntry[]; error: Error; }): PubSubBulkPublishResponse; /** * Prepares DaprClientOptions for use by the DaprClient/DaprServer. * If the user does not provide a value for a mandatory option, the default value is used. * @param clientOptions DaprClientOptions * @param defaultCommunicationProtocol CommunicationProtocolEnum * @param defaultLoggerOptions * @returns DaprClientOptions */ export declare function getClientOptions(clientOptions: Partial | undefined, defaultCommunicationProtocol: CommunicationProtocolEnum, defaultLoggerOptions: LoggerOptions | undefined): Partial;