Socket
Socket
Sign inDemoInstall

aws-iot-device-sdk-v2

Package Overview
Dependencies
132
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.19.1 to 1.19.3

documents/MIGRATION_GUIDE.md

2

dist/echotestrpc.spec.js

@@ -373,3 +373,3 @@ "use strict";

}));
test('echoMessage failure test - server side internal service error', () => __awaiter(void 0, void 0, void 0, function* () {
conditional_test(hasEchoServerEnvironment())('echoMessage failure test - server side internal service error', () => __awaiter(void 0, void 0, void 0, function* () {
let client = echo_rpc.createClient(makeGoodConfig());

@@ -376,0 +376,0 @@ yield client.connect();

@@ -56,2 +56,4 @@ /// <reference types="node" />

*
* Send a request to authorize action on some resource
*
* @param request data describing the AuthorizeClientDeviceAction operation to perform

@@ -77,2 +79,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Generate a password for the LocalDebugConsole component
*
* @param request data describing the CreateDebugPassword operation to perform

@@ -120,2 +124,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Get session token for a client device
*
* @param request data describing the GetClientDeviceAuthToken operation to perform

@@ -163,2 +169,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Retrieves a secret stored in AWS secrets manager
*
* @param request data describing the GetSecretValue operation to perform

@@ -184,2 +192,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Request for a list of components
*
* @param request data describing the ListComponents operation to perform

@@ -216,2 +226,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Pause a running component
*
* @param request data describing the PauseComponent operation to perform

@@ -248,2 +260,5 @@ * @param options additional eventstream options to use while performing this operation

*
* Send component metrics
* NOTE Only usable by AWS components
*
* @param request data describing the PutComponentMetric operation to perform

@@ -269,2 +284,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Resume a paused component
*
* @param request data describing the ResumeComponent operation to perform

@@ -280,4 +297,4 @@ * @param options additional eventstream options to use while performing this operation

* This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates
subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
* subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
* period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
*

@@ -304,2 +321,4 @@ * @param request data describing the SendConfigurationValidityReport operation to perform

*
* Create a subscription for new certificates
*
* Once created, the streaming operation must be started by a call to activate().

@@ -427,3 +446,3 @@ *

* Update this component's configuration by replacing the value of given keyName with the newValue.
If an oldValue is specified then update will only take effect id the current value matches the given oldValue
* If an oldValue is specified then update will only take effect id the current value matches the given oldValue
*

@@ -451,3 +470,3 @@ * @param request data describing the UpdateConfiguration operation to perform

* Updates a device shadow document stored in the local shadow service
The update is an upsert operation, with optimistic locking support
* The update is an upsert operation, with optimistic locking support
*

@@ -463,2 +482,5 @@ * @param request data describing the UpdateThingShadow operation to perform

*
* Validate authorization token
* NOTE This API can be used only by stream manager, customer component calling this API will receive UnauthorizedError
*
* @param request data describing the ValidateAuthorizationToken operation to perform

@@ -473,2 +495,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Verify client device credentials
*
* @param request data describing the VerifyClientDeviceIdentity operation to perform

@@ -475,0 +499,0 @@ * @param options additional eventstream options to use while performing this operation

@@ -105,2 +105,4 @@ "use strict";

*
* Send a request to authorize action on some resource
*
* @param request data describing the AuthorizeClientDeviceAction operation to perform

@@ -146,2 +148,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Generate a password for the LocalDebugConsole component
*
* @param request data describing the CreateDebugPassword operation to perform

@@ -229,2 +233,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Get session token for a client device
*
* @param request data describing the GetClientDeviceAuthToken operation to perform

@@ -312,2 +318,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Retrieves a secret stored in AWS secrets manager
*
* @param request data describing the GetSecretValue operation to perform

@@ -353,2 +361,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Request for a list of components
*
* @param request data describing the ListComponents operation to perform

@@ -415,2 +425,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Pause a running component
*
* @param request data describing the PauseComponent operation to perform

@@ -477,2 +489,5 @@ * @param options additional eventstream options to use while performing this operation

*
* Send component metrics
* NOTE Only usable by AWS components
*
* @param request data describing the PutComponentMetric operation to perform

@@ -518,2 +533,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Resume a paused component
*
* @param request data describing the ResumeComponent operation to perform

@@ -539,4 +556,4 @@ * @param options additional eventstream options to use while performing this operation

* This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates
subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
* subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
* period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
*

@@ -583,2 +600,4 @@ * @param request data describing the SendConfigurationValidityReport operation to perform

*
* Create a subscription for new certificates
*
* Once created, the streaming operation must be started by a call to activate().

@@ -748,3 +767,3 @@ *

* Update this component's configuration by replacing the value of given keyName with the newValue.
If an oldValue is specified then update will only take effect id the current value matches the given oldValue
* If an oldValue is specified then update will only take effect id the current value matches the given oldValue
*

@@ -792,3 +811,3 @@ * @param request data describing the UpdateConfiguration operation to perform

* Updates a device shadow document stored in the local shadow service
The update is an upsert operation, with optimistic locking support
* The update is an upsert operation, with optimistic locking support
*

@@ -814,2 +833,5 @@ * @param request data describing the UpdateThingShadow operation to perform

*
* Validate authorization token
* NOTE This API can be used only by stream manager, customer component calling this API will receive UnauthorizedError
*
* @param request data describing the ValidateAuthorizationToken operation to perform

@@ -834,2 +856,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Verify client device credentials
*
* @param request data describing the VerifyClientDeviceIdentity operation to perform

@@ -836,0 +860,0 @@ * @param options additional eventstream options to use while performing this operation

@@ -72,3 +72,4 @@ /**

/**
* The context is ignored if used in PublishMessage.
* Contextual information about the message.
* NOTE The context is ignored if used in PublishMessage.
*/

@@ -75,0 +76,0 @@ export interface MessageContext {

@@ -48,2 +48,21 @@ /**

/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishCreateCertificateFromCsr(request: model.CreateCertificateFromCsrRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Creates new keys and a certificate. AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.

@@ -68,6 +87,25 @@ *

/**
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishRegisterThing(request: model.RegisterThingRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -91,8 +129,8 @@ *

*/
subscribeToCreateKeysAndCertificateAccepted(request: model.CreateKeysAndCertificateSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToCreateCertificateFromCsrAccepted(request: model.CreateCertificateFromCsrSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -116,8 +154,8 @@ *

*/
subscribeToCreateKeysAndCertificateRejected(request: model.CreateKeysAndCertificateSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToCreateCertificateFromCsrRejected(request: model.CreateCertificateFromCsrSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic of the RegisterThing operation.
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -141,8 +179,8 @@ *

*/
subscribeToRegisterThingRejected(request: model.RegisterThingSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToCreateKeysAndCertificateAccepted(request: model.CreateKeysAndCertificateSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -166,23 +204,4 @@ *

*/
subscribeToCreateCertificateFromCsrAccepted(request: model.CreateCertificateFromCsrSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToCreateKeysAndCertificateRejected(request: model.CreateKeysAndCertificateSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishRegisterThing(request: model.RegisterThingRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic of the RegisterThing operation.

@@ -212,6 +231,6 @@ *

/**
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the RegisterThing operation.
*
*
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -235,22 +254,3 @@ *

*/
subscribeToCreateCertificateFromCsrRejected(request: model.CreateCertificateFromCsrSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishCreateCertificateFromCsr(request: model.CreateCertificateFromCsrRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToRegisterThingRejected(request: model.RegisterThingSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
}

@@ -114,2 +114,26 @@ "use strict";

/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishCreateCertificateFromCsr(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create-from-csr/json";
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Creates new keys and a certificate. AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.

@@ -139,6 +163,31 @@ *

/**
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishRegisterThing(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/provisioning-templates/{templateName}/provision/json";
topic = topic.replace("{templateName}", request.templateName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -162,5 +211,5 @@ *

*/
subscribeToCreateKeysAndCertificateAccepted(request, qos, messageHandler) {
subscribeToCreateCertificateFromCsrAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create/json/accepted";
let topic = "$aws/certificates/create-from-csr/json/accepted";
const on_message = (topic, payload) => {

@@ -184,6 +233,6 @@ let response;

/**
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -207,5 +256,5 @@ *

*/
subscribeToCreateKeysAndCertificateRejected(request, qos, messageHandler) {
subscribeToCreateCertificateFromCsrRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create/json/rejected";
let topic = "$aws/certificates/create-from-csr/json/rejected";
const on_message = (topic, payload) => {

@@ -229,6 +278,6 @@ let response;

/**
* Subscribes to the rejected topic of the RegisterThing operation.
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -252,6 +301,5 @@ *

*/
subscribeToRegisterThingRejected(request, qos, messageHandler) {
subscribeToCreateKeysAndCertificateAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/provisioning-templates/{templateName}/provision/json/rejected";
topic = topic.replace("{templateName}", request.templateName);
let topic = "$aws/certificates/create/json/accepted";
const on_message = (topic, payload) => {

@@ -275,6 +323,6 @@ let response;

/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -298,5 +346,5 @@ *

*/
subscribeToCreateCertificateFromCsrAccepted(request, qos, messageHandler) {
subscribeToCreateKeysAndCertificateRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create-from-csr/json/accepted";
let topic = "$aws/certificates/create/json/rejected";
const on_message = (topic, payload) => {

@@ -320,27 +368,2 @@ let response;

/**
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishRegisterThing(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/provisioning-templates/{templateName}/provision/json";
topic = topic.replace("{templateName}", request.templateName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic of the RegisterThing operation.

@@ -390,6 +413,6 @@ *

/**
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the RegisterThing operation.
*
*
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -413,5 +436,6 @@ *

*/
subscribeToCreateCertificateFromCsrRejected(request, qos, messageHandler) {
subscribeToRegisterThingRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create-from-csr/json/rejected";
let topic = "$aws/provisioning-templates/{templateName}/provision/json/rejected";
topic = topic.replace("{templateName}", request.templateName);
const on_message = (topic, payload) => {

@@ -434,26 +458,2 @@ let response;

}
/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
publishCreateCertificateFromCsr(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/certificates/create-from-csr/json";
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
}

@@ -460,0 +460,0 @@ exports.IotIdentityClient = IotIdentityClient;

@@ -25,11 +25,11 @@ /**

/**
* The token to prove ownership of the certificate during provisioning.
* The certificate data, in PEM format.
*
*/
certificateOwnershipToken?: string;
certificatePem?: string;
/**
* The certificate data, in PEM format.
* The token to prove ownership of the certificate during provisioning.
*
*/
certificatePem?: string;
certificateOwnershipToken?: string;
}

@@ -62,7 +62,2 @@ /**

/**
* The token to prove ownership of the certificate during provisioning.
*
*/
certificateOwnershipToken?: string;
/**
* The certificate data, in PEM format.

@@ -77,2 +72,7 @@ *

privateKey?: string;
/**
* The token to prove ownership of the certificate during provisioning.
*
*/
certificateOwnershipToken?: string;
}

@@ -98,11 +98,11 @@ /**

/**
* Response error message
* Response error code
*
*/
errorMessage?: string;
errorCode?: string;
/**
* Response error code
* Response error message
*
*/
errorCode?: string;
errorMessage?: string;
}

@@ -121,2 +121,7 @@ /**

/**
* The token to prove ownership of the certificate. The token is generated by AWS IoT when you create a certificate over MQTT.
*
*/
certificateOwnershipToken?: string;
/**
* Optional. Key-value pairs from the device that are used by the pre-provisioning hooks to evaluate the registration request.

@@ -128,7 +133,2 @@ *

};
/**
* The token to prove ownership of the certificate. The token is generated by AWS IoT when you create a certificate over MQTT.
*
*/
certificateOwnershipToken?: string;
}

@@ -142,7 +142,2 @@ /**

/**
* The name of the IoT thing created during provisioning.
*
*/
thingName?: string;
/**
* The device configuration defined in the template.

@@ -154,2 +149,7 @@ *

};
/**
* The name of the IoT thing created during provisioning.
*
*/
thingName?: string;
}

@@ -156,0 +156,0 @@ /**

@@ -48,30 +48,82 @@ /**

/**
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
* Gets detailed information about a job execution.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
* @category IotJobs
*/
publishDescribeJobExecution(request: model.DescribeJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Gets the list of all jobs for a thing that are not in a terminal state.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
subscribeToJobExecutionsChangedEvents(request: model.JobExecutionsChangedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.JobExecutionsChangedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
publishGetPendingJobExecutions(request: model.GetPendingJobExecutionsRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishStartNextPendingJobExecution(request: model.StartNextPendingJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishUpdateJobExecution(request: model.UpdateJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -83,3 +135,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*

@@ -96,3 +148,3 @@ * @param request Subscription request configuration

*/
subscribeToStartNextPendingJobExecutionAccepted(request: model.StartNextPendingJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.StartNextJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToDescribeJobExecutionAccepted(request: model.DescribeJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.DescribeJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**

@@ -123,6 +175,6 @@ * Subscribes to the rejected topic for the DescribeJobExecution operation

/**
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
*
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -134,3 +186,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -147,8 +199,8 @@ * @param request Subscription request configuration

*/
subscribeToNextJobExecutionChangedEvents(request: model.NextJobExecutionChangedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.NextJobExecutionChangedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToGetPendingJobExecutionsAccepted(request: model.GetPendingJobExecutionsSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.GetPendingJobExecutionsResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic for the UpdateJobExecution operation
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
*
*
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -160,3 +212,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -173,8 +225,8 @@ * @param request Subscription request configuration

*/
subscribeToUpdateJobExecutionRejected(request: model.UpdateJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToGetPendingJobExecutionsRejected(request: model.GetPendingJobExecutionsSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the UpdateJobExecution operation
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
*
*
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -186,3 +238,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
*

@@ -199,27 +251,8 @@ * @param request Subscription request configuration

*/
subscribeToUpdateJobExecutionAccepted(request: model.UpdateJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.UpdateJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToJobExecutionsChangedEvents(request: model.JobExecutionsChangedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.JobExecutionsChangedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishUpdateJobExecution(request: model.UpdateJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -231,3 +264,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
*

@@ -244,27 +277,8 @@ * @param request Subscription request configuration

*/
subscribeToDescribeJobExecutionAccepted(request: model.DescribeJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.DescribeJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToNextJobExecutionChangedEvents(request: model.NextJobExecutionChangedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.NextJobExecutionChangedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Gets the list of all jobs for a thing that are not in a terminal state.
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishGetPendingJobExecutions(request: model.GetPendingJobExecutionsRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -276,3 +290,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*

@@ -289,3 +303,3 @@ * @param request Subscription request configuration

*/
subscribeToGetPendingJobExecutionsAccepted(request: model.GetPendingJobExecutionsSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.GetPendingJobExecutionsResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToStartNextPendingJobExecutionAccepted(request: model.StartNextPendingJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.StartNextJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**

@@ -316,6 +330,6 @@ * Subscribes to the rejected topic for the StartNextPendingJobExecution operation

/**
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
* Subscribes to the accepted topic for the UpdateJobExecution operation
*
*
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -327,3 +341,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*

@@ -340,41 +354,27 @@ * @param request Subscription request configuration

*/
subscribeToGetPendingJobExecutionsRejected(request: model.GetPendingJobExecutionsSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToUpdateJobExecutionAccepted(request: model.UpdateJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.UpdateJobExecutionResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
* Subscribes to the rejected topic for the UpdateJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @category IotJobs
*/
publishStartNextPendingJobExecution(request: model.StartNextPendingJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Gets detailed information about a job execution.
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishDescribeJobExecution(request: model.DescribeJobExecutionRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToUpdateJobExecutionRejected(request: model.UpdateJobExecutionSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
}

@@ -114,6 +114,108 @@ "use strict";

/**
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
* Gets detailed information about a job execution.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishDescribeJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/get";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets the list of all jobs for a thing that are not in a terminal state.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishGetPendingJobExecutions(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishStartNextPendingJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/start-next";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishUpdateJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -125,3 +227,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*

@@ -138,6 +240,7 @@ * @param request Subscription request configuration

*/
subscribeToJobExecutionsChangedEvents(request, qos, messageHandler) {
subscribeToDescribeJobExecutionAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/notify";
let topic = "$aws/things/{thingName}/jobs/{jobId}/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -161,6 +264,6 @@ let response;

/**
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
* Subscribes to the rejected topic for the DescribeJobExecution operation
*
*
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToDescribeJobExecutionRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -172,3 +275,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*

@@ -185,6 +288,7 @@ * @param request Subscription request configuration

*/
subscribeToStartNextPendingJobExecutionAccepted(request, qos, messageHandler) {
subscribeToDescribeJobExecutionRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/start-next/accepted";
let topic = "$aws/things/{thingName}/jobs/{jobId}/get/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -208,6 +312,6 @@ let response;

/**
* Subscribes to the rejected topic for the DescribeJobExecution operation
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
* subscribeToDescribeJobExecutionRejected may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -219,3 +323,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -232,7 +336,6 @@ * @param request Subscription request configuration

*/
subscribeToDescribeJobExecutionRejected(request, qos, messageHandler) {
subscribeToGetPendingJobExecutionsAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/get/rejected";
let topic = "$aws/things/{thingName}/jobs/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -256,6 +359,6 @@ let response;

/**
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
*
*
*
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -267,3 +370,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -280,5 +383,5 @@ * @param request Subscription request configuration

*/
subscribeToNextJobExecutionChangedEvents(request, qos, messageHandler) {
subscribeToGetPendingJobExecutionsRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/notify-next";
let topic = "$aws/things/{thingName}/jobs/get/rejected";
topic = topic.replace("{thingName}", request.thingName);

@@ -303,6 +406,6 @@ const on_message = (topic, payload) => {

/**
* Subscribes to the rejected topic for the UpdateJobExecution operation
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
*
*
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -314,3 +417,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
*

@@ -327,6 +430,5 @@ * @param request Subscription request configuration

*/
subscribeToUpdateJobExecutionRejected(request, qos, messageHandler) {
subscribeToJobExecutionsChangedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/update/rejected";
topic = topic.replace("{jobId}", request.jobId);
let topic = "$aws/things/{thingName}/jobs/notify";
topic = topic.replace("{thingName}", request.thingName);

@@ -351,6 +453,6 @@ const on_message = (topic, payload) => {

/**
* Subscribes to the accepted topic for the UpdateJobExecution operation
*
*
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
*
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -362,3 +464,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
*

@@ -375,6 +477,5 @@ * @param request Subscription request configuration

*/
subscribeToUpdateJobExecutionAccepted(request, qos, messageHandler) {
subscribeToNextJobExecutionChangedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/update/accepted";
topic = topic.replace("{jobId}", request.jobId);
let topic = "$aws/things/{thingName}/jobs/notify-next";
topic = topic.replace("{thingName}", request.thingName);

@@ -399,32 +500,6 @@ const on_message = (topic, payload) => {

/**
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishUpdateJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -436,3 +511,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*

@@ -449,7 +524,6 @@ * @param request Subscription request configuration

*/
subscribeToDescribeJobExecutionAccepted(request, qos, messageHandler) {
subscribeToStartNextPendingJobExecutionAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/get/accepted";
let topic = "$aws/things/{thingName}/jobs/start-next/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -473,31 +547,6 @@ let response;

/**
* Gets the list of all jobs for a thing that are not in a terminal state.
* Subscribes to the rejected topic for the StartNextPendingJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishGetPendingJobExecutions(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* subscribeToStartNextPendingJobExecutionRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -509,3 +558,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*

@@ -522,5 +571,5 @@ * @param request Subscription request configuration

*/
subscribeToGetPendingJobExecutionsAccepted(request, qos, messageHandler) {
subscribeToStartNextPendingJobExecutionRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/get/accepted";
let topic = "$aws/things/{thingName}/jobs/start-next/rejected";
topic = topic.replace("{thingName}", request.thingName);

@@ -545,6 +594,6 @@ const on_message = (topic, payload) => {

/**
* Subscribes to the rejected topic for the StartNextPendingJobExecution operation
* Subscribes to the accepted topic for the UpdateJobExecution operation
*
*
* subscribeToStartNextPendingJobExecutionRejected may be called while the device is offline, though the async
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -556,3 +605,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*

@@ -569,6 +618,7 @@ * @param request Subscription request configuration

*/
subscribeToStartNextPendingJobExecutionRejected(request, qos, messageHandler) {
subscribeToUpdateJobExecutionAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/start-next/rejected";
let topic = "$aws/things/{thingName}/jobs/{jobId}/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -592,6 +642,6 @@ let response;

/**
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
* Subscribes to the rejected topic for the UpdateJobExecution operation
*
*
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -603,3 +653,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*

@@ -616,6 +666,7 @@ * @param request Subscription request configuration

*/
subscribeToGetPendingJobExecutionsRejected(request, qos, messageHandler) {
subscribeToUpdateJobExecutionRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/get/rejected";
let topic = "$aws/things/{thingName}/jobs/{jobId}/update/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic, payload) => {

@@ -638,53 +689,2 @@ let response;

}
/**
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishStartNextPendingJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/start-next";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets detailed information about a job execution.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
publishDescribeJobExecution(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/jobs/{jobId}/get";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
}

@@ -691,0 +691,0 @@ exports.IotJobsClient = IotJobsClient;

@@ -68,26 +68,26 @@ /**

/**
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is returned.
* The name of the thing associated with the device.
*
*/
executionNumber?: number;
thingName: string;
/**
* The name of the thing associated with the device.
* The unique identifier assigned to this job when it was created. Or use $next to return the next pending job execution for a thing (status IN_PROGRESS or QUEUED). In this case, any job executions with status IN_PROGRESS are returned first. Job executions are returned in the order in which they were created.
*
*/
thingName: string;
jobId: string;
/**
* Optional. Unless set to false, the response contains the job document. The default is true.
* An opaque string used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
includeJobDocument?: boolean;
clientToken?: string;
/**
* The unique identifier assigned to this job when it was created. Or use $next to return the next pending job execution for a thing (status IN_PROGRESS or QUEUED). In this case, any job executions with status IN_PROGRESS are returned first. Job executions are returned in the order in which they were created.
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is returned.
*
*/
jobId: string;
executionNumber?: number;
/**
* An opaque string used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* Optional. Unless set to false, the response contains the job document. The default is true.
*
*/
clientToken?: string;
includeJobDocument?: boolean;
}

@@ -101,11 +101,11 @@ /**

/**
* Contains data about a job execution.
* A client token used to correlate requests and responses.
*
*/
execution?: JobExecutionData;
clientToken?: string;
/**
* A client token used to correlate requests and responses.
* Contains data about a job execution.
*
*/
clientToken?: string;
execution?: JobExecutionData;
/**

@@ -158,2 +158,7 @@ * The time when the message was sent.

/**
* A list of JobExecutionSummary objects with status IN_PROGRESS.
*
*/
inProgressJobs?: Array<JobExecutionSummary>;
/**
* A list of JobExecutionSummary objects with status QUEUED.

@@ -173,7 +178,2 @@ *

clientToken?: string;
/**
* A list of JobExecutionSummary objects with status IN_PROGRESS.
*
*/
inProgressJobs?: Array<JobExecutionSummary>;
}

@@ -204,2 +204,7 @@ /**

/**
* The name of the thing that is executing the job.
*
*/
thingName?: string;
/**
* The content of the job document.

@@ -215,6 +220,8 @@ *

/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
* A collection of name-value pairs that describe the status of the job execution.
*
*/
versionNumber?: number;
statusDetails?: {
[key: string]: string;
};
/**

@@ -226,7 +233,17 @@ * The time when the job execution was enqueued.

/**
* The name of the thing that is executing the job.
* The time when the job execution started.
*
*/
thingName?: string;
startedAt?: Date;
/**
* The time when the job execution started.
*
*/
lastUpdatedAt?: Date;
/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
*
*/
versionNumber?: number;
/**
* A number that identifies a job execution on a device. It can be used later in commands that return or update job execution information.

@@ -236,19 +253,33 @@ *

executionNumber?: number;
}
/**
* Sent whenever a job execution is added to or removed from the list of pending job executions for a thing.
*
* @category IotJobs
*/
export interface JobExecutionsChangedEvent {
/**
* A collection of name-value pairs that describe the status of the job execution.
* Map from JobStatus to a list of Jobs transitioning to that status.
*
*/
statusDetails?: {
[key: string]: string;
jobs?: {
[key: string]: Array<JobExecutionSummary>;
};
/**
* The time when the job execution started.
* The time when the message was sent.
*
*/
lastUpdatedAt?: Date;
timestamp?: Date;
}
/**
* Data needed to subscribe to JobExecutionsChanged events.
*
* @category IotJobs
*/
export interface JobExecutionsChangedSubscriptionRequest {
/**
* The time when the job execution started.
* Name of the IoT Thing that you want to subscribe to JobExecutionsChanged events for.
*
*/
startedAt?: Date;
thingName: string;
}

@@ -262,2 +293,7 @@ /**

/**
* The status of the job execution. Can be one of: QUEUED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELED, TIMED_OUT, REJECTED, or REMOVED.
*
*/
status?: JobStatus;
/**
* A collection of name-value pairs that describe the status of the job execution.

@@ -274,7 +310,2 @@ *

versionNumber?: number;
/**
* The status of the job execution. Can be one of: QUEUED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELED, TIMED_OUT, REJECTED, or REMOVED.
*
*/
status?: JobStatus;
}

@@ -288,6 +319,6 @@ /**

/**
* The time when the job execution was last updated.
* The unique identifier you assigned to this job when it was created.
*
*/
lastUpdatedAt?: Date;
jobId?: string;
/**

@@ -299,7 +330,2 @@ * A number that identifies a job execution on a device.

/**
* The time when the job execution started.
*
*/
startedAt?: Date;
/**
* The version of the job execution. Job execution versions are incremented each time the AWS IoT Jobs service receives an update from a device.

@@ -310,6 +336,6 @@ *

/**
* The unique identifier you assigned to this job when it was created.
* The time when the job execution was last updated.
*
*/
jobId?: string;
lastUpdatedAt?: Date;
/**

@@ -320,35 +346,9 @@ * The time when the job execution was enqueued.

queuedAt?: Date;
}
/**
* Sent whenever a job execution is added to or removed from the list of pending job executions for a thing.
*
* @category IotJobs
*/
export interface JobExecutionsChangedEvent {
/**
* Map from JobStatus to a list of Jobs transitioning to that status.
* The time when the job execution started.
*
*/
jobs?: {
[key: string]: Array<JobExecutionSummary>;
};
/**
* The time when the message was sent.
*
*/
timestamp?: Date;
startedAt?: Date;
}
/**
* Data needed to subscribe to JobExecutionsChanged events.
*
* @category IotJobs
*/
export interface JobExecutionsChangedSubscriptionRequest {
/**
* Name of the IoT Thing that you want to subscribe to JobExecutionsChanged events for.
*
*/
thingName: string;
}
/**
* Sent whenever there is a change to which job execution is next on the list of pending job executions for a thing, as defined for DescribeJobExecution with jobId $next. This message is not sent when the next job's execution details change, only when the next job that would be returned by DescribeJobExecution with jobId $next has changed.

@@ -389,6 +389,6 @@ *

/**
* The date and time the response was generated by AWS IoT.
* Opaque token that can correlate this response to the original request.
*
*/
timestamp?: Date;
clientToken?: string;
/**

@@ -405,6 +405,6 @@ * Indicates the type of error.

/**
* Opaque token that can correlate this response to the original request.
* The date and time the response was generated by AWS IoT.
*
*/
clientToken?: string;
timestamp?: Date;
/**

@@ -428,11 +428,11 @@ * A JobExecutionState object. This field is included only when the code field has the value InvalidStateTransition or VersionMismatch.

/**
* The time when the message was sent to the device.
* Contains data about a job execution.
*
*/
timestamp?: Date;
execution?: JobExecutionData;
/**
* Contains data about a job execution.
* The time when the message was sent to the device.
*
*/
execution?: JobExecutionData;
timestamp?: Date;
}

@@ -451,11 +451,11 @@ /**

/**
* Specifies the amount of time this device has to finish execution of this job.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
stepTimeoutInMinutes?: number;
clientToken?: string;
/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* Specifies the amount of time this device has to finish execution of this job.
*
*/
clientToken?: string;
stepTimeoutInMinutes?: number;
/**

@@ -493,7 +493,17 @@ * A collection of name-value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.

/**
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is used.
* The unique identifier assigned to this job when it was created.
*
*/
executionNumber?: number;
jobId: string;
/**
* The new status for the job execution (IN_PROGRESS, FAILED, SUCCEEDED, or REJECTED). This must be specified on every update.
*
*/
status?: JobStatus;
/**
* A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
clientToken?: string;
/**
* A collection of name-value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.

@@ -506,16 +516,16 @@ *

/**
* Optional. When included and set to true, the response contains the JobExecutionState field. The default is false.
* The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in the AWS IoT Jobs service does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned.
*
*/
includeJobExecutionState?: boolean;
expectedVersion?: number;
/**
* The unique identifier assigned to this job when it was created.
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is used.
*
*/
jobId: string;
executionNumber?: number;
/**
* The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in the AWS IoT Jobs service does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned.
* Optional. When included and set to true, the response contains the JobExecutionState field. The default is false.
*
*/
expectedVersion?: number;
includeJobExecutionState?: boolean;
/**

@@ -527,7 +537,2 @@ * Optional. When included and set to true, the response contains the JobDocument. The default is false.

/**
* The new status for the job execution (IN_PROGRESS, FAILED, SUCCEEDED, or REJECTED). This must be specified on every update.
*
*/
status?: JobStatus;
/**
* Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling UpdateJobExecution, setting the status to IN_PROGRESS and specifying a new timeout value in this field) the job execution status is set to TIMED_OUT. Setting or resetting this timeout has no effect on the job execution timeout that might have been specified when the job was created (by using CreateJob with the timeoutConfig).

@@ -537,7 +542,2 @@ *

stepTimeoutInMinutes?: number;
/**
* A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
clientToken?: string;
}

@@ -556,6 +556,6 @@ /**

/**
* The time when the message was sent.
* Contains data about the state of a job execution.
*
*/
timestamp?: Date;
executionState?: JobExecutionState;
/**

@@ -567,6 +567,6 @@ * A UTF-8 encoded JSON document that contains information that your devices need to perform the job.

/**
* Contains data about the state of a job execution.
* The time when the message was sent.
*
*/
executionState?: JobExecutionState;
timestamp?: Date;
}

@@ -580,11 +580,11 @@ /**

/**
* Job ID that you want to subscribe to UpdateJobExecution response events for.
* Name of the IoT Thing that you want to subscribe to UpdateJobExecution response events for.
*
*/
jobId: string;
thingName: string;
/**
* Name of the IoT Thing that you want to subscribe to UpdateJobExecution response events for.
* Job ID that you want to subscribe to UpdateJobExecution response events for.
*
*/
thingName: string;
jobId: string;
}

@@ -48,103 +48,83 @@ /**

/**
* Subscribes to the rejected topic for the UpdateShadow operation
* Deletes a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
subscribeToUpdateShadowRejected(request: model.UpdateShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
publishDeleteNamedShadow(request: model.DeleteNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
* Deletes the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
subscribeToShadowDeltaUpdatedEvents(request: model.ShadowDeltaUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
publishDeleteShadow(request: model.DeleteShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the rejected topic for the GetNamedShadow operation.
* Gets a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
subscribeToGetNamedShadowRejected(request: model.GetNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
publishGetNamedShadow(request: model.GetNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
* Gets the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
subscribeToDeleteNamedShadowRejected(request: model.DeleteNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
publishGetShadow(request: model.GetShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Deletes the (classic) shadow for an AWS IoT thing.
* Update a named shadow for a device.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*

@@ -162,9 +142,9 @@ * @param request Message to be serialized and sent

*/
publishDeleteShadow(request: model.DeleteShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
publishUpdateNamedShadow(request: model.UpdateNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Gets a named shadow for an AWS IoT thing.
* Update a device's (classic) shadow.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*

@@ -182,8 +162,8 @@ * @param request Message to be serialized and sent

*/
publishGetNamedShadow(request: model.GetNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
publishUpdateShadow(request: model.UpdateShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
/**
* Subscribes to the accepted topic for the DeleteShadow operation
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
*
*
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -207,8 +187,8 @@ *

*/
subscribeToDeleteShadowAccepted(request: model.DeleteShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToDeleteNamedShadowAccepted(request: model.DeleteNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the GetShadow operation.
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
*
*
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -220,3 +200,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
*

@@ -233,8 +213,8 @@ * @param request Subscription request configuration

*/
subscribeToGetShadowAccepted(request: model.GetShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToDeleteNamedShadowRejected(request: model.DeleteNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the GetNamedShadow operation.
* Subscribes to the accepted topic for the DeleteShadow operation
*
*
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -246,3 +226,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
*

@@ -259,8 +239,8 @@ * @param request Subscription request configuration

*/
subscribeToGetNamedShadowAccepted(request: model.GetNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToDeleteShadowAccepted(request: model.DeleteShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
* Subscribes to the rejected topic for the DeleteShadow operation
*
*
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -272,3 +252,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
*

@@ -285,8 +265,8 @@ * @param request Subscription request configuration

*/
subscribeToNamedShadowUpdatedEvents(request: model.NamedShadowUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToDeleteShadowRejected(request: model.DeleteShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
* Subscribes to the accepted topic for the GetNamedShadow operation.
*
*
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -298,3 +278,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
*

@@ -311,27 +291,32 @@ * @param request Subscription request configuration

*/
subscribeToShadowUpdatedEvents(request: model.ShadowUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToGetNamedShadowAccepted(request: model.GetNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Deletes a named shadow for an AWS IoT thing.
* Subscribes to the rejected topic for the GetNamedShadow operation.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
publishDeleteNamedShadow(request: model.DeleteNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToGetNamedShadowRejected(request: model.GetNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
* Subscribes to the accepted topic for the GetShadow operation.
*
*
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -343,3 +328,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
*

@@ -356,8 +341,8 @@ * @param request Subscription request configuration

*/
subscribeToDeleteNamedShadowAccepted(request: model.DeleteNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToGetShadowAccepted(request: model.GetShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic for the DeleteShadow operation
* Subscribes to the rejected topic for the GetShadow operation.
*
*
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -369,3 +354,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*

@@ -382,8 +367,8 @@ * @param request Subscription request configuration

*/
subscribeToDeleteShadowRejected(request: model.DeleteShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToGetShadowRejected(request: model.GetShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic for the GetShadow operation.
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
*
*
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -395,3 +380,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*

@@ -408,46 +393,56 @@ * @param request Subscription request configuration

*/
subscribeToGetShadowRejected(request: model.GetShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToNamedShadowDeltaUpdatedEvents(request: model.NamedShadowDeltaUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Update a device's (classic) shadow.
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
publishUpdateShadow(request: model.UpdateShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToNamedShadowUpdatedEvents(request: model.NamedShadowUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Gets the (classic) shadow for an AWS IoT thing.
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
publishGetShadow(request: model.GetShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToShadowDeltaUpdatedEvents(request: model.ShadowDeltaUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the UpdateShadow operation
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
*
*
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -459,3 +454,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*

@@ -472,8 +467,8 @@ * @param request Subscription request configuration

*/
subscribeToUpdateShadowAccepted(request: model.UpdateShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToShadowUpdatedEvents(request: model.ShadowUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the rejected topic for the UpdateNamedShadow operation
* Subscribes to the accepted topic for the UpdateNamedShadow operation
*
*
* subscribeToUpdateNamedShadowRejected may be called while the device is offline, though the async
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -485,3 +480,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
*

@@ -498,27 +493,32 @@ * @param request Subscription request configuration

*/
subscribeToUpdateNamedShadowRejected(request: model.UpdateNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToUpdateNamedShadowAccepted(request: model.UpdateNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Update a named shadow for a device.
* Subscribes to the rejected topic for the UpdateNamedShadow operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
* subscribeToUpdateNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* @category IotShadow
*/
publishUpdateNamedShadow(request: model.UpdateNamedShadowRequest, qos: mqtt.QoS): Promise<mqtt.MqttRequest>;
subscribeToUpdateNamedShadowRejected(request: model.UpdateNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
* Subscribes to the accepted topic for the UpdateShadow operation
*
*
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -530,3 +530,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
*

@@ -543,8 +543,8 @@ * @param request Subscription request configuration

*/
subscribeToNamedShadowDeltaUpdatedEvents(request: model.NamedShadowDeltaUpdatedSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToUpdateShadowAccepted(request: model.UpdateShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
/**
* Subscribes to the accepted topic for the UpdateNamedShadow operation
* Subscribes to the rejected topic for the UpdateShadow operation
*
*
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -556,3 +556,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
*

@@ -569,3 +569,3 @@ * @param request Subscription request configuration

*/
subscribeToUpdateNamedShadowAccepted(request: model.UpdateNamedShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
subscribeToUpdateShadowRejected(request: model.UpdateShadowSubscriptionRequest, qos: mqtt.QoS, messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void): Promise<mqtt.MqttSubscribeRequest>;
}

@@ -114,6 +114,159 @@ "use strict";

/**
* Subscribes to the rejected topic for the UpdateShadow operation
* Deletes a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishDeleteNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Deletes the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishDeleteShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/delete";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishGetNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishGetShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Update a named shadow for a device.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishUpdateNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Update a device's (classic) shadow.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishUpdateShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
*
*
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -125,3 +278,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
*

@@ -138,6 +291,7 @@ * @param request Subscription request configuration

*/
subscribeToUpdateShadowRejected(request, qos, messageHandler) {
subscribeToDeleteNamedShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update/rejected";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -161,6 +315,6 @@ let response;

/**
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
*
*
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -172,3 +326,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
*

@@ -185,6 +339,7 @@ * @param request Subscription request configuration

*/
subscribeToShadowDeltaUpdatedEvents(request, qos, messageHandler) {
subscribeToDeleteNamedShadowRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update/delta";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -208,6 +363,6 @@ let response;

/**
* Subscribes to the rejected topic for the GetNamedShadow operation.
* Subscribes to the accepted topic for the DeleteShadow operation
*
*
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -219,3 +374,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
*

@@ -232,7 +387,6 @@ * @param request Subscription request configuration

*/
subscribeToGetNamedShadowRejected(request, qos, messageHandler) {
subscribeToDeleteShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get/rejected";
let topic = "$aws/things/{thingName}/shadow/delete/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -256,6 +410,6 @@ let response;

/**
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
* Subscribes to the rejected topic for the DeleteShadow operation
*
*
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -279,7 +433,6 @@ *

*/
subscribeToDeleteNamedShadowRejected(request, qos, messageHandler) {
subscribeToDeleteShadowRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/rejected";
let topic = "$aws/things/{thingName}/shadow/delete/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -303,57 +456,6 @@ let response;

/**
* Deletes the (classic) shadow for an AWS IoT thing.
* Subscribes to the accepted topic for the GetNamedShadow operation.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishDeleteShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/delete";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishGetNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the DeleteShadow operation
*
*
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -365,3 +467,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
*

@@ -378,6 +480,7 @@ * @param request Subscription request configuration

*/
subscribeToDeleteShadowAccepted(request, qos, messageHandler) {
subscribeToGetNamedShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/delete/accepted";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -401,6 +504,6 @@ let response;

/**
* Subscribes to the accepted topic for the GetShadow operation.
* Subscribes to the rejected topic for the GetNamedShadow operation.
*
*
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -412,3 +515,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*

@@ -425,6 +528,7 @@ * @param request Subscription request configuration

*/
subscribeToGetShadowAccepted(request, qos, messageHandler) {
subscribeToGetNamedShadowRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/get/accepted";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -448,6 +552,6 @@ let response;

/**
* Subscribes to the accepted topic for the GetNamedShadow operation.
* Subscribes to the accepted topic for the GetShadow operation.
*
*
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -471,7 +575,6 @@ *

*/
subscribeToGetNamedShadowAccepted(request, qos, messageHandler) {
subscribeToGetShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/get/accepted";
let topic = "$aws/things/{thingName}/shadow/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -495,6 +598,6 @@ let response;

/**
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
* Subscribes to the rejected topic for the GetShadow operation.
*
*
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -506,3 +609,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*

@@ -519,6 +622,5 @@ * @param request Subscription request configuration

*/
subscribeToNamedShadowUpdatedEvents(request, qos, messageHandler) {
subscribeToGetShadowRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/documents";
topic = topic.replace("{shadowName}", request.shadowName);
let topic = "$aws/things/{thingName}/shadow/get/rejected";
topic = topic.replace("{thingName}", request.thingName);

@@ -543,6 +645,6 @@ const on_message = (topic, payload) => {

/**
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
*
*
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -554,3 +656,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*

@@ -567,6 +669,7 @@ * @param request Subscription request configuration

*/
subscribeToShadowUpdatedEvents(request, qos, messageHandler) {
subscribeToNamedShadowDeltaUpdatedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update/documents";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/delta";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -590,32 +693,6 @@ let response;

/**
* Deletes a named shadow for an AWS IoT thing.
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishDeleteNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
*
*
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -627,3 +704,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*

@@ -640,5 +717,5 @@ * @param request Subscription request configuration

*/
subscribeToDeleteNamedShadowAccepted(request, qos, messageHandler) {
subscribeToNamedShadowUpdatedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/accepted";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/documents";
topic = topic.replace("{thingName}", request.thingName);

@@ -664,6 +741,6 @@ topic = topic.replace("{shadowName}", request.shadowName);

/**
* Subscribes to the rejected topic for the DeleteShadow operation
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
*
*
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -675,3 +752,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*

@@ -688,5 +765,5 @@ * @param request Subscription request configuration

*/
subscribeToDeleteShadowRejected(request, qos, messageHandler) {
subscribeToShadowDeltaUpdatedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/delete/rejected";
let topic = "$aws/things/{thingName}/shadow/update/delta";
topic = topic.replace("{thingName}", request.thingName);

@@ -711,6 +788,6 @@ const on_message = (topic, payload) => {

/**
* Subscribes to the rejected topic for the GetShadow operation.
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
*
*
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -722,3 +799,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*

@@ -735,5 +812,5 @@ * @param request Subscription request configuration

*/
subscribeToGetShadowRejected(request, qos, messageHandler) {
subscribeToShadowUpdatedEvents(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/get/rejected";
let topic = "$aws/things/{thingName}/shadow/update/documents";
topic = topic.replace("{thingName}", request.thingName);

@@ -758,56 +835,6 @@ const on_message = (topic, payload) => {

/**
* Update a device's (classic) shadow.
* Subscribes to the accepted topic for the UpdateNamedShadow operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishUpdateShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Gets the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishGetShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribes to the accepted topic for the UpdateShadow operation
*
*
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -831,6 +858,7 @@ *

*/
subscribeToUpdateShadowAccepted(request, qos, messageHandler) {
subscribeToUpdateNamedShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/update/accepted";
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -899,32 +927,6 @@ let response;

/**
* Update a named shadow for a device.
* Subscribes to the accepted topic for the UpdateShadow operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
publishUpdateNamedShadow(request, qos) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
});
}
/**
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
*
*
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -936,3 +938,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
*

@@ -949,7 +951,6 @@ * @param request Subscription request configuration

*/
subscribeToNamedShadowDeltaUpdatedEvents(request, qos, messageHandler) {
subscribeToUpdateShadowAccepted(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/delta";
let topic = "$aws/things/{thingName}/shadow/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -973,6 +974,6 @@ let response;

/**
* Subscribes to the accepted topic for the UpdateNamedShadow operation
* Subscribes to the rejected topic for the UpdateShadow operation
*
*
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -984,3 +985,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
*

@@ -997,7 +998,6 @@ * @param request Subscription request configuration

*/
subscribeToUpdateNamedShadowAccepted(request, qos, messageHandler) {
subscribeToUpdateShadowRejected(request, qos, messageHandler) {
return __awaiter(this, void 0, void 0, function* () {
let topic = "$aws/things/{thingName}/shadow/name/{shadowName}/update/accepted";
let topic = "$aws/things/{thingName}/shadow/update/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic, payload) => {

@@ -1004,0 +1004,0 @@ let response;

@@ -8,6 +8,6 @@ /**

/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* AWS IoT thing to delete a named shadow from.
*
*/
clientToken?: string;
thingName: string;
/**

@@ -19,6 +19,6 @@ * Name of the shadow to delete.

/**
* AWS IoT thing to delete a named shadow from.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;
}

@@ -66,7 +66,2 @@ /**

/**
* The current version of the document for the device's shadow.
*
*/
version?: number;
/**
* A client token used to correlate requests and responses.

@@ -81,2 +76,7 @@ *

timestamp?: Date;
/**
* The current version of the document for the device's shadow.
*
*/
version?: number;
}

@@ -102,21 +102,21 @@ /**

/**
* The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
* Opaque request-response correlation data. Present only if a client token was used in the request.
*
*/
timestamp?: Date;
clientToken?: string;
/**
* A text message that provides additional information.
* An HTTP response code that indicates the type of error.
*
*/
message?: string;
code?: number;
/**
* Opaque request-response correlation data. Present only if a client token was used in the request.
* A text message that provides additional information.
*
*/
clientToken?: string;
message?: string;
/**
* An HTTP response code that indicates the type of error.
* The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
*
*/
code?: number;
timestamp?: Date;
}

@@ -130,6 +130,6 @@ /**

/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* AWS IoT thing to get the named shadow for.
*
*/
clientToken?: string;
thingName: string;
/**

@@ -141,6 +141,6 @@ * Name of the shadow to get.

/**
* AWS IoT thing to get the named shadow for.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;
}

@@ -188,7 +188,2 @@ /**

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
/**
* An opaque token used to correlate requests and responses.

@@ -213,2 +208,7 @@ *

timestamp?: Date;
/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
}

@@ -251,11 +251,11 @@ /**

/**
* Name of the shadow to get NamedShadowUpdated events for.
* Name of the AWS IoT thing to get NamedShadowUpdated events for.
*
*/
shadowName: string;
thingName: string;
/**
* Name of the AWS IoT thing to get NamedShadowUpdated events for.
* Name of the shadow to get NamedShadowUpdated events for.
*
*/
thingName: string;
shadowName: string;
}

@@ -269,11 +269,11 @@ /**

/**
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
* Shadow properties that were updated.
*
*/
clientToken?: string;
state?: object;
/**
* The current version of the document for the device's shadow.
* Timestamps for the shadow properties that were updated.
*
*/
version?: number;
metadata?: object;
/**

@@ -285,11 +285,11 @@ * The time the event was generated by AWS IoT.

/**
* Timestamps for the shadow properties that were updated.
* The current version of the document for the device's shadow.
*
*/
metadata?: object;
version?: number;
/**
* Shadow properties that were updated.
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
*
*/
state?: object;
clientToken?: string;
}

@@ -349,6 +349,6 @@ /**

/**
* The delta between the reported and desired states.
* The desired shadow state (from external services and devices).
*
*/
delta?: object;
desired?: object;
/**

@@ -360,6 +360,6 @@ * The (last) reported shadow state from the device.

/**
* The desired shadow state (from external services and devices).
* The delta between the reported and desired states.
*
*/
desired?: object;
delta?: object;
}

@@ -429,2 +429,7 @@ /**

/**
* Aws IoT thing to update a named shadow of.
*
*/
thingName: string;
/**
* Name of the shadow to update.

@@ -440,7 +445,2 @@ *

/**
* Aws IoT thing to update a named shadow of.
*
*/
thingName: string;
/**
* Requested changes to shadow state. Updates affect only the fields specified.

@@ -480,21 +480,21 @@ *

/**
* Requested changes to the shadow state. Updates affect only the fields specified.
* Aws IoT thing to update the (classic) shadow of.
*
*/
state?: ShadowState;
thingName: string;
/**
* Aws IoT thing to update the (classic) shadow of.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;
/**
* (Optional) The Device Shadow service processes the update only if the specified version matches the latest version.
* Requested changes to the shadow state. Updates affect only the fields specified.
*
*/
version?: number;
state?: ShadowState;
/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* (Optional) The Device Shadow service processes the update only if the specified version matches the latest version.
*
*/
clientToken?: string;
version?: number;
}

@@ -508,7 +508,2 @@ /**

/**
* Updated device shadow state.
*
*/
state?: ShadowState;
/**
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.

@@ -519,6 +514,6 @@ *

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
* Updated device shadow state.
*
*/
version?: number;
state?: ShadowState;
/**

@@ -534,2 +529,7 @@ * Contains the timestamps for each attribute in the desired and reported sections so that you can determine when the state was updated.

timestamp?: Date;
/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
}

@@ -536,0 +536,0 @@ /**

@@ -5,3 +5,3 @@ # PREREQUISITES

You will need to install NodeJS in orderto run the SDK on Windows, MacOS, and Linux. You can find installers for NodeJS on the NodeJS website's download page: [NodeJS Download](https://nodejs.org/en/download/). Just download the installer for your platform and follow the prompts to install.
You will need to install NodeJS in order to run the SDK on Windows, MacOS, and Linux. You can find installers for NodeJS on the NodeJS website's download page: [NodeJS Download](https://nodejs.org/en/download/). Just download the installer for your platform and follow the prompts to install.

@@ -8,0 +8,0 @@ You can also install NodeJS using Linux package managers if you are on Linux or using `brew` if you are on MacOS. Instructions for both are listed further below.

@@ -426,3 +426,3 @@ /*

test('echoMessage failure test - server side internal service error', async () => {
conditional_test(hasEchoServerEnvironment())('echoMessage failure test - server side internal service error', async () => {
let client: echo_rpc.Client = echo_rpc.createClient(makeGoodConfig());

@@ -429,0 +429,0 @@

@@ -95,2 +95,4 @@ /*

*
* Send a request to authorize action on some resource
*
* @param request data describing the AuthorizeClientDeviceAction operation to perform

@@ -138,2 +140,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Generate a password for the LocalDebugConsole component
*
* @param request data describing the CreateDebugPassword operation to perform

@@ -225,2 +229,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Get session token for a client device
*
* @param request data describing the GetClientDeviceAuthToken operation to perform

@@ -312,2 +318,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Retrieves a secret stored in AWS secrets manager
*
* @param request data describing the GetSecretValue operation to perform

@@ -355,2 +363,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Request for a list of components
*
* @param request data describing the ListComponents operation to perform

@@ -420,2 +430,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Pause a running component
*
* @param request data describing the PauseComponent operation to perform

@@ -485,2 +497,5 @@ * @param options additional eventstream options to use while performing this operation

*
* Send component metrics
* NOTE Only usable by AWS components
*
* @param request data describing the PutComponentMetric operation to perform

@@ -528,2 +543,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Resume a paused component
*
* @param request data describing the ResumeComponent operation to perform

@@ -550,4 +567,4 @@ * @param options additional eventstream options to use while performing this operation

* This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates
subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
* subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
* period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
*

@@ -596,2 +613,4 @@ * @param request data describing the SendConfigurationValidityReport operation to perform

*
* Create a subscription for new certificates
*
* Once created, the streaming operation must be started by a call to activate().

@@ -773,3 +792,3 @@ *

* Update this component's configuration by replacing the value of given keyName with the newValue.
If an oldValue is specified then update will only take effect id the current value matches the given oldValue
* If an oldValue is specified then update will only take effect id the current value matches the given oldValue
*

@@ -819,3 +838,3 @@ * @param request data describing the UpdateConfiguration operation to perform

* Updates a device shadow document stored in the local shadow service
The update is an upsert operation, with optimistic locking support
* The update is an upsert operation, with optimistic locking support
*

@@ -842,2 +861,5 @@ * @param request data describing the UpdateThingShadow operation to perform

*
* Validate authorization token
* NOTE This API can be used only by stream manager, customer component calling this API will receive UnauthorizedError
*
* @param request data describing the ValidateAuthorizationToken operation to perform

@@ -863,2 +885,4 @@ * @param options additional eventstream options to use while performing this operation

*
* Verify client device credentials
*
* @param request data describing the VerifyClientDeviceIdentity operation to perform

@@ -865,0 +889,0 @@ * @param options additional eventstream options to use while performing this operation

@@ -120,3 +120,4 @@ /*

/**
* The context is ignored if used in PublishMessage.
* Contextual information about the message.
* NOTE The context is ignored if used in PublishMessage.
*/

@@ -123,0 +124,0 @@ export interface MessageContext {

@@ -92,2 +92,29 @@ /*

/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
async publishCreateCertificateFromCsr(
request: model.CreateCertificateFromCsrRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/certificates/create-from-csr/json";
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Creates new keys and a certificate. AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.

@@ -120,6 +147,34 @@ *

/**
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
async publishRegisterThing(
request: model.RegisterThingRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/provisioning-templates/{templateName}/provision/json";
topic = topic.replace("{templateName}", request.templateName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -143,15 +198,15 @@ *

*/
async subscribeToCreateKeysAndCertificateAccepted(
request: model.CreateKeysAndCertificateSubscriptionRequest,
async subscribeToCreateCertificateFromCsrAccepted(
request: model.CreateCertificateFromCsrSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse) => void)
messageHandler: (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/certificates/create/json/accepted";
let topic: string = "$aws/certificates/create-from-csr/json/accepted";
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.CreateKeysAndCertificateResponse | undefined;
let response: model.CreateCertificateFromCsrResponse | undefined;
let error: IotIdentityError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.CreateKeysAndCertificateResponse;
response = JSON.parse(payload_text) as model.CreateCertificateFromCsrResponse;
} catch (err) {

@@ -169,6 +224,6 @@ error = IotIdentityClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
*
*
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -192,4 +247,4 @@ *

*/
async subscribeToCreateKeysAndCertificateRejected(
request: model.CreateKeysAndCertificateSubscriptionRequest,
async subscribeToCreateCertificateFromCsrRejected(
request: model.CreateCertificateFromCsrSubscriptionRequest,
qos: mqtt.QoS,

@@ -199,3 +254,3 @@ messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void)

let topic: string = "$aws/certificates/create/json/rejected";
let topic: string = "$aws/certificates/create-from-csr/json/rejected";
const on_message = (topic: string, payload: ArrayBuffer) => {

@@ -219,6 +274,6 @@ let response: model.ErrorResponse | undefined;

/**
* Subscribes to the rejected topic of the RegisterThing operation.
* Subscribes to the accepted topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -242,16 +297,15 @@ *

*/
async subscribeToRegisterThingRejected(
request: model.RegisterThingSubscriptionRequest,
async subscribeToCreateKeysAndCertificateAccepted(
request: model.CreateKeysAndCertificateSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void)
messageHandler: (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/provisioning-templates/{templateName}/provision/json/rejected";
topic = topic.replace("{templateName}", request.templateName);
let topic: string = "$aws/certificates/create/json/accepted";
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ErrorResponse | undefined;
let response: model.CreateKeysAndCertificateResponse | undefined;
let error: IotIdentityError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ErrorResponse;
response = JSON.parse(payload_text) as model.CreateKeysAndCertificateResponse;
} catch (err) {

@@ -269,6 +323,6 @@ error = IotIdentityClient.createClientError(err, payload);

/**
* Subscribes to the accepted topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the CreateKeysAndCertificate operation.
*
*
* subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async
* subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -292,15 +346,15 @@ *

*/
async subscribeToCreateCertificateFromCsrAccepted(
request: model.CreateCertificateFromCsrSubscriptionRequest,
async subscribeToCreateKeysAndCertificateRejected(
request: model.CreateKeysAndCertificateSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse) => void)
messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/certificates/create-from-csr/json/accepted";
let topic: string = "$aws/certificates/create/json/rejected";
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.CreateCertificateFromCsrResponse | undefined;
let response: model.ErrorResponse | undefined;
let error: IotIdentityError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.CreateCertificateFromCsrResponse;
response = JSON.parse(payload_text) as model.ErrorResponse;
} catch (err) {

@@ -318,30 +372,2 @@ error = IotIdentityClient.createClientError(err, payload);

/**
* Provisions an AWS IoT thing using a pre-defined template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
async publishRegisterThing(
request: model.RegisterThingRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/provisioning-templates/{templateName}/provision/json";
topic = topic.replace("{templateName}", request.templateName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic of the RegisterThing operation.

@@ -395,6 +421,6 @@ *

/**
* Subscribes to the rejected topic of the CreateCertificateFromCsr operation.
* Subscribes to the rejected topic of the RegisterThing operation.
*
*
* subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async
* subscribeToRegisterThingRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -418,4 +444,4 @@ *

*/
async subscribeToCreateCertificateFromCsrRejected(
request: model.CreateCertificateFromCsrSubscriptionRequest,
async subscribeToRegisterThingRejected(
request: model.RegisterThingSubscriptionRequest,
qos: mqtt.QoS,

@@ -425,3 +451,4 @@ messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void)

let topic: string = "$aws/certificates/create-from-csr/json/rejected";
let topic: string = "$aws/provisioning-templates/{templateName}/provision/json/rejected";
topic = topic.replace("{templateName}", request.templateName);
const on_message = (topic: string, payload: ArrayBuffer) => {

@@ -444,29 +471,2 @@ let response: model.ErrorResponse | undefined;

/**
* Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotIdentity
*/
async publishCreateCertificateFromCsr(
request: model.CreateCertificateFromCsrRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/certificates/create-from-csr/json";
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
}

@@ -38,12 +38,12 @@ /*

/**
* The token to prove ownership of the certificate during provisioning.
* The certificate data, in PEM format.
*
*/
certificateOwnershipToken?: string;
certificatePem?: string;
/**
* The certificate data, in PEM format.
* The token to prove ownership of the certificate during provisioning.
*
*/
certificatePem?: string;
certificateOwnershipToken?: string;

@@ -84,8 +84,2 @@ }

/**
* The token to prove ownership of the certificate during provisioning.
*
*/
certificateOwnershipToken?: string;
/**
* The certificate data, in PEM format.

@@ -102,2 +96,8 @@ *

/**
* The token to prove ownership of the certificate during provisioning.
*
*/
certificateOwnershipToken?: string;
}

@@ -128,12 +128,12 @@

/**
* Response error message
* Response error code
*
*/
errorMessage?: string;
errorCode?: string;
/**
* Response error code
* Response error message
*
*/
errorCode?: string;
errorMessage?: string;

@@ -156,12 +156,12 @@ }

/**
* Optional. Key-value pairs from the device that are used by the pre-provisioning hooks to evaluate the registration request.
* The token to prove ownership of the certificate. The token is generated by AWS IoT when you create a certificate over MQTT.
*
*/
parameters?: {[key: string]: string};
certificateOwnershipToken?: string;
/**
* The token to prove ownership of the certificate. The token is generated by AWS IoT when you create a certificate over MQTT.
* Optional. Key-value pairs from the device that are used by the pre-provisioning hooks to evaluate the registration request.
*
*/
certificateOwnershipToken?: string;
parameters?: {[key: string]: string};

@@ -178,12 +178,12 @@ }

/**
* The name of the IoT thing created during provisioning.
* The device configuration defined in the template.
*
*/
thingName?: string;
deviceConfiguration?: {[key: string]: string};
/**
* The device configuration defined in the template.
* The name of the IoT thing created during provisioning.
*
*/
deviceConfiguration?: {[key: string]: string};
thingName?: string;

@@ -190,0 +190,0 @@ }

@@ -92,54 +92,120 @@ /*

/**
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
* Gets detailed information about a job execution.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
* @category IotJobs
*/
async publishDescribeJobExecution(
request: model.DescribeJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets the list of all jobs for a thing that are not in a terminal state.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async subscribeToJobExecutionsChangedEvents(
request: model.JobExecutionsChangedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.JobExecutionsChangedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
async publishGetPendingJobExecutions(
request: model.GetPendingJobExecutionsRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/notify";
let topic: string = "$aws/things/{thingName}/jobs/get";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.JobExecutionsChangedEvent | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.JobExecutionsChangedEvent;
} catch (err) {
error = IotJobsClient.createClientError(err, payload);
}
finally {
messageHandler(error, response);
}
}
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
return this.mqttAdapter.subscribe(topic, qos, on_message);
/**
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async publishStartNextPendingJobExecution(
request: model.StartNextPendingJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/start-next";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async publishUpdateJobExecution(
request: model.UpdateJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -151,3 +217,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*

@@ -164,16 +230,17 @@ * @param request Subscription request configuration

*/
async subscribeToStartNextPendingJobExecutionAccepted(
request: model.StartNextPendingJobExecutionSubscriptionRequest,
async subscribeToDescribeJobExecutionAccepted(
request: model.DescribeJobExecutionSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.StartNextJobExecutionResponse) => void)
messageHandler: (error?: IotJobsError, response?: model.DescribeJobExecutionResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/start-next/accepted";
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.StartNextJobExecutionResponse | undefined;
let response: model.DescribeJobExecutionResponse | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.StartNextJobExecutionResponse;
response = JSON.parse(payload_text) as model.DescribeJobExecutionResponse;
} catch (err) {

@@ -240,6 +307,6 @@ error = IotJobsClient.createClientError(err, payload);

/**
*
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -251,3 +318,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -264,16 +331,16 @@ * @param request Subscription request configuration

*/
async subscribeToNextJobExecutionChangedEvents(
request: model.NextJobExecutionChangedSubscriptionRequest,
async subscribeToGetPendingJobExecutionsAccepted(
request: model.GetPendingJobExecutionsSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.NextJobExecutionChangedEvent) => void)
messageHandler: (error?: IotJobsError, response?: model.GetPendingJobExecutionsResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/notify-next";
let topic: string = "$aws/things/{thingName}/jobs/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.NextJobExecutionChangedEvent | undefined;
let response: model.GetPendingJobExecutionsResponse | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.NextJobExecutionChangedEvent;
response = JSON.parse(payload_text) as model.GetPendingJobExecutionsResponse;
} catch (err) {

@@ -291,6 +358,6 @@ error = IotJobsClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the UpdateJobExecution operation
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
*
*
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -302,3 +369,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*

@@ -315,4 +382,4 @@ * @param request Subscription request configuration

*/
async subscribeToUpdateJobExecutionRejected(
request: model.UpdateJobExecutionSubscriptionRequest,
async subscribeToGetPendingJobExecutionsRejected(
request: model.GetPendingJobExecutionsSubscriptionRequest,
qos: mqtt.QoS,

@@ -322,4 +389,3 @@ messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void)

let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/rejected";
topic = topic.replace("{jobId}", request.jobId);
let topic: string = "$aws/things/{thingName}/jobs/get/rejected";
topic = topic.replace("{thingName}", request.thingName);

@@ -344,6 +410,6 @@ const on_message = (topic: string, payload: ArrayBuffer) => {

/**
* Subscribes to the accepted topic for the UpdateJobExecution operation
* Subscribes to JobExecutionsChanged notifications for a given IoT thing.
*
*
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToJobExecutionsChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -355,3 +421,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
*

@@ -368,17 +434,16 @@ * @param request Subscription request configuration

*/
async subscribeToUpdateJobExecutionAccepted(
request: model.UpdateJobExecutionSubscriptionRequest,
async subscribeToJobExecutionsChangedEvents(
request: model.JobExecutionsChangedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.UpdateJobExecutionResponse) => void)
messageHandler: (error?: IotJobsError, response?: model.JobExecutionsChangedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/accepted";
topic = topic.replace("{jobId}", request.jobId);
let topic: string = "$aws/things/{thingName}/jobs/notify";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.UpdateJobExecutionResponse | undefined;
let response: model.JobExecutionsChangedEvent | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.UpdateJobExecutionResponse;
response = JSON.parse(payload_text) as model.JobExecutionsChangedEvent;
} catch (err) {

@@ -396,35 +461,6 @@ error = IotJobsClient.createClientError(err, payload);

/**
* Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.
*
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async publishUpdateJobExecution(
request: model.UpdateJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the DescribeJobExecution operation
*
*
* subscribeToDescribeJobExecutionAccepted may be called while the device is offline, though the async
* subscribeToNextJobExecutionChangedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -436,3 +472,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
*

@@ -449,17 +485,16 @@ * @param request Subscription request configuration

*/
async subscribeToDescribeJobExecutionAccepted(
request: model.DescribeJobExecutionSubscriptionRequest,
async subscribeToNextJobExecutionChangedEvents(
request: model.NextJobExecutionChangedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.DescribeJobExecutionResponse) => void)
messageHandler: (error?: IotJobsError, response?: model.NextJobExecutionChangedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get/accepted";
let topic: string = "$aws/things/{thingName}/jobs/notify-next";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.DescribeJobExecutionResponse | undefined;
let response: model.NextJobExecutionChangedEvent | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.DescribeJobExecutionResponse;
response = JSON.parse(payload_text) as model.NextJobExecutionChangedEvent;
} catch (err) {

@@ -477,34 +512,6 @@ error = IotJobsClient.createClientError(err, payload);

/**
* Gets the list of all jobs for a thing that are not in a terminal state.
* Subscribes to the accepted topic for the StartNextPendingJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async publishGetPendingJobExecutions(
request: model.GetPendingJobExecutionsRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the GetPendingJobsExecutions operation
*
*
* subscribeToGetPendingJobExecutionsAccepted may be called while the device is offline, though the async
* subscribeToStartNextPendingJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -516,3 +523,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
*

@@ -529,16 +536,16 @@ * @param request Subscription request configuration

*/
async subscribeToGetPendingJobExecutionsAccepted(
request: model.GetPendingJobExecutionsSubscriptionRequest,
async subscribeToStartNextPendingJobExecutionAccepted(
request: model.StartNextPendingJobExecutionSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.GetPendingJobExecutionsResponse) => void)
messageHandler: (error?: IotJobsError, response?: model.StartNextJobExecutionResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/get/accepted";
let topic: string = "$aws/things/{thingName}/jobs/start-next/accepted";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.GetPendingJobExecutionsResponse | undefined;
let response: model.StartNextJobExecutionResponse | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.GetPendingJobExecutionsResponse;
response = JSON.parse(payload_text) as model.StartNextJobExecutionResponse;
} catch (err) {

@@ -604,6 +611,6 @@ error = IotJobsClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the GetPendingJobsExecutions operation
* Subscribes to the accepted topic for the UpdateJobExecution operation
*
*
* subscribeToGetPendingJobExecutionsRejected may be called while the device is offline, though the async
* subscribeToUpdateJobExecutionAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -615,3 +622,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*

@@ -628,16 +635,17 @@ * @param request Subscription request configuration

*/
async subscribeToGetPendingJobExecutionsRejected(
request: model.GetPendingJobExecutionsSubscriptionRequest,
async subscribeToUpdateJobExecutionAccepted(
request: model.UpdateJobExecutionSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void)
messageHandler: (error?: IotJobsError, response?: model.UpdateJobExecutionResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/get/rejected";
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.RejectedErrorResponse | undefined;
let response: model.UpdateJobExecutionResponse | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.RejectedErrorResponse;
response = JSON.parse(payload_text) as model.UpdateJobExecutionResponse;
} catch (err) {

@@ -655,58 +663,50 @@ error = IotJobsClient.createClientError(err, payload);

/**
* Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).
* Subscribes to the rejected topic for the UpdateJobExecution operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
* subscribeToUpdateJobExecutionRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
* Once subscribed, `messageHandler` is invoked each time a message matching
* the `topic` is received. It is possible for such messages to arrive before
* the SUBACK is received.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
*
* @category IotJobs
*/
async publishStartNextPendingJobExecution(
request: model.StartNextPendingJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/jobs/start-next";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets detailed information about a job execution.
* @param request Subscription request configuration
* @param qos Maximum requested QoS that server may use when sending messages to the client.
* The server may grant a lower QoS in the SUBACK
* @param messageHandler Callback invoked when message or error is received from the server.
* @returns Promise which returns a `mqtt.MqttSubscribeRequest` which will contain the
* result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned
* from the server or is rejected when an exception occurs.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotJobs
*/
async publishDescribeJobExecution(
request: model.DescribeJobExecutionRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
async subscribeToUpdateJobExecutionRejected(
request: model.UpdateJobExecutionSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotJobsError, response?: model.RejectedErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get";
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.RejectedErrorResponse | undefined;
let error: IotJobsError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.RejectedErrorResponse;
} catch (err) {
error = IotJobsClient.createClientError(err, payload);
}
finally {
messageHandler(error, response);
}
}
return this.mqttAdapter.subscribe(topic, qos, on_message);
}
}

@@ -98,30 +98,30 @@ /*

/**
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is returned.
* The name of the thing associated with the device.
*
*/
executionNumber?: number;
thingName: string;
/**
* The name of the thing associated with the device.
* The unique identifier assigned to this job when it was created. Or use $next to return the next pending job execution for a thing (status IN_PROGRESS or QUEUED). In this case, any job executions with status IN_PROGRESS are returned first. Job executions are returned in the order in which they were created.
*
*/
thingName: string;
jobId: string;
/**
* Optional. Unless set to false, the response contains the job document. The default is true.
* An opaque string used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
includeJobDocument?: boolean;
clientToken?: string;
/**
* The unique identifier assigned to this job when it was created. Or use $next to return the next pending job execution for a thing (status IN_PROGRESS or QUEUED). In this case, any job executions with status IN_PROGRESS are returned first. Job executions are returned in the order in which they were created.
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is returned.
*
*/
jobId: string;
executionNumber?: number;
/**
* An opaque string used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* Optional. Unless set to false, the response contains the job document. The default is true.
*
*/
clientToken?: string;
includeJobDocument?: boolean;

@@ -138,12 +138,12 @@ }

/**
* Contains data about a job execution.
* A client token used to correlate requests and responses.
*
*/
execution?: JobExecutionData;
clientToken?: string;
/**
* A client token used to correlate requests and responses.
* Contains data about a job execution.
*
*/
clientToken?: string;
execution?: JobExecutionData;

@@ -208,2 +208,8 @@ /**

/**
* A list of JobExecutionSummary objects with status IN_PROGRESS.
*
*/
inProgressJobs?: Array<JobExecutionSummary>;
/**
* A list of JobExecutionSummary objects with status QUEUED.

@@ -226,8 +232,2 @@ *

/**
* A list of JobExecutionSummary objects with status IN_PROGRESS.
*
*/
inProgressJobs?: Array<JobExecutionSummary>;
}

@@ -264,2 +264,8 @@

/**
* The name of the thing that is executing the job.
*
*/
thingName?: string;
/**
* The content of the job document.

@@ -277,6 +283,6 @@ *

/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
* A collection of name-value pairs that describe the status of the job execution.
*
*/
versionNumber?: number;
statusDetails?: {[key: string]: string};

@@ -290,8 +296,20 @@ /**

/**
* The name of the thing that is executing the job.
* The time when the job execution started.
*
*/
thingName?: string;
startedAt?: Date;
/**
* The time when the job execution started.
*
*/
lastUpdatedAt?: Date;
/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
*
*/
versionNumber?: number;
/**
* A number that identifies a job execution on a device. It can be used later in commands that return or update job execution information.

@@ -302,19 +320,37 @@ *

}
/**
* Sent whenever a job execution is added to or removed from the list of pending job executions for a thing.
*
* @category IotJobs
*/
export interface JobExecutionsChangedEvent {
/**
* A collection of name-value pairs that describe the status of the job execution.
* Map from JobStatus to a list of Jobs transitioning to that status.
*
*/
statusDetails?: {[key: string]: string};
jobs?: {[key: string]: Array<JobExecutionSummary>};
/**
* The time when the job execution started.
* The time when the message was sent.
*
*/
lastUpdatedAt?: Date;
timestamp?: Date;
}
/**
* Data needed to subscribe to JobExecutionsChanged events.
*
* @category IotJobs
*/
export interface JobExecutionsChangedSubscriptionRequest {
/**
* The time when the job execution started.
* Name of the IoT Thing that you want to subscribe to JobExecutionsChanged events for.
*
*/
startedAt?: Date;
thingName: string;

@@ -331,2 +367,8 @@ }

/**
* The status of the job execution. Can be one of: QUEUED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELED, TIMED_OUT, REJECTED, or REMOVED.
*
*/
status?: JobStatus;
/**
* A collection of name-value pairs that describe the status of the job execution.

@@ -343,8 +385,2 @@ *

/**
* The status of the job execution. Can be one of: QUEUED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELED, TIMED_OUT, REJECTED, or REMOVED.
*
*/
status?: JobStatus;
}

@@ -360,6 +396,6 @@

/**
* The time when the job execution was last updated.
* The unique identifier you assigned to this job when it was created.
*
*/
lastUpdatedAt?: Date;
jobId?: string;

@@ -373,8 +409,2 @@ /**

/**
* The time when the job execution started.
*
*/
startedAt?: Date;
/**
* The version of the job execution. Job execution versions are incremented each time the AWS IoT Jobs service receives an update from a device.

@@ -386,6 +416,6 @@ *

/**
* The unique identifier you assigned to this job when it was created.
* The time when the job execution was last updated.
*
*/
jobId?: string;
lastUpdatedAt?: Date;

@@ -398,41 +428,11 @@ /**

}
/**
* Sent whenever a job execution is added to or removed from the list of pending job executions for a thing.
*
* @category IotJobs
*/
export interface JobExecutionsChangedEvent {
/**
* Map from JobStatus to a list of Jobs transitioning to that status.
* The time when the job execution started.
*
*/
jobs?: {[key: string]: Array<JobExecutionSummary>};
startedAt?: Date;
/**
* The time when the message was sent.
*
*/
timestamp?: Date;
}
/**
* Data needed to subscribe to JobExecutionsChanged events.
*
* @category IotJobs
*/
export interface JobExecutionsChangedSubscriptionRequest {
/**
* Name of the IoT Thing that you want to subscribe to JobExecutionsChanged events for.
*
*/
thingName: string;
}
/**
* Sent whenever there is a change to which job execution is next on the list of pending job executions for a thing, as defined for DescribeJobExecution with jobId $next. This message is not sent when the next job's execution details change, only when the next job that would be returned by DescribeJobExecution with jobId $next has changed.

@@ -481,6 +481,6 @@ *

/**
* The date and time the response was generated by AWS IoT.
* Opaque token that can correlate this response to the original request.
*
*/
timestamp?: Date;
clientToken?: string;

@@ -500,6 +500,6 @@ /**

/**
* Opaque token that can correlate this response to the original request.
* The date and time the response was generated by AWS IoT.
*
*/
clientToken?: string;
timestamp?: Date;

@@ -528,12 +528,12 @@ /**

/**
* The time when the message was sent to the device.
* Contains data about a job execution.
*
*/
timestamp?: Date;
execution?: JobExecutionData;
/**
* Contains data about a job execution.
* The time when the message was sent to the device.
*
*/
execution?: JobExecutionData;
timestamp?: Date;

@@ -556,12 +556,12 @@ }

/**
* Specifies the amount of time this device has to finish execution of this job.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
stepTimeoutInMinutes?: number;
clientToken?: string;
/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* Specifies the amount of time this device has to finish execution of this job.
*
*/
clientToken?: string;
stepTimeoutInMinutes?: number;

@@ -605,24 +605,24 @@ /**

/**
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is used.
* The unique identifier assigned to this job when it was created.
*
*/
executionNumber?: number;
jobId: string;
/**
* A collection of name-value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
* The new status for the job execution (IN_PROGRESS, FAILED, SUCCEEDED, or REJECTED). This must be specified on every update.
*
*/
statusDetails?: {[key: string]: string};
status?: JobStatus;
/**
* Optional. When included and set to true, the response contains the JobExecutionState field. The default is false.
* A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
includeJobExecutionState?: boolean;
clientToken?: string;
/**
* The unique identifier assigned to this job when it was created.
* A collection of name-value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
*
*/
jobId: string;
statusDetails?: {[key: string]: string};

@@ -636,24 +636,24 @@ /**

/**
* Optional. When included and set to true, the response contains the JobDocument. The default is false.
* Optional. A number that identifies a job execution on a device. If not specified, the latest job execution is used.
*
*/
includeJobDocument?: boolean;
executionNumber?: number;
/**
* The new status for the job execution (IN_PROGRESS, FAILED, SUCCEEDED, or REJECTED). This must be specified on every update.
* Optional. When included and set to true, the response contains the JobExecutionState field. The default is false.
*
*/
status?: JobStatus;
includeJobExecutionState?: boolean;
/**
* Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling UpdateJobExecution, setting the status to IN_PROGRESS and specifying a new timeout value in this field) the job execution status is set to TIMED_OUT. Setting or resetting this timeout has no effect on the job execution timeout that might have been specified when the job was created (by using CreateJob with the timeoutConfig).
* Optional. When included and set to true, the response contains the JobDocument. The default is false.
*
*/
stepTimeoutInMinutes?: number;
includeJobDocument?: boolean;
/**
* A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling UpdateJobExecution, setting the status to IN_PROGRESS and specifying a new timeout value in this field) the job execution status is set to TIMED_OUT. Setting or resetting this timeout has no effect on the job execution timeout that might have been specified when the job was created (by using CreateJob with the timeoutConfig).
*
*/
clientToken?: string;
stepTimeoutInMinutes?: number;

@@ -676,6 +676,6 @@ }

/**
* The time when the message was sent.
* Contains data about the state of a job execution.
*
*/
timestamp?: Date;
executionState?: JobExecutionState;

@@ -689,6 +689,6 @@ /**

/**
* Contains data about the state of a job execution.
* The time when the message was sent.
*
*/
executionState?: JobExecutionState;
timestamp?: Date;

@@ -705,14 +705,14 @@ }

/**
* Job ID that you want to subscribe to UpdateJobExecution response events for.
* Name of the IoT Thing that you want to subscribe to UpdateJobExecution response events for.
*
*/
jobId: string;
thingName: string;
/**
* Name of the IoT Thing that you want to subscribe to UpdateJobExecution response events for.
* Job ID that you want to subscribe to UpdateJobExecution response events for.
*
*/
thingName: string;
jobId: string;
}

@@ -92,6 +92,177 @@ /*

/**
* Subscribes to the rejected topic for the UpdateShadow operation
* Deletes a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishDeleteNamedShadow(
request: model.DeleteNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Deletes the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishDeleteShadow(
request: model.DeleteShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/delete";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishGetNamedShadow(
request: model.GetNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishGetShadow(
request: model.GetShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Update a named shadow for a device.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishUpdateNamedShadow(
request: model.UpdateNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Update a device's (classic) shadow.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishUpdateShadow(
request: model.UpdateShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/update";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
*
*
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -103,3 +274,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
*

@@ -116,16 +287,17 @@ * @param request Subscription request configuration

*/
async subscribeToUpdateShadowRejected(
request: model.UpdateShadowSubscriptionRequest,
async subscribeToDeleteNamedShadowAccepted(
request: model.DeleteNamedShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/update/rejected";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ErrorResponse | undefined;
let response: model.DeleteShadowResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ErrorResponse;
response = JSON.parse(payload_text) as model.DeleteShadowResponse;
} catch (err) {

@@ -143,6 +315,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
*
*
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -154,3 +326,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
*

@@ -167,16 +339,17 @@ * @param request Subscription request configuration

*/
async subscribeToShadowDeltaUpdatedEvents(
request: model.ShadowDeltaUpdatedSubscriptionRequest,
async subscribeToDeleteNamedShadowRejected(
request: model.DeleteNamedShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void)
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/update/delta";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ShadowDeltaUpdatedEvent | undefined;
let response: model.ErrorResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ShadowDeltaUpdatedEvent;
response = JSON.parse(payload_text) as model.ErrorResponse;
} catch (err) {

@@ -194,6 +367,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the GetNamedShadow operation.
* Subscribes to the accepted topic for the DeleteShadow operation
*
*
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -205,3 +378,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
*

@@ -218,17 +391,16 @@ * @param request Subscription request configuration

*/
async subscribeToGetNamedShadowRejected(
request: model.GetNamedShadowSubscriptionRequest,
async subscribeToDeleteShadowAccepted(
request: model.DeleteShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get/rejected";
let topic: string = "$aws/things/{thingName}/shadow/delete/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ErrorResponse | undefined;
let response: model.DeleteShadowResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ErrorResponse;
response = JSON.parse(payload_text) as model.DeleteShadowResponse;
} catch (err) {

@@ -246,6 +418,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the DeleteNamedShadow operation.
* Subscribes to the rejected topic for the DeleteShadow operation
*
*
* subscribeToDeleteNamedShadowRejected may be called while the device is offline, though the async
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -269,4 +441,4 @@ *

*/
async subscribeToDeleteNamedShadowRejected(
request: model.DeleteNamedShadowSubscriptionRequest,
async subscribeToDeleteShadowRejected(
request: model.DeleteShadowSubscriptionRequest,
qos: mqtt.QoS,

@@ -276,5 +448,4 @@ messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)

let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/rejected";
let topic: string = "$aws/things/{thingName}/shadow/delete/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {

@@ -298,63 +469,6 @@ let response: model.ErrorResponse | undefined;

/**
* Deletes the (classic) shadow for an AWS IoT thing.
* Subscribes to the accepted topic for the GetNamedShadow operation.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishDeleteShadow(
request: model.DeleteShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/delete";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets a named shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishGetNamedShadow(
request: model.GetNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the DeleteShadow operation
*
*
* subscribeToDeleteShadowAccepted may be called while the device is offline, though the async
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -366,3 +480,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
*

@@ -379,16 +493,17 @@ * @param request Subscription request configuration

*/
async subscribeToDeleteShadowAccepted(
request: model.DeleteShadowSubscriptionRequest,
async subscribeToGetNamedShadowAccepted(
request: model.GetNamedShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/delete/accepted";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.DeleteShadowResponse | undefined;
let response: model.GetShadowResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.DeleteShadowResponse;
response = JSON.parse(payload_text) as model.GetShadowResponse;
} catch (err) {

@@ -406,6 +521,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the accepted topic for the GetShadow operation.
* Subscribes to the rejected topic for the GetNamedShadow operation.
*
*
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* subscribeToGetNamedShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -417,3 +532,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*

@@ -430,16 +545,17 @@ * @param request Subscription request configuration

*/
async subscribeToGetShadowAccepted(
request: model.GetShadowSubscriptionRequest,
async subscribeToGetNamedShadowRejected(
request: model.GetNamedShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/get/accepted";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.GetShadowResponse | undefined;
let response: model.ErrorResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.GetShadowResponse;
response = JSON.parse(payload_text) as model.ErrorResponse;
} catch (err) {

@@ -457,6 +573,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the accepted topic for the GetNamedShadow operation.
* Subscribes to the accepted topic for the GetShadow operation.
*
*
* subscribeToGetNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToGetShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -480,4 +596,4 @@ *

*/
async subscribeToGetNamedShadowAccepted(
request: model.GetNamedShadowSubscriptionRequest,
async subscribeToGetShadowAccepted(
request: model.GetShadowSubscriptionRequest,
qos: mqtt.QoS,

@@ -487,5 +603,4 @@ messageHandler: (error?: IotShadowError, response?: model.GetShadowResponse) => void)

let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/get/accepted";
let topic: string = "$aws/things/{thingName}/shadow/get/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {

@@ -509,6 +624,6 @@ let response: model.GetShadowResponse | undefined;

/**
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
* Subscribes to the rejected topic for the GetShadow operation.
*
*
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -520,3 +635,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
*

@@ -533,17 +648,16 @@ * @param request Subscription request configuration

*/
async subscribeToNamedShadowUpdatedEvents(
request: model.NamedShadowUpdatedSubscriptionRequest,
async subscribeToGetShadowRejected(
request: model.GetShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void)
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/documents";
topic = topic.replace("{shadowName}", request.shadowName);
let topic: string = "$aws/things/{thingName}/shadow/get/rejected";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ShadowUpdatedEvent | undefined;
let response: model.ErrorResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ShadowUpdatedEvent;
response = JSON.parse(payload_text) as model.ErrorResponse;
} catch (err) {

@@ -561,6 +675,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
*
*
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -572,3 +686,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*

@@ -585,16 +699,17 @@ * @param request Subscription request configuration

*/
async subscribeToShadowUpdatedEvents(
request: model.ShadowUpdatedSubscriptionRequest,
async subscribeToNamedShadowDeltaUpdatedEvents(
request: model.NamedShadowDeltaUpdatedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void)
messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/update/documents";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/delta";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ShadowUpdatedEvent | undefined;
let response: model.ShadowDeltaUpdatedEvent | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ShadowUpdatedEvent;
response = JSON.parse(payload_text) as model.ShadowDeltaUpdatedEvent;
} catch (err) {

@@ -612,35 +727,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Deletes a named shadow for an AWS IoT thing.
* Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishDeleteNamedShadow(
request: model.DeleteNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the DeleteNamedShadow operation.
*
*
* subscribeToDeleteNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToNamedShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -652,3 +738,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*

@@ -665,17 +751,17 @@ * @param request Subscription request configuration

*/
async subscribeToDeleteNamedShadowAccepted(
request: model.DeleteNamedShadowSubscriptionRequest,
async subscribeToNamedShadowUpdatedEvents(
request: model.NamedShadowUpdatedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.DeleteShadowResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/accepted";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/documents";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.DeleteShadowResponse | undefined;
let response: model.ShadowUpdatedEvent | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.DeleteShadowResponse;
response = JSON.parse(payload_text) as model.ShadowUpdatedEvent;
} catch (err) {

@@ -693,6 +779,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the DeleteShadow operation
* Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
*
*
* subscribeToDeleteShadowRejected may be called while the device is offline, though the async
* subscribeToShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -704,3 +790,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
*

@@ -717,16 +803,16 @@ * @param request Subscription request configuration

*/
async subscribeToDeleteShadowRejected(
request: model.DeleteShadowSubscriptionRequest,
async subscribeToShadowDeltaUpdatedEvents(
request: model.ShadowDeltaUpdatedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/delete/rejected";
let topic: string = "$aws/things/{thingName}/shadow/update/delta";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ErrorResponse | undefined;
let response: model.ShadowDeltaUpdatedEvent | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ErrorResponse;
response = JSON.parse(payload_text) as model.ShadowDeltaUpdatedEvent;
} catch (err) {

@@ -744,6 +830,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the rejected topic for the GetShadow operation.
* Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
*
*
* subscribeToGetShadowRejected may be called while the device is offline, though the async
* subscribeToShadowUpdatedEvents may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -755,3 +841,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic
*

@@ -768,16 +854,16 @@ * @param request Subscription request configuration

*/
async subscribeToGetShadowRejected(
request: model.GetShadowSubscriptionRequest,
async subscribeToShadowUpdatedEvents(
request: model.ShadowUpdatedSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.ShadowUpdatedEvent) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/get/rejected";
let topic: string = "$aws/things/{thingName}/shadow/update/documents";
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ErrorResponse | undefined;
let response: model.ShadowUpdatedEvent | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ErrorResponse;
response = JSON.parse(payload_text) as model.ShadowUpdatedEvent;
} catch (err) {

@@ -795,62 +881,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Update a device's (classic) shadow.
* Subscribes to the accepted topic for the UpdateNamedShadow operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishUpdateShadow(
request: model.UpdateShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/update";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Gets the (classic) shadow for an AWS IoT thing.
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishGetShadow(
request: model.GetShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/get";
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribes to the accepted topic for the UpdateShadow operation
*
*
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -874,4 +904,4 @@ *

*/
async subscribeToUpdateShadowAccepted(
request: model.UpdateShadowSubscriptionRequest,
async subscribeToUpdateNamedShadowAccepted(
request: model.UpdateNamedShadowSubscriptionRequest,
qos: mqtt.QoS,

@@ -881,4 +911,5 @@ messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void)

let topic: string = "$aws/things/{thingName}/shadow/update/accepted";
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {

@@ -951,35 +982,6 @@ let response: model.UpdateShadowResponse | undefined;

/**
* Update a named shadow for a device.
* Subscribes to the accepted topic for the UpdateShadow operation
*
* If the device is offline, the PUBLISH packet will be sent once the connection resumes.
*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
*
* @param request Message to be serialized and sent
* @param qos Quality of Service for delivering this message
* @returns Promise which returns a `mqtt.MqttRequest` which will contain the packet id of
* the PUBLISH packet.
*
* * For QoS 0, completes as soon as the packet is sent.
* * For QoS 1, completes when PUBACK is received.
* * QoS 2 is not supported by AWS IoT.
*
* @category IotShadow
*/
async publishUpdateNamedShadow(
request: model.UpdateNamedShadowRequest,
qos: mqtt.QoS)
: Promise<mqtt.MqttRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update";
topic = topic.replace("{shadowName}", request.shadowName);
topic = topic.replace("{thingName}", request.thingName);
return this.mqttAdapter.publish(topic, JSON.stringify(request), qos);
}
/**
* Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
*
*
* subscribeToNamedShadowDeltaUpdatedEvents may be called while the device is offline, though the async
* subscribeToUpdateShadowAccepted may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -991,3 +993,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
*

@@ -1004,17 +1006,16 @@ * @param request Subscription request configuration

*/
async subscribeToNamedShadowDeltaUpdatedEvents(
request: model.NamedShadowDeltaUpdatedSubscriptionRequest,
async subscribeToUpdateShadowAccepted(
request: model.UpdateShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.ShadowDeltaUpdatedEvent) => void)
messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/delta";
let topic: string = "$aws/things/{thingName}/shadow/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.ShadowDeltaUpdatedEvent | undefined;
let response: model.UpdateShadowResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.ShadowDeltaUpdatedEvent;
response = JSON.parse(payload_text) as model.UpdateShadowResponse;
} catch (err) {

@@ -1032,6 +1033,6 @@ error = IotShadowClient.createClientError(err, payload);

/**
* Subscribes to the accepted topic for the UpdateNamedShadow operation
* Subscribes to the rejected topic for the UpdateShadow operation
*
*
* subscribeToUpdateNamedShadowAccepted may be called while the device is offline, though the async
* subscribeToUpdateShadowRejected may be called while the device is offline, though the async
* operation cannot complete successfully until the connection resumes.

@@ -1043,3 +1044,3 @@ *

*
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic
* AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic
*

@@ -1056,17 +1057,16 @@ * @param request Subscription request configuration

*/
async subscribeToUpdateNamedShadowAccepted(
request: model.UpdateNamedShadowSubscriptionRequest,
async subscribeToUpdateShadowRejected(
request: model.UpdateShadowSubscriptionRequest,
qos: mqtt.QoS,
messageHandler: (error?: IotShadowError, response?: model.UpdateShadowResponse) => void)
messageHandler: (error?: IotShadowError, response?: model.ErrorResponse) => void)
: Promise<mqtt.MqttSubscribeRequest> {
let topic: string = "$aws/things/{thingName}/shadow/name/{shadowName}/update/accepted";
let topic: string = "$aws/things/{thingName}/shadow/update/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{shadowName}", request.shadowName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.UpdateShadowResponse | undefined;
let response: model.ErrorResponse | undefined;
let error: IotShadowError | undefined;
try {
const payload_text = toUtf8(new Uint8Array(payload));
response = JSON.parse(payload_text) as model.UpdateShadowResponse;
response = JSON.parse(payload_text) as model.ErrorResponse;
} catch (err) {

@@ -1073,0 +1073,0 @@ error = IotShadowClient.createClientError(err, payload);

@@ -17,6 +17,6 @@ /*

/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* AWS IoT thing to delete a named shadow from.
*
*/
clientToken?: string;
thingName: string;

@@ -30,6 +30,6 @@ /**

/**
* AWS IoT thing to delete a named shadow from.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;

@@ -88,8 +88,2 @@ }

/**
* The current version of the document for the device's shadow.
*
*/
version?: number;
/**
* A client token used to correlate requests and responses.

@@ -106,2 +100,8 @@ *

/**
* The current version of the document for the device's shadow.
*
*/
version?: number;
}

@@ -132,24 +132,24 @@

/**
* The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
* Opaque request-response correlation data. Present only if a client token was used in the request.
*
*/
timestamp?: Date;
clientToken?: string;
/**
* A text message that provides additional information.
* An HTTP response code that indicates the type of error.
*
*/
message?: string;
code?: number;
/**
* Opaque request-response correlation data. Present only if a client token was used in the request.
* A text message that provides additional information.
*
*/
clientToken?: string;
message?: string;
/**
* An HTTP response code that indicates the type of error.
* The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
*
*/
code?: number;
timestamp?: Date;

@@ -166,6 +166,6 @@ }

/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* AWS IoT thing to get the named shadow for.
*
*/
clientToken?: string;
thingName: string;

@@ -179,6 +179,6 @@ /**

/**
* AWS IoT thing to get the named shadow for.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;

@@ -237,8 +237,2 @@ }

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
/**
* An opaque token used to correlate requests and responses.

@@ -267,2 +261,8 @@ *

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
}

@@ -314,12 +314,12 @@

/**
* Name of the shadow to get NamedShadowUpdated events for.
* Name of the AWS IoT thing to get NamedShadowUpdated events for.
*
*/
shadowName: string;
thingName: string;
/**
* Name of the AWS IoT thing to get NamedShadowUpdated events for.
* Name of the shadow to get NamedShadowUpdated events for.
*
*/
thingName: string;
shadowName: string;

@@ -336,12 +336,12 @@ }

/**
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
* Shadow properties that were updated.
*
*/
clientToken?: string;
state?: object;
/**
* The current version of the document for the device's shadow.
* Timestamps for the shadow properties that were updated.
*
*/
version?: number;
metadata?: object;

@@ -355,12 +355,12 @@ /**

/**
* Timestamps for the shadow properties that were updated.
* The current version of the document for the device's shadow.
*
*/
metadata?: object;
version?: number;
/**
* Shadow properties that were updated.
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
*
*/
state?: object;
clientToken?: string;

@@ -434,6 +434,6 @@ }

/**
* The delta between the reported and desired states.
* The desired shadow state (from external services and devices).
*
*/
delta?: object;
desired?: object;

@@ -447,6 +447,6 @@ /**

/**
* The desired shadow state (from external services and devices).
* The delta between the reported and desired states.
*
*/
desired?: object;
delta?: object;

@@ -532,2 +532,8 @@ }

/**
* Aws IoT thing to update a named shadow of.
*
*/
thingName: string;
/**
* Name of the shadow to update.

@@ -545,8 +551,2 @@ *

/**
* Aws IoT thing to update a named shadow of.
*
*/
thingName: string;
/**
* Requested changes to shadow state. Updates affect only the fields specified.

@@ -594,24 +594,24 @@ *

/**
* Requested changes to the shadow state. Updates affect only the fields specified.
* Aws IoT thing to update the (classic) shadow of.
*
*/
state?: ShadowState;
thingName: string;
/**
* Aws IoT thing to update the (classic) shadow of.
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
*
*/
thingName: string;
clientToken?: string;
/**
* (Optional) The Device Shadow service processes the update only if the specified version matches the latest version.
* Requested changes to the shadow state. Updates affect only the fields specified.
*
*/
version?: number;
state?: ShadowState;
/**
* Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
* (Optional) The Device Shadow service processes the update only if the specified version matches the latest version.
*
*/
clientToken?: string;
version?: number;

@@ -628,8 +628,2 @@ }

/**
* Updated device shadow state.
*
*/
state?: ShadowState;
/**
* An opaque token used to correlate requests and responses. Present only if a client token was used in the request.

@@ -641,6 +635,6 @@ *

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
* Updated device shadow state.
*
*/
version?: number;
state?: ShadowState;

@@ -659,2 +653,8 @@ /**

/**
* The current version of the document for the device's shadow shared in AWS IoT. It is increased by one over the previous version of the document.
*
*/
version?: number;
}

@@ -661,0 +661,0 @@

{
"name": "aws-iot-device-sdk-v2",
"version": "1.19.1",
"version": "1.19.3",
"description": "NodeJS API for the AWS IoT service",

@@ -45,5 +45,6 @@ "homepage": "https://github.com/aws/aws-iot-device-sdk-js-v2",

"dependencies": {
"2": "^3.0.0",
"@aws-sdk/util-utf8-browser": "^3.109.0",
"aws-crt": "^1.21.1"
"aws-crt": "^1.21.2"
}
}

@@ -12,2 +12,3 @@ # AWS IoT Device SDK for JavaScript v2

* [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)
* [Migration Guide from the AWS IoT SDK for JavaScript v1](./documents/MIGRATION_GUIDE.md)

@@ -79,2 +80,2 @@ ## Installation

Latest released version: v1.19.1
Latest released version: v1.19.3

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc