Skip to content

Commit bc98b6d

Browse files
author
Justin Boswell
authored
NamedShadow import (#54)
1 parent 9e2f5fa commit bc98b6d

File tree

5 files changed

+650
-104
lines changed

5 files changed

+650
-104
lines changed

lib/iotidentity/model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export interface CreateKeysAndCertificateRequest {
5353
*/
5454
export interface CreateKeysAndCertificateResponse {
5555
certificateId?: string;
56-
privateKey?: string;
5756
certificateOwnershipToken?: string;
5857
certificatePem?: string;
58+
privateKey?: string;
5959
}
6060

6161
/**
@@ -70,18 +70,18 @@ export interface CreateKeysAndCertificateSubscriptionRequest {
7070
* @category IotIdentity
7171
*/
7272
export interface ErrorResponse {
73-
errorCode?: string;
7473
statusCode?: number;
7574
errorMessage?: string;
75+
errorCode?: string;
7676
}
7777

7878
/**
7979
* @module aws-iot-device-sdk
8080
* @category IotIdentity
8181
*/
8282
export interface RegisterThingRequest {
83-
parameters?: {[key: string]: string};
8483
templateName: string;
84+
parameters?: {[key: string]: string};
8585
certificateOwnershipToken?: string;
8686
}
8787

@@ -90,8 +90,8 @@ export interface RegisterThingRequest {
9090
* @category IotIdentity
9191
*/
9292
export interface RegisterThingResponse {
93-
deviceConfiguration?: {[key: string]: string};
9493
thingName?: string;
94+
deviceConfiguration?: {[key: string]: string};
9595
}
9696

9797
/**

lib/iotjobs/iotjobsclient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ export class IotJobsClient {
269269
: Promise<mqtt.MqttSubscribeRequest> {
270270

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

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

628628
let topic: string = "$aws/things/{thingName}/jobs/{jobId}/get";
629-
topic = topic.replace("{jobId}", request.jobId);
630629
topic = topic.replace("{thingName}", request.thingName);
630+
topic = topic.replace("{jobId}", request.jobId);
631631
return this.connection.publish(topic, JSON.stringify(request), qos);
632632
}
633633

lib/iotjobs/model.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export enum JobStatus {
5353
* @category IotJobs
5454
*/
5555
export interface DescribeJobExecutionRequest {
56+
executionNumber?: number;
57+
thingName: string;
5658
includeJobDocument?: boolean;
5759
jobId: string;
5860
clientToken?: string;
59-
executionNumber?: number;
60-
thingName: string;
6161
}
6262

6363
/**
@@ -93,9 +93,9 @@ export interface GetPendingJobExecutionsRequest {
9393
* @category IotJobs
9494
*/
9595
export interface GetPendingJobExecutionsResponse {
96-
clientToken?: string;
9796
queuedJobs?: Array<JobExecutionSummary>;
9897
timestamp?: Date;
98+
clientToken?: string;
9999
inProgressJobs?: Array<JobExecutionSummary>;
100100
}
101101

@@ -113,13 +113,13 @@ export interface GetPendingJobExecutionsSubscriptionRequest {
113113
*/
114114
export interface JobExecutionData {
115115
jobId?: string;
116-
thingName?: string;
117116
jobDocument?: object;
118-
executionNumber?: number;
119-
statusDetails?: {[key: string]: string};
120117
status?: JobStatus;
121118
versionNumber?: number;
122119
queuedAt?: Date;
120+
thingName?: string;
121+
executionNumber?: number;
122+
statusDetails?: {[key: string]: string};
123123
lastUpdatedAt?: Date;
124124
startedAt?: Date;
125125
}
@@ -129,8 +129,8 @@ export interface JobExecutionData {
129129
* @category IotJobs
130130
*/
131131
export interface JobExecutionState {
132-
versionNumber?: number;
133132
statusDetails?: {[key: string]: string};
133+
versionNumber?: number;
134134
status?: JobStatus;
135135
}
136136

@@ -141,9 +141,9 @@ export interface JobExecutionState {
141141
export interface JobExecutionSummary {
142142
lastUpdatedAt?: Date;
143143
executionNumber?: number;
144+
startedAt?: Date;
144145
versionNumber?: number;
145146
jobId?: string;
146-
startedAt?: Date;
147147
queuedAt?: Date;
148148
}
149149

@@ -187,10 +187,10 @@ export interface NextJobExecutionChangedSubscriptionRequest {
187187
*/
188188
export interface RejectedErrorResponse {
189189
timestamp?: Date;
190-
clientToken?: string;
191190
code?: RejectedErrorCode;
192-
executionState?: JobExecutionState;
193191
message?: string;
192+
clientToken?: string;
193+
executionState?: JobExecutionState;
194194
}
195195

196196
/**
@@ -208,10 +208,10 @@ export interface StartNextJobExecutionResponse {
208208
* @category IotJobs
209209
*/
210210
export interface StartNextPendingJobExecutionRequest {
211-
clientToken?: string;
212211
thingName: string;
213-
statusDetails?: {[key: string]: string};
214212
stepTimeoutInMinutes?: number;
213+
clientToken?: string;
214+
statusDetails?: {[key: string]: string};
215215
}
216216

217217
/**
@@ -228,14 +228,14 @@ export interface StartNextPendingJobExecutionSubscriptionRequest {
228228
*/
229229
export interface UpdateJobExecutionRequest {
230230
thingName: string;
231-
expectedVersion?: number;
232231
executionNumber?: number;
233-
includeJobDocument?: boolean;
234232
statusDetails?: {[key: string]: string};
235233
includeJobExecutionState?: boolean;
234+
jobId: string;
235+
expectedVersion?: number;
236+
includeJobDocument?: boolean;
236237
status?: JobStatus;
237238
stepTimeoutInMinutes?: number;
238-
jobId: string;
239239
clientToken?: string;
240240
}
241241

@@ -244,8 +244,8 @@ export interface UpdateJobExecutionRequest {
244244
* @category IotJobs
245245
*/
246246
export interface UpdateJobExecutionResponse {
247-
timestamp?: Date;
248247
clientToken?: string;
248+
timestamp?: Date;
249249
jobDocument?: object;
250250
executionState?: JobExecutionState;
251251
}
@@ -255,7 +255,7 @@ export interface UpdateJobExecutionResponse {
255255
* @category IotJobs
256256
*/
257257
export interface UpdateJobExecutionSubscriptionRequest {
258-
thingName: string;
259258
jobId: string;
259+
thingName: string;
260260
}
261261

0 commit comments

Comments
 (0)