New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azure-iot-device-http

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-iot-device-http - npm Package Compare versions

Comparing version 1.1.17 to 1.1.18

6

lib/http_errors.d.ts
/// <reference types="node" />
import { IncomingMessage } from 'http';
/**
* @private
*/
export declare class HttpTransportError extends Error {

@@ -7,2 +10,5 @@ response?: IncomingMessage;

}
/**
* @private
*/
export declare function translateError(message: string, body: any, response: IncomingMessage): HttpTransportError;

@@ -16,2 +16,5 @@ // Copyright (c) Microsoft. All rights reserved.

var azure_iot_common_1 = require("azure-iot-common");
/**
* @private
*/
var HttpTransportError = (function (_super) {

@@ -30,2 +33,5 @@ __extends(HttpTransportError, _super);

*/
/**
* @private
*/
function translateError(message, body, response) {

@@ -32,0 +38,0 @@ var error;

58

lib/http_receiver.d.ts
/// <reference types="node" />
import { EventEmitter } from 'events';
import { results, Message, Receiver } from 'azure-iot-common';
/**
* Options structure used to configure how often the HTTP receiver polls for messages.
* Each of these options is mutually exclusive, except for the `drain` boolean. Only one `interval`, `at`, `cron` or `manualPolling` shall be present in the options structure.
*
* This is configured by calling {@link azure-iot-device.Client.setOptions} with an options structure following this format:
* ```js
* {
* http: {
* receivePolicy: {
* ...
* }
* }
* }
* ```
*/
export interface HttpReceiverOptions {
/**
* Interval **in seconds** at which the Azure IoT hub is going to be polled.
*/
interval?: number;
/**
* Use this option to configure the receiver to receive only once at a specific time.
*/
at?: Date;
/**
* Use a cron-formatted string
*/
cron?: string;
/**
* Does not poll and instead rely on the user calling the `receive` method.
*/
manualPolling?: boolean;
/**
* Boolean indicating whether only one message should be received all messages should be drained.
*/
drain?: boolean;
}
/**
* @class module:azure-iot-device-http.HttpReceiver
* @classdesc Provides a receiver link that can pull messages from the IoT Hub service and settle them.
* @private
* Provides a receiver link that can pull messages from the IoT Hub service and settle them.
*
* @param {Object} config This is a dictionary containing the
* following keys and values:
*
* | Key | Value |
* |---------|---------------------------------------------------------|
* | host | The host URL of the Azure IoT Hub |
* | hubName | The name of the Azure IoT Hub |
* | keyName | The identifier of the device that is being connected to |
* | key | The shared access key auth |
*
* @emits message When a message is received

@@ -44,2 +64,16 @@ * @emits errorReceived When there was an error trying to receive messages

private _receiverStarted;
/**
* @private
* @constructor
* @param {Object} config This is a dictionary containing the
* following keys and values:
*
* | Key | Value |
* |---------|---------------------------------------------------------|
* | host | The host URL of the Azure IoT Hub |
* | hubName | The name of the Azure IoT Hub |
* | keyName | The identifier of the device that is being connected to |
* | key | The shared access key auth |
* @param httpHelper
*/
constructor(config: any, httpHelper: any);

@@ -46,0 +80,0 @@ /**

@@ -34,15 +34,5 @@ // Copyright (c) Microsoft. All rights reserved.

/**
* @class module:azure-iot-device-http.HttpReceiver
* @classdesc Provides a receiver link that can pull messages from the IoT Hub service and settle them.
* @private
* Provides a receiver link that can pull messages from the IoT Hub service and settle them.
*
* @param {Object} config This is a dictionary containing the
* following keys and values:
*
* | Key | Value |
* |---------|---------------------------------------------------------|
* | host | The host URL of the Azure IoT Hub |
* | hubName | The name of the Azure IoT Hub |
* | keyName | The identifier of the device that is being connected to |
* | key | The shared access key auth |
*
* @emits message When a message is received

@@ -61,2 +51,16 @@ * @emits errorReceived When there was an error trying to receive messages

__extends(HttpReceiver, _super);
/**
* @private
* @constructor
* @param {Object} config This is a dictionary containing the
* following keys and values:
*
* | Key | Value |
* |---------|---------------------------------------------------------|
* | host | The host URL of the Azure IoT Hub |
* | hubName | The name of the Azure IoT Hub |
* | keyName | The identifier of the device that is being connected to |
* | key | The shared access key auth |
* @param httpHelper
*/
function HttpReceiver(config, httpHelper) {

@@ -63,0 +67,0 @@ var _this = _super.call(this) || this;

@@ -7,6 +7,6 @@ /// <reference types="node" />

/**
* @class module:azure-iot-device-http.Http
* @classdesc Provide HTTP transport to the device [client]{@link module:azure-iot-device.Client}.
* Provides the transport layer over HTTP for the {@link azure-iot-device.Client} object.
*
* @param {Object} config Configuration object derived from the connection string by the client.
* This class is not meant to be used directly, instead passed to the {@link azure-iot-device.Client} class to be used as
* a transport.
*/

@@ -17,4 +17,10 @@ export declare class Http extends EventEmitter implements Client.Transport, BatchingTransport {

private _receiver;
/**
* @private
* @constructor
* @param config The configuration object.
*/
constructor(config: ClientConfig);
/**
* @private
* @method module:azure-iot-device-http.Http#sendEvent

@@ -41,2 +47,3 @@ * @description This method sends an event to the IoT Hub as the device indicated in the

/**
* @private
* @method module:azure-iot-device-http.Http#sendEventBatch

@@ -62,2 +69,3 @@ * @description The `sendEventBatch` method sends a list of event messages to the IoT Hub

/**
* @private
* @method module:azure-iot-device-http.Http#getReceiver

@@ -70,2 +78,3 @@ * @description This methods gets the unique instance of the receiver that is used to asynchronously retrieve messages from the IoT Hub service.

/**
* @private
* @method module:azure-iot-device-http.Http#setOptions

@@ -78,2 +87,3 @@ * @description This methods sets the HTTP specific options of the transport.

/**
* @private
* @method module:azure-iot-device-http.Http#complete

@@ -87,2 +97,3 @@ * @description Settles the message as complete and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#reject

@@ -96,2 +107,3 @@ * @description Settles the message as rejected and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#abandon

@@ -105,2 +117,3 @@ * @description Settles the message as abandoned and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#updateSharedAccessSignature

@@ -107,0 +120,0 @@ * @description This methods sets the SAS token used to authenticate with the IoT Hub service.

@@ -41,6 +41,6 @@ // Copyright (c) Microsoft. All rights reserved.

/**
* @class module:azure-iot-device-http.Http
* @classdesc Provide HTTP transport to the device [client]{@link module:azure-iot-device.Client}.
* Provides the transport layer over HTTP for the {@link azure-iot-device.Client} object.
*
* @param {Object} config Configuration object derived from the connection string by the client.
* This class is not meant to be used directly, instead passed to the {@link azure-iot-device.Client} class to be used as
* a transport.
*/

@@ -57,2 +57,7 @@ /*Codes_SRS_NODE_DEVICE_HTTP_05_001: [The Http constructor shall accept an object with the following properties:

__extends(Http, _super);
/**
* @private
* @constructor
* @param config The configuration object.
*/
function Http(config) {

@@ -65,2 +70,3 @@ var _this = _super.call(this) || this;

/**
* @private
* @method module:azure-iot-device-http.Http#sendEvent

@@ -137,2 +143,3 @@ * @description This method sends an event to the IoT Hub as the device indicated in the

/**
* @private
* @method module:azure-iot-device-http.Http#sendEventBatch

@@ -209,2 +216,3 @@ * @description The `sendEventBatch` method sends a list of event messages to the IoT Hub

/**
* @private
* @method module:azure-iot-device-http.Http#getReceiver

@@ -222,2 +230,3 @@ * @description This methods gets the unique instance of the receiver that is used to asynchronously retrieve messages from the IoT Hub service.

/**
* @private
* @method module:azure-iot-device-http.Http#setOptions

@@ -259,2 +268,3 @@ * @description This methods sets the HTTP specific options of the transport.

/**
* @private
* @method module:azure-iot-device-http.Http#complete

@@ -273,2 +283,3 @@ * @description Settles the message as complete and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#reject

@@ -287,2 +298,3 @@ * @description Settles the message as rejected and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#abandon

@@ -301,2 +313,3 @@ * @description Settles the message as abandoned and calls the done callback with the result.

/**
* @private
* @method module:azure-iot-device-http.Http#updateSharedAccessSignature

@@ -303,0 +316,0 @@ * @description This methods sets the SAS token used to authenticate with the IoT Hub service.

{
"name": "azure-iot-device-http",
"version": "1.1.17",
"version": "1.1.18",
"description": "HTTP transport for Azure IoT device SDK",

@@ -10,9 +10,9 @@ "author": "Microsoft Corporation",

"dependencies": {
"azure-iot-http-base": "1.1.11",
"azure-iot-common": "1.1.11",
"azure-iot-device": "1.1.17",
"azure-iot-http-base": "1.1.12",
"azure-iot-common": "1.1.12",
"azure-iot-device": "1.1.18",
"node-crontab": "^0.0.8"
},
"devDependencies": {
"azure-iothub": "1.1.14",
"azure-iothub": "1.1.16",
"chai": "^3.5.0",

@@ -19,0 +19,0 @@ "istanbul": "^0.4.4",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc