@blueid/access-proto 0.24.0 → 0.25.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/BlueSDK.proto CHANGED
@@ -64,7 +64,11 @@ message BlueAccessCredential {
64
64
  required BlueCredentialType credentialType = 2;
65
65
  optional BlueLocalTimestamp validFrom = 3;
66
66
  optional BlueLocalTimestamp validTo = 4;
67
- required bytes privateKey = 5;
67
+ optional bytes privateKey = 5;
68
+ }
69
+
70
+ message BlueAccessCredentialList {
71
+ repeated BlueAccessCredential credentials = 1;
68
72
  }
69
73
 
70
74
  message BlueAccessDevice {
@@ -220,9 +220,9 @@ export declare class BlueAccessCredential extends Message<BlueAccessCredential>
220
220
  validTo?: BlueLocalTimestamp;
221
221
 
222
222
  /**
223
- * @generated from field: required bytes privateKey = 5;
223
+ * @generated from field: optional bytes privateKey = 5;
224
224
  */
225
- privateKey: Uint8Array;
225
+ privateKey?: Uint8Array;
226
226
 
227
227
  constructor(data?: PartialMessage<BlueAccessCredential>);
228
228
 
@@ -239,6 +239,30 @@ export declare class BlueAccessCredential extends Message<BlueAccessCredential>
239
239
  static equals(a: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined, b: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined): boolean;
240
240
  }
241
241
 
242
+ /**
243
+ * @generated from message BlueAccessCredentialList
244
+ */
245
+ export declare class BlueAccessCredentialList extends Message<BlueAccessCredentialList> {
246
+ /**
247
+ * @generated from field: repeated BlueAccessCredential credentials = 1;
248
+ */
249
+ credentials: BlueAccessCredential[];
250
+
251
+ constructor(data?: PartialMessage<BlueAccessCredentialList>);
252
+
253
+ static readonly runtime: typeof proto2;
254
+ static readonly typeName = "BlueAccessCredentialList";
255
+ static readonly fields: FieldList;
256
+
257
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessCredentialList;
258
+
259
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessCredentialList;
260
+
261
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessCredentialList;
262
+
263
+ static equals(a: BlueAccessCredentialList | PlainMessage<BlueAccessCredentialList> | undefined, b: BlueAccessCredentialList | PlainMessage<BlueAccessCredentialList> | undefined): boolean;
264
+ }
265
+
242
266
  /**
243
267
  * @generated from message BlueAccessDevice
244
268
  */
package/cjs/BlueSDK_pb.js CHANGED
@@ -18,6 +18,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
18
18
  var BlueSDK_pb_exports = {};
19
19
  __export(BlueSDK_pb_exports, {
20
20
  BlueAccessCredential: () => BlueAccessCredential,
21
+ BlueAccessCredentialList: () => BlueAccessCredentialList,
21
22
  BlueAccessDevice: () => BlueAccessDevice,
22
23
  BlueAccessDeviceList: () => BlueAccessDeviceList,
23
24
  BlueDeviceDetailsBluetooth: () => BlueDeviceDetailsBluetooth,
@@ -117,13 +118,13 @@ const BlueAccessCredential = import_protobuf.proto2.makeMessageType(
117
118
  { no: 2, name: "credentialType", kind: "enum", T: import_protobuf.proto2.getEnumType(import_BlueCore_pb.BlueCredentialType) },
118
119
  { no: 3, name: "validFrom", kind: "message", T: import_BlueCore_pb.BlueLocalTimestamp, opt: true },
119
120
  { 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
- }
121
+ { no: 5, name: "privateKey", kind: "scalar", T: 12, opt: true }
122
+ ]
123
+ );
124
+ const BlueAccessCredentialList = import_protobuf.proto2.makeMessageType(
125
+ "BlueAccessCredentialList",
126
+ () => [
127
+ { no: 1, name: "credentials", kind: "message", T: BlueAccessCredential, repeated: true }
127
128
  ]
128
129
  );
129
130
  const BlueAccessDevice = import_protobuf.proto2.makeMessageType(
@@ -220,9 +220,9 @@ export declare class BlueAccessCredential extends Message<BlueAccessCredential>
220
220
  validTo?: BlueLocalTimestamp;
221
221
 
222
222
  /**
223
- * @generated from field: required bytes privateKey = 5;
223
+ * @generated from field: optional bytes privateKey = 5;
224
224
  */
225
- privateKey: Uint8Array;
225
+ privateKey?: Uint8Array;
226
226
 
227
227
  constructor(data?: PartialMessage<BlueAccessCredential>);
228
228
 
@@ -239,6 +239,30 @@ export declare class BlueAccessCredential extends Message<BlueAccessCredential>
239
239
  static equals(a: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined, b: BlueAccessCredential | PlainMessage<BlueAccessCredential> | undefined): boolean;
240
240
  }
241
241
 
242
+ /**
243
+ * @generated from message BlueAccessCredentialList
244
+ */
245
+ export declare class BlueAccessCredentialList extends Message<BlueAccessCredentialList> {
246
+ /**
247
+ * @generated from field: repeated BlueAccessCredential credentials = 1;
248
+ */
249
+ credentials: BlueAccessCredential[];
250
+
251
+ constructor(data?: PartialMessage<BlueAccessCredentialList>);
252
+
253
+ static readonly runtime: typeof proto2;
254
+ static readonly typeName = "BlueAccessCredentialList";
255
+ static readonly fields: FieldList;
256
+
257
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BlueAccessCredentialList;
258
+
259
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BlueAccessCredentialList;
260
+
261
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BlueAccessCredentialList;
262
+
263
+ static equals(a: BlueAccessCredentialList | PlainMessage<BlueAccessCredentialList> | undefined, b: BlueAccessCredentialList | PlainMessage<BlueAccessCredentialList> | undefined): boolean;
264
+ }
265
+
242
266
  /**
243
267
  * @generated from message BlueAccessDevice
244
268
  */
package/es/BlueSDK_pb.js CHANGED
@@ -81,7 +81,17 @@ export const BlueAccessCredential = proto2.makeMessageType(
81
81
  { no: 2, name: "credentialType", kind: "enum", T: proto2.getEnumType(BlueCredentialType) },
82
82
  { no: 3, name: "validFrom", kind: "message", T: BlueLocalTimestamp, opt: true },
83
83
  { no: 4, name: "validTo", kind: "message", T: BlueLocalTimestamp, opt: true },
84
- { no: 5, name: "privateKey", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
84
+ { no: 5, name: "privateKey", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
85
+ ],
86
+ );
87
+
88
+ /**
89
+ * @generated from message BlueAccessCredentialList
90
+ */
91
+ export const BlueAccessCredentialList = proto2.makeMessageType(
92
+ "BlueAccessCredentialList",
93
+ () => [
94
+ { no: 1, name: "credentials", kind: "message", T: BlueAccessCredential, repeated: true },
85
95
  ],
86
96
  );
87
97
 
@@ -21,6 +21,9 @@ PB_BIND(BLUEDEVICEINFO, BlueDeviceInfo_t, AUTO)
21
21
  PB_BIND(BLUEACCESSCREDENTIAL, BlueAccessCredential_t, AUTO)
22
22
 
23
23
 
24
+ PB_BIND(BLUEACCESSCREDENTIALLIST, BlueAccessCredentialList_t, AUTO)
25
+
26
+
24
27
  PB_BIND(BLUEACCESSDEVICE, BlueAccessDevice_t, AUTO)
25
28
 
26
29
 
@@ -61,6 +61,10 @@ typedef struct BlueAccessCredential {
61
61
  pb_callback_t privateKey;
62
62
  } BlueAccessCredential_t;
63
63
 
64
+ typedef struct BlueAccessCredentialList {
65
+ pb_callback_t credentials;
66
+ } BlueAccessCredentialList_t;
67
+
64
68
  typedef struct BlueAccessDevice {
65
69
  pb_callback_t deviceId;
66
70
  pb_callback_t name;
@@ -90,12 +94,14 @@ extern "C" {
90
94
 
91
95
 
92
96
 
97
+
93
98
  /* Initializer values for message structs */
94
99
  #define BLUEI18N_INIT_DEFAULT {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
95
100
  #define BLUEDEVICEDETAILSBLUETOOTH_INIT_DEFAULT {0, 0, 0}
96
101
  #define BLUEDEVICEDETAILSUWB_INIT_DEFAULT {0}
97
102
  #define BLUEDEVICEINFO_INIT_DEFAULT {_BLUEDEVICETYPE_MIN, {{NULL}, NULL}, 0, false, BLUEBLEMANUFACTURERINFO_INIT_DEFAULT, 0, {BLUEDEVICEDETAILSBLUETOOTH_INIT_DEFAULT}}
98
103
  #define BLUEACCESSCREDENTIAL_INIT_DEFAULT {BLUECREDENTIALID_INIT_DEFAULT, _BLUECREDENTIALTYPE_MIN, false, BLUELOCALTIMESTAMP_INIT_DEFAULT, false, BLUELOCALTIMESTAMP_INIT_DEFAULT, {{NULL}, NULL}}
104
+ #define BLUEACCESSCREDENTIALLIST_INIT_DEFAULT {{{NULL}, NULL}}
99
105
  #define BLUEACCESSDEVICE_INIT_DEFAULT {{{NULL}, NULL}, {{NULL}, NULL}}
100
106
  #define BLUEACCESSDEVICELIST_INIT_DEFAULT {{{NULL}, NULL}}
101
107
  #define BLUEI18N_INIT_ZERO {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
@@ -103,6 +109,7 @@ extern "C" {
103
109
  #define BLUEDEVICEDETAILSUWB_INIT_ZERO {0}
104
110
  #define BLUEDEVICEINFO_INIT_ZERO {_BLUEDEVICETYPE_MIN, {{NULL}, NULL}, 0, false, BLUEBLEMANUFACTURERINFO_INIT_ZERO, 0, {BLUEDEVICEDETAILSBLUETOOTH_INIT_ZERO}}
105
111
  #define BLUEACCESSCREDENTIAL_INIT_ZERO {BLUECREDENTIALID_INIT_ZERO, _BLUECREDENTIALTYPE_MIN, false, BLUELOCALTIMESTAMP_INIT_ZERO, false, BLUELOCALTIMESTAMP_INIT_ZERO, {{NULL}, NULL}}
112
+ #define BLUEACCESSCREDENTIALLIST_INIT_ZERO {{{NULL}, NULL}}
106
113
  #define BLUEACCESSDEVICE_INIT_ZERO {{{NULL}, NULL}, {{NULL}, NULL}}
107
114
  #define BLUEACCESSDEVICELIST_INIT_ZERO {{{NULL}, NULL}}
108
115
 
@@ -130,6 +137,7 @@ extern "C" {
130
137
  #define BLUEACCESSCREDENTIAL_VALIDFROM_TAG 3
131
138
  #define BLUEACCESSCREDENTIAL_VALIDTO_TAG 4
132
139
  #define BLUEACCESSCREDENTIAL_PRIVATEKEY_TAG 5
140
+ #define BLUEACCESSCREDENTIALLIST_CREDENTIALS_TAG 1
133
141
  #define BLUEACCESSDEVICE_DEVICEID_TAG 1
134
142
  #define BLUEACCESSDEVICE_NAME_TAG 2
135
143
  #define BLUEACCESSDEVICELIST_DEVICES_TAG 1
@@ -177,13 +185,19 @@ X(a, STATIC, REQUIRED, MESSAGE, credentialId, 1) \
177
185
  X(a, STATIC, REQUIRED, UENUM, credentialType, 2) \
178
186
  X(a, STATIC, OPTIONAL, MESSAGE, validFrom, 3) \
179
187
  X(a, STATIC, OPTIONAL, MESSAGE, validTo, 4) \
180
- X(a, CALLBACK, REQUIRED, BYTES, privateKey, 5)
188
+ X(a, CALLBACK, OPTIONAL, BYTES, privateKey, 5)
181
189
  #define BLUEACCESSCREDENTIAL_CALLBACK pb_default_field_callback
182
190
  #define BLUEACCESSCREDENTIAL_DEFAULT (const pb_byte_t*)"\x10\x01\x00"
183
191
  #define BlueAccessCredential_t_credentialId_MSGTYPE BlueCredentialId_t
184
192
  #define BlueAccessCredential_t_validFrom_MSGTYPE BlueLocalTimestamp_t
185
193
  #define BlueAccessCredential_t_validTo_MSGTYPE BlueLocalTimestamp_t
186
194
 
195
+ #define BLUEACCESSCREDENTIALLIST_FIELDLIST(X, a) \
196
+ X(a, CALLBACK, REPEATED, MESSAGE, credentials, 1)
197
+ #define BLUEACCESSCREDENTIALLIST_CALLBACK pb_default_field_callback
198
+ #define BLUEACCESSCREDENTIALLIST_DEFAULT NULL
199
+ #define BlueAccessCredentialList_t_credentials_MSGTYPE BlueAccessCredential_t
200
+
187
201
  #define BLUEACCESSDEVICE_FIELDLIST(X, a) \
188
202
  X(a, CALLBACK, REQUIRED, STRING, deviceId, 1) \
189
203
  X(a, CALLBACK, OPTIONAL, STRING, name, 2)
@@ -201,6 +215,7 @@ extern const pb_msgdesc_t BlueDeviceDetailsBluetooth_t_msg;
201
215
  extern const pb_msgdesc_t BlueDeviceDetailsUWB_t_msg;
202
216
  extern const pb_msgdesc_t BlueDeviceInfo_t_msg;
203
217
  extern const pb_msgdesc_t BlueAccessCredential_t_msg;
218
+ extern const pb_msgdesc_t BlueAccessCredentialList_t_msg;
204
219
  extern const pb_msgdesc_t BlueAccessDevice_t_msg;
205
220
  extern const pb_msgdesc_t BlueAccessDeviceList_t_msg;
206
221
 
@@ -210,6 +225,7 @@ extern const pb_msgdesc_t BlueAccessDeviceList_t_msg;
210
225
  #define BLUEDEVICEDETAILSUWB_FIELDS &BlueDeviceDetailsUWB_t_msg
211
226
  #define BLUEDEVICEINFO_FIELDS &BlueDeviceInfo_t_msg
212
227
  #define BLUEACCESSCREDENTIAL_FIELDS &BlueAccessCredential_t_msg
228
+ #define BLUEACCESSCREDENTIALLIST_FIELDS &BlueAccessCredentialList_t_msg
213
229
  #define BLUEACCESSDEVICE_FIELDS &BlueAccessDevice_t_msg
214
230
  #define BLUEACCESSDEVICELIST_FIELDS &BlueAccessDeviceList_t_msg
215
231
 
@@ -217,6 +233,7 @@ extern const pb_msgdesc_t BlueAccessDeviceList_t_msg;
217
233
  /* BlueI18n_size depends on runtime parameters */
218
234
  /* BlueDeviceInfo_size depends on runtime parameters */
219
235
  /* BlueAccessCredential_size depends on runtime parameters */
236
+ /* BlueAccessCredentialList_size depends on runtime parameters */
220
237
  /* BlueAccessDevice_size depends on runtime parameters */
221
238
  /* BlueAccessDeviceList_size depends on runtime parameters */
222
239
  #define BLUEDEVICEDETAILSBLUETOOTH_SIZE 24
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueid/access-proto",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "BlueID Access Proto files",
5
5
  "author": "BlueID GmbH",
6
6
  "main": "cjs/index.js",
@@ -377,6 +377,18 @@ public struct BlueAccessCredential {
377
377
  fileprivate var _privateKey: Data? = nil
378
378
  }
379
379
 
380
+ public struct BlueAccessCredentialList {
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 credentials: [BlueAccessCredential] = []
386
+
387
+ public var unknownFields = SwiftProtobuf.UnknownStorage()
388
+
389
+ public init() {}
390
+ }
391
+
380
392
  public struct BlueAccessDevice {
381
393
  // SwiftProtobuf.Message conformance is added in an extension below. See the
382
394
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -428,6 +440,7 @@ extension BlueDeviceDetailsUWB: @unchecked Sendable {}
428
440
  extension BlueDeviceInfo: @unchecked Sendable {}
429
441
  extension BlueDeviceInfo.OneOf_Details: @unchecked Sendable {}
430
442
  extension BlueAccessCredential: @unchecked Sendable {}
443
+ extension BlueAccessCredentialList: @unchecked Sendable {}
431
444
  extension BlueAccessDevice: @unchecked Sendable {}
432
445
  extension BlueAccessDeviceList: @unchecked Sendable {}
433
446
  #endif // swift(>=5.5) && canImport(_Concurrency)
@@ -743,7 +756,6 @@ extension BlueAccessCredential: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
743
756
  public var isInitialized: Bool {
744
757
  if self._credentialID == nil {return false}
745
758
  if self._credentialType == nil {return false}
746
- if self._privateKey == nil {return false}
747
759
  if let v = self._credentialID, !v.isInitialized {return false}
748
760
  if let v = self._validFrom, !v.isInitialized {return false}
749
761
  if let v = self._validTo, !v.isInitialized {return false}
@@ -800,6 +812,43 @@ extension BlueAccessCredential: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
800
812
  }
801
813
  }
802
814
 
815
+ extension BlueAccessCredentialList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
816
+ public static let protoMessageName: String = "BlueAccessCredentialList"
817
+ public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
818
+ 1: .same(proto: "credentials"),
819
+ ]
820
+
821
+ public var isInitialized: Bool {
822
+ if !SwiftProtobuf.Internal.areAllInitialized(self.credentials) {return false}
823
+ return true
824
+ }
825
+
826
+ public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
827
+ while let fieldNumber = try decoder.nextFieldNumber() {
828
+ // The use of inline closures is to circumvent an issue where the compiler
829
+ // allocates stack space for every case branch when no optimizations are
830
+ // enabled. https://github.com/apple/swift-protobuf/issues/1034
831
+ switch fieldNumber {
832
+ case 1: try { try decoder.decodeRepeatedMessageField(value: &self.credentials) }()
833
+ default: break
834
+ }
835
+ }
836
+ }
837
+
838
+ public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
839
+ if !self.credentials.isEmpty {
840
+ try visitor.visitRepeatedMessageField(value: self.credentials, fieldNumber: 1)
841
+ }
842
+ try unknownFields.traverse(visitor: &visitor)
843
+ }
844
+
845
+ public static func ==(lhs: BlueAccessCredentialList, rhs: BlueAccessCredentialList) -> Bool {
846
+ if lhs.credentials != rhs.credentials {return false}
847
+ if lhs.unknownFields != rhs.unknownFields {return false}
848
+ return true
849
+ }
850
+ }
851
+
803
852
  extension BlueAccessDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
804
853
  public static let protoMessageName: String = "BlueAccessDevice"
805
854
  public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [