@blueid/access-proto 0.23.0 → 0.24.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/BlueCore.proto +11 -0
- package/BlueSDK.proto +21 -0
- package/cjs/BlueCore_pb.d.ts +33 -0
- package/cjs/BlueCore_pb.js +10 -0
- package/cjs/BlueSDK_pb.d.ts +98 -1
- package/cjs/BlueSDK_pb.js +38 -0
- package/es/BlueCore_pb.d.ts +33 -0
- package/es/BlueCore_pb.js +13 -0
- package/es/BlueSDK_pb.d.ts +98 -1
- package/es/BlueSDK_pb.js +36 -1
- package/nanopb/BlueCore.pb.c +1 -0
- package/nanopb/BlueCore.pb.h +15 -0
- package/nanopb/BlueSDK.pb.c +9 -0
- package/nanopb/BlueSDK.pb.h +70 -0
- package/package.json +1 -1
- package/swift/BlueCore.pb.swift +58 -0
- package/swift/BlueSDK.pb.swift +261 -0
package/BlueCore.proto
CHANGED
|
@@ -231,6 +231,17 @@ message BlueCredentialId {
|
|
|
231
231
|
required string id = 1 [ (nanopb).max_length = 10 ];
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
enum BlueCredentialType {
|
|
235
|
+
/* Regular credential can only open / enter */
|
|
236
|
+
Regular = 1;
|
|
237
|
+
/* Maintenance can open and update all locks within the site */
|
|
238
|
+
Maintenance = 2;
|
|
239
|
+
/* Master can open all locks within the given site and requires no refresh */
|
|
240
|
+
Master = 3;
|
|
241
|
+
/* Nfc writer allows to write any credential within this site on cards & fobs */
|
|
242
|
+
NfcWriter = 4;
|
|
243
|
+
}
|
|
244
|
+
|
|
234
245
|
message BlueBlacklistEntry {
|
|
235
246
|
required BlueCredentialId credentialId = 1;
|
|
236
247
|
required BlueLocalTimestamp expiresAt = 2;
|
package/BlueSDK.proto
CHANGED
|
@@ -53,4 +53,25 @@ message BlueDeviceInfo {
|
|
|
53
53
|
BlueDeviceDetailsBluetooth bluetooth = 5;
|
|
54
54
|
BlueDeviceDetailsUWB uwb = 6;
|
|
55
55
|
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
///////////////////////////////////////////////////////////////////////
|
|
59
|
+
// Credential
|
|
60
|
+
///////////////////////////////////////////////////////////////////////
|
|
61
|
+
|
|
62
|
+
message BlueAccessCredential {
|
|
63
|
+
required BlueCredentialId credentialId = 1;
|
|
64
|
+
required BlueCredentialType credentialType = 2;
|
|
65
|
+
optional BlueLocalTimestamp validFrom = 3;
|
|
66
|
+
optional BlueLocalTimestamp validTo = 4;
|
|
67
|
+
required bytes privateKey = 5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message BlueAccessDevice {
|
|
71
|
+
required string deviceId = 1;
|
|
72
|
+
optional string name = 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message BlueAccessDeviceList {
|
|
76
|
+
repeated BlueAccessDevice devices = 1;
|
|
56
77
|
}
|
package/cjs/BlueCore_pb.d.ts
CHANGED
|
@@ -479,6 +479,39 @@ export declare enum BlueWeekday {
|
|
|
479
479
|
Sunday = 6,
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* @generated from enum BlueCredentialType
|
|
484
|
+
*/
|
|
485
|
+
export declare enum BlueCredentialType {
|
|
486
|
+
/**
|
|
487
|
+
* Regular credential can only open / enter
|
|
488
|
+
*
|
|
489
|
+
* @generated from enum value: Regular = 1;
|
|
490
|
+
*/
|
|
491
|
+
Regular = 1,
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Maintenance can open and update all locks within the site
|
|
495
|
+
*
|
|
496
|
+
* @generated from enum value: Maintenance = 2;
|
|
497
|
+
*/
|
|
498
|
+
Maintenance = 2,
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Master can open all locks within the given site and requires no refresh
|
|
502
|
+
*
|
|
503
|
+
* @generated from enum value: Master = 3;
|
|
504
|
+
*/
|
|
505
|
+
Master = 3,
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Nfc writer allows to write any credential within this site on cards & fobs
|
|
509
|
+
*
|
|
510
|
+
* @generated from enum value: NfcWriter = 4;
|
|
511
|
+
*/
|
|
512
|
+
NfcWriter = 4,
|
|
513
|
+
}
|
|
514
|
+
|
|
482
515
|
/**
|
|
483
516
|
* @generated from enum BlueAccessType
|
|
484
517
|
*/
|
package/cjs/BlueCore_pb.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(BlueCore_pb_exports, {
|
|
|
23
23
|
BlueBleAdvertisementInfo: () => BlueBleAdvertisementInfo,
|
|
24
24
|
BlueBleManufacturerInfo: () => BlueBleManufacturerInfo,
|
|
25
25
|
BlueCredentialId: () => BlueCredentialId,
|
|
26
|
+
BlueCredentialType: () => BlueCredentialType,
|
|
26
27
|
BlueEvent: () => BlueEvent,
|
|
27
28
|
BlueEventId: () => BlueEventId,
|
|
28
29
|
BlueEventInfoAccess: () => BlueEventInfoAccess,
|
|
@@ -192,6 +193,15 @@ const BlueWeekday = import_protobuf.proto2.makeEnum(
|
|
|
192
193
|
{ no: 6, name: "Sunday" }
|
|
193
194
|
]
|
|
194
195
|
);
|
|
196
|
+
const BlueCredentialType = import_protobuf.proto2.makeEnum(
|
|
197
|
+
"BlueCredentialType",
|
|
198
|
+
[
|
|
199
|
+
{ no: 1, name: "Regular" },
|
|
200
|
+
{ no: 2, name: "Maintenance" },
|
|
201
|
+
{ no: 3, name: "Master" },
|
|
202
|
+
{ no: 4, name: "NfcWriter" }
|
|
203
|
+
]
|
|
204
|
+
);
|
|
195
205
|
const BlueAccessType = import_protobuf.proto2.makeEnum(
|
|
196
206
|
"BlueAccessType",
|
|
197
207
|
[
|
package/cjs/BlueSDK_pb.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
7
|
import { Message, proto2 } from "@bufbuild/protobuf";
|
|
8
|
-
import type { BlueBleManufacturerInfo } from "./BlueCore_pb.js";
|
|
8
|
+
import type { BlueBleManufacturerInfo, BlueCredentialId, BlueCredentialType, BlueLocalTimestamp } from "./BlueCore_pb.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @generated from enum BlueDeviceType
|
|
@@ -195,3 +195,100 @@ export declare class BlueDeviceInfo extends Message<BlueDeviceInfo> {
|
|
|
195
195
|
static equals(a: BlueDeviceInfo | PlainMessage<BlueDeviceInfo> | undefined, b: BlueDeviceInfo | PlainMessage<BlueDeviceInfo> | undefined): boolean;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* @generated from message BlueAccessCredential
|
|
200
|
+
*/
|
|
201
|
+
export declare class BlueAccessCredential extends Message<BlueAccessCredential> {
|
|
202
|
+
/**
|
|
203
|
+
* @generated from field: required BlueCredentialId credentialId = 1;
|
|
204
|
+
*/
|
|
205
|
+
credentialId?: BlueCredentialId;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @generated from field: required BlueCredentialType credentialType = 2;
|
|
209
|
+
*/
|
|
210
|
+
credentialType: BlueCredentialType;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @generated from field: optional BlueLocalTimestamp validFrom = 3;
|
|
214
|
+
*/
|
|
215
|
+
validFrom?: BlueLocalTimestamp;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @generated from field: optional BlueLocalTimestamp validTo = 4;
|
|
219
|
+
*/
|
|
220
|
+
validTo?: BlueLocalTimestamp;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @generated from field: required bytes privateKey = 5;
|
|
224
|
+
*/
|
|
225
|
+
privateKey: Uint8Array;
|
|
226
|
+
|
|
227
|
+
constructor(data?: PartialMessage<BlueAccessCredential>);
|
|
228
|
+
|
|
229
|
+
static readonly runtime: typeof proto2;
|
|
230
|
+
static readonly typeName = "BlueAccessCredential";
|
|
231
|
+
static readonly fields: FieldList;
|
|
232
|
+
|
|
233
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessCredential;
|
|
234
|
+
|
|
235
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessCredential;
|
|
236
|
+
|
|
237
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessCredential;
|
|
238
|
+
|
|
239
|
+
static equals(a: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined, b: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined): boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @generated from message BlueAccessDevice
|
|
244
|
+
*/
|
|
245
|
+
export declare class BlueAccessDevice extends Message<BlueAccessDevice> {
|
|
246
|
+
/**
|
|
247
|
+
* @generated from field: required string deviceId = 1;
|
|
248
|
+
*/
|
|
249
|
+
deviceId: string;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @generated from field: optional string name = 2;
|
|
253
|
+
*/
|
|
254
|
+
name?: string;
|
|
255
|
+
|
|
256
|
+
constructor(data?: PartialMessage<BlueAccessDevice>);
|
|
257
|
+
|
|
258
|
+
static readonly runtime: typeof proto2;
|
|
259
|
+
static readonly typeName = "BlueAccessDevice";
|
|
260
|
+
static readonly fields: FieldList;
|
|
261
|
+
|
|
262
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessDevice;
|
|
263
|
+
|
|
264
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessDevice;
|
|
265
|
+
|
|
266
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessDevice;
|
|
267
|
+
|
|
268
|
+
static equals(a: BlueAccessDevice | PlainMessage<BlueAccessDevice> | undefined, b: BlueAccessDevice | PlainMessage<BlueAccessDevice> | undefined): boolean;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @generated from message BlueAccessDeviceList
|
|
273
|
+
*/
|
|
274
|
+
export declare class BlueAccessDeviceList extends Message<BlueAccessDeviceList> {
|
|
275
|
+
/**
|
|
276
|
+
* @generated from field: repeated BlueAccessDevice devices = 1;
|
|
277
|
+
*/
|
|
278
|
+
devices: BlueAccessDevice[];
|
|
279
|
+
|
|
280
|
+
constructor(data?: PartialMessage<BlueAccessDeviceList>);
|
|
281
|
+
|
|
282
|
+
static readonly runtime: typeof proto2;
|
|
283
|
+
static readonly typeName = "BlueAccessDeviceList";
|
|
284
|
+
static readonly fields: FieldList;
|
|
285
|
+
|
|
286
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessDeviceList;
|
|
287
|
+
|
|
288
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessDeviceList;
|
|
289
|
+
|
|
290
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessDeviceList;
|
|
291
|
+
|
|
292
|
+
static equals(a: BlueAccessDeviceList | PlainMessage<BlueAccessDeviceList> | undefined, b: BlueAccessDeviceList | PlainMessage<BlueAccessDeviceList> | undefined): boolean;
|
|
293
|
+
}
|
|
294
|
+
|
package/cjs/BlueSDK_pb.js
CHANGED
|
@@ -17,6 +17,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var BlueSDK_pb_exports = {};
|
|
19
19
|
__export(BlueSDK_pb_exports, {
|
|
20
|
+
BlueAccessCredential: () => BlueAccessCredential,
|
|
21
|
+
BlueAccessDevice: () => BlueAccessDevice,
|
|
22
|
+
BlueAccessDeviceList: () => BlueAccessDeviceList,
|
|
20
23
|
BlueDeviceDetailsBluetooth: () => BlueDeviceDetailsBluetooth,
|
|
21
24
|
BlueDeviceDetailsUWB: () => BlueDeviceDetailsUWB,
|
|
22
25
|
BlueDeviceInfo: () => BlueDeviceInfo,
|
|
@@ -107,3 +110,38 @@ const BlueDeviceInfo = import_protobuf.proto2.makeMessageType(
|
|
|
107
110
|
{ no: 6, name: "uwb", kind: "message", T: BlueDeviceDetailsUWB, oneof: "details" }
|
|
108
111
|
]
|
|
109
112
|
);
|
|
113
|
+
const BlueAccessCredential = import_protobuf.proto2.makeMessageType(
|
|
114
|
+
"BlueAccessCredential",
|
|
115
|
+
() => [
|
|
116
|
+
{ no: 1, name: "credentialId", kind: "message", T: import_BlueCore_pb.BlueCredentialId },
|
|
117
|
+
{ no: 2, name: "credentialType", kind: "enum", T: import_protobuf.proto2.getEnumType(import_BlueCore_pb.BlueCredentialType) },
|
|
118
|
+
{ no: 3, name: "validFrom", kind: "message", T: import_BlueCore_pb.BlueLocalTimestamp, opt: true },
|
|
119
|
+
{ no: 4, name: "validTo", kind: "message", T: import_BlueCore_pb.BlueLocalTimestamp, opt: true },
|
|
120
|
+
{
|
|
121
|
+
no: 5,
|
|
122
|
+
name: "privateKey",
|
|
123
|
+
kind: "scalar",
|
|
124
|
+
T: 12
|
|
125
|
+
/* ScalarType.BYTES */
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
);
|
|
129
|
+
const BlueAccessDevice = import_protobuf.proto2.makeMessageType(
|
|
130
|
+
"BlueAccessDevice",
|
|
131
|
+
() => [
|
|
132
|
+
{
|
|
133
|
+
no: 1,
|
|
134
|
+
name: "deviceId",
|
|
135
|
+
kind: "scalar",
|
|
136
|
+
T: 9
|
|
137
|
+
/* ScalarType.STRING */
|
|
138
|
+
},
|
|
139
|
+
{ no: 2, name: "name", kind: "scalar", T: 9, opt: true }
|
|
140
|
+
]
|
|
141
|
+
);
|
|
142
|
+
const BlueAccessDeviceList = import_protobuf.proto2.makeMessageType(
|
|
143
|
+
"BlueAccessDeviceList",
|
|
144
|
+
() => [
|
|
145
|
+
{ no: 1, name: "devices", kind: "message", T: BlueAccessDevice, repeated: true }
|
|
146
|
+
]
|
|
147
|
+
);
|
package/es/BlueCore_pb.d.ts
CHANGED
|
@@ -479,6 +479,39 @@ export declare enum BlueWeekday {
|
|
|
479
479
|
Sunday = 6,
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* @generated from enum BlueCredentialType
|
|
484
|
+
*/
|
|
485
|
+
export declare enum BlueCredentialType {
|
|
486
|
+
/**
|
|
487
|
+
* Regular credential can only open / enter
|
|
488
|
+
*
|
|
489
|
+
* @generated from enum value: Regular = 1;
|
|
490
|
+
*/
|
|
491
|
+
Regular = 1,
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Maintenance can open and update all locks within the site
|
|
495
|
+
*
|
|
496
|
+
* @generated from enum value: Maintenance = 2;
|
|
497
|
+
*/
|
|
498
|
+
Maintenance = 2,
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Master can open all locks within the given site and requires no refresh
|
|
502
|
+
*
|
|
503
|
+
* @generated from enum value: Master = 3;
|
|
504
|
+
*/
|
|
505
|
+
Master = 3,
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Nfc writer allows to write any credential within this site on cards & fobs
|
|
509
|
+
*
|
|
510
|
+
* @generated from enum value: NfcWriter = 4;
|
|
511
|
+
*/
|
|
512
|
+
NfcWriter = 4,
|
|
513
|
+
}
|
|
514
|
+
|
|
482
515
|
/**
|
|
483
516
|
* @generated from enum BlueAccessType
|
|
484
517
|
*/
|
package/es/BlueCore_pb.js
CHANGED
|
@@ -122,6 +122,19 @@ export const BlueWeekday = proto2.makeEnum(
|
|
|
122
122
|
],
|
|
123
123
|
);
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @generated from enum BlueCredentialType
|
|
127
|
+
*/
|
|
128
|
+
export const BlueCredentialType = proto2.makeEnum(
|
|
129
|
+
"BlueCredentialType",
|
|
130
|
+
[
|
|
131
|
+
{no: 1, name: "Regular"},
|
|
132
|
+
{no: 2, name: "Maintenance"},
|
|
133
|
+
{no: 3, name: "Master"},
|
|
134
|
+
{no: 4, name: "NfcWriter"},
|
|
135
|
+
],
|
|
136
|
+
);
|
|
137
|
+
|
|
125
138
|
/**
|
|
126
139
|
* @generated from enum BlueAccessType
|
|
127
140
|
*/
|
package/es/BlueSDK_pb.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
7
|
import { Message, proto2 } from "@bufbuild/protobuf";
|
|
8
|
-
import type { BlueBleManufacturerInfo } from "./BlueCore_pb.js";
|
|
8
|
+
import type { BlueBleManufacturerInfo, BlueCredentialId, BlueCredentialType, BlueLocalTimestamp } from "./BlueCore_pb.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @generated from enum BlueDeviceType
|
|
@@ -195,3 +195,100 @@ export declare class BlueDeviceInfo extends Message<BlueDeviceInfo> {
|
|
|
195
195
|
static equals(a: BlueDeviceInfo | PlainMessage<BlueDeviceInfo> | undefined, b: BlueDeviceInfo | PlainMessage<BlueDeviceInfo> | undefined): boolean;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* @generated from message BlueAccessCredential
|
|
200
|
+
*/
|
|
201
|
+
export declare class BlueAccessCredential extends Message<BlueAccessCredential> {
|
|
202
|
+
/**
|
|
203
|
+
* @generated from field: required BlueCredentialId credentialId = 1;
|
|
204
|
+
*/
|
|
205
|
+
credentialId?: BlueCredentialId;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @generated from field: required BlueCredentialType credentialType = 2;
|
|
209
|
+
*/
|
|
210
|
+
credentialType: BlueCredentialType;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @generated from field: optional BlueLocalTimestamp validFrom = 3;
|
|
214
|
+
*/
|
|
215
|
+
validFrom?: BlueLocalTimestamp;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @generated from field: optional BlueLocalTimestamp validTo = 4;
|
|
219
|
+
*/
|
|
220
|
+
validTo?: BlueLocalTimestamp;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @generated from field: required bytes privateKey = 5;
|
|
224
|
+
*/
|
|
225
|
+
privateKey: Uint8Array;
|
|
226
|
+
|
|
227
|
+
constructor(data?: PartialMessage<BlueAccessCredential>);
|
|
228
|
+
|
|
229
|
+
static readonly runtime: typeof proto2;
|
|
230
|
+
static readonly typeName = "BlueAccessCredential";
|
|
231
|
+
static readonly fields: FieldList;
|
|
232
|
+
|
|
233
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessCredential;
|
|
234
|
+
|
|
235
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessCredential;
|
|
236
|
+
|
|
237
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessCredential;
|
|
238
|
+
|
|
239
|
+
static equals(a: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined, b: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined): boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @generated from message BlueAccessDevice
|
|
244
|
+
*/
|
|
245
|
+
export declare class BlueAccessDevice extends Message<BlueAccessDevice> {
|
|
246
|
+
/**
|
|
247
|
+
* @generated from field: required string deviceId = 1;
|
|
248
|
+
*/
|
|
249
|
+
deviceId: string;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @generated from field: optional string name = 2;
|
|
253
|
+
*/
|
|
254
|
+
name?: string;
|
|
255
|
+
|
|
256
|
+
constructor(data?: PartialMessage<BlueAccessDevice>);
|
|
257
|
+
|
|
258
|
+
static readonly runtime: typeof proto2;
|
|
259
|
+
static readonly typeName = "BlueAccessDevice";
|
|
260
|
+
static readonly fields: FieldList;
|
|
261
|
+
|
|
262
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessDevice;
|
|
263
|
+
|
|
264
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessDevice;
|
|
265
|
+
|
|
266
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessDevice;
|
|
267
|
+
|
|
268
|
+
static equals(a: BlueAccessDevice | PlainMessage<BlueAccessDevice> | undefined, b: BlueAccessDevice | PlainMessage<BlueAccessDevice> | undefined): boolean;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @generated from message BlueAccessDeviceList
|
|
273
|
+
*/
|
|
274
|
+
export declare class BlueAccessDeviceList extends Message<BlueAccessDeviceList> {
|
|
275
|
+
/**
|
|
276
|
+
* @generated from field: repeated BlueAccessDevice devices = 1;
|
|
277
|
+
*/
|
|
278
|
+
devices: BlueAccessDevice[];
|
|
279
|
+
|
|
280
|
+
constructor(data?: PartialMessage<BlueAccessDeviceList>);
|
|
281
|
+
|
|
282
|
+
static readonly runtime: typeof proto2;
|
|
283
|
+
static readonly typeName = "BlueAccessDeviceList";
|
|
284
|
+
static readonly fields: FieldList;
|
|
285
|
+
|
|
286
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessDeviceList;
|
|
287
|
+
|
|
288
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessDeviceList;
|
|
289
|
+
|
|
290
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessDeviceList;
|
|
291
|
+
|
|
292
|
+
static equals(a: BlueAccessDeviceList | PlainMessage<BlueAccessDeviceList> | undefined, b: BlueAccessDeviceList | PlainMessage<BlueAccessDeviceList> | undefined): boolean;
|
|
293
|
+
}
|
|
294
|
+
|
package/es/BlueSDK_pb.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
|
|
6
6
|
import { proto2 } from "@bufbuild/protobuf";
|
|
7
|
-
import { BlueBleManufacturerInfo } from "./BlueCore_pb.js";
|
|
7
|
+
import { BlueBleManufacturerInfo, BlueCredentialId, BlueCredentialType, BlueLocalTimestamp } from "./BlueCore_pb.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @generated from enum BlueDeviceType
|
|
@@ -71,3 +71,38 @@ export const BlueDeviceInfo = proto2.makeMessageType(
|
|
|
71
71
|
],
|
|
72
72
|
);
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* @generated from message BlueAccessCredential
|
|
76
|
+
*/
|
|
77
|
+
export const BlueAccessCredential = proto2.makeMessageType(
|
|
78
|
+
"BlueAccessCredential",
|
|
79
|
+
() => [
|
|
80
|
+
{ no: 1, name: "credentialId", kind: "message", T: BlueCredentialId },
|
|
81
|
+
{ no: 2, name: "credentialType", kind: "enum", T: proto2.getEnumType(BlueCredentialType) },
|
|
82
|
+
{ no: 3, name: "validFrom", kind: "message", T: BlueLocalTimestamp, opt: true },
|
|
83
|
+
{ no: 4, name: "validTo", kind: "message", T: BlueLocalTimestamp, opt: true },
|
|
84
|
+
{ no: 5, name: "privateKey", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
85
|
+
],
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @generated from message BlueAccessDevice
|
|
90
|
+
*/
|
|
91
|
+
export const BlueAccessDevice = proto2.makeMessageType(
|
|
92
|
+
"BlueAccessDevice",
|
|
93
|
+
() => [
|
|
94
|
+
{ no: 1, name: "deviceId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
95
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
96
|
+
],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @generated from message BlueAccessDeviceList
|
|
101
|
+
*/
|
|
102
|
+
export const BlueAccessDeviceList = proto2.makeMessageType(
|
|
103
|
+
"BlueAccessDeviceList",
|
|
104
|
+
() => [
|
|
105
|
+
{ no: 1, name: "devices", kind: "message", T: BlueAccessDevice, repeated: true },
|
|
106
|
+
],
|
|
107
|
+
);
|
|
108
|
+
|
package/nanopb/BlueCore.pb.c
CHANGED
package/nanopb/BlueCore.pb.h
CHANGED
|
@@ -112,6 +112,17 @@ typedef enum BlueWeekday {
|
|
|
112
112
|
BlueWeekday_Sunday = 6
|
|
113
113
|
} BlueWeekday_t;
|
|
114
114
|
|
|
115
|
+
typedef enum BlueCredentialType {
|
|
116
|
+
/* Regular credential can only open / enter */
|
|
117
|
+
BlueCredentialType_Regular = 1,
|
|
118
|
+
/* Maintenance can open and update all locks within the site */
|
|
119
|
+
BlueCredentialType_Maintenance = 2,
|
|
120
|
+
/* Master can open all locks within the given site and requires no refresh */
|
|
121
|
+
BlueCredentialType_Master = 3,
|
|
122
|
+
/* Nfc writer allows to write any credential within this site on cards & fobs */
|
|
123
|
+
BlueCredentialType_NfcWriter = 4
|
|
124
|
+
} BlueCredentialType_t;
|
|
125
|
+
|
|
115
126
|
typedef enum BlueAccessType {
|
|
116
127
|
/* Access with default unlock time */
|
|
117
128
|
BlueAccessType_DefaultTime = 1,
|
|
@@ -689,6 +700,10 @@ extern "C" {
|
|
|
689
700
|
#define _BLUEWEEKDAY_MAX BlueWeekday_Sunday
|
|
690
701
|
#define _BLUEWEEKDAY_ARRAYSIZE ((BlueWeekday_t)(BlueWeekday_Sunday+1))
|
|
691
702
|
|
|
703
|
+
#define _BLUECREDENTIALTYPE_MIN BlueCredentialType_Regular
|
|
704
|
+
#define _BLUECREDENTIALTYPE_MAX BlueCredentialType_NfcWriter
|
|
705
|
+
#define _BLUECREDENTIALTYPE_ARRAYSIZE ((BlueCredentialType_t)(BlueCredentialType_NfcWriter+1))
|
|
706
|
+
|
|
692
707
|
#define _BLUEACCESSTYPE_MIN BlueAccessType_DefaultTime
|
|
693
708
|
#define _BLUEACCESSTYPE_MAX BlueAccessType_NoAccessBlacklisted
|
|
694
709
|
#define _BLUEACCESSTYPE_ARRAYSIZE ((BlueAccessType_t)(BlueAccessType_NoAccessBlacklisted+1))
|
package/nanopb/BlueSDK.pb.c
CHANGED
|
@@ -18,5 +18,14 @@ PB_BIND(BLUEDEVICEDETAILSUWB, BlueDeviceDetailsUWB_t, AUTO)
|
|
|
18
18
|
PB_BIND(BLUEDEVICEINFO, BlueDeviceInfo_t, AUTO)
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
PB_BIND(BLUEACCESSCREDENTIAL, BlueAccessCredential_t, AUTO)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
PB_BIND(BLUEACCESSDEVICE, BlueAccessDevice_t, AUTO)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PB_BIND(BLUEACCESSDEVICELIST, BlueAccessDeviceList_t, AUTO)
|
|
28
|
+
|
|
29
|
+
|
|
21
30
|
|
|
22
31
|
|
package/nanopb/BlueSDK.pb.h
CHANGED
|
@@ -51,6 +51,25 @@ typedef struct BlueDeviceInfo {
|
|
|
51
51
|
} details;
|
|
52
52
|
} BlueDeviceInfo_t;
|
|
53
53
|
|
|
54
|
+
typedef struct BlueAccessCredential {
|
|
55
|
+
BlueCredentialId_t credentialId;
|
|
56
|
+
BlueCredentialType_t credentialType;
|
|
57
|
+
bool has_validFrom;
|
|
58
|
+
BlueLocalTimestamp_t validFrom;
|
|
59
|
+
bool has_validTo;
|
|
60
|
+
BlueLocalTimestamp_t validTo;
|
|
61
|
+
pb_callback_t privateKey;
|
|
62
|
+
} BlueAccessCredential_t;
|
|
63
|
+
|
|
64
|
+
typedef struct BlueAccessDevice {
|
|
65
|
+
pb_callback_t deviceId;
|
|
66
|
+
pb_callback_t name;
|
|
67
|
+
} BlueAccessDevice_t;
|
|
68
|
+
|
|
69
|
+
typedef struct BlueAccessDeviceList {
|
|
70
|
+
pb_callback_t devices;
|
|
71
|
+
} BlueAccessDeviceList_t;
|
|
72
|
+
|
|
54
73
|
|
|
55
74
|
#ifdef __cplusplus
|
|
56
75
|
extern "C" {
|
|
@@ -66,16 +85,26 @@ extern "C" {
|
|
|
66
85
|
|
|
67
86
|
#define BlueDeviceInfo_t_deviceType_ENUMTYPE BlueDeviceType_t
|
|
68
87
|
|
|
88
|
+
#define BlueAccessCredential_t_credentialType_ENUMTYPE BlueCredentialType_t
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
69
92
|
|
|
70
93
|
/* Initializer values for message structs */
|
|
71
94
|
#define BLUEI18N_INIT_DEFAULT {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
|
72
95
|
#define BLUEDEVICEDETAILSBLUETOOTH_INIT_DEFAULT {0, 0, 0}
|
|
73
96
|
#define BLUEDEVICEDETAILSUWB_INIT_DEFAULT {0}
|
|
74
97
|
#define BLUEDEVICEINFO_INIT_DEFAULT {_BLUEDEVICETYPE_MIN, {{NULL}, NULL}, 0, false, BLUEBLEMANUFACTURERINFO_INIT_DEFAULT, 0, {BLUEDEVICEDETAILSBLUETOOTH_INIT_DEFAULT}}
|
|
98
|
+
#define BLUEACCESSCREDENTIAL_INIT_DEFAULT {BLUECREDENTIALID_INIT_DEFAULT, _BLUECREDENTIALTYPE_MIN, false, BLUELOCALTIMESTAMP_INIT_DEFAULT, false, BLUELOCALTIMESTAMP_INIT_DEFAULT, {{NULL}, NULL}}
|
|
99
|
+
#define BLUEACCESSDEVICE_INIT_DEFAULT {{{NULL}, NULL}, {{NULL}, NULL}}
|
|
100
|
+
#define BLUEACCESSDEVICELIST_INIT_DEFAULT {{{NULL}, NULL}}
|
|
75
101
|
#define BLUEI18N_INIT_ZERO {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
|
76
102
|
#define BLUEDEVICEDETAILSBLUETOOTH_INIT_ZERO {0, 0, 0}
|
|
77
103
|
#define BLUEDEVICEDETAILSUWB_INIT_ZERO {0}
|
|
78
104
|
#define BLUEDEVICEINFO_INIT_ZERO {_BLUEDEVICETYPE_MIN, {{NULL}, NULL}, 0, false, BLUEBLEMANUFACTURERINFO_INIT_ZERO, 0, {BLUEDEVICEDETAILSBLUETOOTH_INIT_ZERO}}
|
|
105
|
+
#define BLUEACCESSCREDENTIAL_INIT_ZERO {BLUECREDENTIALID_INIT_ZERO, _BLUECREDENTIALTYPE_MIN, false, BLUELOCALTIMESTAMP_INIT_ZERO, false, BLUELOCALTIMESTAMP_INIT_ZERO, {{NULL}, NULL}}
|
|
106
|
+
#define BLUEACCESSDEVICE_INIT_ZERO {{{NULL}, NULL}, {{NULL}, NULL}}
|
|
107
|
+
#define BLUEACCESSDEVICELIST_INIT_ZERO {{{NULL}, NULL}}
|
|
79
108
|
|
|
80
109
|
/* Field tags (for use in manual encoding/decoding) */
|
|
81
110
|
#define BLUEI18N_NFCWAITMESSAGE_TAG 1
|
|
@@ -96,6 +125,14 @@ extern "C" {
|
|
|
96
125
|
#define BLUEDEVICEINFO_MANUFACTURERINFO_TAG 4
|
|
97
126
|
#define BLUEDEVICEINFO_BLUETOOTH_TAG 5
|
|
98
127
|
#define BLUEDEVICEINFO_UWB_TAG 6
|
|
128
|
+
#define BLUEACCESSCREDENTIAL_CREDENTIALID_TAG 1
|
|
129
|
+
#define BLUEACCESSCREDENTIAL_CREDENTIALTYPE_TAG 2
|
|
130
|
+
#define BLUEACCESSCREDENTIAL_VALIDFROM_TAG 3
|
|
131
|
+
#define BLUEACCESSCREDENTIAL_VALIDTO_TAG 4
|
|
132
|
+
#define BLUEACCESSCREDENTIAL_PRIVATEKEY_TAG 5
|
|
133
|
+
#define BLUEACCESSDEVICE_DEVICEID_TAG 1
|
|
134
|
+
#define BLUEACCESSDEVICE_NAME_TAG 2
|
|
135
|
+
#define BLUEACCESSDEVICELIST_DEVICES_TAG 1
|
|
99
136
|
|
|
100
137
|
/* Struct field encoding specification for nanopb */
|
|
101
138
|
#define BLUEI18N_FIELDLIST(X, a) \
|
|
@@ -135,20 +172,53 @@ X(a, STATIC, ONEOF, MESSAGE, (details,uwb,details.uwb), 6)
|
|
|
135
172
|
#define BlueDeviceInfo_t_details_bluetooth_MSGTYPE BlueDeviceDetailsBluetooth_t
|
|
136
173
|
#define BlueDeviceInfo_t_details_uwb_MSGTYPE BlueDeviceDetailsUWB_t
|
|
137
174
|
|
|
175
|
+
#define BLUEACCESSCREDENTIAL_FIELDLIST(X, a) \
|
|
176
|
+
X(a, STATIC, REQUIRED, MESSAGE, credentialId, 1) \
|
|
177
|
+
X(a, STATIC, REQUIRED, UENUM, credentialType, 2) \
|
|
178
|
+
X(a, STATIC, OPTIONAL, MESSAGE, validFrom, 3) \
|
|
179
|
+
X(a, STATIC, OPTIONAL, MESSAGE, validTo, 4) \
|
|
180
|
+
X(a, CALLBACK, REQUIRED, BYTES, privateKey, 5)
|
|
181
|
+
#define BLUEACCESSCREDENTIAL_CALLBACK pb_default_field_callback
|
|
182
|
+
#define BLUEACCESSCREDENTIAL_DEFAULT (const pb_byte_t*)"\x10\x01\x00"
|
|
183
|
+
#define BlueAccessCredential_t_credentialId_MSGTYPE BlueCredentialId_t
|
|
184
|
+
#define BlueAccessCredential_t_validFrom_MSGTYPE BlueLocalTimestamp_t
|
|
185
|
+
#define BlueAccessCredential_t_validTo_MSGTYPE BlueLocalTimestamp_t
|
|
186
|
+
|
|
187
|
+
#define BLUEACCESSDEVICE_FIELDLIST(X, a) \
|
|
188
|
+
X(a, CALLBACK, REQUIRED, STRING, deviceId, 1) \
|
|
189
|
+
X(a, CALLBACK, OPTIONAL, STRING, name, 2)
|
|
190
|
+
#define BLUEACCESSDEVICE_CALLBACK pb_default_field_callback
|
|
191
|
+
#define BLUEACCESSDEVICE_DEFAULT NULL
|
|
192
|
+
|
|
193
|
+
#define BLUEACCESSDEVICELIST_FIELDLIST(X, a) \
|
|
194
|
+
X(a, CALLBACK, REPEATED, MESSAGE, devices, 1)
|
|
195
|
+
#define BLUEACCESSDEVICELIST_CALLBACK pb_default_field_callback
|
|
196
|
+
#define BLUEACCESSDEVICELIST_DEFAULT NULL
|
|
197
|
+
#define BlueAccessDeviceList_t_devices_MSGTYPE BlueAccessDevice_t
|
|
198
|
+
|
|
138
199
|
extern const pb_msgdesc_t BlueI18n_t_msg;
|
|
139
200
|
extern const pb_msgdesc_t BlueDeviceDetailsBluetooth_t_msg;
|
|
140
201
|
extern const pb_msgdesc_t BlueDeviceDetailsUWB_t_msg;
|
|
141
202
|
extern const pb_msgdesc_t BlueDeviceInfo_t_msg;
|
|
203
|
+
extern const pb_msgdesc_t BlueAccessCredential_t_msg;
|
|
204
|
+
extern const pb_msgdesc_t BlueAccessDevice_t_msg;
|
|
205
|
+
extern const pb_msgdesc_t BlueAccessDeviceList_t_msg;
|
|
142
206
|
|
|
143
207
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
144
208
|
#define BLUEI18N_FIELDS &BlueI18n_t_msg
|
|
145
209
|
#define BLUEDEVICEDETAILSBLUETOOTH_FIELDS &BlueDeviceDetailsBluetooth_t_msg
|
|
146
210
|
#define BLUEDEVICEDETAILSUWB_FIELDS &BlueDeviceDetailsUWB_t_msg
|
|
147
211
|
#define BLUEDEVICEINFO_FIELDS &BlueDeviceInfo_t_msg
|
|
212
|
+
#define BLUEACCESSCREDENTIAL_FIELDS &BlueAccessCredential_t_msg
|
|
213
|
+
#define BLUEACCESSDEVICE_FIELDS &BlueAccessDevice_t_msg
|
|
214
|
+
#define BLUEACCESSDEVICELIST_FIELDS &BlueAccessDeviceList_t_msg
|
|
148
215
|
|
|
149
216
|
/* Maximum encoded size of messages (where known) */
|
|
150
217
|
/* BlueI18n_size depends on runtime parameters */
|
|
151
218
|
/* BlueDeviceInfo_size depends on runtime parameters */
|
|
219
|
+
/* BlueAccessCredential_size depends on runtime parameters */
|
|
220
|
+
/* BlueAccessDevice_size depends on runtime parameters */
|
|
221
|
+
/* BlueAccessDeviceList_size depends on runtime parameters */
|
|
152
222
|
#define BLUEDEVICEDETAILSBLUETOOTH_SIZE 24
|
|
153
223
|
#define BLUEDEVICEDETAILSUWB_SIZE 2
|
|
154
224
|
|
package/package.json
CHANGED
package/swift/BlueCore.pb.swift
CHANGED
|
@@ -381,6 +381,54 @@ extension BlueWeekday: CaseIterable {
|
|
|
381
381
|
|
|
382
382
|
#endif // swift(>=4.2)
|
|
383
383
|
|
|
384
|
+
public enum BlueCredentialType: SwiftProtobuf.Enum {
|
|
385
|
+
public typealias RawValue = Int
|
|
386
|
+
|
|
387
|
+
/// Regular credential can only open / enter
|
|
388
|
+
case regular // = 1
|
|
389
|
+
|
|
390
|
+
/// Maintenance can open and update all locks within the site
|
|
391
|
+
case maintenance // = 2
|
|
392
|
+
|
|
393
|
+
/// Master can open all locks within the given site and requires no refresh
|
|
394
|
+
case master // = 3
|
|
395
|
+
|
|
396
|
+
/// Nfc writer allows to write any credential within this site on cards & fobs
|
|
397
|
+
case nfcWriter // = 4
|
|
398
|
+
|
|
399
|
+
public init() {
|
|
400
|
+
self = .regular
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
public init?(rawValue: Int) {
|
|
404
|
+
switch rawValue {
|
|
405
|
+
case 1: self = .regular
|
|
406
|
+
case 2: self = .maintenance
|
|
407
|
+
case 3: self = .master
|
|
408
|
+
case 4: self = .nfcWriter
|
|
409
|
+
default: return nil
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
public var rawValue: Int {
|
|
414
|
+
switch self {
|
|
415
|
+
case .regular: return 1
|
|
416
|
+
case .maintenance: return 2
|
|
417
|
+
case .master: return 3
|
|
418
|
+
case .nfcWriter: return 4
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
#if swift(>=4.2)
|
|
425
|
+
|
|
426
|
+
extension BlueCredentialType: CaseIterable {
|
|
427
|
+
// Support synthesized by the compiler.
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
#endif // swift(>=4.2)
|
|
431
|
+
|
|
384
432
|
public enum BlueAccessType: SwiftProtobuf.Enum {
|
|
385
433
|
public typealias RawValue = Int
|
|
386
434
|
|
|
@@ -3361,6 +3409,7 @@ public struct _BlueTestEncodeDecode {
|
|
|
3361
3409
|
extension BlueReturnCode: @unchecked Sendable {}
|
|
3362
3410
|
extension BlueTimeUnit: @unchecked Sendable {}
|
|
3363
3411
|
extension BlueWeekday: @unchecked Sendable {}
|
|
3412
|
+
extension BlueCredentialType: @unchecked Sendable {}
|
|
3364
3413
|
extension BlueAccessType: @unchecked Sendable {}
|
|
3365
3414
|
extension BlueTransponderType: @unchecked Sendable {}
|
|
3366
3415
|
extension BlueHardwareType: @unchecked Sendable {}
|
|
@@ -3535,6 +3584,15 @@ extension BlueWeekday: SwiftProtobuf._ProtoNameProviding {
|
|
|
3535
3584
|
]
|
|
3536
3585
|
}
|
|
3537
3586
|
|
|
3587
|
+
extension BlueCredentialType: SwiftProtobuf._ProtoNameProviding {
|
|
3588
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
3589
|
+
1: .same(proto: "Regular"),
|
|
3590
|
+
2: .same(proto: "Maintenance"),
|
|
3591
|
+
3: .same(proto: "Master"),
|
|
3592
|
+
4: .same(proto: "NfcWriter"),
|
|
3593
|
+
]
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3538
3596
|
extension BlueAccessType: SwiftProtobuf._ProtoNameProviding {
|
|
3539
3597
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
3540
3598
|
1: .same(proto: "DefaultTime"),
|
package/swift/BlueSDK.pb.swift
CHANGED
|
@@ -316,6 +316,110 @@ public struct BlueDeviceInfo {
|
|
|
316
316
|
fileprivate var _manufacturerInfo: BlueBleManufacturerInfo? = nil
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
public struct BlueAccessCredential {
|
|
320
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
321
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
322
|
+
// methods supported on all messages.
|
|
323
|
+
|
|
324
|
+
public var credentialID: BlueCredentialId {
|
|
325
|
+
get {return _credentialID ?? BlueCredentialId()}
|
|
326
|
+
set {_credentialID = newValue}
|
|
327
|
+
}
|
|
328
|
+
/// Returns true if `credentialID` has been explicitly set.
|
|
329
|
+
public var hasCredentialID: Bool {return self._credentialID != nil}
|
|
330
|
+
/// Clears the value of `credentialID`. Subsequent reads from it will return its default value.
|
|
331
|
+
public mutating func clearCredentialID() {self._credentialID = nil}
|
|
332
|
+
|
|
333
|
+
public var credentialType: BlueCredentialType {
|
|
334
|
+
get {return _credentialType ?? .regular}
|
|
335
|
+
set {_credentialType = newValue}
|
|
336
|
+
}
|
|
337
|
+
/// Returns true if `credentialType` has been explicitly set.
|
|
338
|
+
public var hasCredentialType: Bool {return self._credentialType != nil}
|
|
339
|
+
/// Clears the value of `credentialType`. Subsequent reads from it will return its default value.
|
|
340
|
+
public mutating func clearCredentialType() {self._credentialType = nil}
|
|
341
|
+
|
|
342
|
+
public var validFrom: BlueLocalTimestamp {
|
|
343
|
+
get {return _validFrom ?? BlueLocalTimestamp()}
|
|
344
|
+
set {_validFrom = newValue}
|
|
345
|
+
}
|
|
346
|
+
/// Returns true if `validFrom` has been explicitly set.
|
|
347
|
+
public var hasValidFrom: Bool {return self._validFrom != nil}
|
|
348
|
+
/// Clears the value of `validFrom`. Subsequent reads from it will return its default value.
|
|
349
|
+
public mutating func clearValidFrom() {self._validFrom = nil}
|
|
350
|
+
|
|
351
|
+
public var validTo: BlueLocalTimestamp {
|
|
352
|
+
get {return _validTo ?? BlueLocalTimestamp()}
|
|
353
|
+
set {_validTo = newValue}
|
|
354
|
+
}
|
|
355
|
+
/// Returns true if `validTo` has been explicitly set.
|
|
356
|
+
public var hasValidTo: Bool {return self._validTo != nil}
|
|
357
|
+
/// Clears the value of `validTo`. Subsequent reads from it will return its default value.
|
|
358
|
+
public mutating func clearValidTo() {self._validTo = nil}
|
|
359
|
+
|
|
360
|
+
public var privateKey: Data {
|
|
361
|
+
get {return _privateKey ?? Data()}
|
|
362
|
+
set {_privateKey = newValue}
|
|
363
|
+
}
|
|
364
|
+
/// Returns true if `privateKey` has been explicitly set.
|
|
365
|
+
public var hasPrivateKey: Bool {return self._privateKey != nil}
|
|
366
|
+
/// Clears the value of `privateKey`. Subsequent reads from it will return its default value.
|
|
367
|
+
public mutating func clearPrivateKey() {self._privateKey = nil}
|
|
368
|
+
|
|
369
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
370
|
+
|
|
371
|
+
public init() {}
|
|
372
|
+
|
|
373
|
+
fileprivate var _credentialID: BlueCredentialId? = nil
|
|
374
|
+
fileprivate var _credentialType: BlueCredentialType? = nil
|
|
375
|
+
fileprivate var _validFrom: BlueLocalTimestamp? = nil
|
|
376
|
+
fileprivate var _validTo: BlueLocalTimestamp? = nil
|
|
377
|
+
fileprivate var _privateKey: Data? = nil
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
public struct BlueAccessDevice {
|
|
381
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
382
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
383
|
+
// methods supported on all messages.
|
|
384
|
+
|
|
385
|
+
public var deviceID: String {
|
|
386
|
+
get {return _deviceID ?? String()}
|
|
387
|
+
set {_deviceID = newValue}
|
|
388
|
+
}
|
|
389
|
+
/// Returns true if `deviceID` has been explicitly set.
|
|
390
|
+
public var hasDeviceID: Bool {return self._deviceID != nil}
|
|
391
|
+
/// Clears the value of `deviceID`. Subsequent reads from it will return its default value.
|
|
392
|
+
public mutating func clearDeviceID() {self._deviceID = nil}
|
|
393
|
+
|
|
394
|
+
public var name: String {
|
|
395
|
+
get {return _name ?? String()}
|
|
396
|
+
set {_name = newValue}
|
|
397
|
+
}
|
|
398
|
+
/// Returns true if `name` has been explicitly set.
|
|
399
|
+
public var hasName: Bool {return self._name != nil}
|
|
400
|
+
/// Clears the value of `name`. Subsequent reads from it will return its default value.
|
|
401
|
+
public mutating func clearName() {self._name = nil}
|
|
402
|
+
|
|
403
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
404
|
+
|
|
405
|
+
public init() {}
|
|
406
|
+
|
|
407
|
+
fileprivate var _deviceID: String? = nil
|
|
408
|
+
fileprivate var _name: String? = nil
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
public struct BlueAccessDeviceList {
|
|
412
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
413
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
414
|
+
// methods supported on all messages.
|
|
415
|
+
|
|
416
|
+
public var devices: [BlueAccessDevice] = []
|
|
417
|
+
|
|
418
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
419
|
+
|
|
420
|
+
public init() {}
|
|
421
|
+
}
|
|
422
|
+
|
|
319
423
|
#if swift(>=5.5) && canImport(_Concurrency)
|
|
320
424
|
extension BlueDeviceType: @unchecked Sendable {}
|
|
321
425
|
extension BlueI18n: @unchecked Sendable {}
|
|
@@ -323,6 +427,9 @@ extension BlueDeviceDetailsBluetooth: @unchecked Sendable {}
|
|
|
323
427
|
extension BlueDeviceDetailsUWB: @unchecked Sendable {}
|
|
324
428
|
extension BlueDeviceInfo: @unchecked Sendable {}
|
|
325
429
|
extension BlueDeviceInfo.OneOf_Details: @unchecked Sendable {}
|
|
430
|
+
extension BlueAccessCredential: @unchecked Sendable {}
|
|
431
|
+
extension BlueAccessDevice: @unchecked Sendable {}
|
|
432
|
+
extension BlueAccessDeviceList: @unchecked Sendable {}
|
|
326
433
|
#endif // swift(>=5.5) && canImport(_Concurrency)
|
|
327
434
|
|
|
328
435
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
@@ -622,3 +729,157 @@ extension BlueDeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
|
|
|
622
729
|
return true
|
|
623
730
|
}
|
|
624
731
|
}
|
|
732
|
+
|
|
733
|
+
extension BlueAccessCredential: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
734
|
+
public static let protoMessageName: String = "BlueAccessCredential"
|
|
735
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
736
|
+
1: .same(proto: "credentialId"),
|
|
737
|
+
2: .same(proto: "credentialType"),
|
|
738
|
+
3: .same(proto: "validFrom"),
|
|
739
|
+
4: .same(proto: "validTo"),
|
|
740
|
+
5: .same(proto: "privateKey"),
|
|
741
|
+
]
|
|
742
|
+
|
|
743
|
+
public var isInitialized: Bool {
|
|
744
|
+
if self._credentialID == nil {return false}
|
|
745
|
+
if self._credentialType == nil {return false}
|
|
746
|
+
if self._privateKey == nil {return false}
|
|
747
|
+
if let v = self._credentialID, !v.isInitialized {return false}
|
|
748
|
+
if let v = self._validFrom, !v.isInitialized {return false}
|
|
749
|
+
if let v = self._validTo, !v.isInitialized {return false}
|
|
750
|
+
return true
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
754
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
755
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
756
|
+
// allocates stack space for every case branch when no optimizations are
|
|
757
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
758
|
+
switch fieldNumber {
|
|
759
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._credentialID) }()
|
|
760
|
+
case 2: try { try decoder.decodeSingularEnumField(value: &self._credentialType) }()
|
|
761
|
+
case 3: try { try decoder.decodeSingularMessageField(value: &self._validFrom) }()
|
|
762
|
+
case 4: try { try decoder.decodeSingularMessageField(value: &self._validTo) }()
|
|
763
|
+
case 5: try { try decoder.decodeSingularBytesField(value: &self._privateKey) }()
|
|
764
|
+
default: break
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
770
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
771
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
772
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
773
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
774
|
+
try { if let v = self._credentialID {
|
|
775
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
776
|
+
} }()
|
|
777
|
+
try { if let v = self._credentialType {
|
|
778
|
+
try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
|
|
779
|
+
} }()
|
|
780
|
+
try { if let v = self._validFrom {
|
|
781
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
|
782
|
+
} }()
|
|
783
|
+
try { if let v = self._validTo {
|
|
784
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
|
785
|
+
} }()
|
|
786
|
+
try { if let v = self._privateKey {
|
|
787
|
+
try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
|
|
788
|
+
} }()
|
|
789
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
public static func ==(lhs: BlueAccessCredential, rhs: BlueAccessCredential) -> Bool {
|
|
793
|
+
if lhs._credentialID != rhs._credentialID {return false}
|
|
794
|
+
if lhs._credentialType != rhs._credentialType {return false}
|
|
795
|
+
if lhs._validFrom != rhs._validFrom {return false}
|
|
796
|
+
if lhs._validTo != rhs._validTo {return false}
|
|
797
|
+
if lhs._privateKey != rhs._privateKey {return false}
|
|
798
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
799
|
+
return true
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
extension BlueAccessDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
804
|
+
public static let protoMessageName: String = "BlueAccessDevice"
|
|
805
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
806
|
+
1: .same(proto: "deviceId"),
|
|
807
|
+
2: .same(proto: "name"),
|
|
808
|
+
]
|
|
809
|
+
|
|
810
|
+
public var isInitialized: Bool {
|
|
811
|
+
if self._deviceID == nil {return false}
|
|
812
|
+
return true
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
816
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
817
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
818
|
+
// allocates stack space for every case branch when no optimizations are
|
|
819
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
820
|
+
switch fieldNumber {
|
|
821
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self._deviceID) }()
|
|
822
|
+
case 2: try { try decoder.decodeSingularStringField(value: &self._name) }()
|
|
823
|
+
default: break
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
829
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
830
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
831
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
832
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
833
|
+
try { if let v = self._deviceID {
|
|
834
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
|
|
835
|
+
} }()
|
|
836
|
+
try { if let v = self._name {
|
|
837
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
|
|
838
|
+
} }()
|
|
839
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
public static func ==(lhs: BlueAccessDevice, rhs: BlueAccessDevice) -> Bool {
|
|
843
|
+
if lhs._deviceID != rhs._deviceID {return false}
|
|
844
|
+
if lhs._name != rhs._name {return false}
|
|
845
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
846
|
+
return true
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
extension BlueAccessDeviceList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
851
|
+
public static let protoMessageName: String = "BlueAccessDeviceList"
|
|
852
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
853
|
+
1: .same(proto: "devices"),
|
|
854
|
+
]
|
|
855
|
+
|
|
856
|
+
public var isInitialized: Bool {
|
|
857
|
+
if !SwiftProtobuf.Internal.areAllInitialized(self.devices) {return false}
|
|
858
|
+
return true
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
862
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
863
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
864
|
+
// allocates stack space for every case branch when no optimizations are
|
|
865
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
866
|
+
switch fieldNumber {
|
|
867
|
+
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.devices) }()
|
|
868
|
+
default: break
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
874
|
+
if !self.devices.isEmpty {
|
|
875
|
+
try visitor.visitRepeatedMessageField(value: self.devices, fieldNumber: 1)
|
|
876
|
+
}
|
|
877
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
public static func ==(lhs: BlueAccessDeviceList, rhs: BlueAccessDeviceList) -> Bool {
|
|
881
|
+
if lhs.devices != rhs.devices {return false}
|
|
882
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
883
|
+
return true
|
|
884
|
+
}
|
|
885
|
+
}
|