@balena/open-balena-api 27.1.1-build-simplify-getAccessibleDeviceTypes-15011a2e8ad9feaf4eec3316ee60d3afec615be0-1 → 27.1.1-build-update-pinejs-ba344c6f2f6c163d7f1655cdef2173645df44abb-1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/balena-model.d.ts
CHANGED
@@ -800,15 +800,10 @@ export interface Device {
|
|
800
800
|
api_secret: Types['Short Text']['Write'] | null;
|
801
801
|
is_managed_by__service_instance: ServiceInstance['Write']['id'] | null;
|
802
802
|
is_pinned_on__release: Release['Write']['id'] | null;
|
803
|
-
should_be_running__release: Release['Write']['id'] | null;
|
804
803
|
should_be_operated_by__release: Release['Write']['id'] | null;
|
805
804
|
should_be_managed_by__release: Release['Write']['id'] | null;
|
806
805
|
update_status: 'rejected' | 'downloading' | 'downloaded' | 'applying changes' | 'aborted' | 'done' | null;
|
807
806
|
last_update_status_event: Types['Date Time']['Write'] | null;
|
808
|
-
is_web_accessible: Types['Boolean']['Write'] | null;
|
809
|
-
is_frozen: Types['Boolean']['Write'] | null;
|
810
|
-
overall_status: Types['Short Text']['Write'] | null;
|
811
|
-
overall_progress: Types['Integer']['Write'] | null;
|
812
807
|
};
|
813
808
|
}
|
814
809
|
export interface DeviceEnvironmentVariable {
|
@@ -1051,10 +1046,6 @@ export interface Release {
|
|
1051
1046
|
known_issue_list: Types['Text']['Write'] | null;
|
1052
1047
|
note: Types['Text']['Write'] | null;
|
1053
1048
|
invalidation_reason: Types['Text']['Write'] | null;
|
1054
|
-
is_final: Types['Boolean']['Write'];
|
1055
|
-
semver: Types['Short Text']['Write'];
|
1056
|
-
raw_version: Types['Short Text']['Write'];
|
1057
|
-
version: Types['JSON']['Write'];
|
1058
1049
|
};
|
1059
1050
|
}
|
1060
1051
|
export interface ReleaseTag {
|
@@ -1255,11 +1246,7 @@ export interface UserHasDirectAccessToApplication {
|
|
1255
1246
|
__id: User['Read']['id'];
|
1256
1247
|
} | [User['Read']];
|
1257
1248
|
};
|
1258
|
-
Write:
|
1259
|
-
id: Types['Big Integer']['Write'];
|
1260
|
-
user: User['Write']['id'];
|
1261
|
-
has_direct_access_to__application: Application['Write']['id'];
|
1262
|
-
};
|
1249
|
+
Write: Record<string, never>;
|
1263
1250
|
}
|
1264
1251
|
export default interface $Model {
|
1265
1252
|
actor: Actor;
|
package/dist/balena-model.js
CHANGED
@@ -61,9 +61,14 @@ export const validateSlug = (slug) => {
|
|
61
61
|
return slug;
|
62
62
|
};
|
63
63
|
/** @deprecated */
|
64
|
+
const getAllDeviceTypes = async () => {
|
65
|
+
const dtInfo = await getDeviceTypes();
|
66
|
+
return _.uniqBy(Object.values(dtInfo).map((dtEntry) => dtEntry.latest), (dt) => dt.slug);
|
67
|
+
};
|
68
|
+
/** @deprecated */
|
64
69
|
export const getAccessibleDeviceTypes = async (resinApi) => {
|
65
|
-
const [
|
66
|
-
|
70
|
+
const [deviceTypes, accessibleDeviceTypes] = await Promise.all([
|
71
|
+
getAllDeviceTypes(),
|
67
72
|
resinApi.get({
|
68
73
|
resource: 'device_type',
|
69
74
|
options: {
|
@@ -71,9 +76,10 @@ export const getAccessibleDeviceTypes = async (resinApi) => {
|
|
71
76
|
},
|
72
77
|
}),
|
73
78
|
]);
|
74
|
-
|
75
|
-
|
76
|
-
.
|
79
|
+
const accessSet = new Set(accessibleDeviceTypes.map((dt) => dt.slug));
|
80
|
+
return deviceTypes.filter((deviceType) => {
|
81
|
+
return accessSet.has(deviceType.slug);
|
82
|
+
});
|
77
83
|
};
|
78
84
|
/** @deprecated Use the getDeviceTypeBySlug unless you need the device-type.json contents. */
|
79
85
|
export const findBySlug = async (resinApi, slug) => (await findDeviceTypeInfoBySlug(resinApi, slug)).latest;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"device-types.js","sourceRoot":"","sources":["../../../src/features/device-types/device-types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAIvB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACx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EAAE;IAC3B,MAAM,cAAc,GAAG,MAAM,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtE,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC;IACzC,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAEvC,MAAM,QAAQ,GAAG,CAChB,MAAM,OAAO,CAAC,GAAG,CAChB,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7C,IAAI,CAAC;YACJ,IAAI,CAAC,MAAM,iBAAiB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;gBAChE,OAAO,OAAO,CAAC;YAChB,CAAC;QACF,CAAC;QAAC,MAAM,CAAC;YACR,OAAO;QACR,CAAC;IACF,CAAC,CAAC,CACF,CACD,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,oBAAoB,CAC7B,wDAAwD,IAAI,EAAE,CAC9D,CAAC;IACH,CAAC;IAED,OAAO;QACN,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;KACnB,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/open-balena-api",
|
3
3
|
"description": "Internet of things, Made Simple",
|
4
|
-
"version": "27.1.1-build-
|
4
|
+
"version": "27.1.1-build-update-pinejs-ba344c6f2f6c163d7f1655cdef2173645df44abb-1",
|
5
5
|
"license": "AGPL-3.0",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -45,13 +45,13 @@
|
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
47
|
"@balena/abstract-sql-compiler": "^9.2.0",
|
48
|
-
"@balena/abstract-sql-to-typescript": "^4.0.
|
48
|
+
"@balena/abstract-sql-to-typescript": "^4.0.3",
|
49
49
|
"@balena/env-parsing": "^1.1.12",
|
50
50
|
"@balena/es-version": "^1.0.3",
|
51
51
|
"@balena/node-metrics-gatherer": "^6.0.3",
|
52
|
-
"@balena/pinejs": "^18.2.
|
52
|
+
"@balena/pinejs": "^18.2.3",
|
53
53
|
"@balena/pinejs-webresource-cloudfront": "^0.2.0",
|
54
|
-
"@sentry/node": "^8.
|
54
|
+
"@sentry/node": "^8.29.0",
|
55
55
|
"@types/basic-auth": "^1.1.8",
|
56
56
|
"@types/bluebird": "^3.5.42",
|
57
57
|
"@types/cache-manager": "^4.0.6",
|
@@ -69,7 +69,7 @@
|
|
69
69
|
"@types/memoizee": "^0.4.11",
|
70
70
|
"@types/morgan": "^1.9.9",
|
71
71
|
"@types/ndjson": "^2.0.4",
|
72
|
-
"@types/node": "^20.16.
|
72
|
+
"@types/node": "^20.16.5",
|
73
73
|
"@types/node-schedule": "^2.1.7",
|
74
74
|
"@types/on-finished": "^2.3.4",
|
75
75
|
"@types/passport-jwt": "^4.0.1",
|
@@ -82,7 +82,7 @@
|
|
82
82
|
"@types/uuid": "^10.0.0",
|
83
83
|
"@types/validator": "^13.12.1",
|
84
84
|
"avsc": "^5.7.7",
|
85
|
-
"aws-sdk": "^2.
|
85
|
+
"aws-sdk": "^2.1691.0",
|
86
86
|
"balena-device-config": "^6.3.0",
|
87
87
|
"balena-semver": "^2.3.5",
|
88
88
|
"basic-auth": "^2.0.1",
|
@@ -113,7 +113,7 @@
|
|
113
113
|
"on-finished": "^2.4.1",
|
114
114
|
"passport": "^0.7.0",
|
115
115
|
"passport-jwt": "^4.0.1",
|
116
|
-
"pinejs-client-core": "^7.1.
|
116
|
+
"pinejs-client-core": "^7.1.3",
|
117
117
|
"proxy-addr": "^2.0.7",
|
118
118
|
"randomstring": "^1.3.0",
|
119
119
|
"rate-limiter-flexible": "^5.0.3",
|
@@ -168,6 +168,6 @@
|
|
168
168
|
"loader": "ts-node/esm/transpile-only"
|
169
169
|
},
|
170
170
|
"versionist": {
|
171
|
-
"publishedAt": "2024-09-
|
171
|
+
"publishedAt": "2024-09-09T11:05:27.623Z"
|
172
172
|
}
|
173
173
|
}
|