Skip to content

Commit

Permalink
Changing type of Source.distribution_mode from an enum to string lite…
Browse files Browse the repository at this point in the history
…ral (#225)
  • Loading branch information
amarzavery authored May 6, 2019
1 parent e5212a2 commit ac87209
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rhea",
"version": "1.0.6",
"version": "1.0.7",
"description": "reactive AMQP 1.0 library",
"homepage": "http://github.com/amqp/rhea",
"license": "Apache-2.0",
Expand Down
26 changes: 7 additions & 19 deletions typings/connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,6 @@ export interface LinkOptions extends EndpointOptions {
max_message_size?: number;
}

/**
* Describes the link distribution policy;
* @enum DistributionMode
*/
export enum DistributionMode {
/**
* @property {string} move once successfully transferred over the link, the message will no longer be available
* to other links from the same node
*/
move = "move",
/**
* @property {string} copy once successfully transferred over the link, the message is
* still available for other links from the same node
*/
copy = "copy"
}

/**
* Defines the options that can be provided while creating the source/target for a Sender or Receiver (link).
* @interface BaseTerminusOptions
Expand Down Expand Up @@ -299,9 +282,14 @@ export interface TargetTerminusOptions extends BaseTerminusOptions {
*/
export interface Source extends TerminusOptions {
/**
* @property {number} [distribution_mode] The distribution mode of the link.
* @property {string} [distribution_mode] The distribution mode of the link.
* Valid values are:
* - **move** - once successfully transferred over the link, the message will no longer be
* available to other links from the same node.
* - **copy** - once successfully transferred over the link, the message is still available
* for other links from the same node.
*/
distribution_mode?: DistributionMode;
distribution_mode?: "move" | "copy";
/**
* @property {object} [filter] - The filters to be added for the terminus.
*/
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export {
Connection, ConnectionOptions, EventContext, DeliveryAnnotations, Dictionary,
EndpointOptions, LinkOptions, ReceiverOptions, SenderOptions, TerminusOptions,
ConnectionEvents, MessageHeader, OnAmqpEvent, Source, TargetTerminusOptions,
ConnectionDetails, DistributionMode
ConnectionDetails
} from "./connection";
export { ConnectionError, ProtocolError, TypeError, SimpleError } from "./errors";
export { Delivery, Session, SessionEvents } from "./session";
Expand Down

0 comments on commit ac87209

Please sign in to comment.