@blueid/access-capacitor 0.89.0 → 0.90.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.
- package/dist/esm/BlueCore_pb.d.ts +0 -6
- package/dist/esm/BlueCore_pb.js +0 -6
- package/dist/esm/BlueCore_pb.js.map +1 -1
- package/dist/esm/interop.js +2 -1
- package/dist/esm/interop.js.map +1 -1
- package/dist/plugin.cjs.js +2 -7
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +2 -7
- package/dist/plugin.js.map +1 -1
- package/ios/CBlueIDAccess.xcframework/Info.plist +5 -5
- package/ios/CBlueIDAccess.xcframework/ios-arm64/Headers/core/BlueCore.pb.h +26 -26
- package/ios/CBlueIDAccess.xcframework/ios-arm64/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/Headers/core/BlueCore.pb.h +26 -26
- package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/Headers/core/BlueCore.pb.h +26 -26
- package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/libCBlueIDAccess.a +0 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueAccessAPIHelper.swift +9 -2
- package/ios/Plugin/BlueIDAccessSDK/BlueAccessSync.swift +1 -1
- package/ios/Plugin/BlueIDAccessSDK/BlueCore.pb.swift +0 -3
- package/ios/Plugin/BlueIDAccessSDK/BlueKeychain.swift +20 -2
- package/ios/Plugin/BlueIDAccessSDK/BlueOssSid.swift +3 -3
- package/ios/Plugin/BlueIDAccessSDK/BlueOssSo.swift +4 -4
- package/package.json +1 -1
|
@@ -29,16 +29,15 @@
|
|
|
29
29
|
<key>HeadersPath</key>
|
|
30
30
|
<string>Headers</string>
|
|
31
31
|
<key>LibraryIdentifier</key>
|
|
32
|
-
<string>
|
|
32
|
+
<string>ios-arm64</string>
|
|
33
33
|
<key>LibraryPath</key>
|
|
34
34
|
<string>libCBlueIDAccess.a</string>
|
|
35
35
|
<key>SupportedArchitectures</key>
|
|
36
36
|
<array>
|
|
37
37
|
<string>arm64</string>
|
|
38
|
-
<string>x86_64</string>
|
|
39
38
|
</array>
|
|
40
39
|
<key>SupportedPlatform</key>
|
|
41
|
-
<string>
|
|
40
|
+
<string>ios</string>
|
|
42
41
|
</dict>
|
|
43
42
|
<dict>
|
|
44
43
|
<key>BinaryPath</key>
|
|
@@ -46,15 +45,16 @@
|
|
|
46
45
|
<key>HeadersPath</key>
|
|
47
46
|
<string>Headers</string>
|
|
48
47
|
<key>LibraryIdentifier</key>
|
|
49
|
-
<string>
|
|
48
|
+
<string>macos-arm64_x86_64</string>
|
|
50
49
|
<key>LibraryPath</key>
|
|
51
50
|
<string>libCBlueIDAccess.a</string>
|
|
52
51
|
<key>SupportedArchitectures</key>
|
|
53
52
|
<array>
|
|
54
53
|
<string>arm64</string>
|
|
54
|
+
<string>x86_64</string>
|
|
55
55
|
</array>
|
|
56
56
|
<key>SupportedPlatform</key>
|
|
57
|
-
<string>
|
|
57
|
+
<string>macos</string>
|
|
58
58
|
</dict>
|
|
59
59
|
</array>
|
|
60
60
|
<key>CFBundlePackageType</key>
|
|
@@ -116,7 +116,7 @@ typedef enum BlueTimeUnit {
|
|
|
116
116
|
BlueTimeUnit_Days = 4,
|
|
117
117
|
BlueTimeUnit_Months = 5,
|
|
118
118
|
BlueTimeUnit_Years = 6
|
|
119
|
-
} BlueTimeUnit_t;
|
|
119
|
+
} pb_packed BlueTimeUnit_t;
|
|
120
120
|
|
|
121
121
|
/* Those may never be changed */
|
|
122
122
|
typedef enum BlueWeekday {
|
|
@@ -127,7 +127,7 @@ typedef enum BlueWeekday {
|
|
|
127
127
|
BlueWeekday_Friday = 4,
|
|
128
128
|
BlueWeekday_Saturday = 5,
|
|
129
129
|
BlueWeekday_Sunday = 6
|
|
130
|
-
} BlueWeekday_t;
|
|
130
|
+
} pb_packed BlueWeekday_t;
|
|
131
131
|
|
|
132
132
|
typedef enum BlueCredentialType {
|
|
133
133
|
/* Regular credential can only open / enter */
|
|
@@ -138,7 +138,7 @@ typedef enum BlueCredentialType {
|
|
|
138
138
|
BlueCredentialType_Master = 3,
|
|
139
139
|
/* Nfc writer allows to write any credential within this site on cards & fobs */
|
|
140
140
|
BlueCredentialType_NfcWriter = 4
|
|
141
|
-
} BlueCredentialType_t;
|
|
141
|
+
} pb_packed BlueCredentialType_t;
|
|
142
142
|
|
|
143
143
|
typedef enum BlueAccessType {
|
|
144
144
|
/* Access with default unlock time */
|
|
@@ -157,13 +157,13 @@ typedef enum BlueAccessType {
|
|
|
157
157
|
BlueAccessType_NoAccessValidity = 7,
|
|
158
158
|
/* No access due blacklisted */
|
|
159
159
|
BlueAccessType_NoAccessBlacklisted = 8
|
|
160
|
-
} BlueAccessType_t;
|
|
160
|
+
} pb_packed BlueAccessType_t;
|
|
161
161
|
|
|
162
162
|
typedef enum BlueTransponderType {
|
|
163
163
|
BlueTransponderType_UnknownTransponder = 0,
|
|
164
164
|
BlueTransponderType_MobileTransponder = 1,
|
|
165
165
|
BlueTransponderType_MifareDesfire = 2
|
|
166
|
-
} BlueTransponderType_t;
|
|
166
|
+
} pb_packed BlueTransponderType_t;
|
|
167
167
|
|
|
168
168
|
typedef enum BlueHardwareType {
|
|
169
169
|
BlueHardwareType_UnknownHardware = 0,
|
|
@@ -173,7 +173,7 @@ typedef enum BlueHardwareType {
|
|
|
173
173
|
BlueHardwareType_DoorHandleLock = 4,
|
|
174
174
|
BlueHardwareType_WallReader = 5,
|
|
175
175
|
BlueHardwareType_Kiosk = 6
|
|
176
|
-
} BlueHardwareType_t;
|
|
176
|
+
} pb_packed BlueHardwareType_t;
|
|
177
177
|
|
|
178
178
|
typedef enum BlueBatteryLevel {
|
|
179
179
|
BlueBatteryLevel_UnknownBattery = 0,
|
|
@@ -185,9 +185,9 @@ typedef enum BlueBatteryLevel {
|
|
|
185
185
|
/* 0% (100) - 100% (200) */
|
|
186
186
|
BlueBatteryLevel_FullyDischarged = 100,
|
|
187
187
|
BlueBatteryLevel_FullyCharged = 200
|
|
188
|
-
} BlueBatteryLevel_t;
|
|
188
|
+
} pb_packed BlueBatteryLevel_t;
|
|
189
189
|
|
|
190
|
-
typedef enum BlueEventId {
|
|
190
|
+
typedef enum BlueEventId {
|
|
191
191
|
/* * eventInfo = 0 */
|
|
192
192
|
BlueEventId_BatteryLow = 1,
|
|
193
193
|
/* * eventInfo = 0 */
|
|
@@ -217,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
|
|
|
217
217
|
BlueEventId_TerminalCommand = 14,
|
|
218
218
|
/* * eventInfo = BlueReturnCode */
|
|
219
219
|
BlueEventId_TerminalOss = 15
|
|
220
|
-
} BlueEventId_t;
|
|
220
|
+
} pb_packed BlueEventId_t;
|
|
221
221
|
|
|
222
|
-
typedef enum BlueEventInfoSystem {
|
|
222
|
+
typedef enum BlueEventInfoSystem {
|
|
223
223
|
BlueEventInfoSystem_SystemRestart = 1,
|
|
224
224
|
BlueEventInfoSystem_SystemConfigured = 2
|
|
225
|
-
} BlueEventInfoSystem_t;
|
|
225
|
+
} pb_packed BlueEventInfoSystem_t;
|
|
226
226
|
|
|
227
|
-
typedef enum BlueEventInfoAccess {
|
|
227
|
+
typedef enum BlueEventInfoAccess {
|
|
228
228
|
BlueEventInfoAccess_Granted = 1,
|
|
229
229
|
BlueEventInfoAccess_GrantedDefaultTime = 2,
|
|
230
230
|
BlueEventInfoAccess_GrantedExtendedTime = 3,
|
|
@@ -234,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
|
|
|
234
234
|
BlueEventInfoAccess_DeniedBlacklisted = 130,
|
|
235
235
|
BlueEventInfoAccess_DeniedValidity = 131,
|
|
236
236
|
BlueEventInfoAccess_DeniedDTSchedule = 132
|
|
237
|
-
} BlueEventInfoAccess_t;
|
|
237
|
+
} pb_packed BlueEventInfoAccess_t;
|
|
238
238
|
|
|
239
239
|
typedef enum BlueOssCredentialTypeSource {
|
|
240
240
|
BlueOssCredentialTypeSource_Oss = 0,
|
|
241
241
|
BlueOssCredentialTypeSource_Proprietary = 1
|
|
242
|
-
} BlueOssCredentialTypeSource_t;
|
|
242
|
+
} pb_packed BlueOssCredentialTypeSource_t;
|
|
243
243
|
|
|
244
244
|
typedef enum BlueOssSoCredentialTypeOssCredential {
|
|
245
245
|
BlueOssSoCredentialTypeOssCredential_Standard = 0,
|
|
246
246
|
BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
|
|
247
|
-
} BlueOssSoCredentialTypeOssCredential_t;
|
|
247
|
+
} pb_packed BlueOssSoCredentialTypeOssCredential_t;
|
|
248
248
|
|
|
249
249
|
typedef enum BlueOssSoDoorInfoAccessBy {
|
|
250
250
|
BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
|
|
251
251
|
BlueOssSoDoorInfoAccessBy_DoorId = 1
|
|
252
|
-
} BlueOssSoDoorInfoAccessBy_t;
|
|
252
|
+
} pb_packed BlueOssSoDoorInfoAccessBy_t;
|
|
253
253
|
|
|
254
254
|
typedef enum BlueOssSoFileId {
|
|
255
255
|
BlueOssSoFileId_Info = 0,
|
|
@@ -257,7 +257,7 @@ typedef enum BlueOssSoFileId {
|
|
|
257
257
|
BlueOssSoFileId_Event = 2,
|
|
258
258
|
BlueOssSoFileId_Blacklist = 3,
|
|
259
259
|
BlueOssSoFileId_CustomerExtensions = 4
|
|
260
|
-
} BlueOssSoFileId_t;
|
|
260
|
+
} pb_packed BlueOssSoFileId_t;
|
|
261
261
|
|
|
262
262
|
/* Struct definitions */
|
|
263
263
|
typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
|
|
@@ -509,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
|
|
|
509
509
|
} BlueOssSoDTSchedule_t;
|
|
510
510
|
|
|
511
511
|
typedef struct BlueOssSoDoorInfo {
|
|
512
|
-
|
|
512
|
+
uint16_t id;
|
|
513
513
|
BlueOssSoDoorInfoAccessBy_t accessBy;
|
|
514
|
-
|
|
514
|
+
uint8_t dtScheduleNumber;
|
|
515
515
|
BlueAccessType_t accessType;
|
|
516
516
|
} BlueOssSoDoorInfo_t;
|
|
517
517
|
|
|
518
518
|
typedef struct BlueOssSoEvent {
|
|
519
519
|
BlueLocalTimestamp_t eventTime;
|
|
520
|
-
|
|
520
|
+
uint16_t doorId;
|
|
521
521
|
BlueEventId_t eventId;
|
|
522
522
|
/* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
|
|
523
523
|
If eventId = SystemEvent -> BlueEventInfoSystem
|
|
524
524
|
Otherwise unused */
|
|
525
|
-
|
|
525
|
+
uint8_t eventInfo;
|
|
526
526
|
} BlueOssSoEvent_t;
|
|
527
527
|
|
|
528
528
|
typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
|
|
@@ -1714,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
|
|
|
1714
1714
|
#define BLUEOSSSIDSETTINGS_SIZE 62
|
|
1715
1715
|
#define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
|
|
1716
1716
|
#define BLUEOSSSIDVERSION_SIZE 12
|
|
1717
|
-
#define BLUEOSSSOCONFIGURATION_SIZE
|
|
1717
|
+
#define BLUEOSSSOCONFIGURATION_SIZE 26018
|
|
1718
1718
|
#define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
|
|
1719
1719
|
#define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
|
|
1720
1720
|
#define BLUEOSSSOCREDENTIALTYPE_SIZE 17
|
|
1721
|
-
#define BLUEOSSSODOORINFO_SIZE
|
|
1721
|
+
#define BLUEOSSSODOORINFO_SIZE 11
|
|
1722
1722
|
#define BLUEOSSSODTSCHEDULEDAY_SIZE 70
|
|
1723
1723
|
#define BLUEOSSSODTSCHEDULE_SIZE 288
|
|
1724
|
-
#define BLUEOSSSOEVENT_SIZE
|
|
1724
|
+
#define BLUEOSSSOEVENT_SIZE 30
|
|
1725
1725
|
#define BLUEOSSSOEXTFEATURE_SIZE 72
|
|
1726
1726
|
#define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
|
|
1727
1727
|
#define BLUEOSSSOFILEBLACKLIST_SIZE 9435
|
|
1728
1728
|
#define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
|
|
1729
|
-
#define BLUEOSSSOFILEDATA_SIZE
|
|
1730
|
-
#define BLUEOSSSOFILEEVENT_SIZE
|
|
1729
|
+
#define BLUEOSSSOFILEDATA_SIZE 7721
|
|
1730
|
+
#define BLUEOSSSOFILEEVENT_SIZE 8174
|
|
1731
1731
|
#define BLUEOSSSOFILEINFO_SIZE 57
|
|
1732
1732
|
#define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
|
|
1733
1733
|
#define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
|
|
Binary file
|
|
@@ -116,7 +116,7 @@ typedef enum BlueTimeUnit {
|
|
|
116
116
|
BlueTimeUnit_Days = 4,
|
|
117
117
|
BlueTimeUnit_Months = 5,
|
|
118
118
|
BlueTimeUnit_Years = 6
|
|
119
|
-
} BlueTimeUnit_t;
|
|
119
|
+
} pb_packed BlueTimeUnit_t;
|
|
120
120
|
|
|
121
121
|
/* Those may never be changed */
|
|
122
122
|
typedef enum BlueWeekday {
|
|
@@ -127,7 +127,7 @@ typedef enum BlueWeekday {
|
|
|
127
127
|
BlueWeekday_Friday = 4,
|
|
128
128
|
BlueWeekday_Saturday = 5,
|
|
129
129
|
BlueWeekday_Sunday = 6
|
|
130
|
-
} BlueWeekday_t;
|
|
130
|
+
} pb_packed BlueWeekday_t;
|
|
131
131
|
|
|
132
132
|
typedef enum BlueCredentialType {
|
|
133
133
|
/* Regular credential can only open / enter */
|
|
@@ -138,7 +138,7 @@ typedef enum BlueCredentialType {
|
|
|
138
138
|
BlueCredentialType_Master = 3,
|
|
139
139
|
/* Nfc writer allows to write any credential within this site on cards & fobs */
|
|
140
140
|
BlueCredentialType_NfcWriter = 4
|
|
141
|
-
} BlueCredentialType_t;
|
|
141
|
+
} pb_packed BlueCredentialType_t;
|
|
142
142
|
|
|
143
143
|
typedef enum BlueAccessType {
|
|
144
144
|
/* Access with default unlock time */
|
|
@@ -157,13 +157,13 @@ typedef enum BlueAccessType {
|
|
|
157
157
|
BlueAccessType_NoAccessValidity = 7,
|
|
158
158
|
/* No access due blacklisted */
|
|
159
159
|
BlueAccessType_NoAccessBlacklisted = 8
|
|
160
|
-
} BlueAccessType_t;
|
|
160
|
+
} pb_packed BlueAccessType_t;
|
|
161
161
|
|
|
162
162
|
typedef enum BlueTransponderType {
|
|
163
163
|
BlueTransponderType_UnknownTransponder = 0,
|
|
164
164
|
BlueTransponderType_MobileTransponder = 1,
|
|
165
165
|
BlueTransponderType_MifareDesfire = 2
|
|
166
|
-
} BlueTransponderType_t;
|
|
166
|
+
} pb_packed BlueTransponderType_t;
|
|
167
167
|
|
|
168
168
|
typedef enum BlueHardwareType {
|
|
169
169
|
BlueHardwareType_UnknownHardware = 0,
|
|
@@ -173,7 +173,7 @@ typedef enum BlueHardwareType {
|
|
|
173
173
|
BlueHardwareType_DoorHandleLock = 4,
|
|
174
174
|
BlueHardwareType_WallReader = 5,
|
|
175
175
|
BlueHardwareType_Kiosk = 6
|
|
176
|
-
} BlueHardwareType_t;
|
|
176
|
+
} pb_packed BlueHardwareType_t;
|
|
177
177
|
|
|
178
178
|
typedef enum BlueBatteryLevel {
|
|
179
179
|
BlueBatteryLevel_UnknownBattery = 0,
|
|
@@ -185,9 +185,9 @@ typedef enum BlueBatteryLevel {
|
|
|
185
185
|
/* 0% (100) - 100% (200) */
|
|
186
186
|
BlueBatteryLevel_FullyDischarged = 100,
|
|
187
187
|
BlueBatteryLevel_FullyCharged = 200
|
|
188
|
-
} BlueBatteryLevel_t;
|
|
188
|
+
} pb_packed BlueBatteryLevel_t;
|
|
189
189
|
|
|
190
|
-
typedef enum BlueEventId {
|
|
190
|
+
typedef enum BlueEventId {
|
|
191
191
|
/* * eventInfo = 0 */
|
|
192
192
|
BlueEventId_BatteryLow = 1,
|
|
193
193
|
/* * eventInfo = 0 */
|
|
@@ -217,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
|
|
|
217
217
|
BlueEventId_TerminalCommand = 14,
|
|
218
218
|
/* * eventInfo = BlueReturnCode */
|
|
219
219
|
BlueEventId_TerminalOss = 15
|
|
220
|
-
} BlueEventId_t;
|
|
220
|
+
} pb_packed BlueEventId_t;
|
|
221
221
|
|
|
222
|
-
typedef enum BlueEventInfoSystem {
|
|
222
|
+
typedef enum BlueEventInfoSystem {
|
|
223
223
|
BlueEventInfoSystem_SystemRestart = 1,
|
|
224
224
|
BlueEventInfoSystem_SystemConfigured = 2
|
|
225
|
-
} BlueEventInfoSystem_t;
|
|
225
|
+
} pb_packed BlueEventInfoSystem_t;
|
|
226
226
|
|
|
227
|
-
typedef enum BlueEventInfoAccess {
|
|
227
|
+
typedef enum BlueEventInfoAccess {
|
|
228
228
|
BlueEventInfoAccess_Granted = 1,
|
|
229
229
|
BlueEventInfoAccess_GrantedDefaultTime = 2,
|
|
230
230
|
BlueEventInfoAccess_GrantedExtendedTime = 3,
|
|
@@ -234,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
|
|
|
234
234
|
BlueEventInfoAccess_DeniedBlacklisted = 130,
|
|
235
235
|
BlueEventInfoAccess_DeniedValidity = 131,
|
|
236
236
|
BlueEventInfoAccess_DeniedDTSchedule = 132
|
|
237
|
-
} BlueEventInfoAccess_t;
|
|
237
|
+
} pb_packed BlueEventInfoAccess_t;
|
|
238
238
|
|
|
239
239
|
typedef enum BlueOssCredentialTypeSource {
|
|
240
240
|
BlueOssCredentialTypeSource_Oss = 0,
|
|
241
241
|
BlueOssCredentialTypeSource_Proprietary = 1
|
|
242
|
-
} BlueOssCredentialTypeSource_t;
|
|
242
|
+
} pb_packed BlueOssCredentialTypeSource_t;
|
|
243
243
|
|
|
244
244
|
typedef enum BlueOssSoCredentialTypeOssCredential {
|
|
245
245
|
BlueOssSoCredentialTypeOssCredential_Standard = 0,
|
|
246
246
|
BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
|
|
247
|
-
} BlueOssSoCredentialTypeOssCredential_t;
|
|
247
|
+
} pb_packed BlueOssSoCredentialTypeOssCredential_t;
|
|
248
248
|
|
|
249
249
|
typedef enum BlueOssSoDoorInfoAccessBy {
|
|
250
250
|
BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
|
|
251
251
|
BlueOssSoDoorInfoAccessBy_DoorId = 1
|
|
252
|
-
} BlueOssSoDoorInfoAccessBy_t;
|
|
252
|
+
} pb_packed BlueOssSoDoorInfoAccessBy_t;
|
|
253
253
|
|
|
254
254
|
typedef enum BlueOssSoFileId {
|
|
255
255
|
BlueOssSoFileId_Info = 0,
|
|
@@ -257,7 +257,7 @@ typedef enum BlueOssSoFileId {
|
|
|
257
257
|
BlueOssSoFileId_Event = 2,
|
|
258
258
|
BlueOssSoFileId_Blacklist = 3,
|
|
259
259
|
BlueOssSoFileId_CustomerExtensions = 4
|
|
260
|
-
} BlueOssSoFileId_t;
|
|
260
|
+
} pb_packed BlueOssSoFileId_t;
|
|
261
261
|
|
|
262
262
|
/* Struct definitions */
|
|
263
263
|
typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
|
|
@@ -509,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
|
|
|
509
509
|
} BlueOssSoDTSchedule_t;
|
|
510
510
|
|
|
511
511
|
typedef struct BlueOssSoDoorInfo {
|
|
512
|
-
|
|
512
|
+
uint16_t id;
|
|
513
513
|
BlueOssSoDoorInfoAccessBy_t accessBy;
|
|
514
|
-
|
|
514
|
+
uint8_t dtScheduleNumber;
|
|
515
515
|
BlueAccessType_t accessType;
|
|
516
516
|
} BlueOssSoDoorInfo_t;
|
|
517
517
|
|
|
518
518
|
typedef struct BlueOssSoEvent {
|
|
519
519
|
BlueLocalTimestamp_t eventTime;
|
|
520
|
-
|
|
520
|
+
uint16_t doorId;
|
|
521
521
|
BlueEventId_t eventId;
|
|
522
522
|
/* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
|
|
523
523
|
If eventId = SystemEvent -> BlueEventInfoSystem
|
|
524
524
|
Otherwise unused */
|
|
525
|
-
|
|
525
|
+
uint8_t eventInfo;
|
|
526
526
|
} BlueOssSoEvent_t;
|
|
527
527
|
|
|
528
528
|
typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
|
|
@@ -1714,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
|
|
|
1714
1714
|
#define BLUEOSSSIDSETTINGS_SIZE 62
|
|
1715
1715
|
#define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
|
|
1716
1716
|
#define BLUEOSSSIDVERSION_SIZE 12
|
|
1717
|
-
#define BLUEOSSSOCONFIGURATION_SIZE
|
|
1717
|
+
#define BLUEOSSSOCONFIGURATION_SIZE 26018
|
|
1718
1718
|
#define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
|
|
1719
1719
|
#define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
|
|
1720
1720
|
#define BLUEOSSSOCREDENTIALTYPE_SIZE 17
|
|
1721
|
-
#define BLUEOSSSODOORINFO_SIZE
|
|
1721
|
+
#define BLUEOSSSODOORINFO_SIZE 11
|
|
1722
1722
|
#define BLUEOSSSODTSCHEDULEDAY_SIZE 70
|
|
1723
1723
|
#define BLUEOSSSODTSCHEDULE_SIZE 288
|
|
1724
|
-
#define BLUEOSSSOEVENT_SIZE
|
|
1724
|
+
#define BLUEOSSSOEVENT_SIZE 30
|
|
1725
1725
|
#define BLUEOSSSOEXTFEATURE_SIZE 72
|
|
1726
1726
|
#define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
|
|
1727
1727
|
#define BLUEOSSSOFILEBLACKLIST_SIZE 9435
|
|
1728
1728
|
#define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
|
|
1729
|
-
#define BLUEOSSSOFILEDATA_SIZE
|
|
1730
|
-
#define BLUEOSSSOFILEEVENT_SIZE
|
|
1729
|
+
#define BLUEOSSSOFILEDATA_SIZE 7721
|
|
1730
|
+
#define BLUEOSSSOFILEEVENT_SIZE 8174
|
|
1731
1731
|
#define BLUEOSSSOFILEINFO_SIZE 57
|
|
1732
1732
|
#define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
|
|
1733
1733
|
#define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
|
|
Binary file
|
|
@@ -116,7 +116,7 @@ typedef enum BlueTimeUnit {
|
|
|
116
116
|
BlueTimeUnit_Days = 4,
|
|
117
117
|
BlueTimeUnit_Months = 5,
|
|
118
118
|
BlueTimeUnit_Years = 6
|
|
119
|
-
} BlueTimeUnit_t;
|
|
119
|
+
} pb_packed BlueTimeUnit_t;
|
|
120
120
|
|
|
121
121
|
/* Those may never be changed */
|
|
122
122
|
typedef enum BlueWeekday {
|
|
@@ -127,7 +127,7 @@ typedef enum BlueWeekday {
|
|
|
127
127
|
BlueWeekday_Friday = 4,
|
|
128
128
|
BlueWeekday_Saturday = 5,
|
|
129
129
|
BlueWeekday_Sunday = 6
|
|
130
|
-
} BlueWeekday_t;
|
|
130
|
+
} pb_packed BlueWeekday_t;
|
|
131
131
|
|
|
132
132
|
typedef enum BlueCredentialType {
|
|
133
133
|
/* Regular credential can only open / enter */
|
|
@@ -138,7 +138,7 @@ typedef enum BlueCredentialType {
|
|
|
138
138
|
BlueCredentialType_Master = 3,
|
|
139
139
|
/* Nfc writer allows to write any credential within this site on cards & fobs */
|
|
140
140
|
BlueCredentialType_NfcWriter = 4
|
|
141
|
-
} BlueCredentialType_t;
|
|
141
|
+
} pb_packed BlueCredentialType_t;
|
|
142
142
|
|
|
143
143
|
typedef enum BlueAccessType {
|
|
144
144
|
/* Access with default unlock time */
|
|
@@ -157,13 +157,13 @@ typedef enum BlueAccessType {
|
|
|
157
157
|
BlueAccessType_NoAccessValidity = 7,
|
|
158
158
|
/* No access due blacklisted */
|
|
159
159
|
BlueAccessType_NoAccessBlacklisted = 8
|
|
160
|
-
} BlueAccessType_t;
|
|
160
|
+
} pb_packed BlueAccessType_t;
|
|
161
161
|
|
|
162
162
|
typedef enum BlueTransponderType {
|
|
163
163
|
BlueTransponderType_UnknownTransponder = 0,
|
|
164
164
|
BlueTransponderType_MobileTransponder = 1,
|
|
165
165
|
BlueTransponderType_MifareDesfire = 2
|
|
166
|
-
} BlueTransponderType_t;
|
|
166
|
+
} pb_packed BlueTransponderType_t;
|
|
167
167
|
|
|
168
168
|
typedef enum BlueHardwareType {
|
|
169
169
|
BlueHardwareType_UnknownHardware = 0,
|
|
@@ -173,7 +173,7 @@ typedef enum BlueHardwareType {
|
|
|
173
173
|
BlueHardwareType_DoorHandleLock = 4,
|
|
174
174
|
BlueHardwareType_WallReader = 5,
|
|
175
175
|
BlueHardwareType_Kiosk = 6
|
|
176
|
-
} BlueHardwareType_t;
|
|
176
|
+
} pb_packed BlueHardwareType_t;
|
|
177
177
|
|
|
178
178
|
typedef enum BlueBatteryLevel {
|
|
179
179
|
BlueBatteryLevel_UnknownBattery = 0,
|
|
@@ -185,9 +185,9 @@ typedef enum BlueBatteryLevel {
|
|
|
185
185
|
/* 0% (100) - 100% (200) */
|
|
186
186
|
BlueBatteryLevel_FullyDischarged = 100,
|
|
187
187
|
BlueBatteryLevel_FullyCharged = 200
|
|
188
|
-
} BlueBatteryLevel_t;
|
|
188
|
+
} pb_packed BlueBatteryLevel_t;
|
|
189
189
|
|
|
190
|
-
typedef enum BlueEventId {
|
|
190
|
+
typedef enum BlueEventId {
|
|
191
191
|
/* * eventInfo = 0 */
|
|
192
192
|
BlueEventId_BatteryLow = 1,
|
|
193
193
|
/* * eventInfo = 0 */
|
|
@@ -217,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
|
|
|
217
217
|
BlueEventId_TerminalCommand = 14,
|
|
218
218
|
/* * eventInfo = BlueReturnCode */
|
|
219
219
|
BlueEventId_TerminalOss = 15
|
|
220
|
-
} BlueEventId_t;
|
|
220
|
+
} pb_packed BlueEventId_t;
|
|
221
221
|
|
|
222
|
-
typedef enum BlueEventInfoSystem {
|
|
222
|
+
typedef enum BlueEventInfoSystem {
|
|
223
223
|
BlueEventInfoSystem_SystemRestart = 1,
|
|
224
224
|
BlueEventInfoSystem_SystemConfigured = 2
|
|
225
|
-
} BlueEventInfoSystem_t;
|
|
225
|
+
} pb_packed BlueEventInfoSystem_t;
|
|
226
226
|
|
|
227
|
-
typedef enum BlueEventInfoAccess {
|
|
227
|
+
typedef enum BlueEventInfoAccess {
|
|
228
228
|
BlueEventInfoAccess_Granted = 1,
|
|
229
229
|
BlueEventInfoAccess_GrantedDefaultTime = 2,
|
|
230
230
|
BlueEventInfoAccess_GrantedExtendedTime = 3,
|
|
@@ -234,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
|
|
|
234
234
|
BlueEventInfoAccess_DeniedBlacklisted = 130,
|
|
235
235
|
BlueEventInfoAccess_DeniedValidity = 131,
|
|
236
236
|
BlueEventInfoAccess_DeniedDTSchedule = 132
|
|
237
|
-
} BlueEventInfoAccess_t;
|
|
237
|
+
} pb_packed BlueEventInfoAccess_t;
|
|
238
238
|
|
|
239
239
|
typedef enum BlueOssCredentialTypeSource {
|
|
240
240
|
BlueOssCredentialTypeSource_Oss = 0,
|
|
241
241
|
BlueOssCredentialTypeSource_Proprietary = 1
|
|
242
|
-
} BlueOssCredentialTypeSource_t;
|
|
242
|
+
} pb_packed BlueOssCredentialTypeSource_t;
|
|
243
243
|
|
|
244
244
|
typedef enum BlueOssSoCredentialTypeOssCredential {
|
|
245
245
|
BlueOssSoCredentialTypeOssCredential_Standard = 0,
|
|
246
246
|
BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
|
|
247
|
-
} BlueOssSoCredentialTypeOssCredential_t;
|
|
247
|
+
} pb_packed BlueOssSoCredentialTypeOssCredential_t;
|
|
248
248
|
|
|
249
249
|
typedef enum BlueOssSoDoorInfoAccessBy {
|
|
250
250
|
BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
|
|
251
251
|
BlueOssSoDoorInfoAccessBy_DoorId = 1
|
|
252
|
-
} BlueOssSoDoorInfoAccessBy_t;
|
|
252
|
+
} pb_packed BlueOssSoDoorInfoAccessBy_t;
|
|
253
253
|
|
|
254
254
|
typedef enum BlueOssSoFileId {
|
|
255
255
|
BlueOssSoFileId_Info = 0,
|
|
@@ -257,7 +257,7 @@ typedef enum BlueOssSoFileId {
|
|
|
257
257
|
BlueOssSoFileId_Event = 2,
|
|
258
258
|
BlueOssSoFileId_Blacklist = 3,
|
|
259
259
|
BlueOssSoFileId_CustomerExtensions = 4
|
|
260
|
-
} BlueOssSoFileId_t;
|
|
260
|
+
} pb_packed BlueOssSoFileId_t;
|
|
261
261
|
|
|
262
262
|
/* Struct definitions */
|
|
263
263
|
typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
|
|
@@ -509,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
|
|
|
509
509
|
} BlueOssSoDTSchedule_t;
|
|
510
510
|
|
|
511
511
|
typedef struct BlueOssSoDoorInfo {
|
|
512
|
-
|
|
512
|
+
uint16_t id;
|
|
513
513
|
BlueOssSoDoorInfoAccessBy_t accessBy;
|
|
514
|
-
|
|
514
|
+
uint8_t dtScheduleNumber;
|
|
515
515
|
BlueAccessType_t accessType;
|
|
516
516
|
} BlueOssSoDoorInfo_t;
|
|
517
517
|
|
|
518
518
|
typedef struct BlueOssSoEvent {
|
|
519
519
|
BlueLocalTimestamp_t eventTime;
|
|
520
|
-
|
|
520
|
+
uint16_t doorId;
|
|
521
521
|
BlueEventId_t eventId;
|
|
522
522
|
/* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
|
|
523
523
|
If eventId = SystemEvent -> BlueEventInfoSystem
|
|
524
524
|
Otherwise unused */
|
|
525
|
-
|
|
525
|
+
uint8_t eventInfo;
|
|
526
526
|
} BlueOssSoEvent_t;
|
|
527
527
|
|
|
528
528
|
typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
|
|
@@ -1714,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
|
|
|
1714
1714
|
#define BLUEOSSSIDSETTINGS_SIZE 62
|
|
1715
1715
|
#define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
|
|
1716
1716
|
#define BLUEOSSSIDVERSION_SIZE 12
|
|
1717
|
-
#define BLUEOSSSOCONFIGURATION_SIZE
|
|
1717
|
+
#define BLUEOSSSOCONFIGURATION_SIZE 26018
|
|
1718
1718
|
#define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
|
|
1719
1719
|
#define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
|
|
1720
1720
|
#define BLUEOSSSOCREDENTIALTYPE_SIZE 17
|
|
1721
|
-
#define BLUEOSSSODOORINFO_SIZE
|
|
1721
|
+
#define BLUEOSSSODOORINFO_SIZE 11
|
|
1722
1722
|
#define BLUEOSSSODTSCHEDULEDAY_SIZE 70
|
|
1723
1723
|
#define BLUEOSSSODTSCHEDULE_SIZE 288
|
|
1724
|
-
#define BLUEOSSSOEVENT_SIZE
|
|
1724
|
+
#define BLUEOSSSOEVENT_SIZE 30
|
|
1725
1725
|
#define BLUEOSSSOEXTFEATURE_SIZE 72
|
|
1726
1726
|
#define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
|
|
1727
1727
|
#define BLUEOSSSOFILEBLACKLIST_SIZE 9435
|
|
1728
1728
|
#define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
|
|
1729
|
-
#define BLUEOSSSOFILEDATA_SIZE
|
|
1730
|
-
#define BLUEOSSSOFILEEVENT_SIZE
|
|
1729
|
+
#define BLUEOSSSOFILEDATA_SIZE 7721
|
|
1730
|
+
#define BLUEOSSSOFILEEVENT_SIZE 8174
|
|
1731
1731
|
#define BLUEOSSSOFILEINFO_SIZE 57
|
|
1732
1732
|
#define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
|
|
1733
1733
|
#define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
|
|
Binary file
|
|
@@ -40,16 +40,23 @@ internal struct BlueAccessAPIHelper {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// Before issuing a new token, we should always delete the current one.
|
|
44
|
+
// Whenever we issue a new token, the backend purges any other tokens.
|
|
45
|
+
// So, in case we are not able to store the token in the keychain, we won't end up having a nonexistent token for upcoming requests.
|
|
46
|
+
_ = try blueAccessAuthenticationTokensKeyChain.deleteEntry(id: credential.credentialID.id)
|
|
47
|
+
|
|
43
48
|
let accessToken: BlueAccessToken = try await self.blueAPI.getAccessToken(credentialId: credential.credentialID.id).getData()
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
storeAccessToken(credential: credential, accessToken: accessToken)
|
|
46
51
|
|
|
47
52
|
return accessToken
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
private func storeAccessToken(credential: BlueAccessCredential, accessToken: BlueAccessToken) {
|
|
51
56
|
do {
|
|
52
|
-
try
|
|
57
|
+
try blueAccessAuthenticationTokensKeyChain.storeCodableEntry(id: credential.credentialID.id, data: accessToken)
|
|
58
|
+
} catch {
|
|
59
|
+
blueLogError(error.localizedDescription)
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
62
|
}
|
|
@@ -131,7 +131,7 @@ internal class BlueSynchronizeMobileAccessCommand: BlueAbstractSynchronizeAccess
|
|
|
131
131
|
updatedCredential.validity = BlueLocalTimestamp(Date(timeIntervalSince1970: TimeInterval(validity/1000)))
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
try blueAccessCredentialsKeyChain.
|
|
134
|
+
try blueAccessCredentialsKeyChain.updateEntry(id: updatedCredential.credentialID.id, data: updatedCredential.jsonUTF8Data())
|
|
135
135
|
|
|
136
136
|
let deviceList = synchronizationResult.getAccessDeviceList()
|
|
137
137
|
try blueAccessDevicesStorage.storeEntry(id: credential.credentialID.id, data: deviceList.jsonUTF8Data())
|
|
@@ -688,7 +688,6 @@ extension BlueBatteryLevel: CaseIterable {
|
|
|
688
688
|
|
|
689
689
|
#endif // swift(>=4.2)
|
|
690
690
|
|
|
691
|
-
/// Oss So events --
|
|
692
691
|
public enum BlueEventId: SwiftProtobuf.Enum {
|
|
693
692
|
public typealias RawValue = Int
|
|
694
693
|
|
|
@@ -790,7 +789,6 @@ extension BlueEventId: CaseIterable {
|
|
|
790
789
|
|
|
791
790
|
#endif // swift(>=4.2)
|
|
792
791
|
|
|
793
|
-
/// Oss So events --
|
|
794
792
|
public enum BlueEventInfoSystem: SwiftProtobuf.Enum {
|
|
795
793
|
public typealias RawValue = Int
|
|
796
794
|
case systemRestart // = 1
|
|
@@ -825,7 +823,6 @@ extension BlueEventInfoSystem: CaseIterable {
|
|
|
825
823
|
|
|
826
824
|
#endif // swift(>=4.2)
|
|
827
825
|
|
|
828
|
-
/// Oss So events --
|
|
829
826
|
public enum BlueEventInfoAccess: SwiftProtobuf.Enum {
|
|
830
827
|
public typealias RawValue = Int
|
|
831
828
|
case granted // = 1
|
|
@@ -33,6 +33,22 @@ internal class BlueKeychain {
|
|
|
33
33
|
return nil
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/// Updates an entry with the specified ID using the provided data without purging it beforehand.
|
|
37
|
+
/// If the entry does not exist, a new one is created.
|
|
38
|
+
///
|
|
39
|
+
/// - parameter id: The ID of the entry to be updated.
|
|
40
|
+
/// - parameter data: The data to update the entry with.
|
|
41
|
+
/// - throws: Throws an error of type `BlueError(.invalidState)` in case the operation does not succeed.
|
|
42
|
+
func updateEntry(id: String, data: Data) throws {
|
|
43
|
+
return try BlueKeychain.storeEntry(attrService: attrService, attrAccessible: attrAccessible, id: id, data: data, purge: false)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// Stores an entry with the specified ID using the provided data.
|
|
47
|
+
/// If the entry already exists, it is first purged.
|
|
48
|
+
///
|
|
49
|
+
/// - parameter id: The ID of the entry to be updated.
|
|
50
|
+
/// - parameter data: The data to update the entry with.
|
|
51
|
+
/// - throws: Throws an error of type `BlueError(.invalidState)` in case the operation does not succeed.
|
|
36
52
|
func storeEntry(id: String, data: Data) throws {
|
|
37
53
|
return try BlueKeychain.storeEntry(attrService: attrService, attrAccessible: attrAccessible, id: id, data: data)
|
|
38
54
|
}
|
|
@@ -138,7 +154,7 @@ internal class BlueKeychain {
|
|
|
138
154
|
return try entryIds.compactMap{ try getEntry(attrService: attrService, attrAccessible: attrAccessible, id: $0) }
|
|
139
155
|
}
|
|
140
156
|
|
|
141
|
-
static func storeEntry(attrService: String, attrAccessible: String, id: String, data: Data) throws {
|
|
157
|
+
static func storeEntry(attrService: String, attrAccessible: String, id: String, data: Data, purge: Bool? = true) throws {
|
|
142
158
|
let query: [String: Any] = [
|
|
143
159
|
kSecClass as String: kSecClassGenericPassword,
|
|
144
160
|
kSecAttrService as String: attrService,
|
|
@@ -147,7 +163,9 @@ internal class BlueKeychain {
|
|
|
147
163
|
kSecValueData as String: data,
|
|
148
164
|
]
|
|
149
165
|
|
|
150
|
-
|
|
166
|
+
if (purge != false) {
|
|
167
|
+
SecItemDelete(query as CFDictionary)
|
|
168
|
+
}
|
|
151
169
|
|
|
152
170
|
let status = SecItemUpdate(query as CFDictionary, [kSecValueData as String: data] as CFDictionary)
|
|
153
171
|
|