Skip to content

Commit

Permalink
NamedShadow import (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Boswell authored Jun 11, 2020
1 parent 9e2f5fa commit bc98b6d
Show file tree
Hide file tree
Showing 5 changed files with 650 additions and 104 deletions.
8 changes: 4 additions & 4 deletions lib/iotidentity/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export interface CreateKeysAndCertificateRequest {
*/
export interface CreateKeysAndCertificateResponse {
certificateId?: string;
privateKey?: string;
certificateOwnershipToken?: string;
certificatePem?: string;
privateKey?: string;
}

/**
Expand All @@ -70,18 +70,18 @@ export interface CreateKeysAndCertificateSubscriptionRequest {
* @category IotIdentity
*/
export interface ErrorResponse {
errorCode?: string;
statusCode?: number;
errorMessage?: string;
errorCode?: string;
}

/**
* @module aws-iot-device-sdk
* @category IotIdentity
*/
export interface RegisterThingRequest {
parameters?: {[key: string]: string};
templateName: string;
parameters?: {[key: string]: string};
certificateOwnershipToken?: string;
}

Expand All @@ -90,8 +90,8 @@ export interface RegisterThingRequest {
* @category IotIdentity
*/
export interface RegisterThingResponse {
deviceConfiguration?: {[key: string]: string};
thingName?: string;
deviceConfiguration?: {[key: string]: string};
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/iotjobs/iotjobsclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ export class IotJobsClient {
: Promise<mqtt.MqttSubscribeRequest> {

let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/rejected";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.RejectedErrorResponse | undefined;
let error: IotJobsError | undefined;
Expand Down Expand Up @@ -317,8 +317,8 @@ export class IotJobsClient {
: Promise<mqtt.MqttSubscribeRequest> {

let topic: string = "$aws/things/{thingName}/jobs/{jobId}/update/accepted";
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
topic = topic.replace("{thingName}", request.thingName);
const on_message = (topic: string, payload: ArrayBuffer) => {
let response: model.UpdateJobExecutionResponse | undefined;
let error: IotJobsError | undefined;
Expand Down Expand Up @@ -626,8 +626,8 @@ export class IotJobsClient {
: Promise<mqtt.MqttRequest> {

let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get";
topic = topic.replace("{jobId}", request.jobId);
topic = topic.replace("{thingName}", request.thingName);
topic = topic.replace("{jobId}", request.jobId);
return this.connection.publish(topic, JSON.stringify(request), qos);
}

Expand Down
34 changes: 17 additions & 17 deletions lib/iotjobs/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export enum JobStatus {
* @category IotJobs
*/
export interface DescribeJobExecutionRequest {
executionNumber?: number;
thingName: string;
includeJobDocument?: boolean;
jobId: string;
clientToken?: string;
executionNumber?: number;
thingName: string;
}

/**
Expand Down Expand Up @@ -93,9 +93,9 @@ export interface GetPendingJobExecutionsRequest {
* @category IotJobs
*/
export interface GetPendingJobExecutionsResponse {
clientToken?: string;
queuedJobs?: Array<JobExecutionSummary>;
timestamp?: Date;
clientToken?: string;
inProgressJobs?: Array<JobExecutionSummary>;
}

Expand All @@ -113,13 +113,13 @@ export interface GetPendingJobExecutionsSubscriptionRequest {
*/
export interface JobExecutionData {
jobId?: string;
thingName?: string;
jobDocument?: object;
executionNumber?: number;
statusDetails?: {[key: string]: string};
status?: JobStatus;
versionNumber?: number;
queuedAt?: Date;
thingName?: string;
executionNumber?: number;
statusDetails?: {[key: string]: string};
lastUpdatedAt?: Date;
startedAt?: Date;
}
Expand All @@ -129,8 +129,8 @@ export interface JobExecutionData {
* @category IotJobs
*/
export interface JobExecutionState {
versionNumber?: number;
statusDetails?: {[key: string]: string};
versionNumber?: number;
status?: JobStatus;
}

Expand All @@ -141,9 +141,9 @@ export interface JobExecutionState {
export interface JobExecutionSummary {
lastUpdatedAt?: Date;
executionNumber?: number;
startedAt?: Date;
versionNumber?: number;
jobId?: string;
startedAt?: Date;
queuedAt?: Date;
}

Expand Down Expand Up @@ -187,10 +187,10 @@ export interface NextJobExecutionChangedSubscriptionRequest {
*/
export interface RejectedErrorResponse {
timestamp?: Date;
clientToken?: string;
code?: RejectedErrorCode;
executionState?: JobExecutionState;
message?: string;
clientToken?: string;
executionState?: JobExecutionState;
}

/**
Expand All @@ -208,10 +208,10 @@ export interface StartNextJobExecutionResponse {
* @category IotJobs
*/
export interface StartNextPendingJobExecutionRequest {
clientToken?: string;
thingName: string;
statusDetails?: {[key: string]: string};
stepTimeoutInMinutes?: number;
clientToken?: string;
statusDetails?: {[key: string]: string};
}

/**
Expand All @@ -228,14 +228,14 @@ export interface StartNextPendingJobExecutionSubscriptionRequest {
*/
export interface UpdateJobExecutionRequest {
thingName: string;
expectedVersion?: number;
executionNumber?: number;
includeJobDocument?: boolean;
statusDetails?: {[key: string]: string};
includeJobExecutionState?: boolean;
jobId: string;
expectedVersion?: number;
includeJobDocument?: boolean;
status?: JobStatus;
stepTimeoutInMinutes?: number;
jobId: string;
clientToken?: string;
}

Expand All @@ -244,8 +244,8 @@ export interface UpdateJobExecutionRequest {
* @category IotJobs
*/
export interface UpdateJobExecutionResponse {
timestamp?: Date;
clientToken?: string;
timestamp?: Date;
jobDocument?: object;
executionState?: JobExecutionState;
}
Expand All @@ -255,7 +255,7 @@ export interface UpdateJobExecutionResponse {
* @category IotJobs
*/
export interface UpdateJobExecutionSubscriptionRequest {
thingName: string;
jobId: string;
thingName: string;
}

Loading

0 comments on commit bc98b6d

Please sign in to comment.