@hello.nrfcloud.com/nrfcloud-api-helpers 4.1.2 → 4.1.4

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.
@@ -20,7 +20,7 @@ export const createFOTAJob = ({ apiKey, endpoint, }, fetchImplementation) => asy
20
20
  payload: JSONPayload({
21
21
  bundleId,
22
22
  autoApply: true,
23
- deviceIds: [deviceId],
23
+ deviceIdentifiers: [deviceId],
24
24
  }),
25
25
  }, CreatedFOTAJobType);
26
26
  if ('error' in maybeJob)
@@ -17,7 +17,17 @@ declare const Devices: import("@sinclair/typebox").TObject<{
17
17
  }>;
18
18
  }>>;
19
19
  }>;
20
- type FwType = 'APP' | 'MODEM' | 'BOOT' | 'SOFTDEVICE' | 'BOOTLOADER' | 'MDM_FULL';
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;
@@ -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}`,
@@ -15,7 +15,7 @@ export declare const FOTAJobType: import("@sinclair/typebox").TObject<{
15
15
  lastUpdatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
16
16
  completedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
17
17
  }>;
18
- export declare const fetchFOTAJob: ({ apiKey, endpoint, }: {
18
+ export declare const getFOTAJob: ({ apiKey, endpoint, }: {
19
19
  apiKey: string;
20
20
  endpoint: URL;
21
21
  }, fetchImplementation?: typeof fetch) => ({ jobId, }: {
@@ -32,7 +32,7 @@ export const FOTAJobType = Type.Object({
32
32
  title: 'FOTA Job',
33
33
  description: 'See https://api.nrfcloud.com/#tag/FOTA-Jobs/operation/FetchFOTAJob',
34
34
  });
35
- export const fetchFOTAJob = ({ apiKey, endpoint, }, fetchImplementation) => async ({ jobId, }) => {
35
+ export const getFOTAJob = ({ apiKey, endpoint, }, fetchImplementation) => async ({ jobId, }) => {
36
36
  const maybeJob = await validatedFetch({
37
37
  endpoint,
38
38
  apiKey,
@@ -12,4 +12,4 @@ export * from './serviceToken.js';
12
12
  export * from './groundFix.js';
13
13
  export * from './bulkOps.js';
14
14
  export * from './createFOTAJob.js';
15
- export * from './fetchFOTAJob.js';
15
+ export * from './getFOTAJob.js';
package/dist/api/index.js CHANGED
@@ -12,4 +12,4 @@ export * from './serviceToken.js';
12
12
  export * from './groundFix.js';
13
13
  export * from './bulkOps.js';
14
14
  export * from './createFOTAJob.js';
15
- export * from './fetchFOTAJob.js';
15
+ export * from './getFOTAJob.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hello.nrfcloud.com/nrfcloud-api-helpers",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "Helper functions for integrating nRF Cloud APIs in AWS lambdas written in TypeScript.",
5
5
  "exports": {
6
6
  "./*": {
@@ -39,7 +39,7 @@
39
39
  "@types/node": "20.14.2",
40
40
  "husky": "9.0.11",
41
41
  "tsmatchers": "5.0.2",
42
- "tsx": "4.11.2"
42
+ "tsx": "4.12.0"
43
43
  },
44
44
  "lint-staged": {
45
45
  "*.ts": [