@hello.nrfcloud.com/nrfcloud-api-helpers 4.1.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,11 +8,11 @@ export declare const DeviceShadow: import("@sinclair/typebox").TObject<{
|
|
|
8
8
|
createdAt: import("@sinclair/typebox").TString;
|
|
9
9
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
10
|
}>;
|
|
11
|
-
state: import("@sinclair/typebox").TObject<{
|
|
11
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
12
12
|
reported: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
13
13
|
desired: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
14
14
|
version: import("@sinclair/typebox").TNumber;
|
|
15
15
|
metadata: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
16
|
-
}
|
|
16
|
+
}>>;
|
|
17
17
|
}>;
|
|
18
18
|
export type DeviceShadowType = Static<typeof DeviceShadow>;
|
package/dist/api/DeviceShadow.js
CHANGED
|
@@ -14,10 +14,10 @@ export const DeviceShadow = Type.Object({
|
|
|
14
14
|
examples: ['2019-08-24T14:15:22Z'],
|
|
15
15
|
})),
|
|
16
16
|
}),
|
|
17
|
-
state: Type.Object({
|
|
17
|
+
state: Type.Optional(Type.Object({
|
|
18
18
|
reported: Type.Optional(Type.Record(Type.String({ minLength: 1 }), Type.Any())),
|
|
19
19
|
desired: Type.Optional(Type.Record(Type.String({ minLength: 1 }), Type.Any())),
|
|
20
20
|
version: Type.Number(),
|
|
21
21
|
metadata: Type.Record(Type.String({ minLength: 1 }), Type.Any()),
|
|
22
|
-
}),
|
|
22
|
+
})),
|
|
23
23
|
});
|
package/dist/api/devices.d.ts
CHANGED
|
@@ -9,15 +9,25 @@ declare const Devices: import("@sinclair/typebox").TObject<{
|
|
|
9
9
|
createdAt: import("@sinclair/typebox").TString;
|
|
10
10
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
11
|
}>;
|
|
12
|
-
state: import("@sinclair/typebox").TObject<{
|
|
12
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
13
13
|
reported: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
14
14
|
desired: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
15
15
|
version: import("@sinclair/typebox").TNumber;
|
|
16
16
|
metadata: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
17
|
-
}
|
|
17
|
+
}>>;
|
|
18
18
|
}>>;
|
|
19
19
|
}>;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* firmware types supported by a device for FOTA
|
|
22
|
+
*/
|
|
23
|
+
declare enum FwType {
|
|
24
|
+
APP = "APP",
|
|
25
|
+
MODEM = "MODEM",
|
|
26
|
+
BOOT = "BOOT",
|
|
27
|
+
SOFTDEVICE = "SOFTDEVICE",
|
|
28
|
+
BOOTLOADER = "BOOTLOADER",
|
|
29
|
+
MDM_FULL = "MDM_FULL"
|
|
30
|
+
}
|
|
21
31
|
export declare const devices: ({ endpoint, apiKey, }: {
|
|
22
32
|
endpoint: URL;
|
|
23
33
|
apiKey: string;
|
package/dist/api/devices.js
CHANGED
|
@@ -13,6 +13,18 @@ const Devices = Page(DeviceShadow);
|
|
|
13
13
|
const ProvisionDevice = Type.Object({
|
|
14
14
|
bulkOpsRequestId: Type.String(),
|
|
15
15
|
});
|
|
16
|
+
/**
|
|
17
|
+
* firmware types supported by a device for FOTA
|
|
18
|
+
*/
|
|
19
|
+
var FwType;
|
|
20
|
+
(function (FwType) {
|
|
21
|
+
FwType["APP"] = "APP";
|
|
22
|
+
FwType["MODEM"] = "MODEM";
|
|
23
|
+
FwType["BOOT"] = "BOOT";
|
|
24
|
+
FwType["SOFTDEVICE"] = "SOFTDEVICE";
|
|
25
|
+
FwType["BOOTLOADER"] = "BOOTLOADER";
|
|
26
|
+
FwType["MDM_FULL"] = "MDM_FULL";
|
|
27
|
+
})(FwType || (FwType = {}));
|
|
16
28
|
export const devices = ({ endpoint, apiKey, }, fetchImplementation) => {
|
|
17
29
|
const headers = {
|
|
18
30
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -6,12 +6,12 @@ declare const DeviceShadows: import("@sinclair/typebox").TArray<import("@sinclai
|
|
|
6
6
|
createdAt: import("@sinclair/typebox").TString;
|
|
7
7
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
8
|
}>;
|
|
9
|
-
state: import("@sinclair/typebox").TObject<{
|
|
9
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
10
10
|
reported: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
11
11
|
desired: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
12
12
|
version: import("@sinclair/typebox").TNumber;
|
|
13
13
|
metadata: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
14
|
-
}
|
|
14
|
+
}>>;
|
|
15
15
|
}>>;
|
|
16
16
|
export declare const getDeviceShadow: ({ endpoint, apiKey, }: {
|
|
17
17
|
endpoint: URL;
|